# Z2 final notes (core / lib / termio / apprt-gtk) - Windows: `cargo check --target x86_64-pc-windows-gnu -p ghostty-core --tests` passes. Surface init gates `rt_pre_exec_info`, `rt_post_fork_info`, `create_scope` and `restore_rlimit` on `cfg(unix)`. Screen-file writing only sets mode 0600 on unix. The test that read the file mode is unix-gated. - Embedded init: `global::init` calls `ensure_locale`. `InitOptions.crash` carries crash metadata, with `default_crash_options()` (shared version; Metal/CoreText/`none` tags on Apple). `ghostty_init` ignores SIGPIPE and passes crash options for the lib build. It also stores the raw argv with `ghostty_os::args::set_argv`, so `ghostty_config_load_cli_args` uses it (I added `set_argv` and a vec-returning `iterator()` in ghostty-os/args.rs). `ghostty_config_load_file` keeps non-UTF-8 path bytes (`file_load::open` decodes them). - Bytes: `Pwd.pwd` and `Surface::pwd()` carry OSC 7 bytes with the reversible `osbytes` escape. `pwd_bytes()` returns the raw bytes. Sinks decode: C `Action::Pwd`, inherited working dir, termio cwd/args/env/PWD/`Raw` input. Embedded surface working-directory/command/env/initial_input and `ghostty_surface_text` (`text_callback_bytes`) pass raw bytes. GTK file drop uses `paste_bytes` and a new `CoreSurface::complete_paste_bytes`. - Version: XTVERSION, `TERM_PROGRAM_VERSION`, both GTK About branches and crash metadata use `ghostty_build_info::VERSION_STRING`. - Tests added: e2e OSC 7 non-UTF-8, `command.rs` non-UTF-8 cwd/args, `embedded` surface-options bytes, `tests/init_argv.rs` (argv, SIGPIPE, non-UTF-8 load_file), crash defaults. - Gate: workspace build, tests and clippy (`--no-deps -D warnings`) for my crates pass, and `cargo +nightly fmt` is applied. Not done: macOS cross clippy (the wrapper setup was declined at the tool prompt). No GTK drop UI test (needs a display). The paste confirmation dialog is text-based, so it carries non-UTF-8 bytes via the escape.