Skip to content

chore: move Ghostty to libghostty-vt's vt-1.0.0 tag (0fa3d577a) - #597

Merged
joelmoss merged 1 commit into
masterfrom
chore/libghostty-vt-1.0.0
Nov 8, 2026
Merged

joelmoss merged 1 commit into
masterfrom
chore/libghostty-vt-1.0.0

Conversation

@joelmoss

@joelmoss joelmoss commented Nov 8, 2026

Copy link
Copy Markdown
Owner

🤖 Opened by Claude Code. Draft until the owner's by-hand §N checks are done.

Summary

This moves the single Ghostty pin (GHOSTTY_SHA) from v1.4.0 (83fb95624) to libghostty-vt's vt-1.0.0 tag (0fa3d577a, announcement, docs). Both the app's GhosttyKit and the daemon's libghostty-vt build from that one pin. ghostty-org/ghostty#14444 (the #547 freeze fix) is not in it, and comes as a later bump when it merges.

 vcs/scripts/build-ghostty-vt.sh
-  GHOSTTY_SHA="83fb95624"   # v1.4.0
+  GHOSTTY_SHA="0fa3d577a"   # vt-1.0.0: stable 1.x C ABI; snapshot bytes and ghostty.h carry no promise
 daemon: vcs/crates/ghostty-vt
-  payload / GridRef / Selection `size` fields
-  GhosttyFormatterOptions struct (zeroed = trim off, no extras)
+  ghostty_formatter_set: EMIT, UNWRAP=false, TRIM=false, extras mask built from zero
+  GHOSTTY_KITTY_GRAPHICS_IMAGE_DATA_PIXELS replaces DATA_PTR / DATA_LEN
 app: GhosttyRuntimeAdapter / GhosttyApp
+  ghostty.h's pointer nullability; the runtime config built from typed callback constants

What it brings:

  • the stable libghostty-vt 1.x ABI, checked by libabigail upstream;
  • upstream's OSC 7 hostname fix (#14971). At our old pin, the directory a shell reported was silently dropped when the hostname had a space, an apostrophe or an underscore.

One trap found and fixed. Building the runtime config with its callbacks written inline gave them main-actor isolation. libghostty's off-main wakeup then trapped the test host (EXC_BREAKPOINT in libdispatch, three run-tab test classes). They're now typed constants, and §N records the trap.

Evidence

Gates

Gate Old pin This PR
make vcs-test (workspace) 560 passed, 8 ignored 560 passed, 8 ignored
make vcs-test (terminal-state) 603 passed, 10 ignored 604 passed, 10 ignored (+ the golden test)
make app-test 3390 passed, 0 failed, 106 skipped 3390 passed, 0 failed, 106 skipped
make vcs-lint, app-format, app-build, app-lint, docs-check n/a pass
musl daemons, x86_64 and aarch64, terminal-state n/a build statically, protocol reports terminal-state yes

Formatter byte-identity

  • repaint_golden_matches compares the daemon's repaint of a rich fixture with repaint.golden, captured on the old pin before any change. The fixture has a styled history, links, wide characters, tabstops, modes, OSC 7, kitty flags, a DEC charset, a scroll region, the alternate screen, and a kitty image.
  • With TRIM left at 1.0's new default, the test fails: 8390 bytes against 8392.
  • With TRIM set explicitly, it passes, and the output is byte-identical to the old pin's.

UI smoke in Tart guests

Class Result
SplitPane, QuickTerminal, SessionRestore pass
TerminalCodingAgentUITests 2 failures
  • The two failures are testClickingInvestigateSeedsTheRealDiagnosisNotABareCommand and testOneLineFixLandsAtThePromptUnexecuted. They fail the same way on the old pin, so this PR didn't cause them. They'll be filed separately.

Not run locally: make vcs-lint-linux fails on this Mac at either pin, while linking Ghostty's own build-time generators (ld.lld: undefined symbol: __divti3). CI's Linux jobs are the check here.

Merge Danger

Door: two-way. Reverting the pin restores the old engine. Snapshots are internal and not persisted across a downgrade.

Blast Radius: wide. It's the terminal engine for every pane, and the daemon's screen shadow. Upstream rewrote the terminal core (style packing, the print fast path, blank-row tracking), and it needs time in Nightly.

