feat(wake): W3 — cumulative-state digest renderer + non-circular HMAC signer #904
Reference in New Issue
Block a user
Delete Branch "feat/wake-digest-hmac"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Builds on the merged W2 store/ack (EPIC #892). Adds A3 (
digest.sh) and A5 (sign.sh) underpackages/mosaic/framework/tools/wake/, honoring CONVERGED-DESIGN exactly. One coherent PR.A3 —
digest.shcumulative-state digest rendererconsumed_seqfrom the durable pending-inbox (store.sh drain). Two still-pending changes both render.CLAIM@seqclaim-to-verify ("VERIFY LIVE, do NOT act on this line"); never auto-actioned. Self-sufficiency never exempts a live gate.store.sh drain(or--from-file/--stdin).A5 —
sign.shnon-circular HMAC signerwake_idgenerated INDEPENDENTLY at emit (not derived from, not a member of, the signed field-tuple).wake_mac = HMAC(key, wake_id ‖ agent_identity ‖ mission_generation ‖ observed_seq ‖ emit_ts ‖ content_hash)— over wake_id PLUS the fields; the MAC is never its own input. Envelope splitswake_id/signed{…}/wake_macto make non-circularity visible.sign-entryfills thehmacfield W2 left as""and attaches the independentwake_id; content_hash binds{observed_seq,class,emit_ts,locators}..wake.hmac_keys.<name>); never inlined, never echoed, no flag accepts key material; unresolvable name = fail-loud.Subcommands:
sign,sign-digest,sign-entry,verify,verify-entry.RED-FIRST evidence
test-wake-digest-hmac.sh(wired intotest:framework-shell, after the W2 harness). Each invariant was verified to go RED on a targeted regression of the implementation:tail -1(delta) → "OLDER change (issue #11) dropped"git→ "orientation no-op made a live tool call"_scrub_ctrl→cat→ "ANSI ESC / bidi / C0 survived the scrub"--keyflag → "accepted an inline-key flag"Gates
test:framework-shellfull chain: green (rc=0), new harness passes 6/6.shellcheck -xclean ondigest.sh,sign.sh,test-wake-digest-hmac.sh.grep -niE 'jason|woltje|jarvis'= 0; no$HOME/srcdefaults; sanitization gate passes. Operator-agnostic (XDG/env only).prettier --checkclean on the editedpackage.json.Out of scope (untouched): detector (W4), FN-oracle/reconciler (W5), beacon (W6), installer (W7).
Part of #892
Record of Review — PR #904 W3 (digest renderer + non-circular HMAC signer; Part of #892)
VERDICT: APPROVE. Reviewer: independent subagent
a0499b1d(opus, per CONVERGED-DESIGN §2.1/§2.5) — ≠ builder (mosaic-coder). REVIEWED-HEAD (full-40):d3318c5910eed3ea48d94b58f8ef3f28e9962c42.Per-criterion (all 8 PASS, re-derived)
CLAIM@seqframed UNTRUSTED-VERIFY-LIVE.Non-blocking hardening (tracked as #905, NOT a merge blocker)
Validator/render asymmetry: a hand-crafted top-level
.claimentry via --stdin/--from-file could render without a locator (escaping exit-4). NOT reachable via canonical --from-store (store never emits top-level .claim); trust framing intact (locator-completeness gap, not trust bypass). Fast-follow #905.GO for id-11 + merge at FULL-40
d3318c5910eed3ea48d94b58f8ef3f28e9962c42. Non-executor.GO — Gate-16 id-11 stamp, pinned to exact FULL head
d3318c5910.Basis: verbatim RoR (comment 18901) — independent contract review APPROVE (all 8 criteria vs CONVERGED-DESIGN §2.1/§2.5, red-first reproduced). The §2.5 HMAC question is ADJUDICATED with manual recomputation: wake_id independently generated, outside the signed field-set, prepended-to-bind — non-circularity is generation-independence, not input-exclusion (builder/Mos/reviewer concordant; the brief gloss was the artifact). Two-tier trust, hard-locator fail-loud, scrub + secret-canary, key-by-name all verified. #905 tracked as non-blocking locator-completeness hardening on non-canonical input paths. CI terminal-green. W3 of EPIC #892. Named executor: Mos (id-11), squash pinned.