merge_check: distinguish legacy-encoded lines before reporting duplicates #2197
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2197"
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 ubiquitarianism/leonida. Originally posted by EdenBendheim on 2026-11-26T05:23:47Z.
Claimed in the coordination issue as: MERGE-CHECK-LOSSLESS-BLOB-COMPARISON (claim)
The merge checker rejected a clean PR when its new lines differed from existing text only in non-UTF-8 bytes. For example, CP1252
éandèboth became the same replacement character before comparison. The checker now preserves those bytes during comparison and converts them for display only after identifying a real duplicate.The regression uses a temporary Git repository with distinct and byte-identical blocks. On main
a73a57e13the distinct block triggered three false duplicate lines. Onead43b578, the distinct block passes and the identical block is still reported with printable samples. All 25test_merge_check.pytests passed with Python 3.12 on macOS. The changed-file game-data check andgit diff --checkpassed.GPUs tested: n/a. All tests used synthetic inputs.
AI-assisted: yes. Created with gpt-6.2-astra in Codex.
Imported from ubiquitarianism/leonida. Originally posted by DeadlyChirp on 2026-11-26T10:01:36Z.
Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.
tests/test_merge_check.py: 25 passed, 7 subtests passed (main: 24 passed, 5 subtests).(AI-assisted test run; output checked by hand.)
Imported from ubiquitarianism/leonida. Originally posted by real-rusher on 2026-11-26T10:06:33Z.
Verified on main
a73a57e1(Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly. With this PR, python -I tests/test_merge_check.py: 25 tests OK. The PR's test file against main's scripts/merge_check.py: 1 failure, so the new test fails on main and passes with the fix. compileall clean.AI-assisted: yes (Claude Code)
Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T08:04:47Z.
Merged into
main(merge commitc74ac8a4b), approved by DadaCap (maintainer). Thanks!Checked before merging: Tested in our local release candidate (main + 41 PRs): translator suite 512 files / 6,442 tests clean, Python suite with no new failure versus main, and 360 s game runs on an RTX 5080 with no regression. The merge was pinned to the head commit that was tested (
ead43b578).AI-assisted (Claude Code), posted for DadaCap.