Before merge, by hand (macapp/QA-libghostty.md §N):

  • Leaks and orphans: IO churn with RSS deltas; orphaned processes, including after a force-quit; run tab; quit with a live TUI.
  • Input: ⌘F ordering; Backspace; ⌃Tab.
  • Display: the scrollbar overlay; $TERM/infocmp.
  • Shell reporting: OSC 7 still lands (step in §N); OSC 133; bash exit status.
  • Rendering: reattach repaint with margins or wide characters; §B fidelity with SGR- and hyperlink-heavy TUIs; title and pwd.
  • Build: the Release build.

Refs #547 (not fixed here)

🤖 Generated with Claude Code

https://claude.ai/code/session_01QxGw2gUmeT3FCNK7RnCdky

The single Ghostty pin, which both the app's GhosttyKit and the daemon build
from, moves from v1.4.0 (83fb95624) to vt-1.0.0: libghostty-vt's stable 1.x C
ABI, and upstream's OSC 7 hostname fix (#14971). ghostty#14444 (the #547
freeze) is not in it.

Daemon (ghostty-vt crate): callback payloads, GhosttyGridRef and
GhosttySelection lose their size fields; the formatter is driven through
ghostty_formatter_set with EMIT, UNWRAP=false and TRIM=false set and the
extras mask built from zero, so 1.0's new defaults (trim on, palette, style
and hyperlink extras) stay out; the Kitty keys are renamed and PIXELS replaces
the pointer and length reads. repaint_golden_matches proves the repaint bytes
are identical to the old pin's (golden captured before any change; red with
TRIM at its new default).

App: follows ghostty.h's new pointer nullability. The runtime config is built
from typed callback constants: closures written inline took main-actor
isolation and trapped on libghostty's off-main wakeup. SOURCE.md records the
check; QA-libghostty.md §N drops a stale modulemap pointer and notes the trap
and the DerivedData step for going back to an older pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QxGw2gUmeT3FCNK7RnCdky
@joelmoss

joelmoss commented Nov 8, 2026

Copy link
Copy Markdown
Owner Author

🤖 Left by Claude Code: the §N engine-bump checks, run by hand in this branch's dev app in UI-test fixture mode (2026-11-08), with run tabs also checked in the VM.

Summary: 21 pass, 0 fail. 1 not testable in fixture mode (25), 4 skipped as agreed (18, 20–22), 1 doesn't apply (19). Rows 23 and 24 are notes, not passes or fails.

# Check Result
1 Tab churn (40 × ⌘T/⌘W) Pass. 214 → 228 → 227 MB, levels off
2 Split churn Pass. 3 panes each round; the survivor is full-size and live
3 Workroom switching Pass. Each shows its own live pane
4 Workroom delete with live panes Pass. Panes torn down, app stayed up (the fixture's teardown fails because it isn't a git repo)
5 Orphans after ⌘Q and kill -9 Pass. No marked shell left either way
6 Run tab start / stop / start Pass, via RunStatusUITests 6/6 in Tart. A hand launch in fixture mode can't reach the run helper; that's environmental
7 Quit with live TUIs Pass. Clean exit, no crash report
8 Clicking while scrollback streams Pass. 212 → 260 → 214 MB
9 free_text leak Pass. leaks: 0 before and after 200 reads
10 ⌘F ordering Pass. 1→6, wraps, walks down
11 Backspace Pass
12 ⌃Tab in vim Pass. No tab change, 0 bytes written
13 Scrollbar overlay Pass
14 $TERM / infocmp Pass
15 OSC 7 Pass. The footer follows cd (⌘-click not tried)
16 OSC 7 with an encoded hostname Pass. #14971's decoding works
17 OSC 133 Pass. The title follows the command; false shows "Command failed (exit 1)", true clears it
18 bash exit status Skipped: Homebrew bash isn't installed
19 Regenerated shell integration Doesn't apply: not regenerated
20–22 ssh integration, ssh cache, other shells Skipped as agreed
23 Release build links Pass with ad-hoc signing (no Developer ID certificate on the Mac)
24 Bake gate The owner's call
25 Reattach repaint Not testable in fixture mode (its panes don't use workroomd). repaint_golden_matches covers the bytes
26 Heavy SGR and hyperlinks Pass. Styles, 256 colours, truecolor, OSC 8, wide characters
27 Title, notifications, clipboard Pass. OSC 2; OSC 9 notification; OSC 52 write; OSC 52 read prompt (Deny works)

Found, but not caused by this bump; filed:

@joelmoss
joelmoss marked this pull request as ready for review November 8, 2026 18:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T18:56:27.701060Z 2b27beb Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@joelmoss
joelmoss merged commit 4dedca7 into master Nov 8, 2026
21 of 22 checks passed
@joelmoss
joelmoss deleted the chore/libghostty-vt-1.0.0 branch November 8, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant