tests: skip merge_check cases on a git without merge-tree --write-tree (TEST-MERGE-CHECK-OLD-GIT) #1248

Merged
TheGeogeo merged 1 commit from upstream-pr/1248 into main 2026-11-28 19:27:27 +00:00
TheGeogeo commented 2026-11-24 20:49:30 +00:00 (Migrated from github.com)

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.py documents git 2.38 or newer for merge-tree --write-tree, but its test does not check for it. On an older git, 18 of the 24 tests fail with JSONDecodeError or a wrong message, which reads as a broken tool. Those 18 tests now skip with the reason when git merge-tree -h does 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 main at 66d4f5aa (6a4500d8):

  • git 2.36.0.windows.1: python -I -B tests/test_merge_check.py gave 17 errors and 2 subtest failures before (measured on 2e026b03). Now 24 run, 18 skipped, OK.
  • git 2.56.1.windows.1: 24 run, none skipped, OK.
  • Negative control on git 2.56.1 (before this rebase, same patch): with the tool's --write-tree replaced by an unknown option, the suite still fails (17 errors, 2 subtest failures) instead of skipping.
  • The probe gives the same answer outside a repository.
  • Merge with #1226 (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 --check and 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

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5480090916 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1248). Originally posted by [TheGeogeo](https://github.com/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.py` documents git 2.38 or newer for `merge-tree --write-tree`, but its test does not check for it. On an older git, 18 of the 24 tests fail with `JSONDecodeError` or a wrong message, which reads as a broken tool. Those 18 tests now skip with the reason when `git merge-tree -h` does 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 `main` at `66d4f5aa` (`6a4500d8`): - git 2.36.0.windows.1: `python -I -B tests/test_merge_check.py` gave 17 errors and 2 subtest failures before (measured on `2e026b03`). Now 24 run, 18 skipped, OK. - git 2.56.1.windows.1: 24 run, none skipped, OK. - Negative control on git 2.56.1 (before this rebase, same patch): with the tool's `--write-tree` replaced by an unknown option, the suite still fails (17 errors, 2 subtest failures) instead of skipping. - The probe gives the same answer outside a repository. - Merge with #1226 (`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 --check` and 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 - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption.
PierreEbele commented 2026-11-25 14:35:59 +00:00 (Migrated from github.com)

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7165526012 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1248#issuecomment-7165526012). Originally posted by [PierreEbele](https://github.com/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
OreoFR commented 2026-11-27 19:42:26 +00:00 (Migrated from github.com)

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 ec91d695c merged without conflict; the PR's test files run with the pins of tests/requirements.txt on Windows 11, Python 3.12 (venv). AI-assisted (Claude Code, Claude Opus 5.5).

  • Tests: with the PR 24 passed; against main: 2 failed. The fix is shown.
  • The merge-tree -h probe looks right and every test needing --write-tree is guarded. Not run on a git older than 2.38 (ASSUMED).
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7226791384 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1248#issuecomment-7226791384). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-27T19:42:26Z. --- Merge test and review, taken from the pool PRs MoonEyes had not checked yet. Main ec91d695c merged without conflict; the PR's test files run with the pins of `tests/requirements.txt` on Windows 11, Python 3.12 (venv). AI-assisted (Claude Code, Claude Opus 5.5). - **Tests:** with the PR 24 passed; against main: 2 failed. The fix is shown. - The `merge-tree -h` probe looks right and every test needing `--write-tree` is guarded. Not run on a git older than 2.38 (ASSUMED).
MoonEyes commented 2026-11-28 19:27:24 +00:00 (Migrated from github.com)

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 7daa4a4a5 in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7244557372 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1248#issuecomment-7244557372). Originally posted by [MoonEyes](https://github.com/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 7daa4a4a5 in GitHub Actions: no new failure. AI-assisted (Claude Code, Claude Opus 5.5)
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!1248
No description provided.