Resolves the parity items of docs/rewrite/notes/review-rv15-codex.md (final-Z18.md): - os::open inherits stdin like Zig's Child.init, strips LD_LIBRARY_PATH only in Snap builds (new `snap` cargo feature, off by default, like Zig's snap build option) and bounds output collection to 50 KiB per stream (StdoutStreamTooLong/StderrStreamTooLong). - +show-face writes diagnostics and lookup lines in the exact fragments Zig's formatter produces, so buffer drains happen at the same byte positions (0 diffs vs /usr/bin/ghostty over 0-44 bad options for three codepoints); its tests no longer parse the test runner's argv. - DEVIANT_FIXES.md: five entries reworded and four removed that were no longer deviations (verified against code and oracle). Test Plan: - cargo test -p ghostty-os open; cargo test -p ghostty-cli show_face
1.6 KiB
1.6 KiB
Z18 notes
A. Deviant fix (separable)
crates/ghostty-apprt-gtk/src/ipc/new_window.rs:arguments_variantnow validates (UTF-8, no NUL) and returnsError::IpcFailedwith a stderr message instead ofprocess::abort()(Zignew_window.zig:49-53). Validation runs before connecting to the bus. Testinvalid_dbus_strings_are_rejected_without_abortreplaces the SIGABRT subprocess test.docs/rewrite/DEVIANT_FIXES.md: row 31.
B. Parity
crates/ghostty-cli/src/show_face.rs:write_diagnostic/write_lookupwrite Zig's exact fragments (literal,cli:, digits,:, key,:, message,\n; hex padding separate from digits). Oracle (pipe) check: n = 0..44 copies of--font-size=badx cp {65, 7, 0x1F600}: 0 diffs (includes the 23x case). Tests:diagnostics_drain_at_zig_fragment_boundaries,lookup_line_pads_hex_and_drains_per_fragment.crates/ghostty-os/src/open.rs: stdin inherited;LD_LIBRARY_PATHremoved only with the newsnapcargo feature (default off; forwarded by rootCargo.tomlsnap); stdout/stderr bounded to 50 KiB each (overflow = error, likecollectOutput; child is still reaped, unlike Zig). Tests:opener_inherits_stdin,snap_env_is_stripped_only_for_snap_builds,output_collection_is_bounded_per_stream.show_face.rs:run_argstakes a config loader; tests use explicit args (test_config),runusesConfig::load.
C. DEVIANT_FIXES.md corrections
Row 30 (offset wording) and the wasm, VT parser buffer, config strings, +version rows reworded; removed: invalid preedit, initial_input escaping, wcwidth bench, D-Bus escape encoding (no longer deviations).