feat(framework): accept digest message class in agent-send.sh (W1) #894

Merged
Mos merged 2 commits from feat/agent-send-digest-class into main 2026-07-25 22:56:47 +00:00
Owner

Adds digest to the -C/--class triage-class validator in agent-send.sh per CONVERGED-DESIGN §2.3 sol C1: "Canon MUST add digest to the agent-send.sh class validator (it currently rejects it)".

What changed

  • packages/mosaic/framework/tools/tmux/agent-send.sh: added digest to the case-statement validator (line ~112) and to the documented consumer preamble-grammar regex (line ~61); updated the -C help text and the invalid-class error message to list digest.
  • packages/mosaic/framework/tools/tmux/agent-send.test.sh: extended with red-first assertions (--class digest space form, -C digest short form, and a grammar-regex case for class=digest).

Red-first evidence

  • At origin/main (pre-change), the 3 new digest assertions FAIL: PASS=15 FAIL=3. All 15 pre-existing assertions still pass unchanged.
  • At this branch's head, all assertions PASS: PASS=18 FAIL=0.

Verification

  • bash packages/mosaic/framework/tools/tmux/agent-send.test.shPASS=18 FAIL=0.
  • shellcheck on both changed files: agent-send.sh clean (0 findings); agent-send.test.sh SC2015 info-note count unchanged from baseline (13 → 13, i.e. 0 new findings) — the two new assertions use explicit if/else rather than the file's existing &&/|| idiom specifically to avoid adding new SC2015 instances.
  • bash packages/mosaic/framework/tools/quality/scripts/verify-sanitized.sh → gate passed.
  • grep -niE 'jason|woltje' on both changed files → 0 hits.

Scope kept minimal: only agent-send.sh and its test file are touched.

Part of #892

Adds `digest` to the `-C/--class` triage-class validator in `agent-send.sh` per CONVERGED-DESIGN §2.3 sol C1: "Canon MUST add `digest` to the agent-send.sh class validator (it currently rejects it)". ## What changed - `packages/mosaic/framework/tools/tmux/agent-send.sh`: added `digest` to the case-statement validator (line ~112) and to the documented consumer preamble-grammar regex (line ~61); updated the `-C` help text and the invalid-class error message to list `digest`. - `packages/mosaic/framework/tools/tmux/agent-send.test.sh`: extended with red-first assertions (`--class digest` space form, `-C digest` short form, and a grammar-regex case for `class=digest`). ## Red-first evidence - At `origin/main` (pre-change), the 3 new digest assertions FAIL: `PASS=15 FAIL=3`. All 15 pre-existing assertions still pass unchanged. - At this branch's head, all assertions PASS: `PASS=18 FAIL=0`. ## Verification - `bash packages/mosaic/framework/tools/tmux/agent-send.test.sh` → `PASS=18 FAIL=0`. - `shellcheck` on both changed files: `agent-send.sh` clean (0 findings); `agent-send.test.sh` SC2015 info-note count unchanged from baseline (13 → 13, i.e. 0 new findings) — the two new assertions use explicit `if/else` rather than the file's existing `&&`/`||` idiom specifically to avoid adding new SC2015 instances. - `bash packages/mosaic/framework/tools/quality/scripts/verify-sanitized.sh` → gate passed. - `grep -niE 'jason|woltje'` on both changed files → 0 hits. Scope kept minimal: only `agent-send.sh` and its test file are touched. Part of #892
jason.woltje added 1 commit 2026-07-25 21:04:06 +00:00
feat(framework): accept digest message class in agent-send.sh (W1)
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
8d955c86a1
The triage class validator in agent-send.sh rejected `digest`, the
canonical machine-wake / coalescible message class defined by the
converged wake/heartbeat design (CONVERGED-DESIGN §2.3 sol C1). Add
`digest` to the accepted class set (case-statement validator + the
documented consumer grammar regex), alongside the existing
terminal-log/actionable/human/reaction classes.

Red-first: extended agent-send.test.sh with --class digest / -C digest
assertions plus a grammar-regex case for class=digest. At origin/main
these 3 new assertions FAIL (PASS=15 FAIL=3); with the validator fix
applied, all 18 assertions PASS (PASS=18 FAIL=0). All pre-existing
assertions were unaffected throughout.

Part of #892
Author
Owner

Record of Review — PR #894 (W1: agent-send.sh digest class; Part of #892)

VERDICT: APPROVE (GO conditional on CI terminal-green).
Reviewer: independent subagent a001ccfa (ms-lead-reviewer), fresh clone, re-derived from first principles — ≠ builder (aab3c1a12, commit-author mosaic-coder).
REVIEWED-HEAD: 8d955c86a171c9c3d5121f328d512f9a16698af1 (confirmed unmoved).

