From 2e05ebb1e28af68bb23d5dc8b62c6ec756a5ce50 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Mon, 5 Oct 2026 00:53:33 -0700 Subject: [PATCH] fix(update): run the isolated completion child in UTF-8 mode (hardening, win-utf8 review) The parent already decodes the child's piped output as UTF-8; -X utf8 makes the child encode it that way on any console code page. The reviewed failure was invalid on re-verification; this is the one-token hardening the triage allowed. test_update_completion_process.py failure set unchanged. --- hermes_cli/update_completion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermes_cli/update_completion.py b/hermes_cli/update_completion.py index d6ba20863e..5767e2d882 100644 --- a/hermes_cli/update_completion.py +++ b/hermes_cli/update_completion.py @@ -56,7 +56,7 @@ def run_completion(request: dict) -> dict: request = {**request, "stdout_isatty": sys.stdout.isatty()} request["bytecode_cache"] = str(Path(directory) / "bytecode") _write_json(request_path, request) - command = [sys.executable, "-I", "-S", "-u", "-X", f"pycache_prefix={request['bytecode_cache']}", + command = [sys.executable, "-I", "-S", "-u", "-X", "utf8", "-X", f"pycache_prefix={request['bytecode_cache']}", str(root / "hermes_cli/update_completion.py"), str(request_path), str(result_path)] proc = subprocess.Popen(