docs/testing: two verdicts that are not about the pull request #3188

Code

Clone this repository

Checkout

From your project repository, check out a new branch and test the changes.

git fetch -u origin "github-pr/3188:github-pr/3188"
git switch "github-pr/3188"
Open
leonida/mandy
fiestorra wants to merge 2 commits from github-pr/3188 into main

This branch is out-of-date with the base branch

Conversation
Reviewers 0 approvals
  • No reviewers
Details
This pull request is blocked because it's outdated.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'github-pr/3188:github-pr/3188'
git switch 'github-pr/3188'
fiestorra commented 2026-12-02 17:37:09 +00:00

docs/testing: two verdicts that are not about the pull request

red_green.py reports a verdict, and two of them read as statements about the change when they are
statements about something else. Both cost me a run today.

green fails can be the machine. A test that fails on main alone fails with the pull request
merged too, so every run reads that verdict whatever the change does. Here it is
descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in, because the crate's tests make
their device with D3D12CreateDevice(None, ..) and that is the integrated Radeon on this machine -
cargo test -p leonida-gpu --lib on main is 695 passed, 1 failed, and that is the one. Two pull
requests I checked (#3153, #3150) read green fails for it while their own tests passed.

red not constructible: the pull request changes no test is also what a merged pull request reads:
its merge base is its own head, so nothing is left to compare. #3148 read that after it merged, and the
phrasing sends you looking for a test that is not missing.

The section is otherwise right; these are the two lines a reader needs before the verdict means
anything.

python -m unittest discover -s tests -p "test_docs_*.py": 57 tests, OK.

Written with an AI assistant.

docs/testing: two verdicts that are not about the pull request `red_green.py` reports a verdict, and two of them read as statements about the change when they are statements about something else. Both cost me a run today. **`green fails` can be the machine.** A test that fails on `main` alone fails with the pull request merged too, so every run reads that verdict whatever the change does. Here it is `descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in`, because the crate's tests make their device with `D3D12CreateDevice(None, ..)` and that is the integrated Radeon on this machine - `cargo test -p leonida-gpu --lib` on `main` is 695 passed, 1 failed, and that is the one. Two pull requests I checked (#3153, #3150) read `green fails` for it while their own tests passed. **`red not constructible: the pull request changes no test` is also what a merged pull request reads**: its merge base is its own head, so nothing is left to compare. #3148 read that after it merged, and the phrasing sends you looking for a test that is not missing. The section is otherwise right; these are the two lines a reader needs before the verdict means anything. `python -m unittest discover -s tests -p "test_docs_*.py"`: 57 tests, OK. Written with an AI assistant.
MoonEyes commented 2026-12-02 18:18:04 +00:00

Verification of #3188 (third party, Linux, no GPU, no game files)

  • Head verified: ff85245aaf3cd6bbb83e211533ddf48b236bf596 (1 file, docs/testing.md, +8).
  • Merge base 5b1fff821; merged with git merge --no-ff onto main 45dc41f95, no conflict.

What was run (Python 3.13, python -I)

Command Result
python -I scripts/check_no_game_data.py docs/testing.md exit 0
git diff --check origin/main...pr/3188 clean
the 13 tests/test_docs_*.py + tests/test_design_contract_rows.py, one by one all pass, same as on main

Docs-only, so no red/green applies.

Checked against scripts/red_green.py

  • Second bullet (red not constructible on a merged pull request): holds. check() diffs merge_base..head
    (red_green.py:656, :664). After a merge-commit merge the merge base is the head, the diff is empty and
    red_commit returns None, so the report reads "not constructible: the pull request changes no test".
    Nit: this is only true of a merge-commit merge, not of a squash merge. main uses merge commits, so it is right here.

  • First bullet (green fails from a test that already fails on main): overstated. compare()
    (red_green.py:501-522) puts a test that fails on both sides in fail_on_both. verdict() (:531-533)
    only says green fails for regressions or a failing only_on_green row. Checked by calling the two functions
    directly:

    • red {pre_broken: failed, new: failed}, green {pre_broken: failed, new: ok} gives red then green, not
      green fails;
    • with no red side (red_why set, red=None), the same green gives green fails.

    So a test that fails on main makes every run read green fails only when the red side has no result for it.
    That happens when the red side is not constructible or does not build, or when the test exists only on green.
    When the red side runs the crate, a deterministic failure on main does not change the verdict. The cases
    quoted in the body (#3153, #3150) may have had no red side, or a flaky test. The bullet as written,
    "every run reads that verdict whatever the change does", says more than the code does.

Defects

  1. docs/testing.md:162-166: limit the claim to runs where the red side gives no result for the test (red not
    constructible or does not build, or the test only exists on green). In the other runs, point to the
    fail on both rows of the report. The advice to compare with the crate's tests on main holds in both cases.
  2. Process: the pull request body has no claim in the coordination issue, and "Written with an AI assistant"
    does not name the models or the reviewer agent (CONTRIBUTING.md, AI-assisted contributions).
  3. docs/testing.md:166: "#2995 and the crate switches it adds are the way out" points to an open, unmerged pull
    request. Say "proposed in #2995" so the line stays right if #2995 changes or is closed.

Verdict: defects. The first bullet needs narrowing to what verdict() actually does. The rest is correct and the doc tests are green.

AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.


Generated by Claude Code

**Verification of #3188 (third party, Linux, no GPU, no game files)** - Head verified: `ff85245aaf3cd6bbb83e211533ddf48b236bf596` (1 file, `docs/testing.md`, +8). - Merge base `5b1fff821`; merged with `git merge --no-ff` onto `main` `45dc41f95`, no conflict. **What was run (Python 3.13, `python -I`)** | Command | Result | |---|---| | `python -I scripts/check_no_game_data.py docs/testing.md` | exit 0 | | `git diff --check origin/main...pr/3188` | clean | | the 13 `tests/test_docs_*.py` + `tests/test_design_contract_rows.py`, one by one | all pass, same as on `main` | Docs-only, so no red/green applies. **Checked against `scripts/red_green.py`** - Second bullet (`red not constructible` on a merged pull request): holds. `check()` diffs `merge_base..head` (`red_green.py:656`, `:664`). After a merge-commit merge the merge base is the head, the diff is empty and `red_commit` returns `None`, so the report reads "not constructible: the pull request changes no test". Nit: this is only true of a merge-commit merge, not of a squash merge. `main` uses merge commits, so it is right here. - First bullet (`green fails` from a test that already fails on `main`): **overstated**. `compare()` (`red_green.py:501-522`) puts a test that fails on both sides in `fail_on_both`. `verdict()` (`:531-533`) only says `green fails` for `regressions` or a failing `only_on_green` row. Checked by calling the two functions directly: - red `{pre_broken: failed, new: failed}`, green `{pre_broken: failed, new: ok}` gives **`red then green`**, not `green fails`; - with no red side (`red_why` set, `red=None`), the same green gives `green fails`. So a test that fails on `main` makes every run read `green fails` only when the red side has no result for it. That happens when the red side is not constructible or does not build, or when the test exists only on green. When the red side runs the crate, a deterministic failure on `main` does not change the verdict. The cases quoted in the body (#3153, #3150) may have had no red side, or a flaky test. The bullet as written, "every run reads that verdict whatever the change does", says more than the code does. **Defects** 1. `docs/testing.md:162-166`: limit the claim to runs where the red side gives no result for the test (red not constructible or does not build, or the test only exists on green). In the other runs, point to the `fail on both` rows of the report. The advice to compare with the crate's tests on `main` holds in both cases. 2. Process: the pull request body has no claim in the coordination issue, and "Written with an AI assistant" does not name the models or the reviewer agent (CONTRIBUTING.md, AI-assisted contributions). 3. `docs/testing.md:166`: "#2995 and the crate switches it adds are the way out" points to an open, unmerged pull request. Say "proposed in #2995" so the line stays right if #2995 changes or is closed. **Verdict: defects.** The first bullet needs narrowing to what `verdict()` actually does. The rest is correct and the doc tests are green. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
fiestorra commented 2026-12-02 21:45:48 +00:00

You are right, and I have corrected the bullet in 9fa90bab7.

I called the two functions from the installed script to see it rather than take it on trust:

red  = {pre_broken: failed, new: failed}
green = {pre_broken: failed, new: ok}
compare() -> fail_on_both: ['pre_broken'], red_to_green: ['new']
verdict() with the red side present   -> red then green
verdict() with red_why and no red set -> green fails

So a deterministic failure on main does not change the verdict when the red side ran the test — it lands in fail_on_both and the run still reads red then green. What I saw in #3153 and #3150 must have been the other case: the red side had no result for those tests (not constructed, did not build, or the test only existed on green), which is the only path to green fails from a machine-level failure.

The bullet now says that, and names the three cases that produce it. I also took the nit: the merged-pull-request red not constructible holds for a merge-commit merge (what this repository uses); a squash merge would leave a diff, so the sentence now says so.

My thanks — this is the second time tonight that a third-party review found a claim of mine that was stronger than the code. The other was #2995's adapter selector.

Checks on the new head: python -I scripts/check_no_game_data.py docs/testing.md exit 0, tests/test_docs_links.py OK, tests/test_docs_encoding.py OK, tests/test_docs_list_items.py OK.

Written with an AI assistant.

**You are right, and I have corrected the bullet in `9fa90bab7`.** I called the two functions from the installed script to see it rather than take it on trust: ``` red = {pre_broken: failed, new: failed} green = {pre_broken: failed, new: ok} compare() -> fail_on_both: ['pre_broken'], red_to_green: ['new'] verdict() with the red side present -> red then green verdict() with red_why and no red set -> green fails ``` **So a deterministic failure on `main` does not change the verdict when the red side ran the test** — it lands in `fail_on_both` and the run still reads `red then green`. What I saw in #3153 and #3150 must have been the other case: **the red side had no result for those tests** (not constructed, did not build, or the test only existed on green), which is the only path to `green fails` from a machine-level failure. The bullet now says that, and names the three cases that produce it. **I also took the nit**: the merged-pull-request `red not constructible` holds for a **merge-commit merge** (what this repository uses); a squash merge would leave a diff, so the sentence now says so. **My thanks — this is the second time tonight that a third-party review found a claim of mine that was stronger than the code.** The other was #2995's adapter selector. Checks on the new head: `python -I scripts/check_no_game_data.py docs/testing.md` exit 0, `tests/test_docs_links.py` OK, `tests/test_docs_encoding.py` OK, `tests/test_docs_list_items.py` OK. Written with an AI assistant.
Collaborator

Both verdicts are useful additions. One line cannot be followed here, though: gh pr view <n> --json state does not work against git.leonida.now (gh never reaches it). Use the forge API, for example curl -s https://git.leonida.now/api/v1/repos/leonida/mandy/pulls/<n>, or tell the reader to open the pull request page.

Both verdicts are useful additions. One line cannot be followed here, though: `gh pr view <n> --json state` does not work against `git.leonida.now` (`gh` never reaches it). Use the forge API, for example `curl -s https://git.leonida.now/api/v1/repos/leonida/mandy/pulls/<n>`, or tell the reader to open the pull request page.
Collaborator

Local CI (run_ci_local.ps1): PASS

  • PR head cec0e37ad merged into main 44c480a5f
  • Machine: 12th Gen Intel(R) Core(TM) i7-12700KF, NVIDIA GeForce RTX 5070, Windows 10.0.26200, Python 3.14.4
Step Result Details Time
Merge into main PASS clean 0 s
No game data tracked PASS 3843 files 0 s
No game data under another name PASS 17 s
Mode INFO quick (launcher, Setup, scripts or docs only) 0 s
Compile Python PASS 20 s
make_game.py --help PASS 0 s
Python tests (standard library) PASS 5 files, 0 failed 58 s
Python tests (pytest) SKIP pytest not installed here (0 files): pip install -r tests/requirements.txt 0 s
D3D12 runtime (Rust) SKIP quick run 0 s
Sensitive files unchanged by the checks PASS 38 checked 0 s

Run with scripts/run_ci_local.ps1 while the Forgejo has no runners; full logs stay on the machine that ran it.

<!-- run_ci_local head=cec0e37ad0df9465decc034a47d346607b7276db --> **Local CI (run_ci_local.ps1): PASS** - PR head `cec0e37ad` merged into main `44c480a5f` - Machine: 12th Gen Intel(R) Core(TM) i7-12700KF, NVIDIA GeForce RTX 5070, Windows 10.0.26200, Python 3.14.4 | Step | Result | Details | Time | |---|---|---|---| | Merge into main | PASS | clean | 0 s | | No game data tracked | PASS | 3843 files | 0 s | | No game data under another name | PASS | | 17 s | | Mode | INFO | quick (launcher, Setup, scripts or docs only) | 0 s | | Compile Python | PASS | | 20 s | | make_game.py --help | PASS | | 0 s | | Python tests (standard library) | PASS | 5 files, 0 failed | 58 s | | Python tests (pytest) | SKIP | pytest not installed here (0 files): pip install -r tests/requirements.txt | 0 s | | D3D12 runtime (Rust) | SKIP | quick run | 0 s | | Sensitive files unchanged by the checks | PASS | 38 checked | 0 s | Run with `scripts/run_ci_local.ps1` while the Forgejo has no runners; full logs stay on the machine that ran it.
Sign in to join this conversation.
No description provided.