Repository navigation
fix(triage): show progress only in the comment and set the verdict label once (CL-12164) - #850
Conversation
…bel once (CL-12164)
|
Merged before Triage finished on |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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.
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.
WAITING_LABELSand 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.unreadynow runs only on the first pass on a head. The manager's take marks that pass withnewHead, and the step removes the verdict labels then.RETIRED_LABELS, so the mirror removes any left on a pull request the next time it writes a verdict.keepinput, which only the waiting mark used.Verification
bun run checkandbun run lintare 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