tests: skip merge_check cases on a git without merge-tree --write-tree (TEST-MERGE-CHECK-OLD-GIT) #1248
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1248"
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?
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-24T20:49:30Z.
Claimed in the coordination issue as: TEST-MERGE-CHECK-OLD-GIT — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7144000568
What and why
scripts/merge_check.pydocuments git 2.38 or newer formerge-tree --write-tree, but its test does not check for it. On an older git, 18 of the 24 tests fail withJSONDecodeErroror a wrong message, which reads as a broken tool. Those 18 tests now skip with the reason whengit merge-tree -hdoes not offer--write-tree. The other six keep running, and nothing is skipped on a git that has the option.Tested
On Windows 11, Python 3.12.4, on
mainat66d4f5aa(6a4500d8):python -I -B tests/test_merge_check.pygave 17 errors and 2 subtest failures before (measured on2e026b03). Now 24 run, 18 skipped, OK.--write-treereplaced by an unknown option, the suite still fails (17 errors, 2 subtest failures) instead of skipping.d6031591), which edits the same file (before this rebase, same patch): no conflict; 18 skipped on git 2.36.0, 24 OK on git 2.56.1.test_tool_stdout_encoding.py,test_text_write_line_endings.py,test_docs_links.py,test_docs_cli_flags.py,compileall,git diff --checkand the no-game-data check passed (before this rebase, same patch).GPUs tested: n/a (CPU-only synthetic tests).
AI-assisted: yes (Claude Code).
Checklist
mainand merges cleanly.Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T14:35:59Z.
Reviewed
6a4500d88: ran tests/test_merge_check.py on the PR tree (24 tests, OK, nothing skipped, git 2.47) and against a shim that fakes a pre-2.38 git: the conflict-free merge with current main then skips exactly the 18 merge-tree tests instead of failing, while on main today those 18 still fail under the same shim. The six tests left unguarded never call merge-tree. AI-assisted review.Recommendation: Merge
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-27T19:42:26Z.
Merge test and review, taken from the pool PRs MoonEyes had not checked yet. Main
ec91d695cmerged without conflict; the PR's test files run with the pins oftests/requirements.txton Windows 11, Python 3.12 (venv). AI-assisted (Claude Code, Claude Opus 5.5).merge-tree -hprobe looks right and every test needing--write-treeis guarded. Not run on a git older than 2.38 (ASSUMED).Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:27:24Z.
Red/green: No red test; the merged tests/test_merge_check.py passes on main and with the PR natively on Windows (git 2.42) and on GitHub Actions Linux, and only adds skips for git older than 2.38.
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
7daa4a4a5in GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)