Skip to content

fix(kanban): don't flag dispatcher stuck when ready tasks are respawn-guard deferred (#80513) - #91941

Closed
Enough1122 wants to merge 2 commits into
NousResearch:mainfrom
Enough1122:fix/issue-80513
Closed

Enough1122 wants to merge 2 commits into
NousResearch:mainfrom
Enough1122:fix/issue-80513

Conversation

@Enough1122

Copy link
Copy Markdown

Fixes #80513

Root cause

The dispatcher health telemetry's has_spawnable_ready() counted ready+assigned+unclaimed tasks without consulting the respawn guard — but dispatch_once deliberately defers exactly those tasks every tick (recent_success / active_pr / rate_limit_cooldown / blocker_auth). An idle-by-design board therefore read as "spawnable work waiting", producing endless false "kanban dispatcher stuck" alarms (~986 false ticks observed by the reporter).

Fix

Both probes (has_spawnable_ready + mirror has_spawnable_review) now route through a shared _has_spawnable_in_lane(): a task counts as spawnable only when its assignee is a real profile AND check_respawn_guard() does not defer it this tick. Unexpected guard errors fail conservative (legacy warn behavior preserved), and both warn sites (CLI daemon + gateway watcher) now annotate the warning with that tick's guard deferrals so operators can split parked tasks from genuinely broken spawns. Dispatch semantics untouched — the probes' only callers are the two telemetry warn sites.

Verification

  • 11 new behavior-contract tests ( ests/hermes_cli/test_kanban_stuck_telemetry.py): no warning on an all-guarded board (and zero spawn attempts), warning fires on truly-spawnable-unspawned, mixed boards warn AND list deferrals, window-expiry re-enables, CLI daemon E2E via real dispatch_once.
  • scripts/run_tests.sh over the new file + est_kanban_review_lifecycle.py + est_kanban_watchers_mixin.py → 31 passed, 0 failed.

@Enough1122 Enough1122 changed the title Dispatcher "stuck" telemetry false-alarms on respawn-guard-deferred tasks fix(kanban): don't flag dispatcher stuck when ready tasks are respawn-guard deferred (#80513) Aug 22, 2026
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery comp/cron Cron scheduler and job management labels Aug 22, 2026
@alt-glitch

Copy link
Copy Markdown

This was generated by AI during triage.

Related: #44899 is an earlier open fix for respawn-guarded tasks being counted as spawnable. This PR overlaps that ready-lane repair and additionally covers review-lane telemetry and diagnostic context; maintainers should choose or consolidate the approaches.

@Enough1122

Copy link
Copy Markdown
Author

Closing as part of an open-queue triage — consolidating my open work so review attention goes to the highest-value changes. Nothing here is abandoned: happy to reopen (or rebase fresh) if there's interest or reviewer bandwidth.

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 comp/gateway Gateway runner, session dispatch, delivery 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 "stuck" telemetry false-alarms on respawn-guard-deferred tasks

2 participants