fix(wake): #914 digest renderer — WAKE_AGENT-prefixed ack line + digest-class locator threading #916

Merged
Mos merged 3 commits from feat/wake-914-digest-render into main 2026-07-26 07:13:08 +00:00
Owner

Closes #914
Part of #892

Two digest.sh renderer fixes surfaced by the live dragon-lin wake pilot.

(a) WAKE_AGENT-prefixed embedded ack copy-run line: the ACK block digest.sh renders (via ack.sh embed) now bakes an explicit WAKE_AGENT= prefix onto the emitted copy-run line, scrubbed through _scrub_inline and shell-quoted (printf %q) so it can never become a shell-injection vector. Previously an env-less copy-run resolved to the wake/default/ namespace and refused; now it targets the agent the digest was actually rendered for. Ack semantics (cumulative, contiguous-prefix, local-write-only) are unchanged.

(b) Digest-class ORIENTATION locator threading: _locator_line now also recognizes the locator vocabulary detector.sh (A1) actually emits for a digest-class entry (kind/id/observed_hash/remote/path/branches), not just the hard-locator shape (repo/issue/sha/file/anchor/head). A digest-class ORIENTATION pointer now carries a usable (soft) locator instead of rendering empty. This is display-only in _locator_line: _has_hard_locator and the ACTIONABLE-tier hard-locator FAIL-LOUD (exit 4) are completely unchanged.

