feat(kanban): re-land HEL-3110 work-intent correlation events - #12
Conversation
Re-lands the governed HEL-3110 implementation (originally PR #3, merged as ad29d8d, reverted by remediation PR #10 / 8684c5b because the merge bypassed the mandatory pre-merge TRC gate) on post-removal main. - work_intent_id correlation key on task_events (additive column + fresh-schema DDL), work_intent_id = task_id. - Typed lifecycle events emitted at existing dispatcher mutation boundaries in hermes_cli/kanban_db.py: task_claimed, worker_spawn_requested, worker_spawned, worker_started, heartbeat, worker_exited. gateway/kanban_watchers.py remains caller-only. - Append-only envelope per HELIOS-THROUGHPUT-TRC-FINAL-SCOPE \u00a73.1; idempotency_key dedupe so replaying a source event yields exactly one logical transition; no second telemetry DB; current_step_key untouched. - Payload safety: no secrets, raw HAA text, or local filesystem paths. Content is the symmetric reverse of PR #10's removal (mechanically the same lines PR #3 added), rebased over #4/#6 dispatcher changes. Linear: HEL-3110 (parent HEL-3103)
TRC Pre-Merge Review Verdict: GO / APPROVEPR: SSC-ENG/hermes-agent #12 — feat(kanban): re-land HEL-3110 work-intent correlation events This is the pre-merge gate PR #3 bypassed. The verdict below was produced entirely at the pinned head, before any merge. Intake gate (structurally present)
Exact-head CI (independently re-verified)
Behavioral verification (proven by exact-head execution, clean py3.11 venv)
Scope conformance (§3.1, line-by-line against the diff)
Re-land parityDiff independently read in full at the pinned head; payload is the §3.1 implementation reconciled with the HEL-3114 dispatcher changes (#4/#6) that landed between removal (#10, Findings
DispositionGO / APPROVE at exact head
|
| session | model | in | out | reasoning | est cost |
|---|---|---|---|---|---|
20260730_041705_5f1a02 |
anthropic/claude-fable-5 | 408,768 | 12,745 | 0 | $4.3123 (est) |
| TOTAL | — | 408,768 | 12,745 | $4.3123 |
profile: tessa-cole · cost estimated unless marked (act). Recorded per the tokens-to-value deliverable.
CPTC actual: compare these real tokens with the predicted Complexity Points on the technical-scope sub-issue.
Summary
Re-lands HEL-3110 work-intent correlation events at the Kanban dispatcher's existing writer boundaries, on post-removal main.
Linear: HEL-3110 (technical scope, CPTC 3) under parent HEL-3103.
History / why this PR exists
25fbbaa3asad29d8dc5— but the merge bypassed the mandatory pre-merge TRC gate (TRC verdict issued afterward: HOLD).8684c5b75) removed the telemetry from main; TRC PASS/GO, STMA SECURE, DSCA N/A were all recorded on fix(kanban): remediate HEL-3110 lifecycle telemetry #10 at exact head before merge.t_e662bbe9: fresh branch cut from post-removal main (d443461ad), the proven PR HEL-3110: correlate dispatcher lifecycle events #3 content re-applied (mechanically the symmetric reverse of PR fix(kanban): remediate HEL-3110 lifecycle telemetry #10's removal), reconciled with the feat(kanban): validate dispatch capabilities before claim #4/fix(kanban): preserve legacy dispatch compatibility #6 dispatcher changes that landed in between.What changed
hermes_cli/kanban_db.py:work_intent_idcolumn ontask_events(additive migration + fresh-schema DDL); typed lifecycle events emitted at existing mutation boundaries:task_claimed,worker_spawn_requested,worker_spawned,worker_started,heartbeat,worker_exited. Idempotency keys (work-intent:<task>:run:<run>:<kind>) so replaying a source event produces exactly one logical transition. Append-only; no second telemetry DB;current_step_keyleft null/UNKNOWN.gateway/kanban_watchers.py: comment-only clarification that the gateway path stays caller-only, not a second telemetry writer.tests/hermes_cli/test_kanban_work_intent_events.py: restored full suite — successful and failed work-intent paths reconstructable from emitted events alone; duplicate claim / replayed source event idempotency; payload safety assertions (no secrets, raw HAA text, or local paths).Test evidence (local, py3.11 clean venv)
test_kanban_work_intent_events.py: 5 passedtest_kanban_db.py,test_kanban_core_functionality.py,test_kanban_db_init.py,test_kanban_work_intent_events.py,test_kanban_preflight.py): 73 passed, 1 skipped-k kanbansweep: 188 passed, 2 skipped, 7 failed — the 7 failures are pre-existing on based443461ad(identical failure set reproduced on the base commit with the same venv; environment-sensitive tests: write-guard real-root detection, WAL refusal, decompose LLM fixtures, lifecycle hook, rate-limit requeue). Zero regressions introduced by this diff.Deployment impact / rollback
No production deploy or DB apply fires on merge; changes are local-SQLite dispatcher telemetry. Rollback = revert this single commit (the #10 remediation proved the reverse applies cleanly).
Governance
HOLD at review-entry gate: do NOT merge before a fresh pre-merge TRC verdict from Tessa Cole at this exact head. Merge lane: Rhea Ramos (RRA) after TRC.