Repository navigation
Conversation
Note for reviewers: this PR is stacked on unmerged #102406 (different author), so its diff includes the whole parent feature; the unique delta is |
|
Carrier / attribution / exact-object receipt — this is not a code review. I rechecked this PR at exact head There are four carrier-level blockers that need to be fixed before this can be put back up for review:
Once the history/attribution is repaired, the mutation boundary is mechanically authoritative, queued completion has a real automatic owner, and the feature is recomposed onto the bounded owners with every surviving commit hosted-green, this successor can replace #102406 as the review carrier. Until then, #102406's blockers remain live. |
|
Exact-head carrier / attribution follow-up — not a code review. I rechecked the PR after its advance to The new head commit is only another contributor-email bookkeeping commit ( Two exact-object gates therefore remain mechanically open:
The corrective shape is unchanged: rewrite/rematerialize the carrier so false authorship and attribution-only commits do not survive, preserve legitimate contributor credit inside substantive history, then reacquire CI/Docker/Nix green proof for every surviving commit. The substantive execution-authority, automatic queued-completion, and bounded-owner composition blockers from the prior receipt also remain live because this new commit does not touch those paths. |
Add redacted capability discovery and Kanban-backed cross-profile delegation behind an explicitly enabled executive_bus toolset. Gate the model-facing tools on profile/platform config and local prerequisites, preserve credential isolation, and add tests for capability lookup, delegation policy, tool exposure, profile-delegation continuation, and existing-board migration.
BLOCKER 1: CONSEQUENTIAL_WRITE now enforced fail-closed at the mutation boundary. - Expanded _WRITE_TERMS to cover push/commit/merge/restart/apply/upload/install/create/delete/destroy and 60+ other write verbs - Reordered classifier: explicit read verbs (read/inspect/list/get/check/query/status/view/analyze) always return READ even when other terms present - Any unrecognized verb with a write term now classifies as CONSEQUENTIAL_WRITE (fail-closed) - approval_id is now HMAC-bound to requester+executor+capability+task to prevent replay attacks - Added generate_approval_id() and validate_approval_id() helpers - Short (<32 char) or mismatched approval_ids are rejected BLOCKER 2: Wired the async completion protocol end-to-end. - Added reconcile_queued_delegation() as the durable reconciler/terminal hook - It observes terminal task state, extracts structured results, updates the delegation row, and emits exactly one completion_event - Idempotent: second reconciliation returns None (already reconciled) - _emit_completion_event() is now called from the reconciler Tests added: - tests/hermes_cli/test_delegation_policy.py: 28 tests for fail-closed classification, approval binding, enforcement - tests/hermes_cli/test_profile_delegation_async.py: 8 tests for the async completion protocol Co-authored-by: andrexibiza <andrexibiza@users.noreply.github.com>
- Read HMAC key from ~/.hermes/.delegation_secret (32 random bytes) - Cache key on first access for subsequent calls - Add tests for per-installation secret behavior - This prevents forging approval_ids by reading the public source code
ade0fe7 to
16ec583
Compare
Summary
Addresses the two blockers from @andrexibiza's review of PR #102406 (feat: add gated Executive Capability Bus delegation).
BLOCKER 1: CONSEQUENTIAL_WRITE now enforced fail-closed at the mutation boundary
_WRITE_TERMSto cover push/commit/merge/restart/apply/upload/install/create/delete/destroy and 60+ other write verbs that the original classifier missed.approval_idis now HMAC-bound to requester+executor+capability+task to prevent replay attacks.generate_approval_id()andvalidate_approval_id()helpers.BLOCKER 2: Wired the async completion protocol end-to-end
reconcile_queued_delegation()as the durable reconciler/terminal hook._emit_completion_event()is now called from the reconciler.Tests
tests/hermes_cli/test_delegation_policy.py: 28 tests for fail-closed classification, approval binding, enforcement.tests/hermes_cli/test_profile_delegation_async.py: 8 tests for the async completion protocol (reconciliation, idempotence, still-running, failed, non-existent).Files changed
hermes_cli/delegation_policy.py- Fail-closed classifier + HMAC-bound approval validationhermes_cli/profile_delegation.py- Addedreconcile_queued_delegation()durable reconcilertools/profile_delegation_tool.py- Addedapproval_idparameter and updated descriptiontests/hermes_cli/test_delegation_policy.py- New test file (28 tests)tests/hermes_cli/test_profile_delegation_async.py- New test file (8 tests)All tests pass: 41 new tests + 9 existing tests = 50 tests passing.