RED-FIRST: new D5 (#914a) and D6 (#914b) groups added to test-wake-digest-hmac.sh, verified RED against unmodified digest.sh/ack.sh and GREEN after the fix (stash/pop diffed both ways). D6 also re-asserts the ACTIONABLE hard-locator FAIL-LOUD (exit 4) is unchanged. H1/H2 (openssl-dependent HMAC tests) are now individually SKIPped rather than short-circuiting the whole file, so D1-D6 still run (and catch a regression) when openssl is masked from PATH.

Scope: touches only digest.sh + ack.sh + their test harness + the wake manifest version bump (0.6.0 -> 0.6.1). store.sh/detector.sh/reconcile.sh are untouched (avoids collision with the concurrent #908 work).

Gates: shellcheck 0.11 clean, verify-sanitized.sh PASS, full pnpm run test:framework-shell rc=0 (both with openssl present and with openssl masked from PATH), firewall check (jason|woltje|jarvis) = 0 added-line hits.

Closes #914 Part of #892 Two digest.sh renderer fixes surfaced by the live dragon-lin wake pilot. (a) WAKE_AGENT-prefixed embedded ack copy-run line: the ACK block digest.sh renders (via ack.sh embed) now bakes an explicit WAKE_AGENT=<render-time-agent> prefix onto the emitted copy-run line, scrubbed through _scrub_inline and shell-quoted (printf %q) so it can never become a shell-injection vector. Previously an env-less copy-run resolved to the wake/default/ namespace and refused; now it targets the agent the digest was actually rendered for. Ack semantics (cumulative, contiguous-prefix, local-write-only) are unchanged. (b) Digest-class ORIENTATION locator threading: _locator_line now also recognizes the locator vocabulary detector.sh (A1) actually emits for a digest-class entry (kind/id/observed_hash/remote/path/branches), not just the hard-locator shape (repo/issue/sha/file/anchor/head). A digest-class ORIENTATION pointer now carries a usable (soft) locator instead of rendering empty. This is display-only in _locator_line: _has_hard_locator and the ACTIONABLE-tier hard-locator FAIL-LOUD (exit 4) are completely unchanged. RED-FIRST: new D5 (#914a) and D6 (#914b) groups added to test-wake-digest-hmac.sh, verified RED against unmodified digest.sh/ack.sh and GREEN after the fix (stash/pop diffed both ways). D6 also re-asserts the ACTIONABLE hard-locator FAIL-LOUD (exit 4) is unchanged. H1/H2 (openssl-dependent HMAC tests) are now individually SKIPped rather than short-circuiting the whole file, so D1-D6 still run (and catch a regression) when openssl is masked from PATH. Scope: touches only digest.sh + ack.sh + their test harness + the wake manifest version bump (0.6.0 -> 0.6.1). store.sh/detector.sh/reconcile.sh are untouched (avoids collision with the concurrent #908 work). Gates: shellcheck 0.11 clean, verify-sanitized.sh PASS, full pnpm run test:framework-shell rc=0 (both with openssl present and with openssl masked from PATH), firewall check (jason|woltje|jarvis) = 0 added-line hits.
jason.woltje added 1 commit 2026-07-26 05:13:15 +00:00
(a) the embedded ack copy-run line (digest.sh -> ack.sh embed) now bakes an
    explicit WAKE_AGENT=<render-time-agent> prefix (scrubbed via _scrub_inline,
    shell-quoted via printf %q), so an env-less copy-run resolves to the
    correct per-agent namespace instead of silently falling back to 'default'.

(b) _locator_line now also recognizes the locator vocabulary detector.sh (A1)
    actually emits for a digest-class entry (kind/id/observed_hash/remote/path
    /branches, not repo/issue/sha/file), so a digest-class ORIENTATION pointer
    carries a usable (soft) locator instead of rendering empty. Display-only:
    _has_hard_locator and the ACTIONABLE-tier hard-locator FAIL-LOUD (exit 4)
    are unchanged.

RED-FIRST: new D5/D6 groups added to test-wake-digest-hmac.sh, verified RED
against unmodified digest.sh/ack.sh and GREEN after the fix (stash/pop
diffed). H1/H2 (openssl-dependent) are now individually SKIPped instead of
short-circuiting the whole file, so D1-D6 (including the new tests) still run
and pass when openssl is masked from PATH.

Touches only digest.sh + ack.sh + their test harness + the wake manifest
version bump; store.sh/detector.sh/reconcile.sh untouched (avoids collision
with the concurrent #908 work).

Closes #914
Part of #892
jason.woltje added 1 commit 2026-07-26 05:42:05 +00:00
jason.woltje added 1 commit 2026-07-26 07:00:41 +00:00
Merge remote-tracking branch 'origin/main' into feat/wake-914-digest-render
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
5d96cbe896
# Conflicts:
#	packages/mosaic/framework/tools/wake/manifest.txt
Author
Owner

Record of Review — PR #916 (issue #914): digest renderer fixes (WAKE_AGENT-prefixed ack + digest-class locator) — FINAL, CI-GREEN

VERDICT: APPROVE — GO. REVIEWED-HEAD (full-40): 5d96cbe896464c1d4db210fdcd4aace3d26f55e0. CI: TERMINAL-GREEN at this exact head.

Review basis (renderer APPROVE + two delta-re-reviews carried through)

  • Renderer review: independent reviewer a9794cb8 (opus, ≠ builder mosaic-coder) at 2fb15b3aAPPROVE, 5/5 verified against runtime: (a) ack.sh embed --agent bakes a printf %q-shell-quoted WAKE_AGENT= prefix → env-less copy-run resolves to the correct namespace (reproduced; hostile agent values %q-escaped, no injection); (b) _locator_line renders the detectors digest-class locator vocabulary (kind/id/observed_hash/remote/path/branches) DISPLAY-only → ORIENTATION pointer carries its locator, with _has_hard_locator + the ACTIONABLE-tier exit-4 FAIL-LOUD byte-unchanged (reproduced); observed_hash kept distinct from a git sha; two-tier trust + scrub intact.
  • Delta-re-review #1 (guard-revert d0bdad93): reverted the openssl-guard rescoping (restore whole-file skip) — test-harness-only; digest.sh/ack.sh byte-unchanged → renderer APPROVE carried. (The digest-suite CI-cleanliness work + evidence live at #912.)
  • Delta-re-review #2 (union-update 5d96cbe, MS-LEAD, git-verified): net delta vs current main = EXACTLY #916s 4 files (ack.sh, digest.sh, manifest.txt, test-wake-digest-hmac.sh); digest.sh/ack.sh/test-wake-digest-hmac.sh byte-identical to the cleared head d0bdad93 (renderer content unchanged → APPROVE carries); store.sh/detector.sh/reconcile.sh/test-wake-store-ack.sh/_wake-common.sh byte-identical to main (the merged #915 allocator + #919 T7 de-flake fully intact); the only new content is the mechanical manifest.txt union → version=0.6.2 keeping BOTH changelog entries (0.6.1 #908 + 0.6.2 #914).

Deterministic green

Prior #916 CI bounces are all cured on the reconciled main: T7 de-flaked (#919), the digest-hmac harness whole-file-skips openssl (D1-D6 CI-unmask deferred to #912), and the manifest 0.6.1 race resolved to 0.6.2. Full-suite rc=0 normal + openssl-masked; T7 10× green; shellcheck clean; firewall 0.

6-check — GO

  1. open/mergeable base main ✓ · 2. CI TERMINAL-GREEN @ full-40 5d96cbe896464c1d4db210fdcd4aace3d26f55e0 ✓ · 3. reviewer(a9794cb8)≠builder + MS-LEAD cumulative delta-re-reviews, durable RoR ✓ · 4. reviewed==CI==merge-head all 5d96cbe ✓ · 5. body Closes #914 + Part of #892 ✓ · 6. queue-guard at merge.
    GO for id-11 + squash-merge at FULL-40 5d96cbe896464c1d4db210fdcd4aace3d26f55e0. Closes #914 (pilot E2E digest renderer fixes). This is the last wake-tail follow-up. Non-executor.
# Record of Review — PR #916 (issue #914): digest renderer fixes (WAKE_AGENT-prefixed ack + digest-class locator) — FINAL, CI-GREEN **VERDICT: APPROVE — GO.** **REVIEWED-HEAD (full-40):** `5d96cbe896464c1d4db210fdcd4aace3d26f55e0`. **CI: TERMINAL-GREEN** at this exact head. ## Review basis (renderer APPROVE + two delta-re-reviews carried through) - **Renderer review:** independent reviewer `a9794cb8` (opus, ≠ builder `mosaic-coder`) at `2fb15b3a` → **APPROVE, 5/5** verified against runtime: (a) `ack.sh embed --agent` bakes a `printf %q`-shell-quoted `WAKE_AGENT=` prefix → env-less copy-run resolves to the correct namespace (reproduced; hostile agent values %q-escaped, no injection); (b) `_locator_line` renders the detectors digest-class locator vocabulary (kind/id/observed_hash/remote/path/branches) DISPLAY-only → ORIENTATION pointer carries its locator, with `_has_hard_locator` + the ACTIONABLE-tier exit-4 FAIL-LOUD byte-unchanged (reproduced); `observed_hash` kept distinct from a git sha; two-tier trust + scrub intact. - **Delta-re-review #1 (guard-revert `d0bdad93`):** reverted the openssl-guard rescoping (restore whole-file skip) — test-harness-only; digest.sh/ack.sh byte-unchanged → renderer APPROVE carried. (The digest-suite CI-cleanliness work + evidence live at #912.) - **Delta-re-review #2 (union-update `5d96cbe`, MS-LEAD, git-verified):** net delta vs current main = EXACTLY #916s 4 files (ack.sh, digest.sh, manifest.txt, test-wake-digest-hmac.sh); digest.sh/ack.sh/test-wake-digest-hmac.sh **byte-identical** to the cleared head `d0bdad93` (renderer content unchanged → APPROVE carries); store.sh/detector.sh/reconcile.sh/test-wake-store-ack.sh/_wake-common.sh **byte-identical to main** (the merged #915 allocator + #919 T7 de-flake fully intact); the only new content is the mechanical `manifest.txt` union → **version=0.6.2** keeping BOTH changelog entries (0.6.1 #908 + 0.6.2 #914). ## Deterministic green Prior #916 CI bounces are all cured on the reconciled main: T7 de-flaked (#919), the digest-hmac harness whole-file-skips openssl (D1-D6 CI-unmask deferred to #912), and the manifest 0.6.1 race resolved to 0.6.2. Full-suite rc=0 normal + openssl-masked; T7 10× green; shellcheck clean; firewall 0. ## 6-check — GO 1. open/mergeable base main ✓ · 2. **CI TERMINAL-GREEN @ full-40 `5d96cbe896464c1d4db210fdcd4aace3d26f55e0`** ✓ · 3. reviewer(`a9794cb8`)≠builder + MS-LEAD cumulative delta-re-reviews, durable RoR ✓ · 4. reviewed==CI==merge-head all `5d96cbe` ✓ · 5. body `Closes #914` + `Part of #892` ✓ · 6. queue-guard at merge. **GO for id-11 + squash-merge at FULL-40 `5d96cbe896464c1d4db210fdcd4aace3d26f55e0`. Closes #914 (pilot E2E digest renderer fixes). This is the last wake-tail follow-up. Non-executor.**
Mos approved these changes 2026-07-26 07:13:06 +00:00
Mos left a comment
First-time contributor

GO — Gate-16 id-11 stamp, pinned to exact FULL head 5d96cbe896.
Basis: verbatim FINAL RoR (comment 19071) — renderer review a9794cb8 APPROVE (5/5: WAKE_AGENT-prefixed injection-safe ack embed; locator vocab threaded into the orientation render display-only with the actionable exit-4 untouched) carried through both git-verified delta-re-reviews (guard-revert + union-update: net delta exactly the 4 renderer files byte-identical to the cleared head; main's #915 allocator and #919 de-flake intact; manifest 0.6.2 mechanical union). CI terminal-green first-try post-union — every prior bounce cause cured. Closes #914. With this merge ALL pilot-driven follow-ups are resolved (#908/#914/#918); tracked residuals #912 (pre-vector G6), #913, #917. Part of #892. Named executor: Mos (id-11), squash pinned.

GO — Gate-16 id-11 stamp, pinned to exact FULL head 5d96cbe896464c1d4db210fdcd4aace3d26f55e0. Basis: verbatim FINAL RoR (comment 19071) — renderer review a9794cb8 APPROVE (5/5: WAKE_AGENT-prefixed injection-safe ack embed; locator vocab threaded into the orientation render display-only with the actionable exit-4 untouched) carried through both git-verified delta-re-reviews (guard-revert + union-update: net delta exactly the 4 renderer files byte-identical to the cleared head; main's #915 allocator and #919 de-flake intact; manifest 0.6.2 mechanical union). CI terminal-green first-try post-union — every prior bounce cause cured. Closes #914. With this merge ALL pilot-driven follow-ups are resolved (#908/#914/#918); tracked residuals #912 (pre-vector G6), #913, #917. Part of #892. Named executor: Mos (id-11), squash pinned.
Mos merged commit d967a4a926 into main 2026-07-26 07:13:08 +00:00
Mos deleted branch feat/wake-914-digest-render 2026-07-26 07:13:08 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#916