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
No Branch/Tag specified
main
j470b-server-mesh-rejoin
mesh-compat-382
j444b-d381-key-wins-flood
j461b-macos-utun-reader-thread
j475b-remove-host-motion
fix-reconnect-new-link
j481-d380
dev
j479-mesh-soak
fix/j476-host-facts
j475-motion-pill-split
j470-mac-node-join
root-upgrade-d376
j474-review-merge
latency-targets-120hz
nightly-suite-shards
gotatun-pin-j469
macos-utun-reader-thread
fix-flood-echo-stall
wip/j416
motion-fast-ease-out
mesh-addhost-j259
takeover-close-terminals-d368
kbd-instant-followups
fix-trust-key-double-click
nightly-suite-partial-report
appwin-icons-j207
rusqlite-slice1
swipe-content-first-d374
mesh-mtu-381
addhost-instant-open
glass-contrast-d365-mock
glass-contrast-d365
signout-followups-442
fix-startup-toast-red
research-gotatun-matrix-j317
themes-sync-j304
fix-load-flakes
fix-nix-zig-patch
fix-compute01-browser-baseline
ratchet-size-baseline-419
predict-auto-d130
revoke-coverage-d367
nightly-suite-queue-timeout
nightly-browser-suite
fix-rustsec-2026-0459
fonts-ioskeley-obel
log-retention-d375
fix-kbd-no-anim-427
fix-dev-red-specs-2
takeover-proof-305-j205
wip/j410-server-pump
ui-consistency-d372
fix-osc52-clipboard
libghostty-vt-1.0
forget-retired-host-d369
j404-merge-426
fix-setup-lock-race
fix-touch-select-426
revoke-access-report-ui
fix-predictive-echo-specs
fix-selinux-agent-exec
wip/j395-checkpoint2
wip/j395
j391-review-scratch
ui-consistency-j195-deferred-rebased
fix-rustc-paths-421
decisions-wording-341
fix-install-suite-red
fix-dev-rtt-specs
fix-pending-removal-align
fix-privileged-skip
fix-install-suite-404
review-j368
mesh-dns-j254
revoke-access-report-d356b
revoke-privilege-round5
fix-removal-confirm
review-j360
gotatun-rotation-367
deps-refresh-340
review-j354
review-J351
review-j350
addhost-takeover-d359
revoke-report-items-347
revoke-end-sessions-d362
review-j348
size-mesh-ssh-346
size-trim-337
revoke-access-diff-d356
j259-pre-rebase-b06c5a6
j305-ended-at-start-spec
addhost-sudo-consent
fix-layout-real-specs-411
fix-shell-open-411
fix-console-hosts-373
fix-shell-exit
fuzz-host-name-353
fix-host-details-410
macos-filter-j197
research-gotatun-tricks
revoke-p3-j216l
stale-state-pill
revoke-followups-j216k
revoke-progress-j216e
backup/macos01-20261106/lume/j197
backup/macos01-20261106/lume/appwin-icons-j207-stash0
backup/macos01-20261106/claude/stash-0
backup/macos01-20261106/claude/stash-1
backup/macos01-20261106/claude/J80-macos-s1
backup/macos01-20261106/claude/J80
backup/macos01-20261106/claude/J80-slice1-20261102
backup/macos01-20261106/claude/J16b-appwin-on-dev
backup/macos01-20261106/claude/appwin-launch-idle-146
backup/macos01-20261106/claude/J80-s1-run
wip/j259
trust-285-p3c
runtime-lock-j216f
mesh-ssh-p3-j175
tun-proof-p3b
trust-285-p3
terminal-polish-j271
tun-proof-p3
ssh-install-flakes-j216i
fuzz-fixes-j264
trust-285-a
trust-285-b
restart-oversized-fixture-j198
backup/macos01-20261106/lume/appwin-icons-j207
restart-bound-j216h
up-preflight-p3-j198
backup/macos01-20261106/lume/j251
up-preflight-j198
wip/up-preflight-j198-j245-p2
wip/up-preflight-j198-j245-p1
agent-fsync-offloop-j196
wip/up-preflight-j198-j245
settings-offscreen-j231
wip/up-preflight-j198-j226-inspection
wip/j103f
themes-j206
wip/up-preflight-j198-j226
flakes-j216c
backup/macos01-20261106/claude/j197
flakes-j216b
backup/macos01-20261106/claude/j197-red
wip/up-preflight-j198-review
flakes-j216
backup/macos01-20261106/claude/appwin-icons-j207
engineering-j208b
appwin-mock-j209
toast-stack-j165
engineering-j208
decisions-d351
decisions-d350
decisions-d349
appearance-presets-mock-j129
decisions-d348
docs-audit-spec
doc-coverage-baseline-raise
decisions-d347
decisions-d346b
decisions-d346
j88h-profile
ui-consistency-j195-deferred
ui-consistency-j195
engineering-practices-j194
preferred-login-ui-j166
signin-pools-263-j174
macos-node-265-s1
decisions-d345
decisions-d344
proxy-cgroup-j164
verify-quick-fuzz-329
proxy-start-io-j168
timing-flakes-j163
up-263-s1
mcp-events-j147
verify-quick-fuzz-j158
proxy-p3-j159
agent-resource-j157-detect
wip/j103d-final
remote-cancel-hang-j155
proxy-traefik-281-j62d
j149-verify-quick
proxy-traefik-281-j62b
j150-drop-unnamed
wip/j79d-red-r4
wip/j103d-d332
rootless-toast-j142
wip/j103d-head
wip/j103d
j125c-mcp
macos-build-j136
backup/macos01-20261106/claude/j136
wip/j79d-red-cli
wip/j79d-red-server
j121-link-liveness
j118c-tracer-failures
wip/j79c-head
release-desktop-j131
j124c-signed-macos
wip/j79c-red-p3
wip/j79c-red-p23
wip/j79c-red-p22
merge-j128-check
perf-deferred-j128
sidebar-toggle-260
j127-shortcut-changed-dot
j125-mcp
j118-tracer-failures
j126-account-summary
settings-sections-mock-j92
j120-pinch-lock
sidebar-292
backup/macos01-20261106/claude/j120
taste-2026-11-03
row-actions-242-215
backup/macos01-20261106/claude/stash-0-untracked
backup/macos01-20261106/claude/J80-265-s1-run
backup/macos01-20261106/claude/J80-macos-s1-20261102
j112-canvas-commands
ui-no-overshoot-scroll
fix-recovery-restart
backup/macos01-20261106/claude/stash-1-untracked
taste-2026-11-02
size-baseline-ratchet
machine-cards-structure-j108
j109-boot-copy-mockups
fix-dev-red
wip/up-263-s1
j95b-settings-rows
proxy-traefik-281
j95-option-rows
docs-human-j91
docs-keys-palette
fix-flood-1013-270-j38d
mesh-ssh-s1
mesh-ssh-s0
addhost-d291-tunnel
test-stability-load
mesh-relay-220
repro-296
shim-thp-off-24
mesh-pins-258-v2
mesh-dns
signin-d311-merged
docs-pages
ui-size-283
fix-ui-batch-specs
wip/j12b-edge-update
gate-on-arm
fix-rename-sync-293
trust-285-j60b
fix-focus-ring-clip
integ-ui-1101
edge-update-v2
signin-d311
taste-2026-11-01
layout-per-tab-250
ui-approved-splitopt-224
ui-approved-splitopt-224-on-dev
icon-text-centre-282
ui-approved-189-212-216
research-reverse-proxy
transfer-budget-320
review-mesh-pins-258-r2
sidebar-pill-259
review-mesh-relay-220
wip/j12-edge-update-v2
nix-package
status-crash-loop-237
fix-dev-test-failures
fix-fixture-socket-path
wip/mesh-relay-220-pre-dev-advance-rebase
fix-canvas-side-clip
research-head-to-head
frosted-real-256
review-mesh-pins-258
wip/mesh-relay-220-pre-final-rebase
review-layout-per-tab-250-r2
broad-suite-triage
nix-devshell
review-status-crash-loop-237-r3
wip/nix-devshell-pre-p3
taste-frosted-real
wip/code-serve-demo-2026-10-30
wip/code-serve-glass-2026-10-30
wip/code-serve-clusters-2026-10-30
wip/code-merge-release94-dev-2026-10-30
wip/rproxy-delta-scratch-2026-10-30
wip/stale-note-257-staged-2026-10-30
wip/d241-size-staged-2026-10-30
review-broad-suite-207
wip/mesh-pins-258-pre-split
wip/mesh-relay-220-pre-rebase
mesh-measure-220
plan-211-update
review-edge-autoupdate-r3
perf24-reconnect
review-stale-note-r2
release-prod-live
d241-shell-marker
review-mesh-pins-server-258
review-revocation-r3
review-setup-token-r2
review-sync-journal-r3
wip/review-mesh-pins-258-prune-review-1995fee46
frosted-scroll-256
sync-journal-r3
revocation-per-account-wip
review-tokio-asyncfd-0386
review-sync-p3s
wip/stash-8by64-stash0-2026-10-30
mesh-drag-r2
setup-token-data-wip
release-9-4
auth-busy-1013
mesh-view-overlap
sync-p3s
review-auth-busy-wake
review-readd-r8-wip
mesh-drag-bounds
audit-auth-93
app-windows-stream-start
review-authority-cap-r3
app-windows-r7-measure
readd-minimal-r6
readd-minimal-r5
app-windows-r7-soak
readd-minimal-r4
app-windows-r7
app-windows-r6
readd-minimal-r3
readd-minimal-r2
readd-minimal
merge-release8-dev
review-busy-page-liveness-r2
review-busy-page-liveness
mesh-view-trim
review-authority-read-retry-r2
review-remove-uninstall-r2
release-retry-reattach
release-retry
review-remove-uninstall
review-authority-read-retry
app-windows-ship
mesh-autoswitch-p2
mesh-ssh
mesh-relay
mesh-macos-node
screen-and-control
session-labels
review-real-logins-r5
review-real-logins-r4
review-real-logins-r3
shim-memory-r2
review-real-logins-r2
shim-memory
shadow-addhost-instant
shadow-real-logins
shadow-same-session-flood
shadow-prod-perf-fix
hosts-from-server
app-windows-real
app-windows-transport
release-prod-6w
mesh-policy-verify
quiet-close-toast
dev-merge-r4
review-mesh-agent-transport
review-app-windows-transport
settings-roundtrip
review-release-pipeline-r4
mesh-agent-transport
ended-strip-fix
review-audit-ca-update-d244
settings-rows
phone-width
signout-clear
fix-restart-tests
dev-merge-rp
signer-hardening
review-audit-ca-update
terminal-fidelity
review-audit-ca-update-wip
mesh-integrate
review-mesh-agent-transport-515d3712
review-mesh-dataplane-feec1988
mesh-dataplane
signout
research-canvas-node
wip/review-renderer-cost
wip/review-terminal-fidelity
padlock-glyph
review-release-pipeline-2e95b689
phone-polish
sidebar-polish
inbox-generic
review-mesh-dataplane-378d4055
prod-batch
ui-inbox
ui-ca-unlock
ui-machine-sections
review-mesh-dataplane-a5f744fb
tls-session-prod
session-bounds-prod
fix-dead-session
session-bounds
tls-session
palette-polish
shortcuts-d222
research-appmeta
phone-gutter
ui-centre-button
wip/ui-centre-button
wip/tls-session
review-addhost-breakit
ui-platform
renderer-cost
remote-agents
mesh-api
ssh-bootstrap
prod-hotfix2
prod-fixes
review-remote-agents
review-mesh-dataplane
session-life
research-browser
review-mesh-api
research-capture
review-mesh-api-round3
review-mesh-api-round1
gate-stability
review-gate-stability
review-relay-direct
review-mesh-api-findings
proto-sessions
font-picker
proto-addhost
proto-windows
mesh-core
latency-gate
research-bsd
research-discovery
keytray-mods
mock-core
ui-tweaks
fix-motion-sel
fix-motion
integrate2
fix-robust
t-web
t-server
vt-ghostty
fix-snap-echo
t-web-auth
review-vt2
t-agent
lane-protocol
lane-shim
lane-auth
s1-base
s1-contracts
s1-workspace
No results found.
No labels
launch-qa
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
unsafeblock and extern declaration against the pinned Ghostty headers.41d9997), tested with sequences split at every byte boundary.Job prompts must keep terminal bytes in files and never print them to the console.
Second independent review started: source branch vt-ghostty, diff base
e72589e346, head234baf0a6c. 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.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.
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.
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.
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.
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.lesssession 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.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.
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.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 completed: tests-first
9b4722e; saved-mode fix54e98b231b. 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.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.
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.
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.R4 completed: tests-first
8031fbc; fix8513830664restores 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.Oracle completion
3841442passes 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.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.ISO scratch-seed fix
ebca78cpasses 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-first4907bdarecords 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.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.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
3182ab9failed before the inherited-protection fix; native/static gate is running. Next: already-proposed additive approximate capability and real wrapped/less reconnect test.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
4efe02a2c5: test(agent): reproduce Snapshot limits closing real reconnects. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/reconnect-test-fast.log.Step
b44c39368a: docs(shim): specify negotiated approximate recovery additively. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-contract-fast.log.Step
8a316c42a2: test(shim): specify bounded canonical approximate frames. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-codec-test-fast.log.Step
b2bc48186c: feat(shim): add the negotiated SnapshotWithFlags codec. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-codec-fix-fast.log.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
e6d08d68e4: feat(shim): own bounded approximate repaint and parser carry. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-terminal-fast.log.Step
88e4328042: fix(shim): negotiate approximate fallback without mislabeling errors. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-session-fast.log.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
201fc6fd0b: fix(agent): resume retained replay after returned credit. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/retained-relay-fix-fast.log.Step
adfaca730e: feat(agent): intersect approximate recovery during shim attachment. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-handshake-fast.log.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
6bf5ca1c84: fix(agent): recover retained output and park Snapshot limitations. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-daemon-fast.log.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.Step
312997f9f0: test(agent): require live recovery across Snapshot limitations. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/reconnect-enable-fast.log.Step
135eb97e86: test(shim): exercise capacity clipping and unfinished-syntax fallback. 7 pass / 0 fail. Evidence: target/review-vt2-fixes/approx-boundaries-fast.log.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.
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
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.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.
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
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
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
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.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).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.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.
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.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).
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.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.
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.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.
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.Saved-charset fix
9b6cb8epasses 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.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.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.
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.
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.
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.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.
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.Performance fix
c86372dpasses 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.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.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.
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.Finished continuation on vt-ghostty, base
544a2e1d0b, headec38f9521d. 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:
Third independent review started: read-only source branch vt-ghostty, round base
234baf0a6c, headec38f9521d; full-switch basee72589e346. 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-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.
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
ec38f95binary. Same branch handles faithful repaint. Source unchanged; clean-binary confirmation follows.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
ec38f95static binary. Ordered InputState fence confirms handling/acceptance; accepted input remains owned by shim.T2 high, failing independent public-C-API test on fresh
ec38f95native 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.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 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 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.
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.
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/.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.
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.
Continuation run 2 started on vt-ghostty at
7283c37(original baseec38f95). 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.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 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.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.
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 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.
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 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.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.
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 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 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 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 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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
Final fast gate output (verbatim):
| fmt | PASS |
| VT native fmt | PASS |
Final fast gate output (verbatim):
| clippy | PASS |
| test | PASS |
Final fast gate output (verbatim):
| cargo-deny | PASS |
| static builds | PASS |
Final TypeScript gate output (verbatim):
7 pass
0 fail
Fourth independent recheck started: read-only branch vt-ghostty, base
ec38f9521d, head565105fde0. 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.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 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.
T2 independently confirmed with the original review-vt3 public C encoder probe:
ec38f95baseline fails all three cases, fresh565105fnative 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.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 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.
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. Baseec38f95faithful/1-byte still fails at 1507.9ms. Evidence credit_extended.py, credit_proxy.py, credit-extended-*.log in scratch review-vt4.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.
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.
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.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.
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.
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.
Verdict: REWORK. Recheck of ec38f95..565105f complete; source branch vt-ghostty, unchanged head
565105fde0.Ranked required work:
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:
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.
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.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:
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).
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
565105fis in dev and prod. Reopen if anything is still missing.kayg referenced this issue2026-10-28 17:53:54 +00:00