Repository navigation
Description
Summary
DEFAULT_PROFILE in #2 has not yet been differentially verified in CI against a compiled Ghostty libghostty-vt 1.0+ shared library across a recorded multi-application session corpus, leaving default-profile divergences outside tmux pane mode (TMUX_PROFILE) to manual spot checks. In addition, pytest --cov under-reports branch coverage (65% vs 79%) because pytest11 entry-point discovery imports libvt before coverage starts tracing, and docs/ lacks an auto-generated per-profile sequence conformance matrix.
Motivation
libghostty-vt reached a stable zero-dependency C ABI in vt-1.0.0 / vt-1.0.1 under the MIT license (ghostty_terminal_new, ghostty_terminal_vt_write, formatter and cell inspection). Driving libghostty-vt in-process via stdlib ctypes alongside an isolated tmux server gives libvt two independent, permissively licensed (MIT and ISC) headless reference engines — testing both inner tmux pane streams (TMUX_PROFILE via capture-pane -R) and outer attached-client streams (DEFAULT_PROFILE, required to verify tmux display-popup overlays, borders, status bars, and background restoration).
Proposal
Invariants
The invariants below are load-bearing; everything under Intent is open.
libghostty-vtis an opt-in CI/integration test oracle loaded viactypesunder a pytest marker (never a runtime package dependency oflibvt).- Clean-room MIT provenance in
AGENTS.mdexplicitly forbids reading, translating, or copyingGPL-2.0/LGPLtest suites (ThomasDickey/esctest2 andgnachman/esctestareGPL-2.0; pyte isLGPL-3.0), while permitting Unicode License v3 data (GraphemeBreakTest.txt,DerivedCoreProperties.txt), BSD/MIT vttest (repo), MIT/Apache-2.0 vtebench, ISCtmux, MIT/X11xterm, and MITlibghostty-vt. - Every recorded trace and short regression vector enforces the prefix + external-event determinism invariant: feeding whole, byte-by-byte, or across split boundaries with interposed
committedreads produces identical live cells/styles, committed cells/styles, cursor,pending_wrap, scrollback, and concatenated reply bytes.
Intent (non-binding)
- Build (and cache by tag SHA)
libghostty-vt(vt-1.0.1) in an integration CI job on.github/workflows/tests.ymland replay a 30-plus recorded session corpus (explicitly aligning mode?2027grapheme clustering and dimensions), settling theDEFAULT_PROFILEdifferential pass rate. - Commit three permanent multi-checkpoint
.jsonltraces (recording orderedwrite,resize, and reply events with plain-text framed grid + sparse style checkpoints verified againstlibghostty-vtandtmux):tmux_popup_lifecycle(captured from the attachedtmuxclient PTY rather thanpipe-paneor%output),nvim_edit_scroll_exit(?1049h,DECSTBM,DECSC/DECRC, scrollback isolation), andresize_mid_sync_wide(?2026h+ CJK/emoji right-margin resizes). - Switch CI coverage invocation to
uv run python -m coverage run --branch --source=libvt -m pytestso module-import definitions andpytest_pluginpaths are measured accurately. - Generate a per-profile control-function conformance page (
Supported,Partial,Ignored,Divergentwith documented rationale and test IDs) fromsrc/libvt/codec.pyand test metadata, failing CI ifcodec.pyand docs drift.
Not doing
- Running
xtermunderXvfbon every pull-request commit (keepxtermfor offline tie-breaking). - Regenerating golden expectations from
libvt's own unverified output.
References
- Core(feat[vt]): Add sans-I/O VT engine, RLE grid, OSC 7501, input, and ADRs #2
.github/workflows/tests.yml(7a72ae8): https://github.com/tmux-python/libvt/blob/7a72ae8/.github/workflows/tests.ymlAGENTS.mdclean-room provenance (7a72ae8): https://github.com/tmux-python/libvt/blob/7a72ae8/AGENTS.md?plain=1#L44-L50- libghostty-vt C API documentation (
vt-1.0.1: https://github.com/ghostty-org/ghostty/tree/vt-1.0.1) ThomasDickey/esctest2GPL-2.0LICENSE(2798f12): https://github.com/ThomasDickey/esctest2/blob/2798f12/LICENSEThomasDickey/xterm-snapshotsMIT/X11COPYING(xterm-412): https://github.com/ThomasDickey/xterm-snapshots/blob/xterm-412/COPYING
Activity
tony commentedon Nov 23, 2026
Option normalization notes against
libghostty-vtvt-1.0.1Inspection of
Ghosttyinclude/ghostty/vt/terminal.hat11ed660d9andTerminal.zigat11ed660d9establishes six runner alignment rules when building thelibghostty-vt1.0.1differential suite:?2027viaGHOSTTY_TERMINAL_OPT_MODE_DEFAULT(libghostty-vtdefaults?2027to off, andOPT_MODE_DEFAULTpreserves configured modes acrossRISandDECSTR).GHOSTTY_TERMINAL_OPT_WRITE_PTYand configure defaultfg/bgRGB colors (libghostty-vtsuppressesDA/DSR/DECRQMreplies without a write callback and suppressesOSC 10/11/12replies until default colors are set).10,000bytes default inlibghostty-vtversus line-count scrollback inlibvt) and omitSIXELvectors (libghostty-vt1.0.1omitsSIXEL).ParserState.GROUNDboundaries without pending UTF-8 bytes, and ignoreWidthRole.SPACER_TAILSGR words (libvtcopies base-cell SGR ontoSPACER_TAIL, whereasGhosttystamps the active stream pen).