Explain when a red-green head is already in the base #3203
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3203"
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 merzleckeier on 2026-12-02T18:58:26Z.
Claimed in the coordination issue as TEST-RED-GREEN-BASE-CONTAINS-HEAD.
What and why
When the selected base already contains a PR head,
scripts/red_green.pyreports that the pull request changes no test. That message is misleading for a PR that added tests and has since been merged, as observed with #3148 and discussed in #3188. Compare the resolved head with the merge base to report the reason explicitly. Thered not constructibleverdict, exit status, and JSON shape stay the same.Tested
python -I tests/test_red_green.pyon Linux: 37 passed, one platform-specific skip.1f158fe57(#3148) with--no-cargo. With currentmainas base it reports that the head is already included. With the head’s first parent as the base it still selectstests/test_x64_recomp.pyand reportsred then green.git diff --checkandpython -I scripts/check_no_game_data.pypassed.GPUs tested: n/a (synthetic Git fixtures and CPU-only checks).
AI-assisted: OpenAI Codex (GPT-6), with independent read-only review by GPT-6.2 Sol.
Checklist
main(b41763227).Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T19:39:11Z.
VERIFY-3203 — Windows nativo, independent of the author's Linux/Wine runs
d7deb51a2b41763227= currentmain(the PR sits exactly on today'smain;git diff --stat merge-base..mainover the two files is empty)Ran (native Windows, Python 3.13, Git for Windows, worktree detached at the PR head)
Negative control (
scripts/red_green.pyreverted tomain, new test kept)The real case the change is for — a head that
mainalready contains (#3148, head1f158fe57), both scripts on the same commit and base:That is the artefact this closes: the misleading verdict I wrote into
docs/testing.mdin #3188 reads as if a merged pull request had no test. With this change the reason names the real one.What I could not test
--mutatepath and the cargo sides: not exercised here; I ran only the Python/unittest side (--no-cargo --no-pythonfor the two single-target runs above, the full file otherwise).Verdict: red then green, and the real head the PR is about reports the new reason.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T20:27:51Z.
Integration check for this head (
d7deb51a) and #3181 (1c62cfc6), both onmainb41763227.git merge-treeis clean. In the clean combined checkout,python3 -I tests/test_red_green.pycompleted all 41 cases on Linux (40 passed, one platform-only skip). Both changes to the checker have coverage in the combined suite. Synthetic Git fixtures only. AI-assisted.