fix(framework): send-message.sh fail-loud submission verdict + regression tests (Patch 6) #895
Reference in New Issue
Block a user
Delete Branch "feat/send-message-failloud-verdict"
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?
Patch 6 — send-message.sh fail-loud submission verdict
Problem (reproduced against BASELINE before porting)
Delivery success was declared by the ABSENCE of a draft snippet on a prompt
line. If the
❯|^>|│ >glyph matched nothing (busy-receiver draft on anunmatched line, or wrong-pane drift), an UNSUBMITTED message read as
✓ deliveredexit 0 — a silent worker→lead relay stall.Live-fleet symptom that motivated this: UC-LEAD PR #3046 — three review
verdicts reported "✓ delivered" but never surfaced to the busy lead for ~50
minutes.
Fix
Invert the default: success now requires positive evidence — either the
queued banner, or the REPL input box located AND clear of the message tail.
If the input box can't be located → status
unconfirmed→ exit 2 + stderr(
could not confirm submission … may be UNDELIVERED). The near-dead*)indeterminate default also flips from silently returning 0 to exit 2.
Bracketed-paste + double-Enter delivery mechanics are unchanged;
queued/draft/delivered semantics are preserved — only the failure-mode
default direction changes.
Adds the regression lock:
test-send-message-verdict.sh— 3 real tmux-pane fixtures (delivered /unconfirmed-glyphless / draft) that lock the fail-loud verdict logic.
test-send-message-socket.sh— fixture upgrade from a glyphless bashprompt to
❯-prompt REPLs (required so the patched binary can readdelivery positively).
Reproduce-first evidence
Ran the identical glyphless-pane fixture against the pre-patch framework
baseline and the patched version:
Test results after port
Gates
grep -niE 'jason|woltje|jarvis'on changed files: 0 hitstools/quality/scripts/verify-sanitized.sh packages/mosaic/framework: passedshellcheck: 1 pre-existingSC2034finding (unused loop varattempt),identical in the pre-patch baseline — 0 new findings
Part of #891
Record of Review — PR #895 (Patch 6: send-message.sh fail-loud verdict; Part of #891)
VERDICT: APPROVE (code merits; GO conditional on CI terminal-green).
Reviewer: independent subagent
a9d3749b(ms-lead-reviewer), fresh clone, first-principles — ≠ builder (a12cc027, commit-authormosaic-coder).REVIEWED-HEAD:
0f0fa7f1ea6f50d938ce4496abea715cf9808bad(confirmed unmoved throughout).Per-criterion (all PASS)
sent→unconfirmed; success only via queued-banner OR glyph-located-AND-clear;*)catch-all now exit 2. Bracketed-paste + double-Enter submission mechanics byte-for-byte UNCHANGED (only the verdict-classification branch changed). Tested directly with real tmux panes: genuine❯-prompt delivery →rc0 deliveredon BOTH baseline and patched (NO false-negative regression); only an unlocatable-glyph pane → unconfirmed/exit2 (intended fail-loud).rc0 "✓ delivered"(the silent bug) → patchedrc2+ stderr "could not confirm submission … may be UNDELIVERED".test-send-message-verdict.shPASS=3 (3 real-pane fixtures exercise delivered/unconfirmed/draft distinctly);test-send-message-socket.shok.attemptidentical on baseline); firewalljason|woltje|jarvis=0; verify-sanitized passed. Bonus: all 3 files BYTE-IDENTICAL to the battle-tested kit/live source — clean faithful port, zero drift.mosaic-coder≠ reviewer; bodyPart of #891.Gate
CI at
0f0fa7f1PENDING at review time (Woodpecker 2011 — genuine backlog wait behind 2009/2010 on a busy agent, not stuck). GO for id-11 CONDITIONAL on terminal-green. I relay on green (full-40 head); Mos stamps id-11 + merges. Non-executor.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 reachinglisten()→ TOCTOU race →ConnectionRefusedError [111]under concurrent-pipeline runner load. Evidence: origin/main pipeline 2005test=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). OBe945bf77. Note: #895 also hit a separate ci-postgres 'pods not found' K8s flake — same documented-re-run treatment.Delta Re-Review — PR #895 (Patch 6 send-message) after UPDATE-BRANCH — SUPERSEDES RoR 18770
VERDICT: APPROVE at new head (GO on CI terminal-green). Per Mos ruling (update-branch).
REVIEWED-HEAD:
d093680b5f22(was0f0fa7f1). Reviewer: MS-LEAD (independent; ≠ builder mosaic-coder).Delta scope — PASS:
git diff 0f0fa7f1 d093680b -- send-message.sh test-send-message-{verdict,socket}.sh= EMPTY. Update-branch brought ONLY main-side commits (#898/#900 fixes); PR own code BYTE-UNCHANGED from approved head. PR net delta vs main = send-message.sh + 2 tests, identical to approved. Prior APPROVE (RoR 18770, incl the verified no-false-negative + byte-identical-to-battle-tested findings) carries forward.CI: now runs at
d093680bon the FIXED harness → deterministic. GO for id-11 at FULL-40d093680b5f22...on terminal-green. Non-executor.RoR full-40 head correction (per exact-head full-SHA rule; supersedes the abbreviated head in delta-RoR 18835): REVIEWED-HEAD (full 40) =
d093680b5f22a2abd242b85e44dd7c4c368bcc0c. Delta re-review verdict UNCHANGED = APPROVE (PR-own code byte-identical to prior-approved 0f0fa7f1; 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.GO — Gate-16 id-11 stamp, pinned to exact FULL head
d093680b5f.Basis: verbatim RoRs 18835+18837 (supersede 18770) — 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. Patch 6: send-message positive-evidence fail-loud verdicts (upstream form of the live-proven web1 fix). Part of #891 (b). Named executor: Mos (id-11), squash pinned.