From d3321356b28729fe3d4cbeec06084f8c95bb94f9 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 09:25:21 +0000 Subject: [PATCH 1/2] Start fix for scan tty test locale (#2216) The test names its locale with LANG alone, so a runner's own LC_ALL outranks it. Fix follows. Assisted-by: Claude Code:claude-fable-5-2 From c9b306477ab9bce460ea3ec952d48f55cc9f08b5 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 09:28:48 +0000 Subject: [PATCH 2/2] Pin all locale vars in the scan tty test The test named its PTY child's locale with LANG alone. The CLI reads the first set of LC_ALL, LC_CTYPE and LANG, and the child inherits the runner's environment, so a runner that exports a UTF-8 LC_ALL (the macOS ones do) outranked the test's LANG=C and the row was drawn with glyphs. Remove the two outranking variables from the child, so LANG decides. Before, LC_ALL=en_US.UTF-8 cargo test ... --test scan scan_on_a_terminal_shows_what_was_measured failed on Linux as it does on the macOS nightly; now it passes under any ambient locale. Fixes #2216 Assisted-by: Claude Code:claude-fable-5-2 --- crates/socket-patch-cli/tests/scan/scan_tty.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/socket-patch-cli/tests/scan/scan_tty.rs b/crates/socket-patch-cli/tests/scan/scan_tty.rs index 4808efd70..85fb4bd31 100644 --- a/crates/socket-patch-cli/tests/scan/scan_tty.rs +++ b/crates/socket-patch-cli/tests/scan/scan_tty.rs @@ -331,8 +331,15 @@ async fn scan_on_a_terminal_shows_what_was_measured() { let uri = mock.uri(); let cwd = tmp.path().to_path_buf(); let (code, output) = tokio::task::spawn_blocking(move || { + // `LANG` is the last of the three variables a locale is read + // from, and the child inherits the other two: a runner that + // exports `LC_ALL` (the macOS ones do) would outrank the + // locale under test. + let mut binary = common::hermetic::pty_binary_command(); + binary.env_remove("LC_ALL"); + binary.env_remove("LC_CTYPE"); let run = pty_io::run_command( - common::hermetic::pty_binary_command(), + binary, &[&["scan", "--mode", "agent"][..], &api_args(&uri)].concat(), &cwd, &[("LANG", locale)],