Repository navigation
merge_check: pin the revisions for each batch - #7468
Barbital11111 wants to merge 2 commits into
Conversation
leoleahy
left a comment
There was a problem hiding this comment.
Independent Windows 11 / Python 3.14.8 review of 96a84e77 (synthetic inputs, CPU only, no game data).
Checks run
python -I tests/test_merge_check.py: 12/12 OK on96a84e77.- Negative control against parent
e7664001'sscripts/merge_check.py: 1 failure (test_batch_uses_initial_revisions_when_refs_advance, returning exit 1 instead of 0 after refs advance mid-batch). python -m compileall -q scripts/merge_check.py tests/test_merge_check.py,git diff --check e7664001..96a84e77, andgit merge-tree --write-tree upstream/main HEAD: all clean.
Code review notes
- Resolving
args.mainand all unique requested refs upfront withrev-parse --verify --end-of-options <ref>^{commit}pins the entire batch to a consistent commit snapshot, rejects non-commit objects, guards against option-like ref names, and preserves the originalrefstring in output rows.
LGTM.
AI-assisted.
|
Tested 96a84e7 on Windows 11, Python 3.15.2, NVIDIA RTX 4060 Ti (driver 621.24; CPU-only checks, no game files, no GPU/llvm-mc/MSVC used): pass. Ran the test files this PR adds or changes, from a clean checkout of the PR head: AI-assisted (Claude Code). |
cryptocxeq
left a comment
There was a problem hiding this comment.
Independent CPU review at 0d7804f672376b1d212da11d7fd8509ddd29bad4 against main 32a50c949e882ae539f2d54be93fadd50ce76cae, native Windows CPython 3.14.0. Review claim.
The tool resolves main and each distinct supplied ref to commit IDs before scanning history. The advancing-ref fixture really updates both main and a PR ref after the history command, then compares the full result to the initial batch. All 17 tests pass; reverting only merge_check makes the new advancing-ref test fail. Repeated user-facing ref labels are retained while comparisons use pinned IDs. This is a batch-consistency improvement, not an atomic snapshot across separate ref-resolution commands.
Commands and results (each changed test module run separately):
python -I tests/test_merge_check.py: exit 0; Ran 17 tests in 24.862s.- With changed implementation files restored to pinned main and PR tests retained: exit 1.
Only public source and handwritten/synthetic fixtures were used. No game files, keys, external game services, GPU runs or LLVM/SPIR-V tool validation. This is a COMMENT review, not a merge approval.
Summary
Claim: #7333 (comment)
A branch can advance between the history scan and the remaining Git commands. Resolve the base and each distinct PR revision to a commit before scanning, then reuse those IDs for history, patch counts, the merge simulation, and duplicate detection. The JSON report keeps the original input label in its
reffield.This follows #6762 and keeps one history scan per batch. #7443 handles Git launch errors separately.
Validation
Windows 11, Python 3.14.3, Git 2.53.0.windows.2. CPU-only with disposable repositories.
test_merge_check.pytests passed. The new regression merges one branch intomainand advances a second branch after the real history query. Upstreame76640014reported a conflict for that batch, while the patch produced the same JSON and exit code as before the refs advanced.git diff --check, and the repository file-content check passed. No game files used.Upstream merge
Merged
dde82f27e, which includes #6669. The batch still uses its pinned base and head commits and retains the upstream squash-merge tree comparison.dde82f27e. The combined checker retains the original batch result.git diff --check, and the changed-file content check passed.AI-assisted (Codex).