tests: d3d12_ab_compare's sign rule has a test of its own (D3D12-AB-COMPARE-AGREE-TEST) #2796

Manually merged
github merged 1 commit from github-bot/gh-2796 into main 2026-11-30 22:34:45 +00:00 AGit
Owner

@⁠TheGeogeo on GitHub · 2026-11-30 21:56 UTC · original
TheGeogeo:d3d12-ab-agree-test → main · +19 −0 · 1 files · 1 commits · merged 2026-11-30 22:33 UTC

Claimed in the coordination issue as: D3D12-AB-COMPARE-AGREE-TEST (#2570)

What and why

tools/d3d12_ab_compare.py (#2783) says "B faster" or "B slower" only when two things hold: the 95 % interval leaves 0 out, and all pairs but at most one agree in sign. The verification of #2783 found that no test catches removing the second rule. test_one_odd_run_gives_no_verdict already has an interval that holds 0, so it passes without the rule.

This adds test_two_pairs_against_the_rest_give_no_verdict:

  • eight pairs: six with B 2 ms faster, two with B 0.1 ms slower;
  • the interval leaves 0 out, and 6 of 8 pairs agree in sign: no verdict;
  • with only one pair against the rest, the verdict is "B faster".

Test only: no change to the tool.

Tested

On Windows 11 Pro 10.0.26300, Python 3.12:

  • tests/test_d3d12_ab_compare.py: 14 tests OK on main 407f71a23 with this test.
  • With the rule removed from verdict() (and e["agree"] >= e["k"] - 1 deleted), the new test fails and the other 13 pass.
  • scripts/check_no_game_data.py on the changed file is clean.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)
**@⁠TheGeogeo** on GitHub · 2026-11-30 21:56 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2796) `TheGeogeo:d3d12-ab-agree-test` → `main` · +19 −0 · 1 files · 1 commits · merged 2026-11-30 22:33 UTC Claimed in the coordination issue as: D3D12-AB-COMPARE-AGREE-TEST (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/2570) ### What and why `tools/d3d12_ab_compare.py` (#2783) says "B faster" or "B slower" only when two things hold: the 95 % interval leaves 0 out, and all pairs but at most one agree in sign. The verification of #2783 found that no test catches removing the second rule. `test_one_odd_run_gives_no_verdict` already has an interval that holds 0, so it passes without the rule. This adds `test_two_pairs_against_the_rest_give_no_verdict`: - eight pairs: six with B 2 ms faster, two with B 0.1 ms slower; - the interval leaves 0 out, and 6 of 8 pairs agree in sign: no verdict; - with only one pair against the rest, the verdict is "B faster". Test only: no change to the tool. ### Tested On Windows 11 Pro 10.0.26300, Python 3.12: - `tests/test_d3d12_ab_compare.py`: 14 tests OK on `main` 407f71a23 with this test. - With the rule removed from `verdict()` (`and e["agree"] >= e["k"] - 1` deleted), the new test fails and the other 13 pass. - `scripts/check_no_game_data.py` on the changed file is clean. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change)
"B faster" or "B slower" needs the interval to leave 0 out and all pairs but at most one to agree
in sign. No test caught removing the sign part (the verification of #2783 found it): the odd-run
test's interval already held 0. Eight pairs, two against the rest, now give no verdict, and one
against the rest still does.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 22:00:52 +00:00
Author
Owner

@⁠OreoFR on GitHub · 2026-11-30 21:58 UTC · original

Verified by OreoFR on macOS 27.2.1, Apple M5, head 3b45610f9, main 407f71a23. CPU only, Python.

MEASURED

  • This PR only adds a test, so red and green run the same code: tests/test_d3d12_ab_compare.py gives 14 passed on main + this test, and 14 passed on main + the PR (merge-tree).
  • Mutation on the PR head: deleting and e["agree"] >= e["k"] - 1 from verdict() (tools/d3d12_ab_compare.py:73) gives 1 failed, 13 passed. The only failure is the new test_two_pairs_against_the_rest_give_no_verdict. That matches your Windows result: removing the sign rule is now caught, which closes the coverage gap reported in the #2783 verification.

AI-assisted: Claude Code

**@⁠OreoFR** on GitHub · 2026-11-30 21:58 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2796#issuecomment-7293168455) Verified by OreoFR on macOS 27.2.1, Apple M5, head `3b45610f9`, main `407f71a23`. CPU only, Python. **MEASURED** - This PR only adds a test, so red and green run the same code: `tests/test_d3d12_ab_compare.py` gives 14 passed on main + this test, and 14 passed on main + the PR (merge-tree). - Mutation on the PR head: deleting ` and e["agree"] >= e["k"] - 1` from `verdict()` (`tools/d3d12_ab_compare.py:73`) gives 1 failed, 13 passed. The only failure is the new `test_two_pairs_against_the_rest_give_no_verdict`. That matches your Windows result: removing the sign rule is now caught, which closes the coverage gap reported in the #2783 verification. AI-assisted: Claude Code
github manually merged commit 6494909b78 into main 2026-11-30 22:34:45 +00:00
Author
Owner

@⁠MoonEyes on GitHub · 2026-11-30 22:33 UTC · original

Merging. Head 3b45610f9 merges cleanly with main b1f91c2f9 and does not force a rebase of #2566. Tests only. CI green on this head. Checked by OreoFR (mutation: the new test alone fails without the sign rule); I ran it with its neighbours on main + PR: 14 tests OK (Windows, Python 3.14). Merged by MoonEyes.

AI-assisted (Claude Code).

**@⁠MoonEyes** on GitHub · 2026-11-30 22:33 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2796#issuecomment-7293997197) Merging. Head `3b45610f9` merges cleanly with `main` `b1f91c2f9` and does not force a rebase of #2566. Tests only. CI green on this head. Checked by OreoFR (mutation: the new test alone fails without the sign rule); I ran it with its neighbours on main + PR: 14 tests OK (Windows, Python 3.14). Merged by MoonEyes. AI-assisted (Claude Code).
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!2796
No description provided.