From 8049c36f5123c2b3271b4e1ca63f501b756024ca Mon Sep 17 00:00:00 2001 From: izdat-sl4w <76667566+izdat-sl4w@users.noreply.github.com> Date: Tue, 24 Nov 2026 20:14:45 +0100 Subject: [PATCH] audit: pin LF newlines in the generated status writes Path.write_text opens with newline=None, so on Windows a regeneration would translate the tracked LF files to CRLF and show a spurious diff. Both write sites now pass newline="\n", which leaves the bytes identical on macOS and Linux. Signed-off-by: izdat-sl4w <76667566+izdat-sl4w@users.noreply.github.com> --- CHANGELOG.md | 2 +- scripts/audit/status.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0463c53..971c01b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -196,7 +196,7 @@ remains unsupported. - Fixed 32-bit guest stores and loads in the native DBT (MOV 89/8B and C7 /0), which accessed eight bytes: stores overwrote the next four guest bytes and accesses at the end of a mapping faulted. RIP-relative operands of byte moves and extensions, which were read as RBP-relative, and LEA with a segment prefix, which added the segment base, are fixed too. - Fixed an x86 prefix-length test that read an untracked fuzz artifact and so failed on every fresh checkout; its input is now inline. - Fixed agent-queue `apply_actions` crashing on comment-only decisions (claim refusals) by skipping no-op `gh issue edit` calls; accept `summary --now` after the subcommand; grant the audit job `pull-requests: read` so live audits can list open PRs (issue #180). -- Fixed `scripts/audit/status.py` and the Python embedded in `scripts/audit/claims.sh` reading and writing tracked files in the process locale encoding instead of UTF-8: under an ASCII or cp1252 locale the status check crashed on `docs/claims.toml` or reported a spurious `xenora-progress.svg` difference. Both scripts now pass `encoding="utf-8"`, as the rest of `scripts/` does, and CI runs the two checks again under a non-UTF-8 locale so the requirement stays enforced. +- Fixed `scripts/audit/status.py` and the Python embedded in `scripts/audit/claims.sh` reading and writing tracked files in the process locale encoding instead of UTF-8: under an ASCII or cp1252 locale the status check crashed on `docs/claims.toml` or reported a spurious `xenora-progress.svg` difference. Both scripts now pass `encoding="utf-8"`, as the rest of `scripts/` does, the two write sites also pin `newline="\n"` so a Windows host cannot turn tracked LF files into CRLF when it regenerates them, and CI runs the two checks again under a non-UTF-8 locale so the requirement stays enforced. - Generated CRT adapters now report unsupported calls when the required guest ABI or runtime behavior is missing. diff --git a/scripts/audit/status.py b/scripts/audit/status.py index 00bc1a7..e5cd3a1 100644 --- a/scripts/audit/status.py +++ b/scripts/audit/status.py @@ -30,7 +30,7 @@ def replace_block(path, name, body, check): if check: print(f"{path}: status table differs from docs/status.toml", file=sys.stderr) return False - path.write_text(updated, encoding="utf-8") + path.write_text(updated, encoding="utf-8", newline="\n") return True @@ -95,7 +95,7 @@ def check_asset(path, svg, check): if check: print(f"{path}: progress graphic differs from docs/status.toml", file=sys.stderr) return False - path.write_text(svg, encoding="utf-8") + path.write_text(svg, encoding="utf-8", newline="\n") return True