Repository navigation
Conversation
…ent_success) check_respawn_guard refused to respawn a reviewer for up to 24h on any review-status card that shipped a PR: the build run that opened the PR counts as a recent 'completed' run (recent_success guard) and left a PR-URL comment (active_pr guard). Both guards exist solely to stop a BUILDER re-running and opening a duplicate PR, but the review pass runs through the same dispatch_once -> check_respawn_guard path, so a card in status='review' got wedged out of review. Read tasks.status alongside last_failure_error and skip the recent_success + active_pr checks when status == 'review'. The rate_limit_cooldown and blocker_auth guards still apply to review spawns (a rate-limited / auth-blocked reviewer should still defer). Adds 4 invariant tests asserting review bypasses the dup-PR guards while a build-lane (ready) task in the same shape stays guarded, plus that review still honors blocker_auth.
Code Review — LGTM ✅Scope: Kanban What was checked:
No issues found. The bypass is well-scoped: only the two guards that would wedge a reviewer are disabled, while rate-limit and auth-blocker protections remain intact. |
Make PATCHES.md the accurate manifest of what topic/rebase-v2026.6.19 carries on upstream tag v2026.6.19, replacing the stale v2026.6.5 state. - Base section: bump base tag v2026.6.5 (3c231eb) -> v2026.6.19 (681cd63). - Bump base-tag to v2026.6.19 on the NousResearch#44023 and NousResearch#46549 rows and confirm both PRs are OPEN upstream (live gh check); add the NousResearch#44023 companion test note and its numpy-extra skip behavior. - Add rows for every carried patch that previously had none, so the table matches the branch (git cherry shows 0 absorbed, nothing to drop): - dispatcher dedicated-executor (fork PR #4, OPEN; no upstream PR number yet -> behavior-keyed retire, not PR-merge-keyed); - skill-count external_dirs fix (fork PR #6, MERGED to integration; permanent-local); - webhook action allow-list (local feature; permanent-local); - daily upstream-sync and secret-scan CI workflows (permanent-local); - PATCHES.md itself (permanent-local).
The active_pr respawn guard in check_respawn_guard refuses to spawn a ready task that has a GitHub PR URL in a recent comment (within the 24h _RESPAWN_GUARD_PR_WINDOW), to prevent a builder re-opening a duplicate PR. But in the one-card review lifecycle, when a reviewer bounces a card back to the author to rework the SAME PR, the card lands in status='ready' still carrying the build-handoff PR-URL comment — so the guard wedges the author out of spawning for up to 24h and the rework loop cannot complete. Use the latest 'unblocked' task event as an additional lower bound on the PR-comment scan window: PR URLs posted before a deliberate unblock no longer veto the respawn (the unblock is the operator/orchestrator's green light to resume work on that PR), while URLs at or after the unblock still guard against a genuine duplicate-PR. Same-second comments stay guarded conservatively (timestamps are second-granular). This is additive over the carried NousResearch#46549 (which bypasses the guard only for status='review'); the author-rework card is in 'ready', which NousResearch#46549 does not cover. Applied inside the existing `if not is_review:` block so the two compose. Carries the mechanism from upstream PR NousResearch#46204 by dannyfranca, adapted to this fork's line context (our base already wraps the active_pr block in the NousResearch#46549 is_review guard, so a raw cherry-pick would conflict). Adds 3 invariant tests and the matching docstring + kanban.md docs. Tracked in PATCHES.md and docs/patches/2026-06-28-pr46204-active-pr-unblock-cutoff.md; auto-retires when NousResearch#46204 merges upstream. Upstream-PR: NousResearch#46204 Upstream-Issue: NousResearch#29458 Co-authored-by: dannyfranca <dannyfranca@users.noreply.github.com>
|
Independent confirmation — we hit this exact bug in production, and the root cause is just as described: a reviewer never opens a PR, so One gap worth covering before merge: keying the bypass on Suggestion: gate on either Tangent: the same misfire also surfaces a misleading |
…ent_success) check_respawn_guard applied the recent_success and active_pr guards — which exist only to stop a builder re-opening a duplicate PR — to review-lane spawns too, so a card in status='review' (whose build run already completed and left a PR-URL comment) got blocked from spawning its reviewer for up to 24h. Reads tasks.status and skips those two guards for status='review' while keeping rate_limit_cooldown and blocker_auth active. upstream-pending: PR NousResearch#46549
Make the active_pr respawn guard honor an explicit unblock so the review->author rework loop can spawn without waiting out the 24h PR window. Uses the latest unblocked task event as an additional lower bound on the PR-comment scan window (pr_cutoff = max(window, latest_unblock_ts)): PR URLs posted before a deliberate unblock no longer veto respawn, while URLs at/after still guard. Additive over NousResearch#46549 (which covers status='review' only; the author-rework card is in 'ready'). upstream-pending: PR NousResearch#46204
|
Thanks for the focused reproduction and regression tests. This is an automated hermes-sweeper review; current
The ready-state dedicated-reviewer case noted in the follow-up discussion is distinct: this PR's |
…ent_success) check_respawn_guard applied the recent_success and active_pr guards — which exist only to stop a builder re-opening a duplicate PR — to review-lane spawns too, so a card in status='review' (whose build run already completed and left a PR-URL comment) got blocked from spawning its reviewer for up to 24h. Reads tasks.status and skips those two guards for status='review' while keeping rate_limit_cooldown and blocker_auth active. upstream-pending: PR NousResearch#46549 (cherry picked from commit d2069ee)
Make the active_pr respawn guard honor an explicit unblock so the review->author rework loop can spawn without waiting out the 24h PR window. Uses the latest unblocked task event as an additional lower bound on the PR-comment scan window (pr_cutoff = max(window, latest_unblock_ts)): PR URLs posted before a deliberate unblock no longer veto respawn, while URLs at/after still guard. Additive over NousResearch#46549 (which covers status='review' only; the author-rework card is in 'ready'). upstream-pending: PR NousResearch#46204 (cherry picked from commit e741b78)
Symptom (reproduced live on
main, 2026-06-15)Review-required cards never get reviewed. A card that shipped a PR sits in
status='review'but the dispatcher refuses to spawn the reviewer for up to 24h — the review lane is wedged out by guards that only make sense for the build lane.Root cause
hermes_cli/kanban_db.py :: check_respawn_guard(conn, task_id)runs indispatch_oncefor every ready+assigned task, build and review alike. Two of its four guards exist solely to stop a builder re-running and opening a duplicate PR:"recent_success"— acompletedrun exists within_RESPAWN_GUARD_SUCCESS_WINDOW(1h)."active_pr"— a GitHub PR URL appears in a comment within_RESPAWN_GUARD_PR_WINDOW(24h).But the build run that ships a PR is itself a recent
completedrun and leaves a PR-URL comment. When that same card transitions tostatus='review', both guards fire and defer the reviewer spawn — for up to the 24h PR window. A reviewer never opens a PR, so neither rationale applies to a review pass.Fix (surgical — only
check_respawn_guard+ tests)SELECTto also readtasks.status.is_review = (status == "review").recent_successandactive_prchecks whenis_reviewis true (return Nonepath).rate_limit_cooldownandblocker_authactive for review spawns — a rate-limited / auth-blocked reviewer should still defer.No new config keys, no new env vars, no refactor. One extra column in one existing query, two
if not is_review:guards.Tests
Added 4 invariant tests in
tests/hermes_cli/test_kanban_db.py(asserting the invariant, not a snapshot):test_respawn_guard_review_bypasses_active_pr_build_does_not— same PR-comment task returns"active_pr"onstatus='ready'butNoneonstatus='review'.test_respawn_guard_review_bypasses_recent_success_build_does_not— same recent-completed-run task returns"recent_success"onreadybutNoneonreview.test_respawn_guard_review_with_pr_and_success_returns_none— acceptance shape: review task with both a PR comment and a recent completed run returnsNone; the build-lane equivalent stays guarded.test_respawn_guard_review_still_honors_blocker_auth— review status still defers on an auth/quota error.Verification
(The dup-PR protection for the build lane is fully intact — every existing
check_respawn_guardtest still passes.)Acceptance criteria (from the task)
check_respawn_guardreturnsNonefor a review-status task that has a PR comment + recent completed run.check_respawn_guardstill returns"active_pr"for a ready-status task with a PR comment (build dup-PR protection intact).