merge_check: distinguish legacy-encoded lines before reporting duplicates #2197

Merged
leonida/mandy
EdenBendheim merged 1 commit from ubiq/merge-check-blob-comparison into main 2026-11-28 08:04:44 +00:00

Pull request successfully merged and closed

EdenBendheim commented 2026-11-26 05:23:47 +00:00

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 a73a57e13 the distinct block triggered three false duplicate lines. On ead43b578, the distinct block passes and the identical block is still reported with printable samples. All 25 test_merge_check.py tests passed with Python 3.12 on macOS. The changed-file game-data check and git diff --check passed.

GPUs tested: n/a. All tests used synthetic inputs.

AI-assisted: yes. Created with gpt-6.2-astra in Codex.

Claimed in the coordination issue as: MERGE-CHECK-LOSSLESS-BLOB-COMPARISON ([claim](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7183431216)) 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 `a73a57e13` the distinct block triggered three false duplicate lines. On `ead43b578`, the distinct block passes and the identical block is still reported with printable samples. All 25 `test_merge_check.py` tests passed with Python 3.12 on macOS. The changed-file game-data check and `git diff --check` passed. GPUs tested: n/a. All tests used synthetic inputs. AI-assisted: yes. Created with gpt-6.2-astra in Codex.
DeadlyChirp commented 2026-11-26 10:01:36 +00:00

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.)

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.)
real-rusher commented 2026-11-26 10:06:33 +00:00

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)

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)
DadaCap commented 2026-11-28 08:04:47 +00:00

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.

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._
Sign in to join this conversation.
No description provided.