Skip to content

fix(triage): show progress only in the comment and set the verdict label once (CL-12164) - #850

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-12164-show-triages-progress-only-in-its-comment-and-set-the
Nov 5, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-12164-show-triages-progress-only-in-its-comment-and-set-the

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Triage no longer adds waiting labels. Its comment is now the only place that shows what it is waiting for. A new commit takes the verdict label off once, and Triage puts the new verdict's label on when it decides that commit. Other events on the same commit write no labels.

  • Deleted WAITING_LABELS and the waiting-label writes. The waiting mark now writes only the in-progress comment, plus the Bitbucket build status, which keeps "Triage: Waiting for CI" as a local constant.
  • unready now runs only on the first pass on a head. The manager's take marks that pass with newHead, and the step removes the verdict labels then.
  • Moved the three waiting label names into RETIRED_LABELS, so the mirror removes any left on a pull request the next time it writes a verdict.
  • Removed the mirror's keep input, which only the waiting mark used.
  • Model check, filed under R3, fails if:
    • Triage adds any label other than a verdict label or Failed to Run;
    • a verdict label is on a new head before that head's verdict;
    • a label is written on a head that already has a verdict when the verdict did not change.
  • R7's label half is removed. INVARIANTS.md and the User Manual are updated to match.

Verification

  • bun run check and bun run lint are clean (no new warnings).
  • bun --conditions=intx-src test packages/triage-workflows packages/triage-manager packages/github-tool tests/model: 281 pass, run against local Postgres.
  • bun --conditions=intx-src test --parallel=2 tests/chain: 13 pass.

Closes CL-12164

@linear-code

linear-code Bot commented Nov 5, 2026

Copy link
Copy Markdown

CL-12164

@corbits-triage

corbits-triage Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Merged before Triage finished on 370fac2.

@corbits-triage corbits-triage Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 · Tool descriptions still mention the removed keep label · packages/github-tool/src/sidecar-bundle.ts:189

This change removes the keep field from MIRROR_FIELDS and from dispatch. The github_mirror and github_mirror_auto descriptions still say labels are synced "unless it carries a keep label". The tool contract now describes behavior that no input can trigger, which can mislead callers or agents reading the schema.

A caller or agent reads the github_mirror or github_mirror_auto description and expects to be able to pass keep labels.

Resolve this comment. Triage will not finish while it is open.

*/
export function closedMark(source: RepoSource, { repo, number, headSha, merged }: { repo: string; number: number; headSha: string; merged: boolean }, automatic: readonly unknown[], labels: Record<VerdictWord, string>, appLogin: string | undefined): WaitingMark | undefined {
export function closedMark(source: RepoSource, { repo, number, headSha, merged }: Head & { merged: boolean }, automatic: readonly unknown[], labels: Record<VerdictWord, string>, appLogin: string | undefined): WaitingMark | undefined {
const comment = automatic.includes("comment");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 · Closed PRs without auto-comment keep old waiting labels

Before this change, closedMark removed the waiting labels from a closed GitHub PR that had labels automatic but not comments. It now returns undefined when comments are not automatic, so it writes nothing. The PR description says the mirror only removes retired labels the next time it writes a verdict, and a closed PR gets no new verdict. So a waiting label added by an earlier version stays on that PR permanently.

A GitHub repo whose policy makes labels automatic but not comments. A PR carrying a 'Triage: Waiting for …' label from before this change is merged or closed before Triage gives a verdict.

Resolve this comment. Triage will not finish while it is open.

corbits-triage[bot]
corbits-triage Bot previously approved these changes Nov 5, 2026
@TheGreatAxios
TheGreatAxios merged commit 85a14f0 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant