fix(kanban): dispatch --json reports respawn_guarded and other suppression reasons
`hermes kanban dispatch --json` only emitted `spawned` and the skip buckets it already knew about, so a ready card held by the respawn guard (`active_pr`, `recent_success`, ...), a quota-released worker, a lost dispatch lock or a memory-pressure hold all looked like `spawned: []` with no reason. Emit `respawn_guarded`, `rate_limited`, `skipped_locked` and `memory_pressure` from the DispatchResult the tick already returns. Salvaged from #111917 by @KoNit-K. Dropped hunk: the `_ACTIVE_PR_RECOVERY_LANES = frozenset({"review"})` rename in kanban_db_dispatch.py, which is behaviour- identical to the existing `lane == "review"` check and does not implement the role-aware exemption the issue asks for. Part of #111910
This commit is contained in:
@@ -105,6 +105,13 @@ def _cmd_dispatch(args: argparse.Namespace) -> int:
|
||||
for (tid, who, current) in res.skipped_per_profile_capped
|
||||
],
|
||||
"auto_assigned_default": res.auto_assigned_default,
|
||||
"respawn_guarded": [
|
||||
{"task_id": tid, "reason": reason}
|
||||
for (tid, reason) in res.respawn_guarded
|
||||
],
|
||||
"rate_limited": res.rate_limited,
|
||||
"skipped_locked": res.skipped_locked,
|
||||
"memory_pressure": res.memory_pressure,
|
||||
}, ascii=True)
|
||||
return 0
|
||||
print(f"Reclaimed: {res.reclaimed}")
|
||||
|
||||
Reference in New Issue
Block a user