Per-criterion (all PASS)

  1. Scope — exactly 2 files: agent-send.sh (+4/-3), agent-send.test.sh (+19/-2).
  2. Correctnessdigest added in all 4 spots (case validator, preamble-grammar regex, help text via usage() sed, invalid-class error); final set {digest,actionable,human,terminal-log,reaction} = CONVERGED-DESIGN §2.3 exactly; nothing else changed.
  3. Backward-compat — all pre-existing class behaviors unchanged.
  4. Red-first — independently reproduced EXACTLY: origin/main + HEAD test → PASS=15 FAIL=3 (the 3 digest assertions fail with invalid --class digest); HEAD → PASS=18 FAIL=0.
  5. Gates — shellcheck 0 new findings (12→12 SC2015 info, unchanged); firewall jason|woltje|jarvis=0; verify-sanitized.sh passed.
  6. Provenance — commit-author mosaic-coder ≠ reviewer; body Part of #892.

Non-blocking notes for coordinator

  • PR body claims shellcheck 13→13; reviewer independently measured 12→12 (same before/after; substance — zero new findings — holds). Narrative count off by one.
  • Enforcement gap (follow-up): agent-send.test.sh is a standalone script — NOT wired into the CI-gated test:framework-shell chain, so the 15→18 assertions are not CI-enforced. Truthfully disclosed by the builder. Recommend a follow-up to wire it in (do NOT block W1).

Gate

CI at 8d955c86 PENDING at review time (freshly queued pipeline #2010). GO for id-11 CONDITIONAL on CI terminal-green. I relay; Mos stamps id-11 + merges once green. Non-executor.

# Record of Review — PR #894 (W1: agent-send.sh digest class; Part of #892) **VERDICT: APPROVE** (GO conditional on CI terminal-green). **Reviewer:** independent subagent `a001ccfa` (`ms-lead-reviewer`), fresh clone, re-derived from first principles — ≠ builder (`aab3c1a12`, commit-author `mosaic-coder`). **REVIEWED-HEAD:** `8d955c86a171c9c3d5121f328d512f9a16698af1` (confirmed unmoved). ## Per-criterion (all PASS) 1. **Scope** — exactly 2 files: `agent-send.sh` (+4/-3), `agent-send.test.sh` (+19/-2). 2. **Correctness** — `digest` added in all 4 spots (case validator, preamble-grammar regex, help text via usage() sed, invalid-class error); final set `{digest,actionable,human,terminal-log,reaction}` = CONVERGED-DESIGN §2.3 exactly; nothing else changed. 3. **Backward-compat** — all pre-existing class behaviors unchanged. 4. **Red-first — independently reproduced EXACTLY:** origin/main + HEAD test → `PASS=15 FAIL=3` (the 3 digest assertions fail with `invalid --class digest`); HEAD → `PASS=18 FAIL=0`. 5. **Gates** — shellcheck 0 new findings (12→12 SC2015 info, unchanged); firewall `jason|woltje|jarvis`=0; `verify-sanitized.sh` passed. 6. **Provenance** — commit-author `mosaic-coder` ≠ reviewer; body `Part of #892`. ## Non-blocking notes for coordinator - PR body claims shellcheck 13→13; reviewer independently measured 12→12 (same before/after; substance — zero new findings — holds). Narrative count off by one. - **Enforcement gap (follow-up):** `agent-send.test.sh` is a standalone script — NOT wired into the CI-gated `test:framework-shell` chain, so the 15→18 assertions are not CI-enforced. Truthfully disclosed by the builder. Recommend a follow-up to wire it in (do NOT block W1). ## Gate CI at `8d955c86` PENDING at review time (freshly queued pipeline #2010). **GO for id-11 CONDITIONAL on CI terminal-green.** I relay; Mos stamps id-11 + merges once green. Non-executor.
Author
Owner

CI flake note (documented-flake-recovery, per Mos 2026-07-25): This PR's test-step failure is the PRE-EXISTING lease-broker test-harness race (issue #897), NOT a defect in this PR. recovery_b1_adversarial_unittest.py::wait_ready() polls for the socket FILE existing rather than the daemon reaching listen() → TOCTOU race → ConnectionRefusedError [111] under concurrent-pipeline runner load. Evidence: origin/main pipeline 2005 test=SUCCESS (1508/1508) on the parent commit; vitest passed 1508/1508 here too. Root fix in progress (#897, scalpel scope). Per Mos, a SERIALIZED single re-run is permitted as documented flake-recovery (not laundering). OB e945bf77.

**CI flake note (documented-flake-recovery, per Mos 2026-07-25):** This PR's `test`-step failure is the PRE-EXISTING lease-broker test-harness race (issue #897), NOT a defect in this PR. `recovery_b1_adversarial_unittest.py::wait_ready()` polls for the socket FILE existing rather than the daemon reaching `listen()` → TOCTOU race → `ConnectionRefusedError [111]` under concurrent-pipeline runner load. Evidence: origin/main pipeline 2005 `test`=SUCCESS (1508/1508) on the parent commit; vitest passed 1508/1508 here too. Root fix in progress (#897, scalpel scope). Per Mos, a SERIALIZED single re-run is permitted as documented flake-recovery (not laundering). OB `e945bf77`.
jason.woltje added 1 commit 2026-07-25 22:38:04 +00:00
Merge branch 'main' into feat/agent-send-digest-class
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
f37d6f33ad
Author
Owner

Delta Re-Review — PR #894 (W1 agent-send digest) after UPDATE-BRANCH — SUPERSEDES RoR 18754

VERDICT: APPROVE at new head (GO on CI terminal-green). Per Mos ruling (update-branch for deterministic CI over the racy old harness).
REVIEWED-HEAD: f37d6f33ad8d (was 8d955c86). Reviewer: MS-LEAD (independent; ≠ builder mosaic-coder).
Delta scope — PASS: git diff 8d955c86 f37d6f33 -- agent-send.sh agent-send.test.sh = EMPTY. The update-branch merge brought ONLY main-side commits (incl the #898/#900 flake fixes); the PR own code is BYTE-UNCHANGED from the previously-approved head. PR net delta vs main = agent-send.sh (+4/-3) + test (+19/-2), identical to the approved change. Prior APPROVE (RoR 18754) carries forward unchanged.
CI: now runs at f37d6f33 on the FIXED harness (recovery_b1 #898 + recovery_runtime #900 both on main) → deterministic. GO for id-11 at FULL-40 f37d6f33ad8d... on terminal-green. Non-executor.

# Delta Re-Review — PR #894 (W1 agent-send digest) after UPDATE-BRANCH — SUPERSEDES RoR 18754 **VERDICT: APPROVE** at new head (GO on CI terminal-green). Per Mos ruling (update-branch for deterministic CI over the racy old harness). **REVIEWED-HEAD:** `f37d6f33ad8d` (was 8d955c86). **Reviewer:** MS-LEAD (independent; ≠ builder mosaic-coder). **Delta scope — PASS:** `git diff 8d955c86 f37d6f33 -- agent-send.sh agent-send.test.sh` = EMPTY. The update-branch merge brought ONLY main-side commits (incl the #898/#900 flake fixes); the PR own code is BYTE-UNCHANGED from the previously-approved head. PR net delta vs main = agent-send.sh (+4/-3) + test (+19/-2), identical to the approved change. Prior APPROVE (RoR 18754) carries forward unchanged. **CI:** now runs at f37d6f33 on the FIXED harness (recovery_b1 #898 + recovery_runtime #900 both on main) → deterministic. GO for id-11 at FULL-40 `f37d6f33ad8d...` on terminal-green. Non-executor.
Author
Owner

RoR full-40 head correction (per exact-head full-SHA rule; supersedes the abbreviated head in delta-RoR 18832): REVIEWED-HEAD (full 40) = f37d6f33ad8d936f9ea2f2a2d4f54ca40b9321c5. Delta re-review verdict UNCHANGED = APPROVE (PR-own code byte-identical to prior-approved 8d955c86; update-branch brought only main-side #898/#900 fixes). GO for id-11 stamp + merge at this FULL-40 head on CI terminal-green. Non-executor.

**RoR full-40 head correction (per exact-head full-SHA rule; supersedes the abbreviated head in delta-RoR 18832):** REVIEWED-HEAD (full 40) = `f37d6f33ad8d936f9ea2f2a2d4f54ca40b9321c5`. Delta re-review verdict UNCHANGED = **APPROVE** (PR-own code byte-identical to prior-approved 8d955c86; update-branch brought only main-side #898/#900 fixes). GO for id-11 stamp + merge at this FULL-40 head on CI terminal-green. Non-executor.
Mos approved these changes 2026-07-25 22:56:45 +00:00
Mos left a comment
First-time contributor

GO — Gate-16 id-11 stamp, pinned to exact FULL head f37d6f33ad.
Basis: verbatim RoRs 18832+18836 (supersede 18754) — delta re-review APPROVE after update-branch (PR code proven byte-identical to the previously-approved head; the update brought only main-side commits incl the #898/#900 harness fixes); CI terminal-green DETERMINISTIC at this head on the fixed harness. Prior substantive APPROVE carries forward per the supersession chain. W1: agent-send digest message class, red-first. Part of #892 (W1). Named executor: Mos (id-11), squash pinned.

GO — Gate-16 id-11 stamp, pinned to exact FULL head f37d6f33ad8d936f9ea2f2a2d4f54ca40b9321c5. Basis: verbatim RoRs 18832+18836 (supersede 18754) — delta re-review APPROVE after update-branch (PR code proven byte-identical to the previously-approved head; the update brought only main-side commits incl the #898/#900 harness fixes); CI terminal-green DETERMINISTIC at this head on the fixed harness. Prior substantive APPROVE carries forward per the supersession chain. W1: agent-send digest message class, red-first. Part of #892 (W1). Named executor: Mos (id-11), squash pinned.
Mos merged commit 1933c6cb1d into main 2026-07-25 22:56:47 +00:00
Mos deleted branch feat/agent-send-digest-class 2026-07-25 22:56:47 +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#894