merge_check: separate Git revisions from checkout paths #242

Closed
Andretuta wants to merge 1 commit from upstream-pr/242 into main
Andretuta commented 2026-11-24 02:51:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T02:51:42Z.


Carried over from old PR 9973 by nandanp1 in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9973, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
nandanp1: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Continuing #9616 for BUILD-MERGE-CHECK-REV-PATH. Coordination claim. This applies directly to main at d083a2cc3 with no prerequisite PRs.

Running merge_check.py --main main in a checkout containing a file named main made Git abort before the tool could report a verdict. The same ambiguity affected the diff and blob reads used to detect duplicated text. A trailing -- tells git log, git diff, and git show where their revision arguments end.

The regression creates four checkout paths in turn: a branch name, its full commit ID, the merged tree ID, and (on POSIX) a blob expression. The checker must report the same three duplicate lines in each case. The existing test for a genuine blob-read error still checks for exit 2.

Verification

  • macOS 26.3.1 arm64, Python 3.12.2, Git 2.45.2, CPU only. Each of the four cases reproduced exit 2 on the base checker. All 20 merge-check tests passed on this branch.
  • Python compilation, CLI help, git diff --check, and scripts/check_no_game_data.py passed. The repository’s merge checker reported one clean commit with no conflicts or duplicate text against the base.
  • The CPU translator suite ran 6,046 tests across 459 files. The base and this branch produced identical failures in four files (test_exec_computed, test_image_atomics_guard, test_sopc_validation, test_unary_f16_validation).
  • The original fix also received independent Linux, macOS, and Windows checks on the earlier commit.

AI-assisted (Codex). All fixtures are synthetic.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5465167571 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/242). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T02:51:42Z. --- > Carried over from **old PR 9973** by `nandanp1` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9973`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `nandanp1`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Continuing `#9616` for BUILD-MERGE-CHECK-REV-PATH. [Coordination claim](https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116906834). This applies directly to `main` at `d083a2cc3` with no prerequisite PRs. Running `merge_check.py --main main` in a checkout containing a file named `main` made Git abort before the tool could report a verdict. The same ambiguity affected the diff and blob reads used to detect duplicated text. A trailing `--` tells `git log`, `git diff`, and `git show` where their revision arguments end. The regression creates four checkout paths in turn: a branch name, its full commit ID, the merged tree ID, and (on POSIX) a blob expression. The checker must report the same three duplicate lines in each case. The existing test for a genuine blob-read error still checks for exit 2. **Verification** - macOS 26.3.1 arm64, Python 3.12.2, Git 2.45.2, CPU only. Each of the four cases reproduced exit 2 on the base checker. All 20 merge-check tests passed on this branch. - Python compilation, CLI help, `git diff --check`, and `scripts/check_no_game_data.py` passed. The repository’s merge checker reported one clean commit with no conflicts or duplicate text against the base. - The CPU translator suite ran 6,046 tests across 459 files. The base and this branch produced identical failures in four files (`test_exec_computed`, `test_image_atomics_guard`, `test_sopc_validation`, `test_unary_f16_validation`). - The original fix also received independent [Linux](https://github.com/ProjectLeonida/Leonida/pull/9616#issuecomment-7114867483), [macOS](https://github.com/ProjectLeonida/Leonida/pull/9616#issuecomment-7114894610), and [Windows](https://github.com/ProjectLeonida/Leonida/pull/9616#issuecomment-7115279132) checks on the earlier commit. AI-assisted (Codex). All fixtures are synthetic.
aslan2142 commented 2026-11-25 19:09:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T19:09:57Z.


Closing: everything this pull request changes is already in main. Merging it into main (490f5b9ec) leaves every file as it is. The same change landed with #1226.

Thanks for the work! If something here is still missing from main, open a new pull request with what's left.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7171906723 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/242#issuecomment-7171906723). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-25T19:09:57Z. --- Closing: everything this pull request changes is already in `main`. Merging it into `main` (`490f5b9ec`) leaves every file as it is. The same change landed with #1226. Thanks for the work! If something here is still missing from `main`, open a new pull request with what's left. AI-assisted (Claude Code, Claude Opus 5.5).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!242
No description provided.