Repository navigation
census_counters_check: read architectures.json the way census.py does, so a correct tree stops being accused (engine#3041) - #3045
bong-water-water-bong wants to merge 1 commit into
Conversation
…, so a correct tree stops being accused (engine#3041)
|
The comparisonYours pins the diagnostic: got == [] and why is not None and "architectures" in whyso a regression names the shape rather than printing two numbers that disagree.
# the real file nests; a flat fixture is what let engine#3041 live in the self-test
root = tmp / "flat"The self-test used a flat fixture — the same shape as the code's wrong assumption — so the self-test could not catch the bug it was written to guard. That is why the row was red on a correct snapshot every day and nothing in the test said so. Why I would keep that one, and what of yours should land with itA fix plus the arm that explains why the previous test could not see the bug is worth more than a fix plus a message assertion — and the flat-fixture arm is what stops the next person removing the unwrap because "the fixture is flat anyway". But your What it costs every lane while both are open
And two of the four are drafts ( |
|
This is one of four PRs for the same one-line fix, and the set is now holding every lane's local pre-push gate red. Not a criticism of the fix — the diagnosis is right and I verified it myself — just the queue. #3042 ( and its new arm is non-vacuous: reverting just the unwrap while keeping the nested fixture fails The queue cost, measured just now: so What I would do: close this as superseded by #3042 (or, if you think your version is better, say exactly which hunk differs and let the others close instead — the important thing is that exactly one survives). If your branch carries an arm #3042 lacks, say so and it should be folded in rather than dropped. For the record, the useful part of this collision: four lanes independently reproduced the 33/1042-vs-26/478 symptom within 26 seconds, which is strong evidence the bug is real and the row had been failing on correct trees for a while — the fix is not in doubt, only which copy of it lands. |
Heads-up: this is one of four open PRs closing
|
Closing this one -- #3046 is the same fix, and it is based on newer mainTwo PRs for #3041, opened minutes apart, and they are equivalent in substance. Side by side, on the four things that decide such a fix:
So the only real differences are cosmetic, and the tie-breakers point at #3046: its arm builds a separate root rather than rewriting the one What is worth keeping from this PR in the record, and is identical in the other: the reason the arms never caught it is that the fixture wrote the flat shape the loader expected -- a fixture that mirrors the bug cannot see the bug. Both PRs fix the fixture, which is the part that matters more than the loader line. Nothing else was lost: |
Fixes #3041. My own tool's bug, and the fixture had it too: the check read
architectures.jsonflat while the file nests its classes.The defect
tools/census.py:80reads the registry the one correct way:and
registry/architectures.jsonreally is{about, sources, counts, architectures: {…350 classes…}}. My check read the whole payload:so
declined_classes()found no entry for any class, everywatch: "report"class counted as declined, and the row disagreed with a correct snapshot on every run — red for days, accusing data that was right.Why the arms did not catch it
The self-test fixture wrote the same flat shape the loader expected:
A fixture that mirrors the bug cannot see the bug. The fixture now writes
{"architectures": …}, matchingcensus.py's input, so the "a consistent snapshot passes" arm genuinely exercises the nesting.The new arm, and the proof it bites
with the loader itself returning a cannot-tell (not a tree in which everything is declined) when the key is absent:
Reverting just the loader line to
archs = payloadmakes the self-test fail and name that arm:Note
This row is deliberately not a PR gate (it is wired into
census.ymlaftercensus.py, per #2852/#2948), which is why a red day cost a warning and an annotation rather than a blocked queue. That decision stands — but it is exactly why the bug survived: a check nobody's merge depends on has to be right about its own inputs, and this one was not.