Skip to content

Matrix Coder Phase 2 — Observability: Kanban audit mirror #114

Description

@Interstellar-code

Epic: #76 · Phase 2 of 6

Goal

Make Matrix Coder delegations auditable and live-visible on the Switch UI by mirroring them as Hermes Kanban tasks. Observability layer — not control flow.

Depends on

Phase 1 (roles dispatch the work being mirrored).

Scope / Deliverables

  • kanban_audit wiring (in hermes_bridge.py or a dedicated module) using hermes_cli.kanban_db directly — never raw SQL.
  • Mapping: 1 invocation = parent card; each specialist dispatch = child card. Single-specialist invocation collapses to one card.
  • Audit-mirror discipline: create cards status=running (never ready) with no dispatcher-actionable assignee, so the Kanban dispatcher cannot claim and re-execute the work.
  • complete_task(summary, metadata, created_cards) carries findings; block_task on failure; add_comment for interim results.
  • Spike: confirm complete_task/block_task behave on a card with no dispatcher-opened run.
  • Verify live update on Switch UI (WebSocket events, ~300ms).

Ships when

A matrix invocation appears as a parent card with child cards transitioning running→done/blocked, visible live on Switch UI, with findings in the drawer — and the dispatcher never double-executes.

References

#76 Kanban Integration comment; body Non-Goals clarification.

Revisions (post advisory review)

  • Remove the spike — already supported by code. complete_task/block_task accept never-claimed cards via expected_run_id=None (hermes_cli/kanban_db.py:3144-3161, 3570-3596). Just call with the default.
  • Add test: an MC running card with no run/claim is never claimed by claim_task (CAS WHERE status=ready, :2544) nor promoted to ready by the stale-claim reaper (reaper only touches cards with claim_expires/worker_pid, which MC cards lack).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions