Skip to content

The agent that grows with you

fix(kanban): warn when the dispatch allowlist is unreadable; document the fail-closed spellings

teknium1c432cd272327
diff --git a/hermes_cli/kanban_db_dispatch.py b/hermes_cli/kanban_db_dispatch.py
index 1c19ef85ba6..0a2b914dce2 100644
--- a/hermes_cli/kanban_db_dispatch.py
+++ b/hermes_cli/kanban_db_dispatch.py
@@ -1533,14 +1533,23 @@ def _dispatch_profile_allowlist(normalize_profile_name) -> Optional[frozenset]:
kanban:
dispatch_profiles: ["sage", "researcher"] # or "sage,researcher"
- Returns ``None`` when the key is unset (upstream behavior: any existing
- profile is claimable). A present value is fail-closed: an empty list,
- ``null``, or a failed config read claims nothing.
+ Returns ``None`` only when the key is absent from the user config (upstream
+ behavior: any existing profile is claimable). A present value is
+ fail-closed: an empty list, ``null`` or a bare ``dispatch_profiles:`` claims
+ nothing. The user layer is read without the ``DEFAULT_CONFIG`` merge (whose
+ ``None`` placeholder would make the key look present in every home), and a
+ config read that raises also claims nothing — a corrupt config on a shared
+ board must never widen this home's claim scope silently (#113620).
"""
try:
from hermes_cli.config_effective import load_user_config_effective
kanban = (load_user_config_effective(fail_closed=True) or {}).get("kanban", {})
- except Exception:
+ except Exception as exc:
+ _kb._log.warning(
+ "kanban: could not read kanban.dispatch_profiles (%s: %s) — "
+ "this home claims no cards until the config is readable",
+ type(exc).__name__, exc,
+ )
return frozenset()
if not isinstance(kanban, Mapping) or "dispatch_profiles" not in kanban:
return None
diff --git a/tests/hermes_cli/test_kanban_dispatch_claim_allowlist.py b/tests/hermes_cli/test_kanban_dispatch_claim_allowlist.py
index 1f837881083..4b02564c9b3 100644
--- a/tests/hermes_cli/test_kanban_dispatch_claim_allowlist.py
+++ b/tests/hermes_cli/test_kanban_dispatch_claim_allowlist.py
@@ -109,16 +109,3 @@ def test_allowlist_config_read_failure_skips_all_cards(
res = kbd.dispatch_once(conn, dry_run=True)
assert res.spawned == []
assert res.skipped_nonspawnable == [tid]
-
-
-def test_valid_allowlist_keeps_named_profile_claimable(
- kanban_home, all_assignees_spawnable,
-):
- """A configured name remains claimable after the fail-closed distinction."""
- (kanban_home / "config.yaml").write_text(
- "kanban:\n dispatch_profiles:\n - default\n", encoding="utf-8",
- )
- with kbc.connect() as conn:
- tid = kb.create_task(conn, title="local card", assignee="default")
- res = kbd.dispatch_once(conn, dry_run=True)
- assert [task_id for task_id, _assignee, _workspace in res.spawned] == [tid]
diff --git a/website/docs/user-guide/features/kanban.md b/website/docs/user-guide/features/kanban.md
index f2972c3dceb..fdc73a358c2 100644
--- a/website/docs/user-guide/features/kanban.md
+++ b/website/docs/user-guide/features/kanban.md
@@ -286,11 +286,13 @@ kanban:
review_dispatch: true # default: spawn the assigned profile with
# the bundled sdlc-review skill. Set false
# for human-only review boards.
- dispatch_profiles: null # default: this home may claim cards for any
- # existing profile. Set to a list (or
- # comma-separated string) of profile names to
- # restrict which assignees this home claims;
- # fail-closed, an empty list claims nothing.
+ # dispatch_profiles: [sage] # unset (key omitted): this home may claim
+ # cards for any existing profile. Set to a
+ # list (or comma-separated string) of profile
+ # names to restrict which assignees this home
+ # claims. Fail-closed: an empty list, `null`
+ # or a bare `dispatch_profiles:` claims
+ # nothing, and so does an unreadable config.
```
Override the config flag at runtime via `HERMES_KANBAN_DISPATCH_IN_GATEWAY=0`
@@ -921,7 +923,7 @@ All commands are also available as a slash command in the interactive CLI and in
|------------|---------|--------------|
| `kanban.max_in_progress` | unset (unlimited) | Caps the number of simultaneously running tasks. When the board already has N running, the dispatcher skips spawning more — useful for slow workers (local LLMs, resource-constrained hosts) so they finish what they have before more pile up and time out. Invalid or below-1 values log a warning and behave as unlimited. |
| `kanban.max_in_progress_per_profile` | unset (unlimited) | Per-profile variant of `max_in_progress` — caps how many tasks any single assignee profile may run concurrently. Useful when one profile is slow or rate-limited but others should keep flowing. Applies alongside the board-wide `max_in_progress`; both must allow a spawn for it to proceed. |
-| `kanban.dispatch_profiles` | unset (any existing profile) | Per-home claim allowlist for boards shared across Hermes homes. When set, this home's dispatcher only claims cards whose assignee is listed (fail-closed; an empty list claims nothing); other assignees land in `skipped_nonspawnable`. See [Shared boards across homes](#shared-boards-across-homes). |
+| `kanban.dispatch_profiles` | unset (any existing profile) | Per-home claim allowlist for boards shared across Hermes homes. When the key is present, this home's dispatcher only claims cards whose assignee is listed — fail-closed: an empty list, `null` or a bare `dispatch_profiles:` claims nothing, and a config read that fails logs a warning and claims nothing; other assignees land in `skipped_nonspawnable`. Only omitting the key means "any existing profile". See [Shared boards across homes](#shared-boards-across-homes). |
| `kanban.auto_promote_children` | `true` | After `decompose_triage_task()` produces children with no parent-blocker dependencies, they're automatically promoted to `ready` so the dispatcher can pick them up. Set to `false` to require manual review — children stay in `todo` until you promote them. |
| `kanban.default_workdir` | unset | Board-level default working directory applied to new tasks when neither `--workspace` nor the task itself overrides it. Per-task `workspace:` still wins. |