Skip to content

refactor(triage): let a policy turn labels off (CL-12165) - #851

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-12165-make-labels-off-by-default-for-new-workspaces
Nov 5, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-12165-make-labels-off-by-default-for-new-workspaces

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

A parsed policy now carries its verdict label names as optional (labels?: VerdictLabels). Absent means Triage writes no labels. Every label writer reads that one field:

  • the verdict, waiting, closed and degraded marks, including the failed-run label
  • the unready pass
  • the hub's close action
  • postingKinds, so a policy without labels needs no label grant
  • the policy export and the portal's policy view

render.ts now takes the label names from the policy instead of the hard-coded defaults.

A policy file, a shared policy and an extending policy all accept labels: true. With extends, the repository's own labels key wins; without one, the shared policy decides.

There is no behaviour change yet. A missing labels key, or no policy at all, still gives the three default labels. Turning that default off follows separately. No user docs change here, because the default is unchanged.

Verification

  • bun run check and bun run lint pass.
  • bun --conditions=intx-src test packages/triage-contracts packages/triage-workflows packages/triage-manager packages/github-tool tests/model tests/policy-corpus gives 540 pass, 0 fail.
  • Parsing a policy file confirmed that labels: true and a missing key give the default names, a rename map keeps its names, and labels: false is refused with "labels must be true, or a mapping of pass, fail and unsure".

Refs CL-12165

@linear-code

linear-code Bot commented Nov 5, 2026

Copy link
Copy Markdown

CL-12165

@corbits-triage

corbits-triage Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Merged before Triage finished on 066e5ec.

@TheGreatAxios
TheGreatAxios merged commit b583c3c into main Nov 5, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant