S1: switch the shim to libghostty-vt #22
Closed
opened 2026-10-06 13:47:58 +00:00 by kayg
·
27 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#22
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?
DECISIONS 94: switch the shim's terminal state from alacritty_terminal to libghostty-vt. Write our own snapshot serializer, and pass every existing repaint fixture (vim, htop, less, alternate screens 47/1047/1049, continuations). Pin Zig and build statically for both musl targets. Measure the LF flood throughput (target ≥ 10 MB/s through shim and agent) and the RSS per session at 10,000 lines.
Starting vt-ghostty at base
947d68f. Reading the shim serializer, VT fixtures and build gates before implementing DECISIONS 94. Scope excludes infraternal-agent and session/frame changes except minimal engine API adaptations.Finding: clean vt-ghostty actually starts at
e72589e346(947d68fplus the existing interleaved-Ack fix). The worktree DECISIONS.md ends at 86; owner decision 94 is supplied in the job. scripts/auth-toolchain already pins checksum-verified Zig 0.15.2 for both musl C targets. libghostty-vt 0.2.2 pins upstream a887df42c56f6de86c0fe6da9c4eeca37931e083; its C API exposes active-screen cells and pending wrap but lacks inactive-screen lookup, saved cursor, margins, tabs, charset state and hyperlink IDs. Investigating a small read-only native adapter over the pinned Zig screen/cell API to preserve those without mirroring terminal state.1981e55pins Zig 0.15.2 in gate/CI; fast gate exit 0 (target/vt-ghostty/toolchain-gate.log). Baseline static binary sizes: x86_64 9908192 bytes; aarch64 8327168 bytes; both no PT_INTERP. Draft native serializer passes actual Ghostty cell/style/mode/cursor comparison for vim, htop, less and their unchanged continuations, all six alternate/nested variants, and margins/tabs/charsets (target/vt-ghostty/native-check.py). Initial baseline 50 MiB shim-to-infraternal-agent relay: LF 4.160 MB/s, CRLF 13.734 MB/s, printable 31.124 MB/s (target/vt-ghostty/alacritty-flood.log). This run overlapped compilation; final serial comparisons will be recorded separately.Finding: reconstructing a stored emoji ZWJ cluster with default mode 2027 disabled changes cell 0 (native-unicode-red.log: unicode repaint 1 / continue 1). The serializer now disables clustering for each base and enables it only while appending that cell’s stored grapheme. Native comparison returns 0 for repaint and continuation (target/vt-ghostty/native-unicode-green.log). CJK at a wide wrap seam and combining marks are included. Existing vim/htop/less and all six alternate/nesting probes still compare equal. Style/link run serialization reduces those fixture snapshots from approximately 315 KiB to 27–29 KiB. The terminal initialization API change is isolated in
5b5a035; its fast gate passed (target/vt-ghostty/init-api-gate.log).Scrollback calibration (pinned native engine, 200x60, 100060 ASCII CRLF rows): 16 MiB retains 9364 history rows; 17 MiB retains 10063; 18 MiB retains 10762; 20 MiB retains 11927. Evidence: target/vt-ghostty/history-preview.py and history-preview.log. Choose 17 MiB for the session default, equivalent to approximately 10000 rows at the prior S1-SHIM comparison geometry. The budget is bytes; narrower columns and sparse/dense metadata change row retention. No decision is changed.
432b937switches the production shim to Ghostty. Fast gate passes, including existing real vim ring-wrap repaint (target/vt-ghostty/engine-gate.log). The default Rust dependency graph excludes Alacritty and vt100; comparison engines require bench-vt. Native archive is linked statically. x86_64 binary is 11418256 bytes (+1510064); aarch64 9557048 bytes (+1229880), no PT_INTERP. New tests pass for emoji/CJK/combining, keyboard stack wrap/pop, retained alternate cursor, wide pending wrap, 8000-byte unfinished OSC/DCS/APC, oversized carry rejection/recovery and byte-budget pruning/resize. Additional finding: restoring a DECSC cursor after changing margins was clamped to the new region (difference at cell 1013; target/vt-ghostty/saved-origin-red.log). Fix reconstructs saved absolute position with temporary full margins, then restores actual margins independently.Snapshot regressions committed as
bfaa2dbafter the exact fast gate passed (target/vt-ghostty/snapshot-regressions-gate.log). Expanded 20 unit tests pass: saved origin outside changed margins, implicit hyperlink grouping, erased versus printed cells, keyboard ring rollover, oversized unfinished sequence rejection/recovery, byte-budget pruning/resize, and frozen emoji ZWJ/CJK/combining fixtures. Erased-cell regression evidence: expanded-wrap-red.log (difference 199), empty-cells-tests.log (20 passed).Serial release static-binary preview on this host, not the pinned perf VM: LF Alacritty 6.178 versus Ghostty 13.880 MB/s; CRLF 20.770 versus 16.169; printable 44.141 versus 81.201, each exactly 50 MiB plus command completion bytes. CRLF regression under investigation via ground C0 carry-parser bypass. Full 200x60 shim RSS including 8 MiB ring: 67128 versus 33116 KiB; idle 4248 versus 4800 KiB. Real shim socket snapshot p99 (1000 samples): 4.112 versus 1.089 ms. Logs: target/vt-ghostty/{alacritty-flood-serial,ghostty-flood-before-carry,alacritty-rss-serial,ghostty-rss-serial}.log.
Release measurement finding (#22): three serial 50 MiB trials per saved static binary, own builds complete, host i9-9900K/8 CPUs (not pinned perf VM). Median MB/s: LF Alacritty 6.350 -> Ghostty 18.003; CRLF 23.232 -> 21.210 (8.7% slower, overlapping ranges); printable 44.687 -> 80.232. Every Ghostty trial >10 MB/s. Tradeoff is 2.84x LF / 1.80x printable and 50.7% lower full-session RSS. target/vt-ghostty/flood-summary.json contains every sample; vt_flood.py is committed in
22d5eed.Isolated 200x60 terminal: RSS growth 19160 KiB at 10001 rows, 19416 KiB at full 10178 rows; same-host optional Alacritty comparison confirms 47988 KiB at 10000 rows and 67.33 MB/s raw parsing. Ghostty with carry is 145.01 MB/s (2.15x contemporary parser). Default 17 MiB page budget maps to ~10k rows at this geometry, not a row count.
Release tests: serializer p99=0.917 ms; direct Input->PTY p99=17.417 us; all three assertions pass. Real infraternal-agent gate: all 24 crash/replay cases pass, acknowledgement p99=184.360 us (upper bound on write), credited flood 17.401 MiB/s, starved-output peak daemon RSS=4024 KiB. Logs: release-budgets.log, terminal-rss-isolated.log, alacritty-comparison-current.log, real-agent-gate.log.
Supplemental historical 80x24 idle canary fails its unchanged 4 MiB assertion on BOTH binaries here: baseline 5748 KiB, Ghostty 4724 KiB. Evidence: alacritty-idle-80x24.log and idle-final.log. This is not hidden or treated as green; the contemporary attached 200x60 idle/full-RSS harness and required exact fast gate pass. No budget was loosened.
Final HEAD:
d3c71943df. Exact fast gate exit 0. Verbatim gate output, part 1/2.Command:
nix shell nixpkgs#binutils nixpkgs#file nixpkgs#gnumake nixpkgs#perl -c scripts/verify fastFinal HEAD:
d3c71943df. Exact fast gate exit 0. Verbatim gate output, part 2/2.Command:
nix shell nixpkgs#binutils nixpkgs#file nixpkgs#gnumake nixpkgs#perl -c scripts/verify fastImplementation and requested measurements are committed on vt-ghostty; final HEAD
d3c71943df. Nine atomic commits; session changes are only fallible initialization/resize propagation, in their own commits. No infraternal-agent or frame changes; no push/deploy/issue closure. The exact fast gate passed for every commit. Final gate output is posted verbatim in the preceding three parts; full local log: target/vt-ghostty/docs-gate.log. Optional bench-vt and bench-ghostty Clippy checks pass (comparison-feature-gate.log; ghostty-comparison-clean-source-gate.log).Release on this host (i9-9900K, 8 CPUs), NOT pinned perf VM. Flood medians from three serial 50 MiB trials each:
Both executables have no PT_INTERP. All Ghostty flood trials exceed 10 MB/s; LF 2.84× and printable 1.80× faster, CRLF median 8.7% slower with overlapping ranges. Full-session RSS is 50.7% lower, native terminal growth ~60.1% lower, while idle RSS and binary sizes increase. Historical input/snapshot figures are not contemporary controlled A/B latency measurements. Parser/input/snapshot release assertions pass. The real infraternal-agent fixture passes 24/24 crash/replay cases, credited 50 MiB flood and starved-output snapshot progression; peak daemon RSS 4024 KiB.
Default native scrollback is 17,825,792 BYTES: ~10k typical ASCII rows at 200 columns; width/styles/graphemes/page rotation affect row count. Snapshot tail remains bounded at 256 rows. Both retained screens, saved/live cursor, wrap, regions, charsets, tabs, keyboard ring, colors/styles, hyperlinks, Unicode and unfinished syntax are serialized from native state. Existing vim/htop/less/continuation fixtures are unchanged and pass; Unicode ZWJ/CJK/combining fixture added. Native Zig adapter bypasses missing C getters; exact gaps and smallest read-only upstream patch proposal are in docs/S1-VT-GHOSTTY.md. No second metadata engine or broken built-in formatter is used.
Supplemental historical tests/idle.py retains its 4 MiB guard and fails on both old/new saved binaries on this host (5748/4724 KiB); logs are retained. No budget is loosened or failure hidden. Independent unsafe-boundary review and pinned perf-VM verification remain reviewer follow-ups, not claimed results.
Tracked evidence guide: docs/S1-VT-GHOSTTY.md. Raw logs/numbers: target/vt-ghostty/{flood-summary.json,release-budgets.log,terminal-rss-isolated.log,alacritty-comparison-current.log,alacritty-rss-serial.log,ghostty-rss-serial.log,real-agent-gate.log,docs-gate.log}. Worktree is clean.
Correction to the completion note: the final fast-gate output is posted in two parts (42,681 characters), not three. Both parts are labelled 1/2 and 2/2.
Independent Codex review started. Read-only source worktree branch vt-ghostty; base
e72589e; review headd3c7194. Experiments will run in a temporary worktree and findings will be recorded in /tmp/review-vt-findings.md.Independent review finding F1 (high): snapshot loses REP continuation state. At 20x5 feed ESC[?47hALT ESC[?47lMAIN, snapshot into a fresh terminal, then ESC[2b. Original repeats N; replay repeats T from repainting the inactive alternate screen (first mismatch row 1 column 8, native oracle=8). Location: native/snapshot.zig:40-48, liveCursor. Reproduced in independent_state_corpus; /tmp/review-corpus.log. Additional deterministic fuzz and historical binary stress already produce snapshot mismatches; minimization in progress.
Independent review continuation started. Source branch vt-ghostty, base
e72589e346, headd3c71943df. Source worktree remains read-only; continuing experiments in /tmp and preserving /tmp/review-vt-findings.md. Rechecking F1 then continuing snapshot, observer, errors, performance and clean-build checks.Independent review (review-vt, Sol medium): the review was cut short twice by the AI tooling's automated content filter, which reacts to raw terminal byte dumps. Findings so far are below. The verdict is already rework.
crates/infraternal-shim/native/snapshot.zig:40–48, which paints the alternate screen after the primary (see also liveCursor at :145).Next: a fix job builds a differential snapshot test (source terminal vs replayed terminal: cell grid, cursor, modes, and the last printed character), fixes every mismatch, then a fresh review covers FFI soundness, the carry observer, the idle canary and licences.
Starting snapshot fidelity work on branch vt-ghostty, base d3c7194457a (full SHA recorded by git). Reading snapshot adapter and differential-test interfaces; regressions will precede fixes. Decisions 13, 40 and 41 apply.
Base correction: actual starting HEAD is
d3c71943df. Findings: native/snapshot.zig paints primary before retained alternate; existing compare omits previous_char, tabs and saved cursor. spikes/stress is absent (rg reports no such directory); tracked tests/fixtures contains vim, htop, less and unicode. Before measurements on this dev box, not perf VM: LF 17.505 MB/s, CRLF 20.808 MB/s, printable 74.784 MB/s; Snapshot p99 1.034 ms / 1000 samples. Evidence target/snapshot-fidelity/before-{flood,snapshot}.log.F1 reproduced by strict REP-state oracle: difference 6000000 before continuation (target/snapshot-fidelity/red.log). Tests-first commit
9e86d2d; active-screen-last fix32f6ebepasses F1 (f1-green.log). Seeded 1000-case diagnostic found 29 visible replay mismatches: 23 cells, 4 row-wrap flags, 2 cursor positions. Concrete cursor fixture target/snapshot-fidelity/case-766-3000000.vt; edge fixture case-144-12.vt. Diagnostic uses the independent native cell oracle, with payloads only in files.Tracking for this work moved to #25 (snapshot fidelity, job fix-vt running) and #26 (second review). Build and gate state stay here.
Minimized cursor failure: origin on, save at home, change region to rows 2-4, restore, print emoji; CUP in origin mode clamps the replay position. Fix
6c22152uses the saved absolute position and relative movement; cursor regression passes in fixes-preview.log. Line-edge finding: case 144 retains SGR on a now-empty former spacer head; ECH drops foreground/underline attributes. Regression strengthened in97a8665, still red at cell 12 (edge-green.log is a failed attempted fix, not green evidence). Reconstructing a styled wide wrap and then narrowing its head preserves those fields.Expanded oracle now checks both screens, saved cursors, tabs, REP and both row wrap flags. 1000-case smoke: 990 faithful replays, 10 explicit API-gap rejections (all-states-corpus.log). The 20k run exposed saved pending wrap over a changed spacer head at case 1977; minimized test is red at cell 12 (saved-edge-red.log), tests-first
64f98d8. Construct DECSC before painting the grid so its temporary print cannot overwrite the final cells. Further nightly case 8030 exposes a last-row continuation flag that delete-line clearing does not reset in this pinned Ghostty; bounded reconstruction needs a nonprinting row-flag setter. No protocol or engine substitution is being made.Final edge regression: a variation-selector-created wide tail can retain SGR and OSC 8 metadata independently of its base. The failing test reported cell mismatch code 2 in target/snapshot-fidelity/variation-tail-red.log; fix
11884dbrestores those tail attributes. Enabled differential module: 32 passed, 0 failed, 5 ignored; the 1,000-case smoke corpus has 990 faithful replays and 10 explicit Unsupported restoration gaps (target/snapshot-fidelity/variation-module-green.log). The adapter now rejects unrepresentable state instead of emitting a divergent Snapshot. Final 20k validation, exact gate, measurements and upstream setter proposals are being recorded separately.Final 20k nightly profile passes: 19,864 faithful replays, 136 explicit Unsupported gaps, zero accepted divergences (target/snapshot-fidelity/final-nightly.log). First post-change serializer trial missed the 2 ms test guard: p50 0.613 ms, p99 4.637 ms, 27,410 bytes (target/snapshot-fidelity/after-snapshot.log). Concurrent unrelated C compilation occupied nearly all cores; load average 6.07. This failed loaded-host result is retained, and serial measurements will be repeated after compilation subsides rather than described as passing.
Serial development-box measurements after saturated compilation subsided: real credited PTY/shim/infraternal-agent flood before → after, decimal MB/s: LF 17.505 → 16.514; CRLF 20.808 → 20.810; printable 74.784 → 77.715. Every trial, including the earlier loaded-host LF 11.189 MB/s, exceeds 10 MB/s. Release serializer Snapshot at 200x60 + 256-row tail, 1,000 samples: before p50 0.487 ms / p99 1.034 ms; three after trials p50 0.519 / 0.519 / 0.547 ms, p99 1.023 / 1.051 / 1.191 ms, each passing 2 ms. The prior 4.637 ms loaded-host failure remains disclosed. Snapshot bytes 27,279 → 27,410. These are unisolated dev-box observations, not pinned-VM guarantees; one flood per pattern does not prove a speedup. Evidence: target/snapshot-fidelity/{before-flood,before-snapshot,after-flood,after-flood-serial,after-snapshot,after-snapshot-serial-1,after-snapshot-serial-2,after-snapshot-serial-3}.log. docs/S1-VT-GHOSTTY.md records the remaining nonprinting restoration setter proposals and counts; final exact fast gate is running.
Finished this snapshot-fidelity slice on vt-ghostty. Base
d3c71943df; head234baf0a6c; 21 atomic tests/fixes/API/script/docs commits, clean worktree. No push or deploy; issue remains open.Fixes restore inactive screen first/active last, independently restore REP and pending wrap, preserve saved cursor before grid repaint, and retain independent line-edge/wide/variation-tail metadata. Rust differential oracle checks both screens and future-output state. Final smoke: 990 faithful replays / 10 explicit API-gap rejections; nightly: 19,864 faithful replays / 136 explicit API-gap rejections; zero accepted divergences. Shim module: 32 passed, 0 failed, 5 ignored; 20k nightly executed separately and PASS. Four tracked captured fixtures exercised; spikes/stress is absent, coverage zero. Remaining independent REP/cursor/row-continuation/empty-cell states are explicitly Unsupported and documented with proposed nonprinting upstream APIs in docs/S1-VT-GHOSTTY.md; this is not a universal-fidelity claim.
Unisolated dev-box evidence: decimal MB/s before → serial after: LF 17.505 → 16.514; CRLF 20.808 → 20.810; printable 74.784 → 77.715. All floods exceed 10 MB/s, including loaded trial LF 11.189. Serializer Snapshot p99 (200x60, 256-row tail, 1,000 samples) before 1.034 ms → serial after 1.023 / 1.051 / 1.191 ms; p50 0.487 → 0.519 / 0.519 / 0.547 ms. Extra reconstruction cost is justified by the failing-before-fix state regressions. Loaded-host p99 4.637 ms failed the 2 ms guard and remains disclosed; every serial rerun passed. Snapshot bytes 27,279 → 27,410. Socket p99 and pinned performance VM were not measured in this follow-up.
Evidence paths: target/snapshot-fidelity/final-docs-fast.log, final-nightly.log, variation-module-green.log, before-flood.log, before-snapshot.log, after-flood.log, after-flood-serial.log, after-snapshot.log, after-snapshot-serial-1.log, after-snapshot-serial-2.log, after-snapshot-serial-3.log. The named red-first fixture logs and unsupported seeded fixture files are in the same directory.
Exact gate (exit 0): nix shell nixpkgs#binutils nixpkgs#file nixpkgs#gnumake nixpkgs#perl nixpkgs#zig_0_15 -c scripts/verify fast
Verbatim summary:
Closed by the orchestrator during the 2026-10-28 handover (#254), on the owner's request to close finished issues. Evidence: libghostty-vt switch (D94) merged via
a5250c3(#22,#26,#34) in dev and prod; remaining resize-refusal limitation tracked on #37. Reopen if anything is still missing.kayg referenced this issue2026-10-28 17:53:54 +00:00