# W3 JIT — pin what the capture carries that the synthetic does not

**State:** bug 3 is REPRODUCED (`crates/spt-daemon/tests/attach_resize_capture.rs`,
main leg RED at `a230f9a`) on an oracle that earned it: pre-state self-check
sound, capability probe non-vacuous, both permanent legs. The synthetic sibling
(`attach_resize_repaint.rs`) PASSES on the same code with the same construction
and its own probe green. Same seam, same oracle, opposite verdicts — so the
discriminator is in what the capture carries.

**Not pinned:** the root. Reproduction is not a root, and the amendment waits for
one (doyle: one landing, after the root pins).

**Falsified three ways, do not re-litigate:** Amendment 1's stated code root
("the attach-stream resize never arms the barrier"). Static trace
(`send_attach_resize` → serve_attach Resize arm → `brain.resize` → KIND_RESIZE →
`dispatch_resize`, which always arms `begin_resize_serialized`), the synthetic
pass, and the broker's own dynamic trace: attach → `RESIZE_DISPATCH` →
`SYNC_PUSH{controller=true}`, no `RESIZE_SYNC_DROP`. The decision ("one
transaction, one exit shape, any entry") stands regardless.

## The bisect (doyle-approved, three binding rules)

1. **Per-step hygiene.** The self-check AND the precondition-asserted capability
   probe re-run GREEN at every step. A narrowed fixture can re-blind the oracle
   exactly like a redesigned one; both are automated legs, so this is cheap.
2. **Never bisect across the stdin gate.** The pre/attach boundary IS the field
   sequence. Moving records across it changes the experiment, not the fixture.
3. **Record subsets first, intra-record content second.** If the flip pins to a
   single record, look at its BOUNDARIES before its bytes — a payload that
   splits an escape sequence across a delivery boundary at the resize transition
   is a mechanism-class candidate (partial sequence held vs delivered raw), and
   it is invisible to any synthetic painter that emits whole sequences per write.

Mechanics: `capture-player` already takes `--from/--to` and `--from2/--to2`, so a
step is a timestamp range change in `attach_resize_capture.rs` (`PRE_START`,
`PRE_END`, `POST_START`, `POST_END`) — no new machinery. The attach window holds
19 frame records; the natural first cut is the 10 s gap between the two paints
(`…142305` vs `…152253`).

## Pre-registered candidates (sharpen, do not steer — let the records speak)

- **(i) the TUI's own resize RESPONSE.** The captured child repainted at 131x60;
  the synthetic painter ignores the resize entirely, so the post-resize byte
  shape differs fundamentally between them.
- **(ii) record boundaries**, per rule 3.
- A landing outside both is the more interesting answer and doyle wants it raw.

## Then, in order

1. Root pinned → report with the evidence set → draft ADR-0047 Amendment 2 text
   (doyle ratifies + lands): code-root correction; the oracle-shape clauses
   (geometry-sensitive without reflow-sensitive; capability-probed at every shape
   revision, with its own precondition asserted; byte-integrity pinned;
   per-record length refusal); the clause-1 reading (captured evidence vs
   executed machinery); the pre-state self-check as a required leg.
2. Fix against the amended contract; the rig goes green; the synthetic stays
   green as the live-seam sibling.
3. **7.55 is untouched so far** — mechanism 2 (post-resize console echo) has its
   own fixture window in the same capture (`…816155 .. …822893`, echoed keys at
   `…822394/822449/822530/822670/822765`) and the same player feeds it. Banked
   open question, unanswered: whether the restore belongs in `spt-term`'s resize
   seam or at the broker `write_input` call site — record what the
   instrumentation shows, propose, do not pick unilaterally.

## Gate notes for whoever runs this

- Prebuild the player: `cargo build -p mock-adapter --bin capture-player`
  (`attach_wedge_e2e` needs `mock-session` the same way).
- Both W3 rigs are Windows-only and HEAVY (real broker + real ConPTY).
- Never rebuild the fixture: `*.log -text` plus the sha256 table in the fixture
  README are what keep it byte-exact.
