[PR #242] [CLOSED] merge_check: separate Git revisions from checkout paths #294

Closed
opened 2026-11-26 20:17:24 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/242
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: old-pr/9973


📝 Commits (1)

  • 63170fe merge_check: separate Git revisions from checkout paths

📊 Changes

2 files changed (+21 additions, -6 deletions)

View changed files

📝 scripts/merge_check.py (+3 -3)
📝 tests/test_merge_check.py (+18 -3)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/242 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `old-pr/9973` --- ### 📝 Commits (1) - [`63170fe`](https://github.com/ubiquitarianism/leonida/commit/63170fe80c8ec5602b79672d4d697b49f62b6141) merge_check: separate Git revisions from checkout paths ### 📊 Changes **2 files changed** (+21 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `scripts/merge_check.py` (+3 -3) 📝 `tests/test_merge_check.py` (+18 -3) </details> ### 📄 Description > 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:17:24 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#294
No description provided.