Repository navigation
Conversation
|
Checked by OreoFR, main d367675, PR head b86831d. MEASURED:
AI-assisted: Claude Code |
|
Independent controlled-order check. I tested
One uninstrumented control run on each revision also passed. Source-only synthetic test. AI-assisted with OpenAI Codex. |
|
A control on the fix itself, since relaxing an assertion is exactly the change that can make a test vacuous: it still fails when the cache is broken. The mutation: in return value_.load() == 0.0f ? 999.0f : value_.load(); // temporary mutation, not in the branchResult, on the branch with this change applied: So the relaxed assertion is not What the fix trades away, stated plainly: the original assertion also proved that the first call had not yet been filled on that machine, at that moment. That is not a property of the code - Measured, both sides: Written with an AI assistant. |
… value it woke The test asserted that the first get() returns 0.0f, but get() is what wakes the worker to read, and value_.load() runs after the wake: on a loaded host the read lands before the load and the assertion fails. Replaced with the part that does not race - the value is either the fallback or the fresh read - and kept the reads() transition checks that pin the wake-up itself.
b86831d to
4b49e58
Compare
…long to The four lines went in at four spaces while the block they sit in is at eight, and the body of the pull request showed them correctly, so the diff and the description disagreed. Whitespace only: the text, the numbers and the behaviour are unchanged, and the test still exits 0.
|
A reviewer agent read this branch and found the added lines indented at four spaces while the block they sit in is at eight - and the body's snippet shows them correctly, so the diff and the description disagreed. Fixed, whitespace only. Nothing else changed: same assertion, same numbers, same behaviour. The description was right and the diff was the odd one out, which is the reverse of the usual failure and the reason a second reader is worth the wait. Written with an AI assistant. |
|
Independent check on Windows (not the author), at
Environment: Ryzen 9 7950X3D (16C/32T), Windows 11 Pro 10.0.26200.9711. AI-assisted: yes (opencode). |
|
A measured rate for both arms, and it corrects a number I have been quoting in this thread: on The two arms, same machine, same load, same binary target: What that does to the case for the fix:
What I would add before merging, if anyone wants more: a stress arm that runs the same test 1000 times (about 17 minutes here) to put a bound on the old rate rather than an estimate. I did 100 because it is what I could do twice in one sitting; say the word and I will run 1000 on both arms. AI-assisted: yes - DeepSeek v4.1 (flash) built and ran both arms on the machine above. Written with an AI assistant. |
|
The bound I offered, run: 1000 runs of the old assertion, 0 failures. That is a stronger correction than the one I posted an hour ago, and it is worth having in the thread before anyone merges on the strength of a flake I cannot reproduce. So on this machine and this commit the rate is under 0.1% (0 in 1000 puts a 95% upper bound around 0.3%), not the 1-in-30 I carried in from What that leaves the PR standing on, stated so a reviewer can weigh it:
What I would not claim: that this fix makes The machine is idle again (the four hogs are stopped). AI-assisted: yes - DeepSeek v4.1 (flash) ran the thousand and checked the load before and after. Written with an AI assistant. |
|
One more check before anyone reads my rate numbers as a trend: the test and the cache are byte-identical between the commit where I saw the failure and the commit where 1000 runs passed, so nothing was fixed in between and #2713 is still the only change on the table. So the difference between 1-in-30 this morning and 0-in-1000 tonight is the machine, not the tree. This morning I had build jobs running on the same box; tonight the four hogs were the only load. Which makes the honest reading of all three measurements:
Same code, file-hash identical, and a 33-fold difference in rate between two sittings. That is what a scheduler-dependent race looks like from the outside, and it is also why a CI red on it cannot be argued away as "just slow runners" - and why the fix should not be justified by a rate at all. Nothing to change in the PR. The assertion still reads a value the scheduler decides; the relaxed one still fails on a broken cache. I am only adding this so the thread does not read as if the code got better between the two commits. AI-assisted: yes - DeepSeek v4.1 (flash). Written with an AI assistant. |
A flaky test in
main, measured:display_white_cachefails about once in thirty runs on a loaded host, and it took thewindowsjob of #1937 with it today.The assertion:
Why it races -
DisplayWhiteCache::get():The first
get()is what wakes the worker to read, andvalue_.load()runs after the wake. Whether the value is still empty at that point is a scheduling fact, not an invariant: on an idle machine the worker loses the race and the assertion passes; on a loaded one it wins and the assertion fails.Measured here (Windows 11, RTX 4090, MSVC 19.44.35226), on
maind367675c7:What this changes: the assertion now accepts the two outcomes that are both correct - the fallback, or the value the call itself woke the worker to read - and keeps the parts that do not race:
The
reads()checks are untouched, so the property the test exists for - the firstget()wakes the worker exactly once, and a later one does not re-read before the period - is still asserted.What this does not do: it does not make
get()deterministic. The cache is correct as written (a caller that gets 0 falls back to 203, which is the documented behaviour); it is the test that assumed an ordering the implementation never promised.Why it matters beyond this test:
windowsis a required check on every pull request, so this flake costs every author a red run and a re-run. #1937 hit it today and it was not that branch's fault.AI-assisted: yes - DeepSeek v4.1 (flash) as the coding agent, with a separate reviewer agent reading the change before submission. Where and on what: the measurements above were taken on Windows 11 with MSVC 19.44.35226 on an RTX 4090 (NVIDIA driver 621.24) where a C++ or GPU path is involved; Python and docs cases need none of it.
Written with an AI assistant.