Files
hermes-agent/agent
Brooklyn Nicholson 387c78c8f7 fix(kanban): fence the explicit-board override to unfenced callers
The explicit-board-over-env-pin precedence landed for cross-board USER intent,
but it also applied to machine flows that enumerate boards and to
dispatched/delegated workers:

- On a dispatcher-pinned box (HERMES_KANBAN_DB in the gateway env) the
  notifier's per-slug connect(board=slug) resolved every enumerated slug to
  its own empty physical DB instead of the pinned one, so no wake
  notifications were delivered (10 red gateway tests, red on head / green on
  main). Same shape in the per-subscription cursor writes (_kanban_sub_op)
  and the embedded dispatcher's per-board ticks.
- A dispatched worker or delegated child passing board=<other> could resolve
  outside the dispatcher's pin-based fence (kanban_path_is_fenced checks the
  pinned path / fenced root) — weakening the 5ec6baa 'workers physically
  cannot see other boards' isolation.

Fix: explicit board (direct arg or scoped --board) outranks the env pin only
where no fence applies.

- kanban_db.pin_first_board_resolution(): ContextVar marking machine flows
  (notifier collect, per-sub cursor writes, dispatcher tick / readiness /
  auto-decompose) so an enumerated slug resolves through the pin; a no-op
  when no pin is set, so unpinned multi-board ticks are unchanged.
- delegation_context.explicit_board_intent_is_pinned(): dispatched workers
  (HERMES_KANBAN_TASK) and delegated children / descendants keep the pinned
  path, preserving both the isolation invariant and the path fence.
- _board_path: env pin wins for pinned callers, explicit slug otherwise;
  restored the env-pin invariant test (pin wins regardless of board= for
  fenced callers) while keeping the contributor's unfenced explicit-board
  tests, plus new fence and pin-first regression tests.
2026-10-02 22:21:27 -05:00
..
2026-09-11 09:31:13 -07:00