feat(kanban): add audited update-body command - #76765
Jeffgithub0029 wants to merge 1 commit into
Conversation
Add `hermes kanban update-body <task_id> --body <text>` to atomically replace a task's canonical body and append a body_updated audit event carrying only sha256 + lengths (no body text copied into the event log). Repeating the same body is a no-op and appends no event. The operation deliberately does not recompute readiness or touch assignment/status. Split out from the original combined PR (sticky initial-block portion removed); docs updated in website/docs/reference/cli-commands.md.
…vent create_task(initial_status='blocked') is an explicit human parking decision, not a recoverable circuit-breaker failure. Record a 'blocked' event (kind: needs_input) at creation so _has_sticky_block sees it and the dispatcher recompute_ready cannot silently promote the card after an assignment or dependency tick. unblock_task remains the only way out. Narrow fix: no block_kind mutation, no recompute_ready/reclaim changes, so unblock/parent-completion and unblock/claim/reclaim semantics are untouched. This converges the earlier combined PR (update-body command moved to NousResearch#76765).
teknium1
left a comment
There was a problem hiding this comment.
Thanks for splitting this into a focused CLI operation. The change is cleanly based on current main: GitHub reports head af0b6530ff89603800879565cac1421daef3a1ac is one commit ahead of and zero behind current main 0a62610f10cc34d696b2239b2c69fa1ba0f1ca63.
Problems
tests/hermes_cli/test_kanban_body_update.py:56-61finds thebody_updatedrow but only checksauthor. The stated behavior hinges on the payload containing SHA-256 values and lengths while omitting task text, yet the test does not protect that contract.
Suggested changes
- Decode the payload and assert the expected hashes, lengths, event kind, and that it has no old/new body-text field. Retain the existing no-extra-event idempotency check.
Automated hermes-sweeper review.
| assert json.loads(event["payload"])["author"] == "p0-kanban-sync" | ||
|
|
||
| second = kb.update_task_body( | ||
| conn, |
There was a problem hiding this comment.
Please assert the full audit/privacy contract here: expected old/new SHA-256 values and lengths, plus that the decoded payload has no body-text fields. The current assertion only verifies author, so a later regression could persist canonical task text in the event log undetected.
GottZ
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Summary
Two PRs address this complex: #76718 records an initial blocked event so explicitly parked tasks remain sticky, while #76765 adds a separate audited command for replacing canonical task bodies without changing readiness, assignment, or status.
Related pull requests
- #76718 [closed]
related— (+118/-0) — closed as duplicate of #34735: the final diff narrowly emits a typed blocked event during create_task(initial_status='blocked') and adds unblock/reclaim lifecycle coverage. Despite the keep_open review on #76718, the reviewed block_kind-based recompute/reclaim guards are absent from the final diff, and the author closed this converged minimal fix in favor of #34735; it remains relevant as a reference implementation and as the source from which #76765 was split. - #76765
related— (+203/-0) — keep open with a salvage path: the focused diff atomically updates tasks.body, records only SHA-256 values, lengths, and author in a body_updated event, preserves task scheduling state, and makes identical updates event-free no-ops. The keep_open review identifies a concrete remaining test gap: the test must assert the expected hashes and lengths and verify that the decoded audit payload contains no body-text fields.
Duplicates
#76718 and #34735 implement substantially the same minimal initial-blocked event fix; #76765 is distinct because it contains only the audited canonical-body update operation.
Suggested consolidation
Keep #76765 open with a salvage path: retain its focused update-body database, CLI, documentation, idempotency, and state-preservation changes, and have the author add the full audit/privacy assertions requested by the contributor review before further consideration. Keep #76718 closed as a duplicate of #34735; its final narrow diff is useful as reference evidence, but it no longer contains the distinct body-update work now isolated in #76765.
Cross-PR triage: Reviewed 2 pull requests and 0 issues in this complex. Each diff was read against this issue; Assessment working set: 16 kB of PR diffs, 3 kB of issue/PR text, 5 kB of discussion (8 comments), 0 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.
What
Add
hermes kanban update-body <task_id> --body <text>to atomically replace a task's canonical body and append abody_updatedaudit event carrying only sha256 + lengths (no body text copied into the event log). Repeating the same body is a no-op and appends no event. The operation deliberately does not recompute readiness or touch assignment/status.Split out from #76718 (the combined body-update + sticky-initial-block PR) per triage review: this keeps the audited body-update operation as its own focused change. The sticky initial-block portion is being handled separately.
Tests
Docs
website/docs/reference/cli-commands.md: addedupdate-bodyrow.