Repository navigation
Description
Five cells outside the band on one row — cobol 1, css 1, jcl 1, kotlin 2, dockerfile 4 — against a corpus median of 0. In every one of them the engine reading is correct, which means the comparison is what is wrong, and no amount of extraction work will move them.
Measured 2026-09-05 on engine main a59ecf6b / corpus main 2038a86, docs/bias_variance_chart.svg row classes_found (89% consistency, the group's second-worst). Ledger: container-construct-reads-as-class, and one layer up container-construct-reads-as-class-start.
The measurement
The SPEC's probe program is function-only: 12 probes plus an entry point, no type declarations. 41 of 46 languages therefore record classes_found 0 and the corpus median is 0. bias_report._row_stats scores a zero median on exact agreement — relative deviation is undefined, so every nonzero value is pushed off-scale with copysign(1.0, …) and the chart draws it red at full radius, whether it is 1 or 4:
classes_found, corpus total, median 0.0 (agreement basis)
4 dockerfile FROM opens a build stage -- main->a, a->b, b->c, c->scratch, one per file
2 kotlin a.kt: object Region {} / object Home {}
1 cobol main.cbl PROGRAM-ID. ROSETTA-MAIN.
1 css c.css .rosetta-risk { ... }
1 jcl main.jcl //ROSETTA JOB
0 41 languages
Three distinct reasons, all of them correct readings:
The file cannot exist without a container declaration — cobol, jcl, dockerfile. A COBOL program is the compilation unit and a .cbl without a PROGRAM-ID paragraph is not a COBOL program; a JCL file without a job card is a fragment, not a submittable job; a Dockerfile without a FROM is not a Dockerfile. Note dockerfile is the only one that declares per file rather than once per program, which is the whole of why it reads 4 and the others read 1 — all four languages declare exactly one container per file.
"Class" means something else — css. .rosetta-risk is the selector carrying the planted expression()/behavior() bypasses, and a CSS class is a selector, not an OOP-shaped entity. This one has a separate, already-decided answer: see #2798.
The plant forced it — kotlin. object Region {} / object Home {} are the corpus's two planted globals: Kotlin has no module-level mutable state, so a singleton object is how the plant has to be written, and an object declaration is also a type declaration. The class count is one plant counted twice, not a second deviation. Fixing it would mean planting Kotlin's globals as something Kotlin does not have.
The point
Five red dots all stating the same true fact: some languages cannot have a file without a container declaration and some can. #2669's close criterion is "no unexplained out-of-band cells" and all five are ledgered, so nothing forces the question — but the group's headline number permanently under-reports extraction quality by five cells that describe language morphology rather than engine behaviour.
This is not a new argument here. container-construct-reads-as-class-start records exactly this for the class_start rule one row up, and #2669 F.3 already built the machinery for the general case: a metric whose reading is dominated by a known per-language constant is banded against the median of its own stratum (reference_medians, constant_sensitive) instead of the global median, because a global comparison of a constant is meaningless. "Does this language's file require a container declaration" is exactly that kind of constant — known, per-language, and already written down by name in the ledger.
Note also that classes_found is scored for all 46 languages while class_start is n/a for five (shell, agc_assembly, makefile, markdown, m4) — the structure-count rows have no n/a mechanism at all. That is #2795, and it is a prerequisite for reading this row honestly.
Candidate shapes
(a) Band the structure counts against a declaration-requirement stratum. Two strata: languages whose compilation unit is itself a named container (the list container-construct-reads-as-class-start already maintains), and languages where a type declaration is optional. Each banded against its own median. Directly reuses reference_medians/constant_sensitive. Changes no score a customer sees — which also means it fixes nothing for real repositories; it fixes the reading of the corpus.
(b) Make the zero-median banding proportionate. Independent of (a), and it is dockerfile that makes the case: 4 and 1 are the same full-radius dot today. A file-normalised reading (class_count / files = 1.0 for cobol, css, jcl and dockerfile) would show that all four declare exactly one container per file — a far more informative statement than four equal red dots, and it would separate them from a hypothetical language that really did declare four types in one file.
(c) A per-language derivation edge, for kotlin. explain_out_of_band already classifies a composite whose input is out of band as derived and lets it inherit rather than reporting a fresh finding. There is no such edge from classes_found to globals because that edge is language-specific — it exists for kotlin and nothing else. Letting a ledger entry declare "for language L, metric M inherits from N" would state kotlin's actual reason instead of filing it under a heading that means something else, and it generalises to any future "the only way to plant X here is Y".
(d) Reject all, keep the ledger. The current position, and it is coherent: the entry says plainly that the engine reading is correct in every case.
My reading is (a) plus (b) — (b) is cheap and improves the chart regardless. (c) is worth doing only if the kotlin double-count recurs elsewhere.
Corpus pairing
None under any shape — this is reporting-layer work in tools/bias_report.py. No plant change (kotlin's globals cannot be written any other way), no engine change, no re-bless owed. container-construct-reads-as-class narrows to whichever cells the new banding still leaves out.
Part of #2669 (STRUCTURE COUNTS sweep). Prerequisite: #2795. css has its own already-decided answer: #2798. Related: #2567, #2570, #2581, #2572, #2582 (all closed).
Activity
[-]classes_found[cobol] red on a 0 median: PROGRAM-ID is the compilation unit — five languages red for a fact the comparison cannot express[/-][+]classes_found: five red cells on a 0 median are language morphology, not extraction — the row needs a declaration-requirement stratum[/+]feat(standards): func_start and class_start contracts -- 5 open cells…
squid-protocol commentedon Sep 11, 2026
Fixed in keyword-rosetta#124 (merged 2026-09-10). Reporting-layer only — no engine change, no plant change, no re-bless.
What shipped:
classes_foundnow bands on a declaration-requirement axis instead of a zero median. Languages whose file IS a container ({cobol, jcl, dockerfile}) band on container presence (green iff ≥1); everyone else on absence (green iff 0). A correctPROGRAM-ID/JOB/FROMno longer reads as a defect, and the container count (dockerfile's 4 stages vs cobol's 1 program, both correct) is no longer a deviation — while a missing required container or a spurious class still flags.kotlin (
classes_found= 2) is itsglobalsplant re-counted (Kotlin has no module-level mutable state, so globals must beobjectsingletons, and an object is a class), so it's marked n/a via a newcross-plant-incomparableledger disposition.container-construct-reads-as-classretired.Result (full-precision regen):
classes_foundconsistency 89% → 100% (cobol/jcl/dockerfile green, kotlin n/a);--gate0 unexplained; open-defect share unchanged0/2632; na/orphan/issue--ciall clean.Deviation from the filed shapes: shape (a) landed as a presence contract rather than the count-median it described, and shape (b)'s
class_count / filesnormalization was dropped — the corpus grew to 4 files/language since filing (cobol/jcl now carry non-container copybooks/fragments), so per-file division no longer equalizes them. css was already resolved to 0 upstream (#2798). kotlin was zeroed via n/a rather than a derived edge (derived cells still draw red; only n/a removes them from the row).