Resolves the 8 gaps in docs/rewrite/notes/review-rv10-codex.md (final-Z13.md): - P1 memory safety: the C key-table action (and hovered-link/open-URL payloads) could advertise a length larger than the NUL-truncated allocation. A counted_bytes helper now passes the full bytes plus a trailing NUL with len == byte count, like Zig's backing slices; all C pointer+len structs were audited and tested to read exactly len. - ghostty-bench args follow cli/args.zig (ordered duplicates, empty value resets, first bad value errors, parseBool spellings); the C benchmark tokenizer uses the ArgIteratorGeneral port. - OSC 7 derived titles, desktop notifications and OSC 8 hover links forward raw bytes to the runtime; GTK converts only for display. - C diagnostic getter exports original bytes; escaped surrogates report Utf8CannotEncodeSurrogateHalf; config float formatters print `nan`. - Config::finalize_for(AppRuntime): GTK-only finalization (gtk-single- instance=detect) and termio's cgroup hooks apply only to the GTK runtime, so libghostty keeps `detect` like Zig. Test Plan: - cargo test --workspace --no-fail-fast (exit 0) - cargo test -p ghostty-lib --features test-platform - just check-wasm (macOS/Windows clippy re-run after the concurrent terminal changes land)
1.3 KiB
1.3 KiB
Z13: RV10 codex gaps
- action_c.rs: key-table name, mouse-over-link and open-url use
Keep::counted_bytes(full bytes + NUL, len always equals the allocation). Audited config_capi/embedded: other pointer+len pairs already match. Testcounted_buffers_hold_exactly_len_bytes. - bench/args.rs keeps every occurrence in order (empty resets default, first error wins, parseBool spellings); lib/benchmark.rs uses
ghostty_os::arg_iterator::ArgIteratorGeneral. - termio
window_titletakes bytes; OSC 7 forwards the raw path. - apprt
DesktopNotification/MouseOverLinkcarryEncodedOs; core passes raw bytes; C actions decode them. GTK uses lossy text at the UI boundary. - Diagnostic getter decodes the internal encoding (
cstring_value). StringError::Utf8CannotEncodeSurrogateHalf.- NaN: both formatters use
format_float_d. AppRuntime+Config::finalize_for; process-wideapp_runtime()(default Gtk on Linux/BSD, None elsewhere); embedded lib / wasm set None. termio installs the cgroup pre-exec/post-fork hooks only for Gtk (Zig@hasDecl(apprt.runtime, "pre_exec")).
Gate: workspace tests pass; clippy clean except ghostty-terminal/difftest (DF in-progress edits), which also stops just check-macos/check-windows at ghostty-terminal; check-wasm passes.