Scripts: read BOM-marked record-writer listings #2649
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2659"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T05:15:59Z.
The record-writer inspector reads objdump listings as plain UTF-8. A listing saved by Windows PowerShell 5.1 redirection has a UTF-16 BOM; the inspector then silently finds zero record-write sites. Recognize BOM-marked listings while preserving plain UTF-8 input.
What is in it
Tested
b49be183, BOM-marked UTF-8 and UTF-16 fixtures found no sites; on this branch, full Python script discovery passed 25/25 on Windows and Ubuntu under WSL.>redirect produced a UTF-16 LE BOM listing; the patched inspector found one site and fallback slot 8.git diff --checkand independent source review passed. PR #2049 refactors the same reader and may need a mechanical rebase.Regression run
Not tested
AI use
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:32:26Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:36:30Z.
Triage (#1607) – head
c3bf8a7No open PR changes how record_writers.py decodes its input. #1492, #1694, #1730, #2049, #2660 and #3022 change site matching, the fallback scan, headers or the CLI, and keep the UTF-8
open.A UTF-16 BOM selects
utf-16, and anything else is read asutf-8-sig, which also handles UTF-8 with or without a BOM. The test runs UTF-8, UTF-8-BOM and UTF-16 listings. No problems found in the diff.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T09:05:22Z.
merge-check
base:
1c8b551475head:
c3bf8a7fd2merge: clean (
git merge --no-editonto1c8b5514,git diff --checkclean;scripts/re/record_writers.pyandscripts/test_record_writers.py, +17/-5)build: not run (Tier 0 Python script diff; no Rust code changed)
tests:
python -m unittest discover -s scripts -p "test_record_writers.py" -v-> 1 passed, 0 failed (4 subtests coveringutf-8with/without0x,utf-16, andutf-8-sig; base1c8b5514: 1 passed with 2 subtests);python -m unittest discover -s scripts -p "test_*.py"-> 65 passed, 1 error (test_discord_mirror.pyon Windows, same failure on base1c8b5514). Rust workspace tests not run (Tier 0).review: Read the full diff (+17/-5). Sniffs the leading two bytes for
BOM_UTF16_LE/BOM_UTF16_BEto selectutf-16and otherwise usesutf-8-sig(handling both plain UTF-8 and UTF-8 with BOM) viaTextIOWrapper(scripts/re/record_writers.py:13-16), fixing listings redirected from Windows PowerShell. All four subtests pass cleanly. No problems found.performance: none (offline analysis script in
scripts/re/; zero runtime impact)verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Python 3.15.2, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.