Skip to content

feat(kanban): add audited update-body command - #76765

Open
Jeffgithub0029 wants to merge 1 commit into
NousResearch:mainfrom
Jeffgithub0029:feat/kanban-update-body
Open

Jeffgithub0029 wants to merge 1 commit into
NousResearch:mainfrom
Jeffgithub0029:feat/kanban-update-body

Conversation

@Jeffgithub0029

Copy link
Copy Markdown
Contributor

What

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 #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

python -m pytest tests/hermes_cli/test_kanban_body_update.py -q
→ 2 passed

Docs

  • website/docs/reference/cli-commands.md: added update-body row.

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.
Jeffgithub0029 added a commit to Jeffgithub0029/hermes-agent that referenced this pull request Aug 2, 2026
…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).
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cron Cron scheduler and job management labels Aug 2, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-61 finds the body_updated row but only checks author. 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,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@teknium1 teknium1 added sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform area/install-update Installer, updater, packaging, wheels, doctor labels Aug 2, 2026

@GottZ GottZ left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install-update Installer, updater, packaging, wheels, doctor comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants