S1 vt: second review: FFI soundness, carry observer, build and licences #26

Closed
opened 2026-10-06 15:42:28 +00:00 by kayg · 122 comments
Owner

Part of #22. These are the remaining checks the first review could not finish (it was cut short by the tooling's content filter on raw byte dumps). They run after the snapshot-fidelity fixes:

  1. FFI soundness of every unsafe block and extern declaration against the pinned Ghostty headers.
  2. The carry observer's ground-control bypass (41d9997), tested with sequences split at every byte boundary.
  3. Error propagation: no half-initialised terminal.
  4. Build reproducibility with the Zig 0.15.2 pin, and the licences of the fetched Ghostty sources and the uucode dependency.

Job prompts must keep terminal bytes in files and never print them to the console.

Part of #22. These are the remaining checks the first review could not finish (it was cut short by the tooling's content filter on raw byte dumps). They run after the snapshot-fidelity fixes: 1. FFI soundness of every `unsafe` block and extern declaration against the pinned Ghostty headers. 2. The carry observer's ground-control bypass (41d9997), tested with sequences split at every byte boundary. 3. Error propagation: no half-initialised terminal. 4. Build reproducibility with the Zig 0.15.2 pin, and the licences of the fetched Ghostty sources and the uucode dependency. Job prompts must keep terminal bytes in files and never print them to the console.
Author
Owner

Second independent review started: source branch vt-ghostty, diff base e72589e346, head 234baf0a6c. Read CLAUDE.md, decisions, architecture and all #22/#26 comments (#26 has none). Source stays read-only; experiments on review-vt2 under $HOME/.cache/codex-scratch/review-vt2/worktree. Findings recorded in review-vt2/findings.md. No push, deploy or implementation commits.

Second independent review started: source branch vt-ghostty, diff base e72589e346fe1707299f64676367cc5668c9d1c3, head 234baf0a6c46eda56f0a889aa93f744f70aa703f. Read CLAUDE.md, decisions, architecture and all #22/#26 comments (#26 has none). Source stays read-only; experiments on review-vt2 under $HOME/.cache/codex-scratch/review-vt2/worktree. Findings recorded in review-vt2/findings.md. No push, deploy or implementation commits.
Author
Owner

R1 (high), failing real-binary regression: 80x24 shim emits 2,160,005 printable characters without newline, then waits. Top row becomes a wrap continuation; SnapshotRequest returns Error(1). Withhold credit for >250ms, then return it: daemon.rs closes terminal stream on Unsupported, with no retained-ring fallback. Same state restart/ReadFrom(0) faithfully replays all 2,160,419 output bytes, zero Snapshots; ring covers the gap. Shell/shim survive, but credit-based reconnect cannot display it until state changes. Evidence: $HOME/.cache/codex-scratch/review-vt2/{reconnect.py,reconnect.log,wrapped-output.vt,findings.md}; session.rs:94-106 and daemon.rs terminal error branch. Server terminal relay and browser product are absent at this head, so full browser E2E is unavailable.

R1 (high), failing real-binary regression: 80x24 shim emits 2,160,005 printable characters without newline, then waits. Top row becomes a wrap continuation; SnapshotRequest returns Error(1). Withhold credit for >250ms, then return it: daemon.rs closes terminal stream on Unsupported, with no retained-ring fallback. Same state restart/ReadFrom(0) faithfully replays all 2,160,419 output bytes, zero Snapshots; ring covers the gap. Shell/shim survive, but credit-based reconnect cannot display it until state changes. Evidence: $HOME/.cache/codex-scratch/review-vt2/{reconnect.py,reconnect.log,wrapped-output.vt,findings.md}; session.rs:94-106 and daemon.rs terminal error branch. Server terminal relay and browser product are absent at this head, so full browser E2E is unavailable.
Author
Owner

R2 (high): accepted Snapshot loses saved DEC mode state. Enable mouse mode 1000, save it, disable it, print X; Snapshot/replay passes strict immediate oracle. Restore saved mode: original enables mouse, replay remains disabled, difference 4001000. Failing review_saved_modes_future_restore in scratch review_vt2.rs; independent2.log. Serializer/oracle iterate current modes only; pinned modes.zig also has saved values/save flags. Seeded corpus has no DECSM/DECRM tokens, so zero accepted divergences does not establish future-state fidelity.

R2 (high): accepted Snapshot loses saved DEC mode state. Enable mouse mode 1000, save it, disable it, print X; Snapshot/replay passes strict immediate oracle. Restore saved mode: original enables mouse, replay remains disabled, difference 4001000. Failing review_saved_modes_future_restore in scratch review_vt2.rs; independent2.log. Serializer/oracle iterate current modes only; pinned modes.zig also has saved values/save flags. Seeded corpus has no DECSM/DECRM tokens, so zero accepted divergences does not establish future-state fidelity.
Author
Owner

R3 (medium): accepted Snapshot loses semantic prompt state. OSC 133 prompt start redraw=1 followed by a short shell prompt; immediate strict comparison passes. Resize 80x24 to 40x24: source clears prompt for redraw, replay retains it, difference at cell 1. Failing review_prompt_resize_future_state in scratch review_vt2.rs; independent2.log. Serializer/oracle omit semantic cells/rows and shell_redraws_prompt; differential continuations never resize (decision 74). Independent carry checks passed 309 snapshot boundaries; invalid init/resize, live link/protection/charset and single-shift probes pass.

R3 (medium): accepted Snapshot loses semantic prompt state. OSC 133 prompt start redraw=1 followed by a short shell prompt; immediate strict comparison passes. Resize 80x24 to 40x24: source clears prompt for redraw, replay retains it, difference at cell 1. Failing review_prompt_resize_future_state in scratch review_vt2.rs; independent2.log. Serializer/oracle omit semantic cells/rows and shell_redraws_prompt; differential continuations never resize (decision 74). Independent carry checks passed 309 snapshot boundaries; invalid init/resize, live link/protection/charset and single-shift probes pass.
Author
Owner

R4 (medium): Snapshot converts ISO protected-area state into DEC protection. SPA; print X; EPA; CR; Snapshot/replay passes strict immediate oracle. Ordinary ECH retains X in source but erases it in replay (difference cell 1). Failing review_iso_protection_erase, iso-protection.log. Screen.protected_mode is omitted; serializer only emits DECSCA. Fresh controlled 80x24 captures: vim 1116/1116 accepted prefixes, htop 1661/1661, tmux 843/843; less paging long Unicode lines accepted 990/rejected 417 of 1407 sampled prefixes. These correlated states are not a population probability, but prove ordinary less can hit R1 much more often than the synthetic 0.68% figure suggests. Artifacts: review-experiments/capture.py and real-capture-tests.log.

R4 (medium): Snapshot converts ISO protected-area state into DEC protection. SPA; print X; EPA; CR; Snapshot/replay passes strict immediate oracle. Ordinary ECH retains X in source but erases it in replay (difference cell 1). Failing review_iso_protection_erase, iso-protection.log. Screen.protected_mode is omitted; serializer only emits DECSCA. Fresh controlled 80x24 captures: vim 1116/1116 accepted prefixes, htop 1661/1661, tmux 843/843; less paging long Unicode lines accepted 990/rejected 417 of 1407 sampled prefixes. These correlated states are not a population probability, but prove ordinary less can hit R1 much more often than the synthetic 0.68% figure suggests. Artifacts: review-experiments/capture.py and real-capture-tests.log.
Author
Owner

review-vt2 (GPT 6.1 Sol Medium) was cut short by the tooling's content filter (on a crash backtrace this time), but the findings file is complete enough for a verdict: rework. A copy is in the job state directory: review-vt2/findings.md.

  • R1 (high): a Snapshot rejection ends the reconnect. On Unsupported, the daemon closes the stream ("shim refused terminal request") even when the retained ring still covers the gap. The shell survives, but reattach keeps failing until the terminal state changes. This is not rare: a controlled less session paging long wrapped Unicode lines rejected 29.6% of sampled prefixes, and a continuously wrapped output line reaches the rejected state deterministically. vim, htop and tmux captures: 0 rejections.
  • R2 (high): accepted snapshots lose saved DEC modes (mode save/restore, e.g. mouse 1000). The oracle does not compare them, so "zero accepted divergences" does not hold universally.
  • R3 (medium): semantic prompt state (OSC 133, shell_redraws_prompt) is lost, which becomes visible on resize.
  • R4 (medium): ISO vs DEC protected-area mode is lost, which changes ECH behaviour.
  • Passing: 309 sequence-boundary probes (CSI, OSC, DCS, UTF-8 splits), zero-dimension init and resize failures, live charset, links, protection continuation. Six hand-checked seeded cases.
  • Not covered before the stop: FFI audit, licences and re-measured numbers.

Root cause: the "bounded painter" rebuilds terminal state by replaying VT sequences, and that cannot express every piece of state. A complete fix is an engine-level state export/import, which is an owner decision. Fixes R1–R4 within the current design come first.

review-vt2 (GPT 6.1 Sol Medium) was cut short by the tooling's content filter (on a crash backtrace this time), but the findings file is complete enough for a verdict: **rework**. A copy is in the job state directory: `review-vt2/findings.md`. - **R1 (high): a Snapshot rejection ends the reconnect.** On Unsupported, the daemon closes the stream ("shim refused terminal request") even when the retained ring still covers the gap. The shell survives, but reattach keeps failing until the terminal state changes. This is not rare: a controlled `less` session paging long wrapped Unicode lines rejected **29.6%** of sampled prefixes, and a continuously wrapped output line reaches the rejected state deterministically. vim, htop and tmux captures: 0 rejections. - **R2 (high): accepted snapshots lose saved DEC modes** (mode save/restore, e.g. mouse 1000). The oracle does not compare them, so "zero accepted divergences" does not hold universally. - **R3 (medium): semantic prompt state (OSC 133, shell_redraws_prompt) is lost**, which becomes visible on resize. - **R4 (medium): ISO vs DEC protected-area mode is lost**, which changes ECH behaviour. - **Passing:** 309 sequence-boundary probes (CSI, OSC, DCS, UTF-8 splits), zero-dimension init and resize failures, live charset, links, protection continuation. Six hand-checked seeded cases. - **Not covered before the stop:** FFI audit, licences and re-measured numbers. **Root cause:** the "bounded painter" rebuilds terminal state by replaying VT sequences, and that cannot express every piece of state. A complete fix is an engine-level state export/import, which is an owner decision. Fixes R1–R4 within the current design come first.
Author
Owner

Starting second-review fixes on vt-ghostty, base 234baf0a6c; read #26 and #22 history and reviewer findings. R1-R4 will each have red regression evidence before separate fixes. Proposal before implementation: additive shim capability bit 1 APPROXIMATE_SNAPSHOT, selecting new frame 0x1B (u64 seq, u8 flags where bit 0 denotes approximation, bounded VT bytes); v1 Snapshot layout stays unchanged. ReadFrom retained-ring replay takes precedence. Only selected peers receive flagged best-effort repaint when faithful Snapshot is unavailable; count approximate repaints in infraternal agent metrics. Legacy peers receive an accurate nonfatal Snapshot error. DECISIONS 13/17/40/41 and owner engine choice 94 apply; no engine replacement. docs/PROCESS.md is absent; following job-supplied Definition of Done.

Starting second-review fixes on vt-ghostty, base 234baf0a6c46eda56f0a889aa93f744f70aa703f; read #26 and #22 history and reviewer findings. R1-R4 will each have red regression evidence before separate fixes. Proposal before implementation: additive shim capability bit 1 APPROXIMATE_SNAPSHOT, selecting new frame 0x1B (u64 seq, u8 flags where bit 0 denotes approximation, bounded VT bytes); v1 Snapshot layout stays unchanged. ReadFrom retained-ring replay takes precedence. Only selected peers receive flagged best-effort repaint when faithful Snapshot is unavailable; count approximate repaints in infraternal agent metrics. Legacy peers receive an accurate nonfatal Snapshot error. DECISIONS 13/17/40/41 and owner engine choice 94 apply; no engine replacement. docs/PROCESS.md is absent; following job-supplied Definition of Done.
Author
Owner

R2 reproduced against base: saved mouse-mode continuation fails (0 passed / 1 failed), target/review-vt2-fixes/r2-red.log. Regression is initially ignored so its tests-only commit can pass fast; explicit red run exercises it. Pinned ModeState.saved is a packed value record (not a separate presence stack); reconstruct differing saved values before grid painting, then restore live modes. Expanded oracle will compare the packed saved record.

R2 reproduced against base: saved mouse-mode continuation fails (0 passed / 1 failed), target/review-vt2-fixes/r2-red.log. Regression is initially ignored so its tests-only commit can pass fast; explicit red run exercises it. Pinned ModeState.saved is a packed value record (not a separate presence stack); reconstruct differing saved values before grid painting, then restore live modes. Expanded oracle will compare the packed saved record.
Author
Owner

R2 completed: tests-first 9b4722e; saved-mode fix 54e98b231b. Saved values reconstructed before painting; oracle compares the packed saved record. Enabled future DECRM regression and full workspace tests PASS. Exact fast 7 pass / 0 fail: target/review-vt2-fixes/r2-fix-fast.log.

R2 completed: tests-first 9b4722e; saved-mode fix 54e98b231bf1a7115166a9021c9670986e873e54. Saved values reconstructed before painting; oracle compares the packed saved record. Enabled future DECRM regression and full workspace tests PASS. Exact fast 7 pass / 0 fail: target/review-vt2-fixes/r2-fix-fast.log.
Author
Owner

R3 red test committed separately after exact fast passed; target/review-vt2-fixes/r3-red.log records 1 failing resize continuation. Fix in validation: native adapter rejects semantic metadata anywhere in retained screen/history, cursor prompt state, semantic screen state, or nondefault shell-redraw mode. No silent semantic equality: oracle compares these fields. Page-row iterator avoids repeated history pin lookups; final p99 will measure the extra scan at the full ~10k-row budget.

R3 red test committed separately after exact fast passed; target/review-vt2-fixes/r3-red.log records 1 failing resize continuation. Fix in validation: native adapter rejects semantic metadata anywhere in retained screen/history, cursor prompt state, semantic screen state, or nondefault shell-redraw mode. No silent semantic equality: oracle compares these fields. Page-row iterator avoids repeated history pin lookups; final p99 will measure the extra scan at the full ~10k-row budget.
Author
Owner

Additional R3 API gap: pinned C terminal.zig:352 initializes shell_redraws_prompt=false; Terminal.fullReset:3898 resets flags to Zig defaults (redraw=true). Snapshot emits RIS, so fresh C-default states also lose this scalar, affecting future OSC 133 without an explicit redraw option. There is no VT-only setter without creating semantic prompt metadata. Faithful path must explicitly reject redraw=false. Canonical repaint fixtures will start with an explicit reset and retain a separate fresh-C-default rejection test; this changes corpus starting context and will be disclosed. Failed initial R3 gate retained in r3-fix-fast.log (ordinary integration Snapshots rejected); no commit claims that failed gate.

Additional R3 API gap: pinned C terminal.zig:352 initializes shell_redraws_prompt=false; Terminal.fullReset:3898 resets flags to Zig defaults (redraw=true). Snapshot emits RIS, so fresh C-default states also lose this scalar, affecting future OSC 133 without an explicit redraw option. There is no VT-only setter without creating semantic prompt metadata. Faithful path must explicitly reject redraw=false. Canonical repaint fixtures will start with an explicit reset and retain a separate fresh-C-default rejection test; this changes corpus starting context and will be disclosed. Failed initial R3 gate retained in r3-fix-fast.log (ordinary integration Snapshots rejected); no commit claims that failed gate.
Author
Owner

R3 completed at a80bd79cd3: red resize regression in r3-red.log; now explicitly Unsupported for semantic state (cell/row/cursor/screen/history and shell_redraws_prompt). Source resize remains unchanged after rejection. Strict oracle checks semantic state. Exact fast 7 pass / 0 fail, target/review-vt2-fixes/r3-fix-canonical-fast.log.

R3 completed at a80bd79cd3386fcded51e9893be6be0cb8aba8bd: red resize regression in r3-red.log; now explicitly Unsupported for semantic state (cell/row/cursor/screen/history and shell_redraws_prompt). Source resize remains unchanged after rejection. Strict oracle checks semantic state. Exact fast 7 pass / 0 fail, target/review-vt2-fixes/r3-fix-canonical-fast.log.
Author
Owner

R4 completed: tests-first 8031fbc; fix 8513830664 restores remembered ISO/DEC mode separately from cursor protection. Ordinary ECH regression now passes. Native oracle checks both. Red: target/review-vt2-fixes/r4-red.log; exact fast 7 pass / 0 fail, r4-fix-fast.log.

R4 completed: tests-first 8031fbc; fix 851383066450697cbd0e0903daa9e2a872b796f1 restores remembered ISO/DEC mode separately from cursor protection. Ordinary ECH regression now passes. Native oracle checks both. Red: target/review-vt2-fixes/r4-red.log; exact fast 7 pass / 0 fail, r4-fix-fast.log.
Author
Owner

Oracle completion 3841442 passes exact fast (oracle-fix-corrected-fast.log, 7/0); direct native pairs verify omitted fields. New expanded-corpus finding: case 4 minimizes to 2 operations (print ASCII abc, select DEC G2 and single-shift). Accepted Snapshot differs at cell 3: transient single-shift is restored before terminal-global REP seeding, so the seed print is charset-mapped and corrupts the painted cell. Red: expanded-red-fixture.log and single-shift-red.log; minimal fixture target/review-vt2-fixes/minimized.vt. Independent continuation branches and shrink/grow resize probes now avoid overwriting state before checking it.

Oracle completion 3841442 passes exact fast (oracle-fix-corrected-fast.log, 7/0); direct native pairs verify omitted fields. New expanded-corpus finding: case 4 minimizes to 2 operations (print ASCII abc, select DEC G2 and single-shift). Accepted Snapshot differs at cell 3: transient single-shift is restored before terminal-global REP seeding, so the seed print is charset-mapped and corrupts the painted cell. Red: expanded-red-fixture.log and single-shift-red.log; minimal fixture target/review-vt2-fixes/minimized.vt. Independent continuation branches and shrink/grow resize probes now avoid overwriting state before checking it.
Author
Owner

Single-shift seed fix completed at 0a7f540ffb; enabled regression PASS; exact fast 7/0 in single-shift-fix-fast.log. Expanded corpus next failure is case 11, minimized to ISO protection + DEC charset + printable text: scratch REP seed survives ordinary ECH under ISO, leaving a phantom glyph (difference cell 60). Fixture minimized-case-11.vt and minimize-oracle.log in target/review-vt2-fixes. Recording another red regression before altering transient protection.

Single-shift seed fix completed at 0a7f540ffb1b7f5b419f12c5393c5332744384e0; enabled regression PASS; exact fast 7/0 in single-shift-fix-fast.log. Expanded corpus next failure is case 11, minimized to ISO protection + DEC charset + printable text: scratch REP seed survives ordinary ECH under ISO, leaving a phantom glyph (difference cell 60). Fixture minimized-case-11.vt and minimize-oracle.log in target/review-vt2-fixes. Recording another red regression before altering transient protection.
Author
Owner

ISO scratch-seed fix ebca78c passes exact fast 7/0 (protection-seed-fix-fast.log); regression enabled. Case 11 contains a second independent divergence: DEC single shift maps a wide CJK glyph to a stored space but retains width; ordinary painter space narrows it, difference cell 1. Tests-first 4907bda records explicit rejection + source-continuation integrity (wide-space-red.log). Bounded-painter construction gap, not a claim the original VT stream is unreplayable; R1 will retain raw ring replay and flagged fallback. Canonical corpus uses explicit RIS because fresh C redraw=false is independently rejected.

ISO scratch-seed fix ebca78c passes exact fast 7/0 (protection-seed-fix-fast.log); regression enabled. Case 11 contains a second independent divergence: DEC single shift maps a wide CJK glyph to a stored space but retains width; ordinary painter space narrows it, difference cell 1. Tests-first 4907bda records explicit rejection + source-continuation integrity (wide-space-red.log). Bounded-painter construction gap, not a claim the original VT stream is unreplayable; R1 will retain raw ring replay and flagged fallback. Canonical corpus uses explicit RIS because fresh C redraw=false is independently rejected.
Author
Owner

Step 01f9a95: reject charset-mapped wide spaces that the bounded painter narrows. Original source state survives rejection; focused regression and exact verify fast: 7 pass / 0 fail. Expanded case 14 minimizes to ISO protection followed by alternate-screen entry: inherited protected cursor, remembered protection mode off. This combination also needs explicit rejection; regression is next. Evidence: target/review-vt2-fixes/expanded-after-wide-space.log and minimized-case-14.vt.

Step 01f9a95: reject charset-mapped wide spaces that the bounded painter narrows. Original source state survives rejection; focused regression and exact verify fast: 7 pass / 0 fail. Expanded case 14 minimizes to ISO protection followed by alternate-screen entry: inherited protected cursor, remembered protection mode off. This combination also needs explicit rejection; regression is next. Evidence: target/review-vt2-fixes/expanded-after-wide-space.log and minimized-case-14.vt.
Author
Owner

Expanded 1k branched corpus after explicit painter-gap rejections: faithful 238 / rejected 762 / divergent 0. Original 1k: faithful 990 / rejected 10 / divergent 0. Both initial=RIS, seed=22601006; fresh-C defaults will be reported separately. Evidence: target/review-vt2-fixes/{expanded,original}-after-off-mode.log. Tests-only regression 3182ab9 failed before the inherited-protection fix; native/static gate is running. Next: already-proposed additive approximate capability and real wrapped/less reconnect test.

Expanded 1k branched corpus after explicit painter-gap rejections: faithful 238 / rejected 762 / divergent 0. Original 1k: faithful 990 / rejected 10 / divergent 0. Both initial=RIS, seed=22601006; fresh-C defaults will be reported separately. Evidence: target/review-vt2-fixes/{expanded,original}-after-off-mode.log. Tests-only regression 3182ab9 failed before the inherited-protection fix; native/static gate is running. Next: already-proposed additive approximate capability and real wrapped/less reconnect test.
Author
Owner

Step inherited off-mode protection rejection: commit recorded on vt-ghostty; source continuation preserved. Expanded smoke 238/762/0, original smoke 990/10/0. Exact verify fast: 7 pass / 0 fail. Evidence target/review-vt2-fixes/protection-off-fix-fast.log.

Step inherited off-mode protection rejection: commit recorded on vt-ghostty; source continuation preserved. Expanded smoke 238/762/0, original smoke 990/10/0. Exact verify fast: 7 pass / 0 fail. Evidence target/review-vt2-fixes/protection-off-fix-fast.log.
Author
Owner

Step 4efe02a2c5: test(agent): reproduce Snapshot limits closing real reconnects. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/reconnect-test-fast.log.

Step 4efe02a2c5ee29fe79920ee2911d4d119fa88fb5: test(agent): reproduce Snapshot limits closing real reconnects. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/reconnect-test-fast.log.
Author
Owner

Step b44c39368a: docs(shim): specify negotiated approximate recovery additively. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-contract-fast.log.

Step b44c39368ad13d12c88c62eafd6c6bd8ce7bc746: docs(shim): specify negotiated approximate recovery additively. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-contract-fast.log.
Author
Owner

Step 8a316c42a2: test(shim): specify bounded canonical approximate frames. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-codec-test-fast.log.

Step 8a316c42a2321aa663f7001b720cf27efbf95775: test(shim): specify bounded canonical approximate frames. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-codec-test-fast.log.
Author
Owner

Step b2bc48186c: feat(shim): add the negotiated SnapshotWithFlags codec. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-codec-fix-fast.log.

Step b2bc48186cf5e88fc4a66f1cc0cab83a14b06621: feat(shim): add the negotiated SnapshotWithFlags codec. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-codec-fix-fast.log.
Author
Owner

Step bf31c0b4e4: feat(shim): expose a bounded best-effort visible painter. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-native-fast.log.

Step bf31c0b4e4d88dd45f0bafa61e57f30e0e337252: feat(shim): expose a bounded best-effort visible painter. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-native-fast.log.
Author
Owner

Step e6d08d68e4: feat(shim): own bounded approximate repaint and parser carry. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-terminal-fast.log.

Step e6d08d68e4147f2afa2c89e663a30f1f462cb360: feat(shim): own bounded approximate repaint and parser carry. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-terminal-fast.log.
Author
Owner

Step 88e4328042: fix(shim): negotiate approximate fallback without mislabeling errors. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-session-fast.log.

Step 88e432804210bba0b81e8d44d1c66feecfd414a5: fix(shim): negotiate approximate fallback without mislabeling errors. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-session-fast.log.
Author
Owner

Step ac4ff1fa48: test(agent): expose credit recovery discarding retained bytes. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/retained-relay-test-fast.log.

Step ac4ff1fa48aaac97296c6ffd0584f33b8c36f848: test(agent): expose credit recovery discarding retained bytes. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/retained-relay-test-fast.log.
Author
Owner

Step 201fc6fd0b: fix(agent): resume retained replay after returned credit. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/retained-relay-fix-fast.log.

Step 201fc6fd0b19353890198ef010b4bdf4ab5a1a7d: fix(agent): resume retained replay after returned credit. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/retained-relay-fix-fast.log.
Author
Owner

Step adfaca730e: feat(agent): intersect approximate recovery during shim attachment. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-handshake-fast.log.

Step adfaca730e913da5f3818866f5fbde496f3a516a: feat(agent): intersect approximate recovery during shim attachment. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-handshake-fast.log.
Author
Owner

Step 6168b93062: test(agent): support legacy negotiation and scale in real fixtures. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-fixture-fast.log.

Step 6168b9306239b53b24f3fc43705f6b8d7fccfeb6: test(agent): support legacy negotiation and scale in real fixtures. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-fixture-fast.log.
Author
Owner

Step 6bf5ca1c84: fix(agent): recover retained output and park Snapshot limitations. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-daemon-fast.log.

Step 6bf5ca1c840bfb9b8e669b60911cdae6a9560172: fix(agent): recover retained output and park Snapshot limitations. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-daemon-fast.log.
Author
Owner

R1 real-engine proof at 6bf5ca1: wrapped and real less reconnect test passes (3.59s). Retained-ring starvation replays with zero snapshots. Ring-gap recovery emits one approximate notice before the repaint; legacy mask-bit-0 peer stays live for Ping, retries after RIS and delivers subsequent raw output. Evidence: target/review-vt2-fixes/reconnect-after-fix.log and reconnect.stdout.log. Regression is being enabled in the fast gate; frame limits and old layouts unchanged.

R1 real-engine proof at 6bf5ca1: wrapped and real less reconnect test passes (3.59s). Retained-ring starvation replays with zero snapshots. Ring-gap recovery emits one approximate notice before the repaint; legacy mask-bit-0 peer stays live for Ping, retries after RIS and delivers subsequent raw output. Evidence: target/review-vt2-fixes/reconnect-after-fix.log and reconnect.stdout.log. Regression is being enabled in the fast gate; frame limits and old layouts unchanged.
Author
Owner

Step 312997f9f0: test(agent): require live recovery across Snapshot limitations. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/reconnect-enable-fast.log.

Step 312997f9f04daabc78d16f49c6bae65c920697fd: test(agent): require live recovery across Snapshot limitations. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/reconnect-enable-fast.log.
Author
Owner

Step 135eb97e86: test(shim): exercise capacity clipping and unfinished-syntax fallback. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-boundaries-fast.log.

Step 135eb97e865e8c6079da3f38d590f585911bb1f1: test(shim): exercise capacity clipping and unfinished-syntax fallback. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-boundaries-fast.log.
Author
Owner

Additional history finding: current Snapshot appends padding rows to the retained tail; a source with 3 history rows restores 5. Strict oracle also reports equal for different archived cells with identical active screens. Both isolated regressions fail. Evidence: target/review-vt2-fixes/history-tail-red.log and history-oracle-red.log. The frozen contract permits truncating older history; its retained rows still need exact cells/metadata and no fabricated padding.

Additional history finding: current Snapshot appends padding rows to the retained tail; a source with 3 history rows restores 5. Strict oracle also reports equal for different archived cells with identical active screens. Both isolated regressions fail. Evidence: target/review-vt2-fixes/history-tail-red.log and history-oracle-red.log. The frozen contract permits truncating older history; its retained rows still need exact cells/metadata and no fabricated padding.
Author
Owner

Step bb3731d689: test(shim): expose padding history and an unchecked retained tail. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/history-tail-test-fast.log.

Step bb3731d689745e9b169ca9d62766e7b86d62c41d: test(shim): expose padding history and an unchecked retained tail. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/history-tail-test-fast.log.
Author
Owner

Step c0e8e7f860: fix(shim): preserve and validate the exact retained history tail. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/history-tail-fix-fast.log.

Step c0e8e7f8602a50752ba534b8e0f4dbc8d500807e: fix(shim): preserve and validate the exact retained history tail. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/history-tail-fix-fast.log.
Author
Owner

Warm-viewer color finding: RIS preserves palette/dynamic overrides. A Snapshot from a source with default colors leaves prior viewer overrides and fails the now-strict oracle. Isolated red regression: target/review-vt2-fixes/warm-colors-red.log. Fix will reset viewer overrides before re-emitting source overrides on faithful and approximate paths.

Warm-viewer color finding: RIS preserves palette/dynamic overrides. A Snapshot from a source with default colors leaves prior viewer overrides and fails the now-strict oracle. Isolated red regression: target/review-vt2-fixes/warm-colors-red.log. Fix will reset viewer overrides before re-emitting source overrides on faithful and approximate paths.
Author
Owner

Step 4d9f96cf08: test(shim): expose stale color overrides in an existing viewer. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/warm-colors-test-fast.log.

Step 4d9f96cf083fed76d22941801cfcd8d9d77a7f52: test(shim): expose stale color overrides in an existing viewer. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/warm-colors-test-fast.log.
Author
Owner

Step 0066883768: fix(shim): clear stale viewer overrides before restoring source colors. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/warm-colors-fix-fast.log.

Step 0066883768b16bf78e66b9a0e349cbfb824e4394: fix(shim): clear stale viewer overrides before restoring source colors. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/warm-colors-fix-fast.log.
Author
Owner

Step b5d5a29804: test(shim): use independent continuation and resize probes for every fixture. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/branched-oracle-fast.log.

Step b5d5a2980455e11402c64aeed669c6386c44f79a: test(shim): use independent continuation and resize probes for every fixture. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/branched-oracle-fast.log.
Author
Owner

Step 86bd90da5f: test(shim): gate original and expanded nightly corpora in explicit contexts. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/nightly-contexts-fast.log.

Step 86bd90da5f417ef501a2935de7d58e32f3539aec: test(shim): gate original and expanded nightly corpora in explicit contexts. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/nightly-contexts-fast.log.
Author
Owner

Decoder fuzz: 1,110,160 runs in 61s, no failures, ASan; cov 512 / features 1364. Seeded additive Snapshot bodies and framed messages, including reserved flags. Evidence target/review-vt2-fixes/fuzz-no-lto.log. Workspace release LTO caused sanitizer-coverage link failures; harness-only LTO=false/strip=none resolves it without changing production profiles. Original/expanded nightly contexts gate committed at 86bd90d (fast 7 pass / 0 fail).

Decoder fuzz: 1,110,160 runs in 61s, no failures, ASan; cov 512 / features 1364. Seeded additive Snapshot bodies and framed messages, including reserved flags. Evidence target/review-vt2-fixes/fuzz-no-lto.log. Workspace release LTO caused sanitizer-coverage link failures; harness-only LTO=false/strip=none resolves it without changing production profiles. Original/expanded nightly contexts gate committed at 86bd90d (fast 7 pass / 0 fail).
Author
Owner

Step 544a2e1d0b: test(shim): measure full resident state at the 128-session limit. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/scale-harness-fast.log.

Step 544a2e1d0b386d51f613a5dccf3b827c44fabf8a: test(shim): measure full resident state at the 128-session limit. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/scale-harness-fast.log.
Author
Owner

Additional reconnect finding: the enabled regression intermittently fails legacy reset recovery (14.56s, memory-context-fast.log). A detached control send drops its peer immediately; the next single-peer shim connection can replace it before reading input/resize. Fix adds an ordered InputState reply before detaching so acceptance/handling is confirmed; focused real reconnect now passes (4.48s). Original 20k: RIS 19864 faithful/136 rejected/0 divergent; fresh-C 0/20000/0. Expanded nightly found another accepted divergence, being minimized. Evidence target/review-vt2-fixes/nightly.log and reconnect-input-fence.log.

Additional reconnect finding: the enabled regression intermittently fails legacy reset recovery (14.56s, memory-context-fast.log). A detached control send drops its peer immediately; the next single-peer shim connection can replace it before reading input/resize. Fix adds an ordered InputState reply before detaching so acceptance/handling is confirmed; focused real reconnect now passes (4.48s). Original 20k: RIS 19864 faithful/136 rejected/0 divergent; fresh-C 0/20000/0. Expanded nightly found another accepted divergence, being minimized. Evidence target/review-vt2-fixes/nightly.log and reconnect-input-fence.log.
Author
Owner

Continuation started on vt-ghostty, base 544a2e1d0b. Read repository rules and #26/#22 history. Verifying pending detached-control ordering fix, then minimizing expanded nightly divergence. docs/PROCESS.md remains absent; following job Definition of Done.

Continuation started on vt-ghostty, base 544a2e1d0b386d51f613a5dccf3b827c44fabf8a. Read repository rules and #26/#22 history. Verifying pending detached-control ordering fix, then minimizing expanded nightly divergence. docs/PROCESS.md remains absent; following job Definition of Done.
Author
Owner

Expanded nightly case 1027 minimizes to four operations: pending G2 single shift, alternate-screen entry, combining text, DECSC. Accepted Snapshot differs in saved cursor state (oracle 6000002). Screen entry inherits the pending shift, which the painter saves before consuming. Fixture target/review-vt2-fixes/minimized-case-1027.vt; red evidence minimize-oracle.log. Focused wrapped/less reconnect passes with pending detached-control ordering fix (run2-reconnect.log).

Expanded nightly case 1027 minimizes to four operations: pending G2 single shift, alternate-screen entry, combining text, DECSC. Accepted Snapshot differs in saved cursor state (oracle 6000002). Screen entry inherits the pending shift, which the painter saves before consuming. Fixture target/review-vt2-fixes/minimized-case-1027.vt; red evidence minimize-oracle.log. Focused wrapped/less reconnect passes with pending detached-control ordering fix (run2-reconnect.log).
Author
Owner

Step 060a830765: fix(agent): confirm detached controls before replacing the shim peer. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/detached-controls-fast.log.

Step 060a830765435bdb91bbb87ca91b2a017a007d7b: fix(agent): confirm detached controls before replacing the shim peer. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/detached-controls-fast.log.
Author
Owner

Measurement harness finding: vt_memory.py starts in fresh-C redraw=false and its faithful Snapshot assertion fails, as expected from the explicit R3 rejection. Red evidence run2-memory-context-red.log. The socket benchmark will select RIS explicitly, matching the serializer and 128-session benchmark; production initialization remains unchanged.

Measurement harness finding: vt_memory.py starts in fresh-C redraw=false and its faithful Snapshot assertion fails, as expected from the explicit R3 rejection. Red evidence run2-memory-context-red.log. The socket benchmark will select RIS explicitly, matching the serializer and 128-session benchmark; production initialization remains unchanged.
Author
Owner

Step 51b97c2f55: test(shim): expose inherited single shifts changing saved cursor state. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/saved-shift-test-fast.log.

Step 51b97c2f55d740ce25f6d436e0eab7889ecb4f6c: test(shim): expose inherited single shifts changing saved cursor state. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/saved-shift-test-fast.log.
Author
Owner

Original 20k corpus after saved-charset fix: RIS 19864 faithful / 136 rejected / 0 divergent; fresh-C 0 / 20000 / 0. Expanded corpus still running. Both combining-text and null-REP saved-charset regression variants pass (run2-saved-shift-green.log). Fix uses nonprinting DECRC before source saved-cursor construction; no source mutation.

Original 20k corpus after saved-charset fix: RIS 19864 faithful / 136 rejected / 0 divergent; fresh-C 0 / 20000 / 0. Expanded corpus still running. Both combining-text and null-REP saved-charset regression variants pass (run2-saved-shift-green.log). Fix uses nonprinting DECRC before source saved-cursor construction; no source mutation.
Author
Owner

Step 9b6cb8e4a6: fix(shim): reset inherited charset before constructing saved cursors. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/saved-shift-fix-fast.log.

Step 9b6cb8e4a624b211701c8daef9981b3d758af2ba: fix(shim): reset inherited charset before constructing saved cursors. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/saved-shift-fix-fast.log.
Author
Owner

Saved-charset fix 9b6cb8e passes exact fast 7/0 (saved-shift-fix-fast.log). Final 20k nightly PASS: original RIS 19864 faithful / 136 rejected / 0 divergent; original fresh-C 0 / 20000 / 0; expanded RIS 4815 / 15185 / 0. Independent continuation and shrink/grow resize branches run for each accepted case. Evidence run2-nightly.log. Expanded rejections include semantic state and explicit bounded-painter gaps; they are not faithful replays.

Saved-charset fix 9b6cb8e passes exact fast 7/0 (saved-shift-fix-fast.log). Final 20k nightly PASS: original RIS 19864 faithful / 136 rejected / 0 divergent; original fresh-C 0 / 20000 / 0; expanded RIS 4815 / 15185 / 0. Independent continuation and shrink/grow resize branches run for each accepted case. Evidence run2-nightly.log. Expanded rejections include semantic state and explicit bounded-painter gaps; they are not faithful replays.
Author
Owner

Step 8ce7e170c3: test(shim): measure faithful socket Snapshots in explicit RIS context. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/socket-context-fast.log.

Step 8ce7e170c31bc430207880ee190d1bcf9ed8ee47: test(shim): measure faithful socket Snapshots in explicit RIS context. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/socket-context-fast.log.
Author
Owner

Performance finding: full-budget faithful serializer at 200x60, 1000 samples fails 2ms guard: p50 2.749ms / p99 13.518ms, 27522 bytes. run2-snapshot.log; host i9-9900K/8 CPUs, load 3.37/5.00/7.69, unisolated. The R3 scan visits all ~10k stored rows although Snapshot exports at most a 256-row tail. Investigating bounded-tail validation without weakening semantic checks. Three floods remain above 10MB/s: LF 14.202-14.889, CRLF 17.808-19.076, printable 54.783-71.108.

Performance finding: full-budget faithful serializer at 200x60, 1000 samples fails 2ms guard: p50 2.749ms / p99 13.518ms, 27522 bytes. run2-snapshot.log; host i9-9900K/8 CPUs, load 3.37/5.00/7.69, unisolated. The R3 scan visits all ~10k stored rows although Snapshot exports at most a 256-row tail. Investigating bounded-tail validation without weakening semantic checks. Three floods remain above 10MB/s: LF 14.202-14.889, CRLF 17.808-19.076, printable 54.783-71.108.
Author
Owner

Optimization choice: preserve the all-history R3 rejection scope. Reduce packed cell metadata across each row before checking semantic/protection masks, derived from pinned Cell fields. This enables vectorized scanning without history truncation or a cached state mirror. Existing committed snapshot_200x60 2ms regression is red in run2-snapshot.log; no timing threshold changes.

Optimization choice: preserve the all-history R3 rejection scope. Reduce packed cell metadata across each row before checking semantic/protection masks, derived from pinned Cell fields. This enables vectorized scanning without history truncation or a cached state mirror. Existing committed snapshot_200x60 2ms regression is red in run2-snapshot.log; no timing threshold changes.
Author
Owner

Native diagnostic: all-history validation plus visible paint costs p50 1.688ms at tail=0; adding 256 history rows costs 2.087ms (run2-profile.log). Packed reduction alone still fails 2ms. Proposed bounded validation uses exactly exported history plus both visible screens, while always checking live/saved semantic scalar state. Frozen v1 explicitly permits older-history truncation; omitted older cells are outside the replay oracle scope, not certified equal. Add a red boundary regression: input-semantic cells inside retained tail reject; outside the intentionally omitted tail allow an exact retained-tail replay.

Native diagnostic: all-history validation plus visible paint costs p50 1.688ms at tail=0; adding 256 history rows costs 2.087ms (run2-profile.log). Packed reduction alone still fails 2ms. Proposed bounded validation uses exactly exported history plus both visible screens, while always checking live/saved semantic scalar state. Frozen v1 explicitly permits older-history truncation; omitted older cells are outside the replay oracle scope, not certified equal. Add a red boundary regression: input-semantic cells inside retained tail reject; outside the intentionally omitted tail allow an exact retained-tail replay.
Author
Owner

Step c6693ebad4: test(shim): define semantic validation at the exported history boundary. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/semantic-tail-test-fast.log.

Step c6693ebad4ce2d89238331fc9250a951fde32ed2: test(shim): define semantic validation at the exported history boundary. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/semantic-tail-test-fast.log.
Author
Owner

Bounded exported-extent validation is green: retained semantic input still rejects; omitted older input-semantic rows replay with independent continuations and resize (run2-semantic-tail-green.log). Full-budget 200x60 serializer n=1000: p50 0.519ms / p99 0.844ms, 27522 bytes, unchanged 2ms guard PASS (run2-snapshot-bounded.log). Live semantic scalar checks remain mandatory. Failed full-history and vector-reduction measurements remain recorded. Exact fast and final nightly are running.

Bounded exported-extent validation is green: retained semantic input still rejects; omitted older input-semantic rows replay with independent continuations and resize (run2-semantic-tail-green.log). Full-budget 200x60 serializer n=1000: p50 0.519ms / p99 0.844ms, 27522 bytes, unchanged 2ms guard PASS (run2-snapshot-bounded.log). Live semantic scalar checks remain mandatory. Failed full-history and vector-reduction measurements remain recorded. Exact fast and final nightly are running.
Author
Owner

Step c86372daa5: perf(shim): bound semantic validation to the exported Snapshot extent. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/semantic-tail-fix-fast.log.

Step c86372daa56d5586834f735f3f770adcc254b8c3: perf(shim): bound semantic validation to the exported Snapshot extent. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/semantic-tail-fix-fast.log.
Author
Owner

Performance fix c86372d passes exact fast 7/0 (semantic-tail-fix-fast.log). Final nightly: original RIS 19864/136/0; expanded RIS 4815/15185/0; both fresh-C contexts 0/20000/0 (faithful/rejected/divergent). Final static wrapped/less retained replay, approximate notice and legacy recovery PASS (run2-bounded-final-reconnect.log). Final serial floods/socket/128-session measurements are running. Native rejection/restore code is now complete; docs will state the exported-tail scope explicitly.

Performance fix c86372d passes exact fast 7/0 (semantic-tail-fix-fast.log). Final nightly: original RIS 19864/136/0; expanded RIS 4815/15185/0; both fresh-C contexts 0/20000/0 (faithful/rejected/divergent). Final static wrapped/less retained replay, approximate notice and legacy recovery PASS (run2-bounded-final-reconnect.log). Final serial floods/socket/128-session measurements are running. Native rejection/restore code is now complete; docs will state the exported-tail scope explicitly.
Author
Owner

Step 8da9a6005a: test(shim): require credited raw flood throughput without Snapshot substitution. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/flood-evidence-fast.log.

Step 8da9a6005ad6efcac9cc554d4ecaa90a2651f656: test(shim): require credited raw flood throughput without Snapshot substitution. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/flood-evidence-fast.log.
Author
Owner

Final measured evidence on i9-9900K/8 CPUs, unisolated: raw 50MiB floods, three trials each, zero Snapshot substitutions; medians LF 14.143 / CRLF 16.585 / printable 71.948 MB/s, minimum 12.522. Serializer n=1000 p50 0.611ms / p99 1.259ms. Socket n=1000 default p99 3.375ms; CPU1 client/CPU2 shim repeat p99 1.673ms. All logs retained. At 128 full-history+8MiB-ring sessions: RSS sum 4047200KiB, PSS sum 3555936KiB, daemon RSS 4260KiB; 1280 simultaneous replies p99 39.178ms (300ms budget). Paths: run2-raw-flood-*.log, run2-final-snapshot.log, run2-final-socket.log, run2-socket-affinity.log, run2-final-scale.log under target/review-vt2-fixes. Self-review completed for cap/layout/bounds, ordered recovery/control handling, oracle scope, FFI ownership, licenses and budgets. Known historical 4MiB idle-shim canary remains unmet; unchanged threshold. Docs and final gate are next.

Final measured evidence on i9-9900K/8 CPUs, unisolated: raw 50MiB floods, three trials each, zero Snapshot substitutions; medians LF 14.143 / CRLF 16.585 / printable 71.948 MB/s, minimum 12.522. Serializer n=1000 p50 0.611ms / p99 1.259ms. Socket n=1000 default p99 3.375ms; CPU1 client/CPU2 shim repeat p99 1.673ms. All logs retained. At 128 full-history+8MiB-ring sessions: RSS sum 4047200KiB, PSS sum 3555936KiB, daemon RSS 4260KiB; 1280 simultaneous replies p99 39.178ms (300ms budget). Paths: run2-raw-flood-*.log, run2-final-snapshot.log, run2-final-socket.log, run2-socket-affinity.log, run2-final-scale.log under target/review-vt2-fixes. Self-review completed for cap/layout/bounds, ordered recovery/control handling, oracle scope, FFI ownership, licenses and budgets. Known historical 4MiB idle-shim canary remains unmet; unchanged threshold. Docs and final gate are next.
Author
Owner

Step ec38f9521d: docs(shim): record second-review fidelity limits and engine state import requirements. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/run2-final-docs-fast.log.

Step ec38f9521d588e0d110e3bc31089a8f211dc923f: docs(shim): record second-review fidelity limits and engine state import requirements. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/run2-final-docs-fast.log.
Author
Owner

Finished continuation on vt-ghostty, base 544a2e1d0b, head ec38f9521d. Eight atomic commits, each exact fast PASS. Pending detached-control ordering fix committed; expanded case 1027 fixed tests-first. Final 20k faithful/rejected/divergent: original RIS 19864/136/0, expanded RIS 4815/15185/0; both fresh-C contexts 0/20000/0. R1 real wrapped/less retained replay, negotiated approximation and live legacy recovery PASS.

Raw floods, three 50MiB trials per pattern, zero Snapshot substitutions: medians LF 14.143, CRLF 16.585, printable 71.948 MB/s; minimum 12.522 >10. Serializer n=1000 p50 0.611ms/p99 1.259ms (<2ms). Socket default p99 3.375ms; repeat with client CPU1/shim CPU2 p99 1.673ms. Both samples retained. 128 full-history/ring sessions: RSS sum 4047200KiB, PSS sum 3555936KiB, infraternal agent RSS 4260KiB; 1280 recovery replies p99 39.178ms (<300ms). Unisolated i9-9900K/8 CPUs; machine/load and failed timing samples recorded. Known historical 4MiB idle-shim canary remains unmet; no threshold changed.

Self-review complete. docs/S1-VT-GHOSTTY.md records exact restored/rejected fields, exported-tail fidelity scope, all evidence paths and engine-level state export/import requirements for the owner's upstream decision. Evidence and final binaries remain in target/review-vt2-fixes; job scratch caches removed. Independent FFI review and pinned perf-VM validation remain reviewer work. No push/deploy; issue stays open.

Exact final gate, exit 0: nix shell nixpkgs#binutils nixpkgs#file nixpkgs#gnumake nixpkgs#perl nixpkgs#zig_0_15 -c scripts/verify fast
Log: target/review-vt2-fixes/run2-final-docs-fast.log
Verbatim summary:

+---------------------------+--------------+
| Rust gate                 | Result       |
+---------------------------+--------------+
| fmt                       | PASS         |
| VT native fmt             | PASS         |
| clippy                    | PASS         |
| test                      | PASS         |
| cargo-deny                | PASS         |
| static builds             | PASS         |
+---------------------------+--------------+
 7 pass
 0 fail
Finished continuation on vt-ghostty, base 544a2e1d0b386d51f613a5dccf3b827c44fabf8a, head ec38f9521d588e0d110e3bc31089a8f211dc923f. Eight atomic commits, each exact fast PASS. Pending detached-control ordering fix committed; expanded case 1027 fixed tests-first. Final 20k faithful/rejected/divergent: original RIS 19864/136/0, expanded RIS 4815/15185/0; both fresh-C contexts 0/20000/0. R1 real wrapped/less retained replay, negotiated approximation and live legacy recovery PASS. Raw floods, three 50MiB trials per pattern, zero Snapshot substitutions: medians LF 14.143, CRLF 16.585, printable 71.948 MB/s; minimum 12.522 >10. Serializer n=1000 p50 0.611ms/p99 1.259ms (<2ms). Socket default p99 3.375ms; repeat with client CPU1/shim CPU2 p99 1.673ms. Both samples retained. 128 full-history/ring sessions: RSS sum 4047200KiB, PSS sum 3555936KiB, infraternal agent RSS 4260KiB; 1280 recovery replies p99 39.178ms (<300ms). Unisolated i9-9900K/8 CPUs; machine/load and failed timing samples recorded. Known historical 4MiB idle-shim canary remains unmet; no threshold changed. Self-review complete. docs/S1-VT-GHOSTTY.md records exact restored/rejected fields, exported-tail fidelity scope, all evidence paths and engine-level state export/import requirements for the owner's upstream decision. Evidence and final binaries remain in target/review-vt2-fixes; job scratch caches removed. Independent FFI review and pinned perf-VM validation remain reviewer work. No push/deploy; issue stays open. Exact final gate, exit 0: nix shell nixpkgs#binutils nixpkgs#file nixpkgs#gnumake nixpkgs#perl nixpkgs#zig_0_15 -c scripts/verify fast Log: target/review-vt2-fixes/run2-final-docs-fast.log Verbatim summary: ``` +---------------------------+--------------+ | Rust gate | Result | +---------------------------+--------------+ | fmt | PASS | | VT native fmt | PASS | | clippy | PASS | | test | PASS | | cargo-deny | PASS | | static builds | PASS | +---------------------------+--------------+ 7 pass 0 fail ```
Author
Owner

Third independent review started: read-only source branch vt-ghostty, round base 234baf0a6c, head ec38f9521d; full-switch base e72589e346. Read CLAUDE.md, DECISIONS.md, architecture, shim contract and every #22/#26 comment. Experiments and incremental findings in $HOME/.cache/codex-scratch/review-vt3; source unchanged. Decision 110 is absent from checkout/history; requested its text while proceeding with independent checks.

Third independent review started: read-only source branch vt-ghostty, round base 234baf0a6c46eda56f0a889aa93f744f70aa703f, head ec38f9521d588e0d110e3bc31089a8f211dc923f; full-switch base e72589e346fe1707299f64676367cc5668c9d1c3. Read CLAUDE.md, DECISIONS.md, architecture, shim contract and every #22/#26 comment. Experiments and incremental findings in $HOME/.cache/codex-scratch/review-vt3; source unchanged. Decision 110 is absent from checkout/history; requested its text while proceeding with independent checks.
Author
Owner

Third-review R1 checks PASS against final static binary: wrapped retained 2160468 bytes and less retained 1203273 bytes, zero repaint substitutions through credit starvation. Ring-gap approximate payloads 23127/15219 bytes, exactly one ordered notice matching head 14806510/11692120. Legacy bit-0 peer stays live for Ping and reset recovery. Log review-vt3/reconnect.log; clean archived source build is underway. No source changes.

Third-review R1 checks PASS against final static binary: wrapped retained 2160468 bytes and less retained 1203273 bytes, zero repaint substitutions through credit starvation. Ring-gap approximate payloads 23127/15219 bytes, exactly one ordered notice matching head 14806510/11692120. Legacy bit-0 peer stays live for Ping and reset recovery. Log review-vt3/reconnect.log; clean archived source build is underway. No source changes.
Author
Owner

T1 high, independent failing real-binary regression: 80x24 wrapped producer emits 12MiB; consume initial 1MiB credit, allow 250ms detach/ring gap, then grant exactly 1 byte and resume a 2MiB producer. Expected bounded detach while repaint is unaffordable; actual producer remains blocked at 1513.1ms, zero notices/repaints. daemon.rs:381-383 retains SnapshotWithFlags without arming any deadline; relay::Output::pending only arms at zero credit, missing positive insufficient credit. Test review-vt3/credit_probe.py and credit.log, final static ec38f95 binary. Same branch handles faithful repaint. Source unchanged; clean-binary confirmation follows.

T1 high, independent failing real-binary regression: 80x24 wrapped producer emits 12MiB; consume initial 1MiB credit, allow 250ms detach/ring gap, then grant exactly 1 byte and resume a 2MiB producer. Expected bounded detach while repaint is unaffordable; actual producer remains blocked at 1513.1ms, zero notices/repaints. daemon.rs:381-383 retains SnapshotWithFlags without arming any deadline; relay::Output::pending only arms at zero credit, missing positive insufficient credit. Test review-vt3/credit_probe.py and credit.log, final static ec38f95 binary. Same branch handles faithful repaint. Source unchanged; clean-binary confirmation follows.
Author
Owner

Third-review detached-control check PASS: independent ordering_probe.py sends 64 detached resizes, each followed by sequenced PTY input that records stty size. All 64 observations exactly match requested geometry, 30x100 through 93x163; no unread control observed across repeated peer replacement. Evidence review-vt3/ordering.log and harness; final ec38f95 static binary. Ordered InputState fence confirms handling/acceptance; accepted input remains owned by shim.

Third-review detached-control check PASS: independent ordering_probe.py sends 64 detached resizes, each followed by sequenced PTY input that records stty size. All 64 observations exactly match requested geometry, 30x100 through 93x163; no unread control observed across repeated peer replacement. Evidence review-vt3/ordering.log and harness; final ec38f95 static binary. Ordered InputState fence confirms handling/acceptance; accepted input remains owned by shim.
Author
Owner

T2 high, failing independent public-C-API test on fresh ec38f95 native archive: reset + mouse mode 1000 + X, faithful Snapshot/replay; left-button report is 6 bytes in source, 0 in replay. Mode 1003 + SGR 1006: source report 9 bytes, replay 6 (legacy encoding). Strict oracle says equal in both cases. snapshot.zig:123-130 emits all live mode booleans in enum order; pinned stream_terminal.zig:620-648 replaces flags.mouse_event/mouse_format even when an unrelated mouse mode is disabled. compare omits both effective flags. Test review-vt3/mouse_probe.c exits 1, mouse.log (counts only). Restore and independently check effective reporting/encoding, or explicitly reject unsupported combinations. Source remains read-only.

T2 high, failing independent public-C-API test on fresh ec38f95 native archive: reset + mouse mode 1000 + X, faithful Snapshot/replay; left-button report is 6 bytes in source, 0 in replay. Mode 1003 + SGR 1006: source report 9 bytes, replay 6 (legacy encoding). Strict oracle says equal in both cases. snapshot.zig:123-130 emits all live mode booleans in enum order; pinned stream_terminal.zig:620-648 replaces flags.mouse_event/mouse_format even when an unrelated mouse mode is disabled. compare omits both effective flags. Test review-vt3/mouse_probe.c exits 1, mouse.log (counts only). Restore and independently check effective reporting/encoding, or explicitly reject unsupported combinations. Source remains read-only.
Author
Owner

Third-review R2/R3/R4 independent rerun: 10 probes PASS, zero failures; reused prior probe source with disclosed RIS context and R3 Unsupported/source-preservation expectation. 309 carry boundaries pass. Saved-mode restore and ISO ECH match. Fresh less capture still has 990 accepted/417 rejected sampled prefixes; vim/htop/tmux 0 rejected. Native ABI/null/sentinel and 18 guarded writer-buffer checks PASS; rustc confirms Terminal cannot cross threads. Full clean-checkout workspace tests PASS (shim 50/0/7); both static builds underway. Evidence review-vt3/{review2-rerun,ffi,send-build,fast}.log.

Third-review R2/R3/R4 independent rerun: 10 probes PASS, zero failures; reused prior probe source with disclosed RIS context and R3 Unsupported/source-preservation expectation. 309 carry boundaries pass. Saved-mode restore and ISO ECH match. Fresh less capture still has 990 accepted/417 rejected sampled prefixes; vim/htop/tmux 0 rejected. Native ABI/null/sentinel and 18 guarded writer-buffer checks PASS; rustc confirms Terminal cannot cross threads. Full clean-checkout workspace tests PASS (shim 50/0/7); both static builds underway. Evidence review-vt3/{review2-rerun,ffi,send-build,fast}.log.
Author
Owner

Third-review approximation counter PASS: independent actual-writer harness observes zero increment while a 1MiB socket write is pending, exactly one after completion, none for flags=0 and none for an unsuccessful write (metric.log, 1/0, 40ms). FFI review checked all 9 unsafe call sites / 8 extern declarations, matching C ABI, unique ownership, null/error/sentinel handling, bounded synchronous borrows and thread confinement; guarded C probes pass. Native licence audit includes all 24 fetched Ghostty packages plus Zig runtime/toolchain terms; no incompatible linked dependency identified. Cache-only themes omit LICENSE, but pinned upstream 8c97c3c MIT license was verified. Source unchanged.

Third-review approximation counter PASS: independent actual-writer harness observes zero increment while a 1MiB socket write is pending, exactly one after completion, none for flags=0 and none for an unsuccessful write (metric.log, 1/0, 40ms). FFI review checked all 9 unsafe call sites / 8 extern declarations, matching C ABI, unique ownership, null/error/sentinel handling, bounded synchronous borrows and thread confinement; guarded C probes pass. Native licence audit includes all 24 fetched Ghostty packages plus Zig runtime/toolchain terms; no incompatible linked dependency identified. Cache-only themes omit LICENSE, but pinned upstream 8c97c3c MIT license was verified. Source unchanged.
Author
Owner

Third-review finding follow-ups: T1 also reproduces with a faithful repaint, producer incomplete after 1508.9ms. T2 third public mouse-encoder case (mode 1003 then 1000, motion input) gives source 0 report bytes versus replay 6; strict oracle still says equal. All 3 independent encoder cases now fail. Clean x86_64 static build succeeded (11459056 bytes, no PT_INTERP); T1 repeat on that binary and aarch64 build are underway.

Third-review finding follow-ups: T1 also reproduces with a faithful repaint, producer incomplete after 1508.9ms. T2 third public mouse-encoder case (mode 1003 then 1000, motion input) gives source 0 report bytes versus replay 6; strict oracle still says equal. All 3 independent encoder cases now fail. Clean x86_64 static build succeeded (11459056 bytes, no PT_INTERP); T1 repeat on that binary and aarch64 build are underway.
Author
Owner

T3 high, FFI failure-path regression: conforming C allocator permits N allocations then refuses further allocations during 80x24 -> 20000x2 resize (40000 cells, legal shim bound), with both screens retained after reset. For N=2,3,4,5 resize returns OutOfMemory (-1), reports old 80x24 geometry, then Snapshot ends helper with return_code=-11; N=0/1 remain usable, N>=6 succeed. terminal_native.rs:74-76 assumes failure leaves valid state, but pinned Terminal.resize applies tabstops/primary before alternate and commits dimensions last. Rust retains the same engine after error; session handle only disconnects its peer. Test review-vt3/allocation_probe.c and allocation-summary.log; all native diagnostics stay in files. Follow-up continuation/approximate checks underway.

T3 high, FFI failure-path regression: conforming C allocator permits N allocations then refuses further allocations during 80x24 -> 20000x2 resize (40000 cells, legal shim bound), with both screens retained after reset. For N=2,3,4,5 resize returns OutOfMemory (-1), reports old 80x24 geometry, then Snapshot ends helper with return_code=-11; N=0/1 remain usable, N>=6 succeed. terminal_native.rs:74-76 assumes failure leaves valid state, but pinned Terminal.resize applies tabstops/primary before alternate and commits dimensions last. Rust retains the same engine after error; session handle only disconnects its peer. Test review-vt3/allocation_probe.c and allocation-summary.log; all native diagnostics stay in files. Follow-up continuation/approximate checks underway.
Author
Owner

Starting T1-T3 fixes on vt-ghostty, base ec38f9521d. Read repository contract, architecture, decisions, #26/#22 history and third-review findings. Red tests precede separate logical fixes; diagnostics stay in files. docs/PROCESS.md remains absent; following job Definition of Done. Evidence: target/review-vt3-fixes/.

Starting T1-T3 fixes on vt-ghostty, base ec38f9521d588e0d110e3bc31089a8f211dc923f. Read repository contract, architecture, decisions, #26/#22 history and third-review findings. Red tests precede separate logical fixes; diagnostics stay in files. docs/PROCESS.md remains absent; following job Definition of Done. Evidence: target/review-vt3-fixes/.
Author
Owner

