Skip to content

fix(kanban): add fail-closed embedded dispatcher quiesce - #93727

Closed
dagyrox wants to merge 5 commits into
NousResearch:mainfrom
dagyrox:talos/issue-221-dispatcher-quiesce
Closed

dagyrox wants to merge 5 commits into
NousResearch:mainfrom
dagyrox:talos/issue-221-dispatcher-quiesce

Conversation

@dagyrox

@dagyrox dagyrox commented Aug 24, 2026

Copy link
Copy Markdown

Summary

Adds a provider-supported, fail-closed quiescence boundary for the gateway-embedded Kanban dispatcher so a service handoff can drain the old owner before enabling a standalone dispatcher.

  • adds hermes kanban dispatcher-quiesce --pid <MainPID> --timeout <seconds> --json
  • identifies the exact embedded owner with per-acquisition generation metadata
  • prevents new dispatcher ticks after the quiesce boundary
  • drains active asyncio.to_thread(...) work before acknowledging, including under repeated watcher cancellation
  • keeps the old gateway watcher quiesced while retaining the singleton lock until gateway shutdown
  • returns fixed machine-readable states and nonzero failure exits through installed, module, and repository-local launchers
  • keeps the control protocol independent of SQLite initialization, so it remains available with a corrupt/inaccessible board DB
  • stores protocol files in a private owner-only POSIX control directory; unsupported Windows control metadata fails closed rather than trusting forgeable mode bits
  • does not signal, terminate, pause, resume, or mutate child workers/tasks

Closes #221.

Safety contract

A successful result:

{"ok": true, "state": "quiesced", "owner_pid": 1234, "owner_mode": "embedded"}

means the targeted embedded owner acknowledged quiescence only after its active dispatcher tick drained. Repeated requests are idempotent. not_running, not_owner, timeout, indeterminate, and invalid_request return nonzero and must stop the caller's cutover.

Verification

  • scripts/run_tests.sh tests/gateway/test_kanban_dispatcher_quiescence.py tests/hermes_cli/test_kanban_dispatcher_options.py tests/gateway/test_kanban_watchers_mixin.py tests/hermes_cli/test_kanban_core_functionality.py -v --tb=short — 221 passed
  • python -m ruff check ... on all changed Python files — passed
  • python -m compileall -q ... on changed Python files — passed
  • predecessor proof: cancellation/drain regression fails on provider base 83d466e443f8c4e6d1526cebd90c9b0cfceb22cb
  • sabotage proof: removing cancellation drain makes the repeated-cancellation regression fail
  • live local CLI smoke: initial quiesce and retry both returned quiesced with exit 0 against the exact owner PID, even with an inaccessible HERMES_KANBAN_DB

Provenance

dagyrox and others added 5 commits July 24, 2026 19:40
Agent: Talos implementation lane
Coordinator: Hermes
Issue: dagyrox/or7-platform#159
Kanban: build-chat
Task/run ID: release-chat
Plan: /root/projects/worktrees/occ-chat-gateway-write/docs/work-packets/occ-conversation-gateway-write/work-packet.md
Verification: Athena READY_TO_MERGE at a7bca9c; 537 review-time tests passed; isolated H1/H2/H3 staging passed.
Resume: production Hermes update/restart remains separately approval-gated.
Acting-Lane: Talos
Review-Authority: Athena READY_TO_MERGE
Lifecycle-Owner: Hermes
Coordinator: Hyperion
Issue: dagyrox/or7-platform#191
Consumer-PR: dagyrox/or7-platform#207
Governed-Run: 530149e8-b8a3-4fcc-b21e-0fd8360c1445
Work-Packet: docs/agentic-operations/work-packets/2026-08-10-issue-191-canonical-active-work-lifecycle.md
Provider-Reviewed-Head: 0897ffc
Consumer-Compatible-Head: acda74e734b916649f136810e1a821e4c2dce38c
Kanban: none
…191)

Acting-Lane: Talos
Lifecycle-Owner: Hermes
Architecture-Authority: Athena READY_FOR_CONSUMER at b206af7
Related-Issue: dagyrox/or7-platform#191
Governed-Run: 530149e8-b8a3-4fcc-b21e-0fd8360c1445
Work-Packet: docs/agentic-operations/work-packets/2026-08-10-issue-191-canonical-active-work-lifecycle.md
Hermes-Kanban-Card: not available
…ecycle

Acting implementation lane: Talos; review authority: Athena; control: Hermes.\n\nGitHub Issue: dagyrox/or7-platform#221\nHermes Kanban: t_c27eaab4; repair t_2c98e44f run 123\nCanonical work packet: https://github.com/dagyrox/or7-platform/issues/221\nPlanned tracked packet: docs/agentic-operations/work-packets/2026-08-21-hermes-kanban-lifecycle-isolation.md via t_b4fe713f\nExact reviewed head: aedc1ef\nAthena verdict artifact: /tmp/athena-hermes-pr9-body-rereview-aedc1efc.md (93b549ad9c8ab58e43210b6a898bab918c212695e743375a1e0268c6ab21fa7a)\nATHENA_VERDICT: READY_TO_MERGE
Acting lane: Talos builder

Provider issue: NousResearch#221

Hermes Kanban: t_c349e5f1

Run ID: run-20260824-issue-221

Work packet: /root/.hermes/worktrees/or7-command-center/pending_review/hermes-occ-model-provider-cutover-control.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant