fix(review): clear stale disposition labels once the underlying hold resolves - #3575
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-05 17:45:43 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 6 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3575 +/- ##
=======================================
Coverage 93.15% 93.15%
=======================================
Files 311 311
Lines 31702 31707 +5
Branches 11579 11581 +2
=======================================
+ Hits 29533 29538 +5
Misses 1517 1517
Partials 652 652
🚀 New features to boost your workflow:
|
…resolves The review_state_label ternary (ready-to-merge / manual-review / migration-collision / changes-requested) only ever ADDED the current state's label, never removed a sibling left over from a prior pass — so a PR held once (e.g. changes-requested while CI was red) kept that label forever even after becoming healthy again, alongside whatever got added next. This also meant a stale manual-review label could keep the AI-review freeze (isFrozenForManualReview) engaged forever once a PR resolved, since nothing ever cleared it. Adds a cleanup pass that removes any of the three mutually-exclusive sibling labels still live on the PR once the ternary picks something else, while leaving the owner/automation "not reviewGood" fallback hold's own manual-review label alone when it's still independently warranted this same pass.
1c1209b to
1c6db66
Compare
Closes #3573
Summary
review_state_labeldisposition ternary (ready-to-merge/manual-review/migration-collision/changes-requested) inplanAgentMaintenanceActions(
src/settings/agent-actions.ts) only ever ADDED the currently-correct label — itnever removed a sibling label left over from a prior pass. A PR held once (e.g.
changes-requestedwhile CI was red) kept that label forever, even after becominghealthy again, alongside whatever the bot added next.
isFrozenForManualReviewin
src/queue/processors.ts) checks whether the manual-review label is live on thePR to decide whether to reuse the last-published AI verdict instead of spending a
fresh call. A manual-review label that never clears means that freeze can stay
engaged indefinitely — producing a review comment whose deterministic parts (checks,
gate result, linked-issue status) are fresh while the AI-authored "Review
summary"/"Blockers" prose is stale, because the freeze never has a reason to lift.
This is exactly what was observed on feat(review): hold PRs that solve an unlinked open issue #3513 after its own blockers were fixed.
review_state_label-gated section, that removesany of the three OTHER mutually-exclusive disposition labels still live on the PR
once the ternary resolves to a different one this pass — mirroring the existing
clearLinkedIssueFlagpattern already used for the pending-closure label.manual-reviewis excluded from this cleanup specifically when the separateowner/automation "not reviewGood" fallback hold (
manualHoldReason, hoisted earlierin the function so this cleanup can see it) still independently wants it this same
pass — that fallback can re-add the label later in the same call, and removing it
here would race against that add.
manualHoldReason's computation was hoisted from the bottom of the function toright after
ciReason(its own dependencies —guardrailHit,ciUnverified,conclusion,reviewGood,willClose,closeEligible— are all already availablethere); its later use is unchanged, just no longer redeclared.
Scope
type(scope): short summaryConventional Commit format.apps/gittensory-ui/**,no generated-artifact changes needed (no OpenAPI/schema/migration/wrangler-binding
changes).
CONTRIBUTING.md; nosite//CNAME/VitePress changes.Closes #3573.Validation
git diff --checknpm run actionlint— not run; no workflow files touched.npm run typecheck(clean)npm run test:coverage(full/unsharded) — not run locally; ran the specificaffected files instead (
agent-actions.test.ts, 229 tests; the fullqueue.test.tsintegration suite, 572 tests) — all green. Cross-referenced theexact new-diff line/branch ranges against a fresh
coverage-final.json(
--coverage.include='src/settings/agent-actions.ts'): 100% of the newstatements and branches are covered. GitHub CI runs the full suite/gate on push.
npm run test:workers/npm run build:mcp/npm run test:mcp-pack— not run;nothing in those surfaces touched.
npm run ui:openapi:check/ui:lint/ui:typecheck/ui:build— not run; noAPI/schema or
apps/gittensory-ui/**changes.npm audit --audit-level=moderate— not run; no dependency changes.changes-requested/manual-review/ready-to-mergelabel individually, clearingmultiple stale siblings at once, idempotency (no remove when only the correct
label is present), a null-configured sibling label never producing a remove, the
manualHoldReason-still-warranted exclusion (ciUnverified case), and confirmingthe pending-closure label's own dedicated clear path is untouched (no duplicate
remove from the new sibling-cleanup loop).
If any required check was skipped, explain why:
agent-actions.test.tsplus the full
queue.test.tsintegration suite) rather than a full localtest:ci/test:coverage/npm auditpass, since GitHub CI runs the complete gate onpush and re-running the whole suite by hand for every change is redundant.
Safety
touched or exposed.
factual, no compensation/optimization claims — it's a reason string on an internal
label action, not posted as a PR comment.
UI Evidencesection included.Notes
claude/zealous-herschel-f6bfba(feat(review): hold PRs that solve an unlinked open issue #3513) since it touches thesame function and the same lines added there — it will retarget to
mainautomatically once feat(review): hold PRs that solve an unlinked open issue #3513 merges.