merge_check: distinguish legacy-encoded lines before reporting duplicates #2197
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2197
Loading…
Reference in a new issue
No description provided.
Delete branch "ubiq/merge-check-blob-comparison"
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?
Pull request successfully merged and closed
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.
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.)
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)
Merged into
main(merge commit c74ac8a4b), 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.