Repository navigation
Description
The row has been red for days, and the snapshot it accuses is correct. tools/ci/census_counters_check.py reads registry/architectures.json flat; the committed file nests its classes under "architectures". So archs.get(hf) finds no entry for any class, every watch: "report" class counts as declined, and the row disagrees with a correct snapshot on every run. The tempting repair — editing registry/census.json to the number the check computes — would bake the bug into the data.
Measured on main (78c3783):
$ python3 tools/ci/census_counters_check.py --check ; echo rc=$?
declined_architectures: the snapshot says 26, this tree computes 33
declined_models: the snapshot says 478, this tree computes 1042
rc=1
# the same numbers, computed the way tools/census.py computes them
$ python3 -c "…watch=='report' and not a_get(archs, hf)…"
significant.json classes: 47 | watch=report: 33
declined (watch=report and no backends): 26 | snapshot says 26
declined models computed: 478 | snapshot says 478 ← the file on disk is right
Cause. registry/architectures.json is {"about", "sources", "counts", "architectures", "gguf_architectures"}. Every other reader unwraps it — tools/census.py:80 (["architectures"], then the identical predicate at :124-125), tools/census_watch.py:249, tools/registry_build.py:223 — and the check is the only one that indexes the whole file. Its docstring even says "tools/census.py:125 exactly".
Why it stayed invisible. Three reasons, and the third is the interesting one:
- It runs in
census.yml:76(the daily census), not in PR CI — deliberately, per engine#2850/ci: check the census snapshot's two tree-derived counters (engine#2850) #2852. - Since engine#2852 the disagreement is a
::warning::that still opens the census PR, so nothing goes red and nobody reads it. - The check's own self-test cannot see it, because its fixture writes a flat
architectures.jsonwhile the committed file nests. With the flat lookup and a flat fixture, the code and its test agree with each other and both disagree with the repository — which is why--self-test okand--checkrc 1 have coexisted every day.
Fix (draft PR, one line + the arm that would have caught it): unwrap "architectures" (tolerating a flat file), and give the fixture the committed file's shape plus a watch: report class that has a backend — the one shape a flat lookup gets wrong. Control, with the fixture fixed and the lookup reverted:
FAIL a consistent snapshot passes [[('declined_architectures', 1, 2), ('declined_models', 7, 12)]]
self-test FAILED (2) ← the live row's 26 vs 33 / 478 vs 1042, in miniature
With both changes: census-counters: both tree-derived counters match the registry, rc 0, self-test ok.
No data change is needed: registry/census.json's 26/478 are correct for this tree.
Activity
bong-water-water-bong commentedon Nov 20, 2026
Confirmed independently, and the two numbers reproduce exactly: the checker says 33, the tree computes 26, and the seven-class difference is nameable.
Where the two disagree, from
main:registry/architectures.json's top level isabout, sources, counts, architectures, gguf_architectures— the 350 classes are under"architectures". So the checker'sarchs.get(hf)looks up class names among five metadata keys, getsNonefor all 47watch: "report"classes, and counts every one of them as declined.Measured both ways on main's own tree, no build:
Lfm3ForCausalLMis the one that makes this more than a counter: it is mapped ("gguf": "lfm3",backends: ["hrx"]— and it ran, engine#2918), so the daily red row currently claims the fleet's newest served family is unmapped.The fix is one expression, and it should be made in the place that owns the shape rather than duplicated:
archs = json.loads(…)["architectures"]at:49, which makesdeclined_classes()agree withtools/census.py:80by construction — the docstring already says it is that function "exactly", and today it is not. AKeyErroron a malformed file is the right failure here (the checker would rather be cannot-tell than confidently wrong).One caveat worth carrying into the fix:
census.py:80does["architectures"]with no.get, so it already throws on a file without that key — matching it exactly means the checker inherits that, which is the behaviour you want for a counters check.bong-water-water-bong commentedon Nov 20, 2026
Already fixed by #3046 — I worked this one for twenty minutes before noticing, so recording what the two versions share and where they differ, and closing the duplicate work rather than the issue.
Verified on #3046's head (
3afb8c40):So the row is green and, more importantly, the failure mode is now refused rather than mis-counted: a flat
architectures.json— the shape this tool was written against — is cannot-tell, not a tree where every report class is declined. That is a stronger answer than accepting both shapes, which is what my version did: mine would have silently kept working on a file that no longer has the nested key, i.e. it would have hidden the next shape change the way this one was hidden.Two things from my run that may be useful to keep:
declined_architectures: the snapshot says 26, this tree computes 33anddeclined_models: … 478 … 1042. Worth having in the row's record because they are what a reader sees when the check is red, and the issue's title only names the second.registry/census.jsonto33/1042would bake the bug into the data and leave a snapshot that no correct tree can ever match. The issue says it; a comment at theclasses_of/raw_archssite says it to whoever is holding the file.My duplicate is closed — I had a
cl-infra/3041-census-nestedbranch with aclasses_of()that accepted both shapes plus an arm, and it is deleted rather than pushed, since one PR per issue and yours is better on the exact point that matters.duplicate_fixes_check: the note describes the pair it has, and a mark…