tests: a game_gate case where the median is not the fastest half #2794
Open
fiestorra wants to merge 3 commits from
upstream-pr/2794 into main
pull from: upstream-pr/2794
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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!2794
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2794"
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 fiestorra on 2026-11-30T21:35:30Z.
The
game_gatesuite cannot currently tell a median from a maximum. This adds the case that can, and it is one test.The gap, found by mutation on #2782 before it merged: replacing
statistics.median()withmax()inparse_frames(both sites,tools/game_gate.py:291and:311) left all 20 tests passing. The reason is in the fixtures: every case writes one frame rate, so for each of themmedian == mean == max, andassertAlmostEqual(s["fps"]["median"], 50.0)is satisfied by any of the three.That is now in
main, since #2782 merged - so the assertion that reads "median" is not testing a median.The case added:
The windows are unequal on purpose and the presents are equal: 60 s at 40 fps and 40 s at 60 fps both give 2400 gaps, so the median gap is the mean of 16.67 and 25 ms - 48 fps - while
max()answers1000 / 25= 40. Equal durations would not have worked: the 60 fps half contributes 9000 presents to 6000, the median lands on 16.67, and the case reads 60 for both implementations. I tried that first and it passed the mutation.Measured, both arms:
So the mutation now fails on this case and the other 21 still pass - the case is pointed, which is what a regression test for a statistic should be.
p5is asserted too, because it is the other place a rate statistic is derived and it was equally indistinguishable:percentile(counted, 95)reads the slow half (40 fps) here.One file,
+16/-0, no tool code touched.AI-assisted: yes - DeepSeek v4.1 (flash). Found while reviewing #2782, whose author merged with the note on record; this closes it rather than re-litigating it.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T21:39:42Z.
Verified by OreoFR on macOS 27.2.1, Apple M5, head
a2b1f1c93, main0b6e0e3bc. CPU only, no game files.MEASURED
tests/test_game_gate.pygives 22 passed on main + this test, and 22 passed on main + the PR (merge-tree).statistics.median(intools/game_gate.py(lines 279, 291, 296, 312, 315) replaced withmax(gives 1 failed, 21 passed. The only failure is the newtest_the_median_is_not_the_fastest_half(40.0 != 48.0 within 1.0 delta). That matches your result, and it also holds when all five sites are mutated, not just the two inparse_frames.READ IN CODE
AI-assisted: Claude Code
Imported from ubiquitarianism/leonida. Originally posted by aegish-zagi on 2026-12-01T04:52:01Z.
Verification — VERIFY-2794
Verdict: PASS
a2b1f1c9380ecba5dd086f7231dfef1721806602| merge state vs main: clean merge with current main5dd6d444fin a scratch worktree (merge commitbcd396bd1), no conflicts. Diff: test-only,tests/test_game_gate.py+16 lines, no production code touched.python -I tests/test_game_gate.pystatistics.median(withmax(intools/game_gate.py(all 5 sites; the PR describes the 2 fps sites at :291/:311).40.0 != 48.0 … the median of two equal halves is between them, not the slowest one.parse_framesdoes usestatistics.median.AI-assisted: yes (Muse Wonder, Muse by Meta)
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T05:40:24Z.
Review: COMMENTED
Confirmed here: 22 tests pass, and
max()at both median sites now fails only this case (40.0 != 48.0). So the assertion pins "median of intervals, then invert" and rejects max, mean-of-rates and median-of-rates.Two problems, though.
Fake.framesaccumulatest += gap: the 50 fps loop lands at 129.999…,frames(130, …)starts at 130.0, two presents stamp as18:02:10.000000, and the parser counts a 0.0 ms gap. Remove that one sample and the remaining 4,799 gaps have median 25 ms → 40.0 fps, exactlymax(), and the mutation passes with no warning. It also means a per-sample1000/gimplementation raisesZeroDivisionErrorinstead of failing an assertion. Generate the presents at exact timestamps (or slice a known 4,800-gap list) and assertfps.frames == 4800, so the case cannot drift.statistics.fmean(counted)gives 48.008 and passes — with equal halves that is unavoidable, but it is worth saying out loud, since the only thing keeping "median of rates" out (50.0) is a 2 fps margin.Nits: the comment says the halves are "equal in length" — they are 60 s and 40 s (the body has it right); "the a that gets read as a median" is garbled; and a blank line is missing before the next
def. Also note this fixture's run verdict is FAILpresent_gap(longest_present_gap_s = 200.017) because presents stop at 230 while the run ends at 430 — harmless for a statistics test, but not a run shape you would want copied elsewhere.Imported from ubiquitarianism/leonida. Originally posted by andrew-ai on 2026-12-02T00:42:34Z.
A small fixture adjustment can also catch a mean replacing the median. I ran the focused test at
a2b1f1c93on Windows, changing only the aggregation of counted present gaps. The current fixture passed with both statistics.median and statistics.fmean and failed with max, as expected for two equal-sized groups. Extending the 60 fps segment from t=230 to t=250 and expecting 60 fps made all three outcomes distinct: median passed, fmean reported 50.01 fps, and max reported 40.00 fps. The fifth-percentile assertion still passed with the production implementation. This gives the same test coverage for one additional realistic regression, with no runtime changes. Codex-assisted.Imported from ubiquitarianism/leonida. Originally posted by imShangLi on 2026-12-02T05:57:32Z.
VERIFY-2794 — Linux, Fedora 45, no GPU device, no game files, no title
Verdict: PASS. A pure test-coverage pull request: the new case is correct, it genuinely catches the regression it is written for, and nothing else in the repository is touched.
Head
a2b1f1c9, base the currentmain(0ae5a266), merge base0b6e0e3b, 1 file, +16/−0:tests/test_game_gate.py.1. What it changes
One new test method,
Measures.test_the_median_is_not_the_fastest_half, added totests/test_game_gate.pybetweentest_percentiles_come_from_the_presentsandtest_a_dip_on_arrival_is_not_the_first_second_under_2. It builds a synthetic run with two equal halves (40 fps then 60 fps, 2400 presents each) and asserts that the fpsmedianis 48 (between the two) and that the 5th percentile is 40 (the slow half). No source file changes.2. The claims it makes, and which ones I checked
The comment in the new test makes these factual claims:
tests/test_game_gate.pycallsFake.frames(...)with a singlefpsper segment, so all presents in each run are one rate. True.statistics.median==max. True.statistics.median()withmax()inparse_framesleft all of them passing" — checked by temporarily patchingtools/game_gate.pyto usemax(counted)infps_blockand running the file: the only failure is the new test (AssertionError: 40.0 != 48.0); all 21 other tests still pass. True.f.frames(130,190,40.0,...)writes 2400 presents at 25 ms andf.frames(190,230,60.0,...)writes 2400 at 16.67 ms (the 0.0 ms gap in the distribution is the boundary rounding). True.round(1000/20.83, 2)= 48.0. True.max()would answer 40 (1000 / the longest gap)" — checked:maxgap = 25 ms → 40.0 fps. True.The assertions themselves (
median ≈ 48.0delta 1.0,p5 ≈ 40.0delta 1.0) hold: the summary givesmedian = 48.0,p5 = 40.0.3. What the tests do here
python3 -I tests/test_game_gate.py(has a__main__block, standard library only, so it runs standalone): 22 tests, all OK in ~2 s. The new test is included and passes.python3 -I -m unittest discover -s tests -p "test_docs_*.py": 57 tests, OK (48 s).python3 -I scripts/check_no_game_data.py tests/test_game_gate.py: clean (no output, exit 0).python3 -I scripts/red_green.py 2794 --work-dir ...: verdictno red— the red side (base + only the test) and the green side (base + the PR merged) both pass the test file. This is expected for a test-only pull request:tools/game_gate.pyalready usesstatistics.median, so the new case passes onmaintoo; it is a regression guard, not a fix-demonstration. The tool reports "pass on both: 26" (its own regex accounting; the file itself runs 22 tests).4. Anything wrong in the change (with the file and line)
No functional problem. Two cosmetic nits in
tests/test_game_gate.py:def test_a_dip_on_arrival_is_not_the_first_second_under_2; every other method pair in the file is separated by a blank line.Neither affects the test's result; both are style-only.
5. What I did not check
test_docs_*.py; the othertests/files were not run (the change touches one test file).tools/game_gate.pyin a worktree to verify themax()substitution and restored it (git statusclean afterwards); I did not keep any modified file.Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T17:47:14Z.
Fixed, and thank you - that was a good catch. Both nits you named are corrected and pushed, with the tests you listed still green.
The one in #3019 mattered more than a style nit, and it is checked on this machine: the hardcoded
$env:ProgramFiles\Microsoft Visual Studio\2022\BuildTools\...\Launch-VsDevShell.ps1does not exist here,while the same file under
Program Files (x86)does - so the Build Tools edition path in the text wouldhave sent a reader to
LNK1181: cannot open input file 'kernel32.lib', which is the very failure theparagraph is about. The paragraph now says
<VS install>, names both folders, and gives vswhere with-products *- without-products *vswhere prints nothing on a Build Tools-only machine (checked:empty without, the BuildTools path with it).
AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:28:18Z.
Re-checked #2794 at
f228a6a73: the garbled comment is fixed; the test still does not catchstatistics.mean()in place of the median.f228a6a73(1 commit sincea2b1f1c93: the comment says "the value" instead of "the a")main45dc41f95(git merge --no-ff, clean,94b9a878; merge base0b6e0e3bc)Ran on the merge
Red/green (test-only PR, so the red side is a mutation of
tools/game_gate.py:360,out["median"] = round(1000.0 / statistics.median(counted), 2), restored after each run):Earlier findings
tests/test_game_gate.py:223-238: the two halves are equal in length (2,400 frames at 25 ms, 2,400 at 16.67 ms), so the median and the mean of the gaps are both 20.83 ms. andrew-ai's suggestion still applies with no runtime change: make the 60 fps half longer (to t=250) and expect 60 fps; then median, mean and max give three different answers. Mean is the more likely regression of the two.max()of the gaps is the slowest rate (40 fps), as the comment says.test_a_dip_on_arrival_is_not_the_first_second_under_2(line 239).Verdict: defects (minor). The test is real and red for
max(); item 1 should be taken so it also guards against a mean.AI-assisted: Claude Opus 5.5 (Claude Code), verification only.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T20:33:18Z.
RUN (independent run on Windows, head
f228a6a73b4d87842320944936034524a52e16ab, merged intomainb41763227aeed2d23c98af84bcbc1bddc7acdc90withgit merge --no-ff)CI: the PR shows no check runs (GitHub Actions incident today), so nothing is claimed from CI.
Green
tests/test_game_gate.py, +16/-0. The PR does not touch the tool; the runs use main'stools/game_gate.py, which has changed since the PR's base (169 lines), and the results below are on the merge.a2b1f1c93, the push changes one word in a comment ("the a" became "the value"), nothing else.python -I tests/test_game_gate.py: 36 tests, OK (2 skipped). The newtest_the_median_is_not_the_fastest_halfpasses.python -I scripts/check_no_game_data.py tests/test_game_gate.py: clean.Red
The PR adds only a test, so red is a mutation of
tools/game_gate.py(restored after each run, worktree clean). Everystatistics.median((lines 348, 360, 365, 381, 384) replaced at once.max(: 1 failure, only the new case (40.0 != 48.0). Caught, and pointed.min(: 4 errors, including the new case. Caught (not pointed;minis not the regression of interest).statistics.fmean(: 36 OK. Survives. Two equal-count halves give a mean of about 48.0 as well as a median.Review
max()gap is real and the new case closes it.Fake.frames(I did not re-measure that here, it was confirmed in the previous run); mean is not separated from median; the comment says "equal in length" while the halves are 60 s and 40 s; a blank line is missing before the nextdef(the diff shows the new test running straight intodef test_a_dip_on_arrival...).Depends on:line for the coordination issue (it only mentions #2782, which merged). Per AGENTS.md the ID is missing.Not covered
No GPU, no game, no in-game run, no CI. Only
tests/test_game_gate.pywas run, not the full suite. Mean-vs-median is not covered by the test.Verdict
PARTIAL. The test does its stated job (it fails on
max()and passes on the real code), butfmeansurvives, it rests on an accidental 0.0 ms gap, there is a style slip (blank line) and no item ID.AI-assisted (Claude Code), models: Claude Opus 5.5 (checker), separate Claude Opus 5.5 judge.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T21:48:30Z.
Taken, and fixed in
3636d83c9. Thefmeansurvival was a real hole: two halves of the same length make the median and the mean the same number, so the fixture could not tell them apart.The test now has a second fixture with unequal halves — 60 s at 40 fps and 10 s at 60 — where the median stays in the longer, slower half (40) and the mean is about 42.9. Measured with each mutation applied to
tools/game_gate.pyin turn:The equal-halves fixture keeps its 48 and its p5 of 40, so
max()andmin()stay caught by it; the new one exists only to separate median from mean.On the process points: you are right that the body gives no item ID and no
Depends on:. The item is GAME-GATE-VARYING-RATE and the body now says so; #2782 is the merged report of the gap this test covers, not a dependency.Still open and not addressed here: the 2400/2400 split resting on a float boundary. That is the fixture's construction, and I would rather leave it visible in the thread than tune it until it looks clean — the reviewer who finds it next should see that it was found once.
Checks on the new head:
python -I tests/test_game_gate.pyOK,python -I scripts/check_no_game_data.py tests/test_game_gate.pyexit 0.Written with an AI assistant.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.