a73x

1b993c93

test: a styled specimen, so the byte-exact leg has something to compare

a73x   2026-08-09 20:49

Commit message
test: a styled specimen, so the byte-exact leg has something to compare

Campaign row 4 broke the delta paint's leading SGR reset and both suites
passed. The reading at the time was that the styled (--vt) comparison is
the right instrument handed no specimen: nothing in the corpus had ever
emitted a colour, so a suppressed reset reset nothing.

This is the specimen — two bold-red rows from the session's own shell,
followed by a plain prompt row that must come back unstyled. It does not
catch mutation 4 (that resolution is written up in the campaign doc; the
premise was wrong, and the row is banked). It does catch a mutation that
strips every SGR run from delta rows: plain diff empty, styled leg
alone, at this scenario before any other. Until now the only source of
styled bytes anywhere in the suite was the prediction overlay's own
underline, so daemon-side style emission was never under the check.

Pins move to 10 scenario checkpoints and 22 convergence points.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

test/e2e.sh
Old New
@@ -216,7 +216,7 @@ cleanup() {
216 "$OUT.p1.err" "$OUT.pb.err" "$OUT.pw.err" "$OUT.rw.err" "$OUT.pr.err" \ 216 "$OUT.p1.err" "$OUT.pb.err" "$OUT.pw.err" "$OUT.rw.err" "$OUT.pr.err" \
217 "$OUT.p1.d" "$OUT.pw.d" "$OUT.rw.d" "$OUT.pr.d" \ 217 "$OUT.p1.d" "$OUT.pw.d" "$OUT.rw.d" "$OUT.pr.d" \
218 "$SOCK" "$SOCK2" "$SOCK3" "$SOCK4" "$SOCK4.second" "$QKEY" "$QKEY.bad" \ 218 "$SOCK" "$SOCK2" "$SOCK3" "$SOCK4" "$SOCK4.second" "$QKEY" "$QKEY.bad" \
219 "$OUT" "$OUT.kill" "$OUT.re" "$OUT.a" \ 219 "$OUT" "$OUT.kill" "$OUT.re" "$OUT.a" "$OUT.st" \
220 "$OUT.b" "$OUT.via" "$OUT.dead" "$OUT.abort" "$OUT.m7" "$OUT.m7b" \ 220 "$OUT.b" "$OUT.via" "$OUT.dead" "$OUT.abort" "$OUT.m7" "$OUT.m7b" \
221 "$OUT.q" "$OUT.qc" "$OUT.qr" "$OUT.qa" "$OUT.qk" "$QKEY.wrong" \ 221 "$OUT.q" "$OUT.qc" "$OUT.qr" "$OUT.qa" "$OUT.qk" "$QKEY.wrong" \
222 "$OUT.nokey" "$SOCK4.nokey" \ 222 "$OUT.nokey" "$SOCK4.nokey" \
@@ -298,6 +298,29 @@ rm -f "$OUT.doctored" "$OUT.doctored.render" "$OUT.doctored.dump" \
298 "$OUT.doctored.rvt" "$OUT.doctored.dvt" 298 "$OUT.doctored.rvt" "$OUT.doctored.dvt"
299 ok "convergence control fires on a doctored stream" 299 ok "convergence control fires on a doctored stream"
300 300
301 # --- M11: a styled specimen, so the byte-exact leg has something to compare.
302 # The campaign's row 4 broke the delta paint's leading SGR reset and BOTH
303 # suites passed — not because the styled comparison is weak but because no
304 # scenario in the corpus had ever emitted a colour. A suppressed reset resets
305 # nothing when nothing upstream is styled, so the instrument was handed no
306 # specimen. This scenario is the specimen: two delta rows carrying a live
307 # attribute, followed by a plain prompt row that must come back unstyled.
308 #
309 # The escapes are doubled because they are written by the SESSION's shell,
310 # not by this one: what goes down the pipe is the literal text
311 # `printf "\033[1;31mstyled-%s\033[0m\n" red bold`.
312 { printf 'printf "\\033[1;31mstyled-%%s\\033[0m\\n" red bold\n'; sleep 2; printf '\034'; } | \
313 timeout 30 "$MUX" --sock "$SOCK" > "$OUT.st"
314 grep -q "styled-red" "$OUT.st" || {
315 echo "e2e FAIL: styled output never reached the client"; cat "$OUT.st"; exit 1; }
316 grep -q "styled-bold" "$OUT.st" || {
317 echo "e2e FAIL: the second styled row never reached the client"; cat "$OUT.st"; exit 1; }
318 # The plain leg would pass on a bled attribute — same glyphs, wrong colours.
319 # The --vt leg inside assert_converged is the one that speaks here.
320 assert_converged "$OUT.st" "$SOCK" "styled content"
321 rm -f "$OUT.st"
322 ok "styled content survives the paint path"
323
301 # --- M3: kill a client mid-run; daemon survives; reattach lands correctly. 324 # --- M3: kill a client mid-run; daemon survives; reattach lands correctly.
302 # No convergence on $OUT.kill: kill -9 truncates the stream mid-paint, possibly 325 # No convergence on $OUT.kill: kill -9 truncates the stream mid-paint, possibly
303 # mid-escape-sequence, so a half-drawn capture is the expected shape here. 326 # mid-escape-sequence, so a half-drawn capture is the expected shape here.
@@ -1476,15 +1499,15 @@ D5PID=""
1476 1499
1477 # The pins. Literals, not variables set from counting something else — 1500 # The pins. Literals, not variables set from counting something else —
1478 # "assert the literal, never the constant the code under test reads" 1501 # "assert the literal, never the constant the code under test reads"
1479 # (decisions.md, M10). 9 scenario checkpoints; 21 convergence points. 1502 # (decisions.md, M10). 10 scenario checkpoints; 22 convergence points.
1480 # Anyone adding a scenario updates these by hand, on purpose. 1503 # Anyone adding a scenario updates these by hand, on purpose.
1481 [ "$OK_COUNT" = "9" ] || { 1504 [ "$OK_COUNT" = "10" ] || {
1482 echo "e2e FAIL: $OK_COUNT scenario checkpoints ran, the pin says 9 —" 1505 echo "e2e FAIL: $OK_COUNT scenario checkpoints ran, the pin says 10 —"
1483 echo " a scenario was added (update the pin) or silently lost" 1506 echo " a scenario was added (update the pin) or silently lost"
1484 exit 1 1507 exit 1
1485 } 1508 }
1486 [ "$CONV_COUNT" = "21" ] || { 1509 [ "$CONV_COUNT" = "22" ] || {
1487 echo "e2e FAIL: $CONV_COUNT convergence points ran, the pin says 21" 1510 echo "e2e FAIL: $CONV_COUNT convergence points ran, the pin says 22"
1488 exit 1 1511 exit 1
1489 } 1512 }
1490 echo "e2e OK (9 scenarios, 21 convergence points)" 1513 echo "e2e OK (10 scenarios, 22 convergence points)"