fix(kanban): active_pr respawn guard yields to deliberate follow-ups and dead PRs - #7
Merged
Merged
Conversation
…and dead PRs The Kanban dispatcher's active_pr respawn guard blocked a task's respawn whenever a GitHub PR URL appeared in its comments within the last 24h. It matched the URL by regex only — it never checked the PR's real state, and there was no supported way to clear it. Deliberate follow-up / rework / unblock stayed parked behind the guard until the 24h window expired or someone edited the SQLite DB by hand (upstream NousResearch/hermes-agent NousResearch#62418, NousResearch#29458). Rework block "4." of check_respawn_guard so it now: - picks the newest PR-URL comment (only the latest PR can be duplicated); - stands down when a fresher deliberate signal exists after that comment (unblocked / review_reopened / respawn_guard_cleared); - stands down when the PR is actually closed/merged (unknown state keeps the guard as a safe default); - otherwise still returns "active_pr", preserving duplicate-PR protection for the ordinary auto-respawn case. Also: - add a supported operator override `hermes kanban unguard` (+ /kanban), backed by the new public clear_respawn_guard() which records a respawn_guard_cleared event without touching status/claims; - add opt-in kanban.respawn_guard_check_pr_state (default off) gating the built-in gh-backed live PR-state check, so the dispatcher hot path pays nothing by default; - update the Kanban docs and add tests for every branch. Public signatures are preserved: check_respawn_guard(conn, task_id) still works (the new pr_state_resolver arg is keyword-only, default None), so the sole production caller (dispatch_once) is unchanged.
🔎 Lint report:
|
Author
|
Hermes PR: NousResearch#72555 |
nikitaBarkov
pushed a commit
that referenced
this pull request
Aug 3, 2026
…ovider Cancelling the API-key prompt mid-wizard (Enter → 'Cancelled.') let the wizard continue through Terminal/Gateway/Tools and finish 'successfully' with no model configured — the user exits believing they're set up, then hits a broken chat. _print_setup_summary() (called by every setup path: full, quick, blank-slate, portal) now probes resolve_provider() and, when nothing is configured, prints an unmissable warning with the two one-line fixes (hermes model / hermes setup --portal). Consumer-onboarding audit finding #7 (sev 4), Aug 2026.
nikitaBarkov
pushed a commit
that referenced
this pull request
Aug 3, 2026
… (re-review #7) - website/docs/user-guide/configuration.md (en) and the zh-Hans translation gain a 'Session Stall Watchdog' section: default 300, 0=disabled, notify-only semantics (never kills the turn — contrast gateway_timeout), one notification per stall episode, and the exact stall message text so it is greppable. - cli-config.yaml.example: the two in-agent compression timeout keys (compression.context_timeout_seconds / compression.context_total_ceiling_seconds) are shown as commented lines next to session_stall_timeout's example for discoverability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The Kanban dispatcher's
active_prrespawn guard (block "4." ofcheck_respawn_guardinhermes_cli/kanban_db.py) blocked a task's respawnwhenever a GitHub PR URL appeared in its comments within the last 24h. It
matched the URL by regex only — it never checked the PR's real state
(open/closed/merged), and there was no supported way to clear it. So a
deliberate follow-up / rework / unblock stayed parked behind the guard until
the 24h window expired or someone edited the SQLite DB by hand.
This reworks the guard so it blocks only the unintended duplicate-PR
auto-respawn it was built for, while yielding to deliberate continuation and
to PRs that are no longer live:
duplicated; older links are irrelevant).
unblocked(fromunblock_task),review_reopened(fromreopen_review_task), orrespawn_guard_cleared(from the newclear_respawn_guard).closed/merged. Unknown state keeps theguard (safe default — no false "all clear" when
ghis unavailable)."active_pr", so ordinary auto-respawn on a live PRis still de-duplicated exactly as before.
It also adds a supported operator override and an opt-in live PR-state check.
Related Issue
No tracked issue in this fork. Mirrors upstream reports
NousResearch/hermes-agent NousResearch#62418 (guard blocks legitimate rework after unblock)
and NousResearch#29458 (no operator clear-path; ignores closed PRs).
Type of Change
Changes Made
hermes_cli/kanban_db.py— rework block "4." ofcheck_respawn_guard; addhelpers
_has_fresh_continuation_signal,_resolve_github_pr_state(cachedghlookup, 5-min TTL),_resolve_pr_state_check_enabled; add the publicclear_respawn_guard()(emits arespawn_guard_clearedevent, no status/claim mutation). New
pr_state_resolverarg is keyword-only (back-compat).hermes_cli/kanban.py— newunguardverb (parser + dispatch + handler)and
/kanbanhelp entry.hermes_cli/config.py— opt-inkanban.respawn_guard_check_pr_state(default
False) gating the built-ingh-backed live PR-state check.website/docs/user-guide/features/kanban.md— rewrote the Respawn-guardsection, documented
unguard, added therespawn_guard_clearedevent.tests/hermes_cli/test_kanban_db.py,tests/hermes_cli/test_kanban_cli.py— tests for every branch (see below).
How to Test
Run the touched suites:
→ 410 tests pass, 0 failed.
Behavioral coverage:
"active_pr"(dup protection intact).unblock/reopen-review/hermes kanban unguard→ guard yields (None) on the next dispatcher tick.closed/merged(via injectedpr_state_resolver/ opt-ingh) → guard yields; unknown state → guard held.Checklist
Code
fix(kanban):)test_kanban_db,test_kanban_cli,test_config— 410 passed, 0 failed)Documentation & Housekeeping
website/docs/user-guide/features/kanban.md)DEFAULT_CONFIGinhermes_cli/config.py(opt-in, documented inkanban.md)CONTRIBUTING.md/AGENTS.mdghlookup degrades safely to "unknown" (guard held) whenghis missing/unauthenticated, and it is off by defaulthermes kanban unguardverb +/kanbanhelp entry