T1 red reproduced from ported scripts/verify-vt-credit.py: 1-byte grant, 2MiB producer still incomplete after 1.5s; no forwarded repaint/notice. Evidence target/review-vt3-fixes/t1-red.log. T3 recovery must not query or destroy a failed native handle: pinned cleanup also inspects page structures. Plan: retire it at FFI boundary, reconstruct at last good size only when retained bytes and geometry history certify full coverage, otherwise mark clean recovery approximate. Transactional upstream resize (#37) is needed to reclaim failed allocations safely.

T1 red reproduced from ported scripts/verify-vt-credit.py: 1-byte grant, 2MiB producer still incomplete after 1.5s; no forwarded repaint/notice. Evidence target/review-vt3-fixes/t1-red.log. T3 recovery must not query or destroy a failed native handle: pinned cleanup also inspects page structures. Plan: retire it at FFI boundary, reconstruct at last good size only when retained bytes and geometry history certify full coverage, otherwise mark clean recovery approximate. Transactional upstream resize (#37) is needed to reclaim failed allocations safely.
Author
Owner

Red probes reproduced on fresh native build: public mouse encoder 3/3 mismatches; native allocation steps 2-5 fail continuation (0/1 and 6-11 pass); Rust resize ownership test also fails at step 2. T1 unit positive-credit deadline fails; real faithful/16KiB and approximate/1-byte producer cases both exceed 1.5s. Evidence target/review-vt3-fixes/{mouse.log,allocation-red-summary.log,t3-boundary-red.log,t1-unit-red.log,t1-faithful-red.log}. All payloads/native diagnostics retained in files.

Red probes reproduced on fresh native build: public mouse encoder 3/3 mismatches; native allocation steps 2-5 fail continuation (0/1 and 6-11 pass); Rust resize ownership test also fails at step 2. T1 unit positive-credit deadline fails; real faithful/16KiB and approximate/1-byte producer cases both exceed 1.5s. Evidence target/review-vt3-fixes/{mouse.log,allocation-red-summary.log,t3-boundary-red.log,t1-unit-red.log,t1-faithful-red.log}. All payloads/native diagnostics retained in files.
Author
Owner

Continuation run 2 started on vt-ghostty at 7283c37 (original base ec38f95). Read repository instructions and #26/#22 history; verifying pending daemon deadline change, then T2 and T3. Diagnostics stay in files; docs/PROCESS.md is absent.

Continuation run 2 started on vt-ghostty at 7283c37 (original base ec38f95). Read repository instructions and #26/#22 history; verifying pending daemon deadline change, then T2 and T3. Diagnostics stay in files; docs/PROCESS.md is absent.
Author
Owner

T1 completed at the new relay commit on vt-ghostty: faithful/approximate × 1 byte/16KiB real static probes all PASS; producer 2MiB, unchanged cursor, zero early notices, one recovery. Debug completion 161.5–202.8ms; evidence target/review-vt3-fixes/t1-*.log.
Exact fast exit 0, Rust 6 PASS and TypeScript 7 pass/0 fail: t1-daemon-fast.log. Proceeding with T2 effective mouse restoration and oracle.

T1 completed at the new relay commit on vt-ghostty: faithful/approximate × 1 byte/16KiB real static probes all PASS; producer 2MiB, unchanged cursor, zero early notices, one recovery. Debug completion 161.5–202.8ms; evidence target/review-vt3-fixes/t1-*.log. Exact fast exit 0, Rust 6 PASS and TypeScript 7 pass/0 fail: t1-daemon-fast.log. Proceeding with T2 effective mouse restoration and oracle.
Author
Owner

T1 head SHA: 4573c40; preceding completion evidence applies to that atomic commit. T2 native adapter is in validation; its read-only oracle now checks effective mouse_event and mouse_format as well as booleans.

T1 head SHA: 4573c40; preceding completion evidence applies to that atomic commit. T2 native adapter is in validation; its read-only oracle now checks effective mouse_event and mouse_format as well as booleans.
Author
Owner

T3 ownership checks: ReleaseSafe steps 0–3 and 6–11 PASS retirement checks; steps 4/5 do not return from native resize, before wrapper retirement is reached. Evidence t3-boundary-green-*.log; diagnostics stay in files.
Production ReleaseFast 12-step matrix is running. Non-returning native resize and safe reclamation belong to the transactional resize candidate for fork #37.

T3 ownership checks: ReleaseSafe steps 0–3 and 6–11 PASS retirement checks; steps 4/5 do not return from native resize, before wrapper retirement is reached. Evidence t3-boundary-green-*.log; diagnostics stay in files. Production ReleaseFast 12-step matrix is running. Non-returning native resize and safe reclamation belong to the transactional resize candidate for fork #37.
Author
Owner

T2 public encoder 3/3 PASS on rebuilt archive; preserved baseline still fails (t2-public-mouse-green.log, t2-red-confirmation/mouse.log). Fast gate workspace tests PASS, static builds still running.
T3 four terminal recovery tests PASS (t3-terminal-green.log): origin+geometry exact reconstruction, ring-gap/changed-geometry clean approximation, continued output. Replaying borrowed ring slices avoids an extra 8MiB allocation.

T2 public encoder 3/3 PASS on rebuilt archive; preserved baseline still fails (t2-public-mouse-green.log, t2-red-confirmation/mouse.log). Fast gate workspace tests PASS, static builds still running. T3 four terminal recovery tests PASS (t3-terminal-green.log): origin+geometry exact reconstruction, ring-gap/changed-geometry clean approximation, continued output. Replaying borrowed ring slices avoids an extra 8MiB allocation.
Author
Owner

T2 completed at 725b238: effective mouse_event/mouse_format restored and compared; public encoder 3/3 PASS, preserved baseline FAIL. Evidence t2-public-mouse-green.log and t2-red-confirmation/mouse.log.
Exact fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail: target/review-vt3-fixes/t2-fix-fast.log. T3 ownership and recovery are pending separate commits.

T2 completed at 725b238: effective mouse_event/mouse_format restored and compared; public encoder 3/3 PASS, preserved baseline FAIL. Evidence t2-public-mouse-green.log and t2-red-confirmation/mouse.log. Exact fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail: target/review-vt3-fixes/t2-fix-fast.log. T3 ownership and recovery are pending separate commits.
Author
Owner

T3 production ReleaseFast allocation steps 0–5 now PASS, including every reported error step; remaining steps running. ReleaseSafe non-returning steps remain disclosed in their logs.
Recovery ordering finding: a later ReadFrom or detached-control peer replacement can supersede a queued recovery repaint. Proposed existing-capability behavior: after clean recovery, next ReadFrom must deliver a flagged repaint (legacy Error(2)), since retained bytes alone do not cover recovered terminal state.

T3 production ReleaseFast allocation steps 0–5 now PASS, including every reported error step; remaining steps running. ReleaseSafe non-returning steps remain disclosed in their logs. Recovery ordering finding: a later ReadFrom or detached-control peer replacement can supersede a queued recovery repaint. Proposed existing-capability behavior: after clean recovery, next ReadFrom must deliver a flagged repaint (legacy Error(2)), since retained bytes alone do not cover recovered terminal state.
Author
Owner

T3 production ReleaseFast ownership matrix: all 12 allocation steps PASS; t3-boundary-release-0.log through -11.log. Reported error steps 2–5 retire the handle before subsequent operations.
Atomic gates now use isolated source slices. Current HEAD 725b238; T1 gate-test addition staged. Pending T3 source preserved inside target/review-vt3-fixes/pending-source/ while each module is gated separately.

T3 production ReleaseFast ownership matrix: all 12 allocation steps PASS; t3-boundary-release-0.log through -11.log. Reported error steps 2–5 retire the handle before subsequent operations. Atomic gates now use isolated source slices. Current HEAD 725b238; T1 gate-test addition staged. Pending T3 source preserved inside target/review-vt3-fixes/pending-source/ while each module is gated separately.
Author
Owner

T1 real-binary regression is enabled in fast at 7b9c44e: faithful/approximate × 1 byte/16KiB, all four cases PASS.
Isolated exact fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail; target/review-vt3-fixes/t1-enable-fast.log and t1-gate-*.stdout.log.

T1 real-binary regression is enabled in fast at 7b9c44e: faithful/approximate × 1 byte/16KiB, all four cases PASS. Isolated exact fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail; target/review-vt3-fixes/t1-enable-fast.log and t1-gate-*.stdout.log.
Author
Owner

T3 ownership completed at b61b3746c1: fix(shim): retire native ownership after every resize error.
Exact isolated fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail; evidence target/review-vt3-fixes/t3-ownership-atomic-fast.log.

T3 ownership completed at b61b3746c145e63608c56539aff5dfe0b7f51907: fix(shim): retire native ownership after every resize error. Exact isolated fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail; evidence target/review-vt3-fixes/t3-ownership-atomic-fast.log.
Author
Owner

T3 ring completed at 2c0f82f575: feat(shim): borrow complete origin output for recovery.
Exact isolated fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail; evidence target/review-vt3-fixes/t3-ring-atomic-fast.log.

T3 ring completed at 2c0f82f575b70fff29c8a4e35d5f4e64d49a987c: feat(shim): borrow complete origin output for recovery. Exact isolated fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail; evidence target/review-vt3-fixes/t3-ring-atomic-fast.log.
Author
Owner

T3 reconstruction completed at e8fcdcb643: fix(shim): reconstruct retired terminals at their last good size.
Exact isolated fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail; evidence target/review-vt3-fixes/t3-reconstruction-atomic-fast.log.

T3 reconstruction completed at e8fcdcb64364fc031036177ca414cf069dcf2a9d: fix(shim): reconstruct retired terminals at their last good size. Exact isolated fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail; evidence target/review-vt3-fixes/t3-reconstruction-atomic-fast.log.
Author
Owner

T3 session red probes committed at d208c37: exact/gap/current-head/control cases fail before the fix; real native refusal step 2 and real PTY. Evidence t3-session-red.log, t3-session-{gap,readfrom,control}-red.log.
Ignored tests-first slice passes isolated exact fast, Rust 6 PASS / TypeScript 7 pass, 0 fail: t3-session-test-atomic-fast-final.log.

T3 session red probes committed at d208c37: exact/gap/current-head/control cases fail before the fix; real native refusal step 2 and real PTY. Evidence t3-session-red.log, t3-session-{gap,readfrom,control}-red.log. Ignored tests-first slice passes isolated exact fast, Rust 6 PASS / TypeScript 7 pass, 0 fail: t3-session-test-atomic-fast-final.log.
Author
Owner

T3 session draft passes exact/gap/current-head/control probes (t3-session-green.log). Additional queued-read probe is red: ReadFrom pending before refusal, cursor not yet set, recovery repaint omitted; t3-session-queued-red.log.
Final ordering policy preserves control-only InputState fences and repaints active or queued output attachments. Tests-first queued-read slice is gating before the final session fix.

T3 session draft passes exact/gap/current-head/control probes (t3-session-green.log). Additional queued-read probe is red: ReadFrom pending before refusal, cursor not yet set, recovery repaint omitted; t3-session-queued-red.log. Final ordering policy preserves control-only InputState fences and repaints active or queued output attachments. Tests-first queued-read slice is gating before the final session fix.
Author
Owner

Queued-read red regression committed at 5fd4886: explicit draft probe FAIL before ordering correction, t3-session-queued-red.log.
Isolated exact fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail; t3-queued-test-atomic-fast.log.

Queued-read red regression committed at 5fd4886: explicit draft probe FAIL before ordering correction, t3-session-queued-red.log. Isolated exact fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail; t3-queued-test-atomic-fast.log.
Author
Owner

T3 session fix completed at c19ec79: five real allocator/PTY cases PASS, including queued/current-head reads and control fences; physical geometry returns to 80x24 and output continues.
Isolated exact fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail; t3-session-fix-atomic-fast.log and t3-session-final-green.log.

T3 session fix completed at c19ec79: five real allocator/PTY cases PASS, including queued/current-head reads and control fences; physical geometry returns to 80x24 and output continues. Isolated exact fast exit 0, Rust 6 PASS / TypeScript 7 pass, 0 fail; t3-session-fix-atomic-fast.log and t3-session-final-green.log.
Author
Owner

Enabled resize refusal and five real PTY ordering cases; origin/gap/geometry/continuation tests pass. Commit a240e18.
Exact fast gate PASS: target/review-vt3-fixes/t3-test-enable-atomic-fast-final.log; production refusal matrix 12/12 PASS.

Enabled resize refusal and five real PTY ordering cases; origin/gap/geometry/continuation tests pass. Commit a240e18. Exact fast gate PASS: target/review-vt3-fixes/t3-test-enable-atomic-fast-final.log; production refusal matrix 12/12 PASS.
Author
Owner

Four 20k corpus runs PASS: RIS original 19,864 accepted/136 rejected, expanded 4,815/15,185; fresh-C both 0/20,000. Zero accepted divergence.
Evidence: target/review-vt3-fixes/final-fidelity*-*.log. Native resize returns an error and the engine handle must not be reused; wrapper matrix 12/12 PASS.

Four 20k corpus runs PASS: RIS original 19,864 accepted/136 rejected, expanded 4,815/15,185; fresh-C both 0/20,000. Zero accepted divergence. Evidence: target/review-vt3-fixes/final-fidelity*-*.log. Native resize returns an error and the engine handle must not be reused; wrapper matrix 12/12 PASS.
Author
Owner

Original reviewer credit probes PASS: producer completion 120.9/121.1/141.3 ms, zero notices/repaints before forwarding. Final reconnect wrapped-output and less cases PASS.
Evidence: target/review-vt3-fixes/final-reviewer-credit*_probe.log and final-reconnect.log; unchanged cursor and legacy ordering covered.

Original reviewer credit probes PASS: producer completion 120.9/121.1/141.3 ms, zero notices/repaints before forwarding. Final reconnect wrapped-output and less cases PASS. Evidence: target/review-vt3-fixes/final-reviewer-credit*_probe.log and final-reconnect.log; unchanged cursor and legacy ordering covered.
Author
Owner

Public encoder and independent effective-mouse ordering tests now run in fast; 3/3 public continuations PASS. Commit e7cbc62.
Exact fast PASS: target/review-vt3-fixes/t2-encoder-tests-fast-final.log (all six Rust checks and TypeScript checks).

Public encoder and independent effective-mouse ordering tests now run in fast; 3/3 public continuations PASS. Commit e7cbc62. Exact fast PASS: target/review-vt3-fixes/t2-encoder-tests-fast-final.log (all six Rust checks and TypeScript checks).
Author
Owner

Fresh capture oracle committed at 51300c3: vim 48, htop 39, less 34 sampled boundaries accepted, zero divergence (200x60); tracked four captures unchanged and PASS.
Exact fast PASS: target/review-vt3-fixes/fresh-capture-tests-fast.log; fresh evidence final-fresh-captures.log.

Fresh capture oracle committed at 51300c3: vim 48, htop 39, less 34 sampled boundaries accepted, zero divergence (200x60); tracked four captures unchanged and PASS. Exact fast PASS: target/review-vt3-fixes/fresh-capture-tests-fast.log; fresh evidence final-fresh-captures.log.
Author
Owner

Serial budgets: all nine 50MiB raw floods PASS (minimum 10.232 MB/s, zero Snapshots); serializer p99 1.066 ms <2 ms. Socket p99 3.288 ms includes scheduling/framing.
Full 8MiB constructor/replay component: n=50 p99 101.708 ms, 128× payload=1,073,740,160 bytes. Evidence final-{flood-*,snapshot,reconstruction,socket-snapshot}.log; scale running.

Serial budgets: all nine 50MiB raw floods PASS (minimum 10.232 MB/s, zero Snapshots); serializer p99 1.066 ms <2 ms. Socket p99 3.288 ms includes scheduling/framing. Full 8MiB constructor/replay component: n=50 p99 101.708 ms, 128× payload=1,073,740,160 bytes. Evidence final-{flood-*,snapshot,reconstruction,socket-snapshot}.log; scale running.
Author
Owner

128 full 200x60 sessions PASS: 1,280 socket recovery replies p99 51.720 ms <300 ms; aggregate shim RSS/PSS 4,089,300/3,597,524 KiB, infraternal agent 4,264 KiB.
Evidence final-scale-128.log; native full-ring rebuild p99 101.708 ms is a separate per-unit component, not simultaneous refusal certification. Transactional resize candidate and retained-allocation limit documented for #37.

128 full 200x60 sessions PASS: 1,280 socket recovery replies p99 51.720 ms <300 ms; aggregate shim RSS/PSS 4,089,300/3,597,524 KiB, infraternal agent 4,264 KiB. Evidence final-scale-128.log; native full-ring rebuild p99 101.708 ms is a separate per-unit component, not simultaneous refusal certification. Transactional resize candidate and retained-allocation limit documented for #37.
Author
Owner

Completed third-review corrections on vt-ghostty, head 565105fde0.
Exact fast PASS; evidence target/review-vt3-fixes/final-docs-fast.log and docs/S1-VT-GHOSTTY.md.
Minimum raw flood 10.232 MB/s; serializer p99 1.066 ms; 128-session recovery p99 51.720 ms.

Completed third-review corrections on vt-ghostty, head 565105fde025e602aa587b91f98a93b0eb8e7c12. Exact fast PASS; evidence target/review-vt3-fixes/final-docs-fast.log and docs/S1-VT-GHOSTTY.md. Minimum raw flood 10.232 MB/s; serializer p99 1.066 ms; 128-session recovery p99 51.720 ms.
Author
Owner

Final fast gate output (verbatim):
| fmt | PASS |
| VT native fmt | PASS |

Final fast gate output (verbatim): | fmt | PASS | | VT native fmt | PASS |
Author
Owner

Final fast gate output (verbatim):
| clippy | PASS |
| test | PASS |

Final fast gate output (verbatim): | clippy | PASS | | test | PASS |
Author
Owner

Final fast gate output (verbatim):
| cargo-deny | PASS |
| static builds | PASS |

Final fast gate output (verbatim): | cargo-deny | PASS | | static builds | PASS |
Author
Owner

Final TypeScript gate output (verbatim):
7 pass
0 fail

Final TypeScript gate output (verbatim): 7 pass 0 fail
Author
Owner

Fourth independent recheck started: read-only branch vt-ghostty, base ec38f9521d, head 565105fde0. Read repository contract, decisions, architecture, prior findings and #26/#22 history. Scope T1 positive insufficient credit, T2 public mouse encoder, T3 allocation refusal ownership/session recovery and boundedness, plus controlled flood A/B. Experiments and incremental findings: $HOME/.cache/codex-scratch/review-vt4; removed at completion. No source changes or commits.

Fourth independent recheck started: read-only branch vt-ghostty, base ec38f9521d588e0d110e3bc31089a8f211dc923f, head 565105fde025e602aa587b91f98a93b0eb8e7c12. Read repository contract, decisions, architecture, prior findings and #26/#22 history. Scope T1 positive insufficient credit, T2 public mouse encoder, T3 allocation refusal ownership/session recovery and boundedness, plus controlled flood A/B. Experiments and incremental findings: $HOME/.cache/codex-scratch/review-vt4; removed at completion. No source changes or commits.
Author
Owner

T3 review finding (high): returned resize errors retire ownership correctly, but cumulative retained allocations are unbounded. terminal_native.rs:85-88 removes the handle without reclamation; terminal.rs:145-162 creates a fresh engine, and session.rs:551-564 keeps the session eligible for further resizes. Each repeated refusal can retain another engine; the 17MiB page budget and 128-session limit do not bound repetition. docs/S1-VT-GHOSTTY.md explicitly discloses this. Measuring retained bytes independently; no source changes. A bounded refusal policy or transactional native resize is required for approval under decisions 13/40/41.

T3 review finding (high): returned resize errors retire ownership correctly, but cumulative retained allocations are unbounded. terminal_native.rs:85-88 removes the handle without reclamation; terminal.rs:145-162 creates a fresh engine, and session.rs:551-564 keeps the session eligible for further resizes. Each repeated refusal can retain another engine; the 17MiB page budget and 128-session limit do not bound repetition. docs/S1-VT-GHOSTTY.md explicitly discloses this. Measuring retained bytes independently; no source changes. A bounded refusal policy or transactional native resize is required for approval under decisions 13/40/41.
Author
Owner

T3 pre-return limitation is separate from retirement: disclosed ReleaseSafe refusal points 4/5 end inside native resize before the Rust wrapper regains control. Source path includes Screen.zig:1882 -> PageList.zig:93 -> compress/lz4.zig:470, with C terminal.zig:656 unable to translate it to a returned error. Existing default fast allocation probe selects point 2, so its green result does not cover these points. Independently rebuilding both native optimization modes; production and ReleaseSafe results will be reported separately.

T3 pre-return limitation is separate from retirement: disclosed ReleaseSafe refusal points 4/5 end inside native resize before the Rust wrapper regains control. Source path includes Screen.zig:1882 -> PageList.zig:93 -> compress/lz4.zig:470, with C terminal.zig:656 unable to translate it to a returned error. Existing default fast allocation probe selects point 2, so its green result does not cover these points. Independently rebuilding both native optimization modes; production and ReleaseSafe results will be reported separately.
Author
Owner

T2 independently confirmed with the original review-vt3 public C encoder probe: ec38f95 baseline fails all three cases, fresh 565105f native adapter passes all three. Cases: 1000, 1003+1006, and 1003 then 1000 motion. Rebuilt from the exact same original probe source; no reliance on the expanded oracle. Evidence scratch review-vt4/original-mouse-{base,debug}.log; source unchanged.

T2 independently confirmed with the original review-vt3 public C encoder probe: ec38f95 baseline fails all three cases, fresh 565105f native adapter passes all three. Cases: 1000, 1003+1006, and 1003 then 1000 motion. Rebuilt from the exact same original probe source; no reliance on the expanded oracle. Evidence scratch review-vt4/original-mouse-{base,debug}.log; source unchanged.
Author
Owner

T3 cumulative retention measured independently with the exact Rust Engine wrapper and conforming refusing allocator. Tiny terminals, point 2: 1/8/32/64 retired engines retain 31,290/250,320/1,001,280/2,002,560 allocator bytes (native mappings excluded). Full 17MiB history, point 0: RSS after 1 refusal 23,596KiB; after 8 refusals 163,980KiB, +140,384KiB over 7 additional refusals (~20,055KiB each). Each returned error prevents later input/Snapshot calls on that handle; a fresh engine remains usable. Retention is linear with no count/byte ceiling. Evidence scratch ownership/src/allocation.rs and retention-{debug,full-debug}.log. This disclosed limitation is not acceptable as bounded session recovery.

T3 cumulative retention measured independently with the exact Rust Engine wrapper and conforming refusing allocator. Tiny terminals, point 2: 1/8/32/64 retired engines retain 31,290/250,320/1,001,280/2,002,560 allocator bytes (native mappings excluded). Full 17MiB history, point 0: RSS after 1 refusal 23,596KiB; after 8 refusals 163,980KiB, +140,384KiB over 7 additional refusals (~20,055KiB each). Each returned error prevents later input/Snapshot calls on that handle; a fresh engine remains usable. Retention is linear with no count/byte ceiling. Evidence scratch ownership/src/allocation.rs and retention-{debug,full-debug}.log. This disclosed limitation is not acceptable as bounded session recovery.
Author
Owner

T3 disclosed pre-return points independently confirmed on a fresh native ReleaseSafe library: 10/12 resize calls return; allocation refusal points 4 and 5 do not return to the caller. The helper performs no query, Snapshot or destruction after a returned error, so this is inside resize itself. Evidence native_matrix.py, native_return_probe.c, native-debug-results.json and native-return-debug-20000-2-0-{4,5}.log in scratch review-vt4. ReleaseFast verification follows; session guarantee cannot cover these Safe paths merely by retiring returned errors.

T3 disclosed pre-return points independently confirmed on a fresh native ReleaseSafe library: 10/12 resize calls return; allocation refusal points 4 and 5 do not return to the caller. The helper performs no query, Snapshot or destruction after a returned error, so this is inside resize itself. Evidence native_matrix.py, native_return_probe.c, native-debug-results.json and native-return-debug-20000-2-0-{4,5}.log in scratch review-vt4. ReleaseFast verification follows; session guarantee cannot cover these Safe paths merely by retiring returned errors.
Author
Owner

T1 independently PASS on fresh production static 565105f: faithful/approximate x 1 byte/16KiB, 4/4. All preserve the unforwarded cursor, send no premature notice/repaint and resume with exactly one repaint. Extended proxy holds recovery parked for 3000ms and sends six more insufficient one-byte grants: zero shim reattachments and zero daemon CPU ticks in all four cases. Base ec38f95 faithful/1-byte still fails at 1507.9ms. Evidence credit_extended.py, credit_proxy.py, credit-extended-*.log in scratch review-vt4.

T1 independently PASS on fresh production static 565105f: faithful/approximate x 1 byte/16KiB, 4/4. All preserve the unforwarded cursor, send no premature notice/repaint and resume with exactly one repaint. Extended proxy holds recovery parked for 3000ms and sends six more insufficient one-byte grants: zero shim reattachments and zero daemon CPU ticks in all four cases. Base ec38f95 faithful/1-byte still fails at 1507.9ms. Evidence credit_extended.py, credit_proxy.py, credit-extended-*.log in scratch review-vt4.
Author
Owner

Correction to the preceding T1 completion comment: the four production credit/recovery cases passed, but the scratch textual insertion missed the extra 3000ms parked observation. Its zero reattachment/CPU claim was therefore premature. Corrected the scratch instrumentation using the parsed final credit-grant location and am rerunning all four cases. Source remains read-only; corrected measured results will follow.

Correction to the preceding T1 completion comment: the four production credit/recovery cases passed, but the scratch textual insertion missed the extra 3000ms parked observation. Its zero reattachment/CPU claim was therefore premature. Corrected the scratch instrumentation using the parsed final credit-grant location and am rerunning all four cases. Source remains read-only; corrected measured results will follow.
Author
Owner

T3 production ReleaseFast checks: exact Rust wrapper retirement 12/12 PASS; native pre-return probe 144/144 return normally (12 refusal points x 4 admitted geometries x 3 retained-screen/history states); production real-PTY recovery parent PASS across exact/gap/current-head/control/queued subcases. Original public mouse probe also PASS in ReleaseFast. Production cumulative retention remains unbounded: full-history RSS 23,116KiB after one refusal, 144,724KiB after eight (+121,608KiB over seven further refusals, ~17MiB each); tiny fixture retains 1,998,464 allocator bytes after 64 refusals. Evidence ownership-release-results.json, native-release-results.json, session-production.log, retention-{small,full}-release.log and original-mouse-release.log in scratch review-vt4. These finite production passes do not cover the independently confirmed Safe pre-return points 4/5.

T3 production ReleaseFast checks: exact Rust wrapper retirement 12/12 PASS; native pre-return probe 144/144 return normally (12 refusal points x 4 admitted geometries x 3 retained-screen/history states); production real-PTY recovery parent PASS across exact/gap/current-head/control/queued subcases. Original public mouse probe also PASS in ReleaseFast. Production cumulative retention remains unbounded: full-history RSS 23,116KiB after one refusal, 144,724KiB after eight (+121,608KiB over seven further refusals, ~17MiB each); tiny fixture retains 1,998,464 allocator bytes after 64 refusals. Evidence ownership-release-results.json, native-release-results.json, session-production.log, retention-{small,full}-release.log and original-mouse-release.log in scratch review-vt4. These finite production passes do not cover the independently confirmed Safe pre-return points 4/5.
Author
Owner

Corrected extended T1 probes independently PASS 4/4 on production 565105f. Producer completion 121.2/121.7ms faithful (1 byte/16KiB), 121.2/121.4ms approximate. Partial-credit shim connections end after 252.3/252.5/251.8/252.2ms respectively, consistent with the 250ms deadline plus scheduling. Each then parks for 3000ms with six additional insufficient grants: zero reattachments, zero daemon CPU ticks, unchanged cursor and zero notices/repaints before sufficient credit; exactly one repaint after final credit. Evidence credit-extended-*.log, credit-extended-results.json and corrected credit_extended.py. This supersedes the earlier premature parked-observation claim.

Corrected extended T1 probes independently PASS 4/4 on production 565105f. Producer completion 121.2/121.7ms faithful (1 byte/16KiB), 121.2/121.4ms approximate. Partial-credit shim connections end after 252.3/252.5/251.8/252.2ms respectively, consistent with the 250ms deadline plus scheduling. Each then parks for 3000ms with six additional insufficient grants: zero reattachments, zero daemon CPU ticks, unchanged cursor and zero notices/repaints before sufficient credit; exactly one repaint after final credit. Evidence credit-extended-*.log, credit-extended-results.json and corrected credit_extended.py. This supersedes the earlier premature parked-observation claim.
Author
Owner

Gate interruption: first fresh scripts/verify fast invocation ended with exit 143 during the ARM static build, without a final gate summary. Workspace tests, native/public probe tests and x86_64 static build had completed; no compiler error was recorded. Cause not established. Full output retained in scratch fast-interrupted.log. Finishing controlled benchmarks with this job compiler work stopped, then rerunning the complete fast gate using populated caches. Review is not complete until the gate result and verdict are posted.

Gate interruption: first fresh scripts/verify fast invocation ended with exit 143 during the ARM static build, without a final gate summary. Workspace tests, native/public probe tests and x86_64 static build had completed; no compiler error was recorded. Cause not established. Full output retained in scratch fast-interrupted.log. Finishing controlled benchmarks with this job compiler work stopped, then rerunning the complete fast gate using populated caches. Review is not complete until the gate result and verdict are posted.
Author
Owner

Flood cost attribution: four balanced rounds cross exact Rust base/head source with exact native base/head ReleaseFast libraries, using the same benchmark crate identity, CPU 3, process CPU clock, 128MiB per sample after warmup. LF CPU median MB/s (Rust/native): base/base 16.749, base/head 17.084, head/base 17.002, head/head 17.502. Mean paired combined CPU service cost -3.15%; new Rust path +0.33% on base native and -1.32% on head native (noise exceeds these estimates). No repeatable LF CPU regression identified; printable combined CPU service cost -13.00%. Initial serial credited LF medians base/head 11.275/12.633MB/s, minima 8.808/6.880 under shared load; BOTH miss 10MB/s in some runs. The historical 12.522 -> 10.232 minimum is not attributable to these changes from this evidence. Completing all credited flood patterns after the full fast gate; original 10MB/s guard remains unchanged. Evidence cross-results.json/cross-summary.json and flood-first-serial-incomplete-results.json in scratch review-vt4.

Flood cost attribution: four balanced rounds cross exact Rust base/head source with exact native base/head ReleaseFast libraries, using the same benchmark crate identity, CPU 3, process CPU clock, 128MiB per sample after warmup. LF CPU median MB/s (Rust/native): base/base 16.749, base/head 17.084, head/base 17.002, head/head 17.502. Mean paired combined CPU service cost -3.15%; new Rust path +0.33% on base native and -1.32% on head native (noise exceeds these estimates). No repeatable LF CPU regression identified; printable combined CPU service cost -13.00%. Initial serial credited LF medians base/head 11.275/12.633MB/s, minima 8.808/6.880 under shared load; BOTH miss 10MB/s in some runs. The historical 12.522 -> 10.232 minimum is not attributable to these changes from this evidence. Completing all credited flood patterns after the full fast gate; original 10MB/s guard remains unchanged. Evidence cross-results.json/cross-summary.json and flood-first-serial-incomplete-results.json in scratch review-vt4.
Author
Owner

Final serial credited 50MiB flood A/B: five interleaved base/head trials per pattern, after own builds/parser measurements completed; 30/30 raw floods, zero Snapshot substitutions. Median/range MB/s: LF base 14.151 (13.586-14.734), head 14.359 (13.742-15.090); CRLF base 18.039 (17.710-18.850), head 18.012 (16.059-18.778); printable base 68.152 (59.381-76.143), head 69.372 (58.527-77.537). All final samples exceed 10MB/s. Paired LF service cost mean -1.64%, approximate 95% interval -8.18% to +4.90%; no repeatable code-caused regression detected. Earlier loaded-host LF misses (base 8.808/head 6.880 minimum) remain disclosed and are not counted as passing. Historical 10.232 minimum is consistent with shared load; its exact cause cannot be reconstructed. Evidence flood-results.json/flood-summary.json and cross-results.json. Still shared host, not pinned perf VM.

Final serial credited 50MiB flood A/B: five interleaved base/head trials per pattern, after own builds/parser measurements completed; 30/30 raw floods, zero Snapshot substitutions. Median/range MB/s: LF base 14.151 (13.586-14.734), head 14.359 (13.742-15.090); CRLF base 18.039 (17.710-18.850), head 18.012 (16.059-18.778); printable base 68.152 (59.381-76.143), head 69.372 (58.527-77.537). All final samples exceed 10MB/s. Paired LF service cost mean -1.64%, approximate 95% interval -8.18% to +4.90%; no repeatable code-caused regression detected. Earlier loaded-host LF misses (base 8.808/head 6.880 minimum) remain disclosed and are not counted as passing. Historical 10.232 minimum is consistent with shared load; its exact cause cannot be reconstructed. Evidence flood-results.json/flood-summary.json and cross-results.json. Still shared host, not pinned perf VM.
Author
Owner

Verdict: REWORK. Recheck of ec38f95..565105f complete; source branch vt-ghostty, unchanged head 565105fde0.

Ranked required work:

  1. HIGH — Bound cumulative retirement or implement transactional native resize (#37). terminal_native.rs:89 drops the handle but retains native allocations; terminal.rs:149 reconstructs, and session.rs:551 allows further resizes. Production full-history RSS grows 23,116 -> 144,724KiB after 1 -> 8 refused resizes (~17MiB per additional refusal), without any retirement-count/byte ceiling. Holding allocations until shim exit is not a bound for persistent attached sessions (decisions 13/56). A bounded fallback can stop further native resize attempts after retirement while preserving last-good geometry and continued PTY input/output.
  2. MEDIUM — Resolve or contain native resize paths that do not return to the wrapper. Fresh ReleaseSafe refusal points 4/5 still encounter invalid state inside resize, so wrapper retirement cannot keep those sessions alive. Repeat with explicitly log2-aligned allocator confirms Safe 10/12 return, production ReleaseFast 144/144 return; Rust production retirement 12/12 and five real-PTY recovery cases PASS. Sampled ReleaseFast success is not a universal native guarantee.

Passing fixes: T1 faithful/approximate x 1-byte/16KiB, 4/4; partial-credit connection ends 251.8-252.5ms, producer completes 121.2-121.7ms, cursor unchanged, zero premature notices/repaints. Corrected 3000ms parked probes with six insufficient grants have zero reattachments/CPU ticks, then exactly one repaint. T2 original public encoder cases 1000, 1003+1006, 1003 then 1000 match in Safe and Fast; baseline fails 3/3.

Flood: no repeatable regression attributable to these changes. Final serial 30 samples have zero Snapshots; LF median base/head 14.151/14.359MB/s, head minimum 13.742; paired service cost -1.64% (approximate 95% interval -8.18 to +4.90%). Same-crate Rust/native crossover identifies no stable LF cost. Historical 12.522 -> 10.232 minimum is consistent with shared load, whose exact contribution cannot be reconstructed. Earlier loaded-host samples below 10MB/s on BOTH revisions remain disclosed; final runs all pass. No budget changed; pinned perf VM remains untested.

Full scripts/verify fast rerun exit 0 on archived head (only scratch probe output directory redirected). Original worktree clean; no commits, push or deploy. First interrupted gate (exit 143) was rerun completely. Verbatim final gate summary:

+---------------------------+--------------+
| Rust gate                 | Result       |
+---------------------------+--------------+
| fmt                       | PASS         |
| VT native fmt             | PASS         |
| clippy                    | PASS         |
| test                      | PASS         |
| cargo-deny                | PASS         |
| static builds             | PASS         |
+---------------------------+--------------+
 7 pass
 0 fail

Evidence numbers and methods are recorded in preceding comments and scratch findings.md. All review-vt4 experiments and build targets are being removed as requested; issue stays open.

Verdict: REWORK. Recheck of ec38f95..565105f complete; source branch vt-ghostty, unchanged head 565105fde025e602aa587b91f98a93b0eb8e7c12. Ranked required work: 1. HIGH — Bound cumulative retirement or implement transactional native resize (#37). terminal_native.rs:89 drops the handle but retains native allocations; terminal.rs:149 reconstructs, and session.rs:551 allows further resizes. Production full-history RSS grows 23,116 -> 144,724KiB after 1 -> 8 refused resizes (~17MiB per additional refusal), without any retirement-count/byte ceiling. Holding allocations until shim exit is not a bound for persistent attached sessions (decisions 13/56). A bounded fallback can stop further native resize attempts after retirement while preserving last-good geometry and continued PTY input/output. 2. MEDIUM — Resolve or contain native resize paths that do not return to the wrapper. Fresh ReleaseSafe refusal points 4/5 still encounter invalid state inside resize, so wrapper retirement cannot keep those sessions alive. Repeat with explicitly log2-aligned allocator confirms Safe 10/12 return, production ReleaseFast 144/144 return; Rust production retirement 12/12 and five real-PTY recovery cases PASS. Sampled ReleaseFast success is not a universal native guarantee. Passing fixes: T1 faithful/approximate x 1-byte/16KiB, 4/4; partial-credit connection ends 251.8-252.5ms, producer completes 121.2-121.7ms, cursor unchanged, zero premature notices/repaints. Corrected 3000ms parked probes with six insufficient grants have zero reattachments/CPU ticks, then exactly one repaint. T2 original public encoder cases 1000, 1003+1006, 1003 then 1000 match in Safe and Fast; baseline fails 3/3. Flood: no repeatable regression attributable to these changes. Final serial 30 samples have zero Snapshots; LF median base/head 14.151/14.359MB/s, head minimum 13.742; paired service cost -1.64% (approximate 95% interval -8.18 to +4.90%). Same-crate Rust/native crossover identifies no stable LF cost. Historical 12.522 -> 10.232 minimum is consistent with shared load, whose exact contribution cannot be reconstructed. Earlier loaded-host samples below 10MB/s on BOTH revisions remain disclosed; final runs all pass. No budget changed; pinned perf VM remains untested. Full scripts/verify fast rerun exit 0 on archived head (only scratch probe output directory redirected). Original worktree clean; no commits, push or deploy. First interrupted gate (exit 143) was rerun completely. Verbatim final gate summary: ``` +---------------------------+--------------+ | Rust gate | Result | +---------------------------+--------------+ | fmt | PASS | | VT native fmt | PASS | | clippy | PASS | | test | PASS | | cargo-deny | PASS | | static builds | PASS | +---------------------------+--------------+ 7 pass 0 fail ``` Evidence numbers and methods are recorded in preceding comments and scratch findings.md. All review-vt4 experiments and build targets are being removed as requested; issue stays open.
Author
Owner

Cleanup complete: $HOME/.cache/codex-scratch/review-vt4 removed, including experiment files, isolated source copies and build targets. Original vt-ghostty worktree remains clean at 565105fde0. REWORK verdict, ranked requirements, measured evidence and verbatim passing fast-gate summary are recorded above. Issue remains open.

Cleanup complete: $HOME/.cache/codex-scratch/review-vt4 removed, including experiment files, isolated source copies and build targets. Original vt-ghostty worktree remains clean at 565105fde025e602aa587b91f98a93b0eb8e7c12. REWORK verdict, ranked requirements, measured evidence and verbatim passing fast-gate summary are recorded above. Issue remains open.
Author
Owner

Orchestrator decision overnight (owner may override): review-vt4 rework items are accepted as a known limitation for deploy 3, not a blocker. Both occur only under allocation refusal (memory exhaustion) partway through a native resize:

  • retired allocations accumulate until the shim exits (8 full-history refusals: RSS 23 → 145 MB);
  • two ReleaseSafe refusal points end the shim instead of returning an error.

The real fix is a transactional native resize in our libghostty-vt fork, tracked on #37 (D110). T1 and T2 pass the recheck. Flood A/B shows no regression (LF median 14.15 → 14.36 MB/s).

Orchestrator decision overnight (owner may override): **review-vt4 rework items are accepted as a known limitation for deploy 3, not a blocker.** Both occur only under allocation refusal (memory exhaustion) partway through a native resize: - retired allocations accumulate until the shim exits (8 full-history refusals: RSS 23 → 145 MB); - two ReleaseSafe refusal points end the shim instead of returning an error. The real fix is a transactional native resize in our libghostty-vt fork, tracked on #37 (D110). T1 and T2 pass the recheck. Flood A/B shows no regression (LF median 14.15 → 14.36 MB/s).
Author
Owner

Closed by the orchestrator during the 2026-10-28 handover (#254), on the owner's request to close finished issues. Evidence: Second review verdict rework accepted as known limitation by orchestrator; real fix (transactional resize) is tracked on #37 and 565105f is in dev and prod. Reopen if anything is still missing.

Closed by the orchestrator during the 2026-10-28 handover (#254), on the owner's request to close finished issues. Evidence: Second review verdict rework accepted as known limitation by orchestrator; real fix (transactional resize) is tracked on #37 and 565105f is in dev and prod. Reopen if anything is still missing.
kayg closed this issue 2026-10-28 17:52:16 +00:00
Sign in to join this conversation.
No labels
launch-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/infraternal#26
No description provided.