The two-pass flag-then-close machine relies on a delayed recapture-preview job (src/queue/processors.ts ~3559-3581). Its documented backstop is "the next sweep / CI event" — but that backstop is largely vacuous after #never-endless-reregate (src/settings/agent-sweep.ts ~166-174), which makes an already-regated PR permanently sweep-ineligible.
If the queue loses that job (crash mid-flight — see #9007), the PR sits flagged with pending-closure + changes-requested, with merge/approve suppressed via linkedIssueCloseInFlight (src/settings/agent-actions.ts ~1092-1110), until a contributor webhook that may never come. And because the violation memory is permanent (#9028-class behavior), clearLinkedIssueFlag can never fire.
Fix
Make the flag carry a deadline that a cron re-checks (driven by a DB scan or audit events), rather than depending on a single queue job surviving.
The two-pass flag-then-close machine relies on a delayed
recapture-previewjob (src/queue/processors.ts~3559-3581). Its documented backstop is "the next sweep / CI event" — but that backstop is largely vacuous after #never-endless-reregate (src/settings/agent-sweep.ts~166-174), which makes an already-regated PR permanently sweep-ineligible.If the queue loses that job (crash mid-flight — see #9007), the PR sits flagged with pending-closure + changes-requested, with merge/approve suppressed via
linkedIssueCloseInFlight(src/settings/agent-actions.ts~1092-1110), until a contributor webhook that may never come. And because the violation memory is permanent (#9028-class behavior),clearLinkedIssueFlagcan never fire.Fix
Make the flag carry a deadline that a cron re-checks (driven by a DB scan or audit events), rather than depending on a single queue job surviving.