Skip to content

fix(kanban): recover cards guarded by stale PR evidence - #80477

Open
Oceanswave wants to merge 2 commits into
NousResearch:mainfrom
Oceanswave:fix/dispatch-respawn-guard-json-80231
Open

Oceanswave wants to merge 2 commits into
NousResearch:mainfrom
Oceanswave:fix/dispatch-respawn-guard-json-80231

Conversation

@Oceanswave

@Oceanswave Oceanswave commented Aug 6, 2026 •

Copy link
Copy Markdown

Fix Ready cards guarded by PR evidence even though they have never run, and allow strictly later operator promoted_manual/unblocked events to recover a previously run card. Automatic status, promoted and reclaimed events retain the duplicate-PR guard. Existing explicit handoff rules still reject same-owner/unassign/default-assignee bookkeeping.

Updated against main 7239625ae1b7, using the current kanban_db_dispatch owner module and upstream CLI guard reporting. Regression fixtures now represent prior implementer runs where duplicate-work protection applies.

Validation at 84c6359b058c: canonical runner across seven Kanban files: 116 passed, 2 platform-specific tests skipped on macOS. The systemd refusal test is explicitly Linux-scoped; it requires the Linux CI lane. Ruff and diff checks passed. Hosted CI must still execute before merge readiness can be established.

Closes #80231.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cron Cron scheduler and job management labels Aug 6, 2026
@spfcraze

spfcraze commented Aug 6, 2026

Copy link
Copy Markdown

This was generated by AI during triage.

Summary:
The requeue kinds that supersede the active-PR guard include events written by automatic machinery (recompute_ready's promoted, release_stale_claims's reclaimed), so an automatic event after a PR comment can disable the guard on its own.

Problems:

  • check_respawn_guard treats any later event of kind status/promoted/promoted_manual/unblocked/reclaimed as a continuation request, but kanban_db.py:4217 (recompute_ready) writes promoted automatically when a task's parents complete, and release_stale_claims (~4591) writes reclaimed when a worker's claim goes stale.
  • After a worker opens a PR and the card returns to ready/blocked, one such automatic event disables the guard and the dispatcher respawns the task — the duplicate-PR outcome the guard exists to prevent; the PR body's "explicit requeue" wording is narrower than the implementation.

Solution:
Restrict the supersede set to operator-only kinds (promoted_manual, unblocked), or require an operator actor field on promoted/reclaimed before they count.


Checked against 314b6dd — the tip of fix/dispatch-respawn-guard-json-80231 when this was written — and 9d4ef04, main at the same moment.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dispatcher active_pr respawn guard permanently blocks merge-gate and review tasks that legitimately reference an existing PR

3 participants