Repository navigation
feat(chart): score the non-planted rules, retitle the groups, count the band - #93
Merged
Merged
Conversation
…he band
Chart changes:
* Every row prints the number of languages actually IN the band in the band's
own bottom-right corner (`43/45`). The bar already gives the share, but a
reader comparing two rows at the same percentage still has to know whether
that is 43 of 45 or 4 of 5 -- n varies per row as n/a cells and
population-less languages drop out. Drawn after the dots with a white halo,
because anything near +25% sits under the label.
* Group titles: "keywords" -> "keyword extraction", "dependency graph" ->
"dependency graph creation", "shape descriptors" -> "internal function
metrics", "risk scores" -> "calculated risk exposure — per file". "program
length" and "vocabulary" merge into "program size & vocabulary" -- they answer
one question (how big and how wordy did the same program come out) and are
ungated for one reason.
"unplanted inputs" becomes "non-planted keyword extraction", moves directly
after keyword extraction, and is now SCORED rather than charted as context. It
sat with length and vocabulary on the "languages vary too much to band"
argument, which does not apply to it: the corpus plants nothing these rules
match, so the honest reading is 0 in every language and that is exactly the
comparable claim the chart exists to make. It scores on exact agreement against
the zero median, the basis every zero-median metric already uses.
Scoring it takes the group's 37 nonzero cells from unverdicted to needing one,
so all 37 were audited by running each language's own rule over its code and
comment streams and reading what matched. They resolve three ways, ledgered as
`non-planted-rules-match-idiom-and-planted-tokens` (intended-morphology):
1. the language's mandatory form -- `const` (javascript 17, typescript 14),
`let` (swift), `val` (kotlin/scala), `DISPLAY`/`WRITE` as the only output
primitive (cobol/abap), `%%` as yacc's section separator;
2. a token planted for another signal, counted again -- `eval`, `iex`,
`Type.forName` and solidity's `assembly` are the high_risk_execution and
safety_bypasses plants; jcl's `DISP=(OLD` is keyword-rosetta#72's;
3. actually planted despite the group's name -- spec_exposure jcl/yaml are the
`[SPEC-2732]` tags, dead_code jcl is `//*PROBEDEAD`. `unplanted_inputs` is
derived as "governed by a risk formula and not in the manifest's PLANTED
18", so a signal SPEC plants in one or two languages without giving it a
manifest column lands here anyway.
One of the 37 was none of those and is a real defect: makefile dead_code 7,
where every hit is a `# Word:` prose comment (`# decoy:`, `# HACK:`, `# TODO:`,
`# author:`) read as a commented-out target -- makefile's is the only
comment-anchored dead_code rule that is shape-anchored rather than
keyword-anchored, and two of the seven double-count the debt plants. Filed as
gitgalaxy#2851 and ledgered separately as `makefile-dead-code-reads-prose-labels`
(upstream-bug), so it reads as the open defect it is rather than hiding inside
the morphology entry.
Unexplained cells are unchanged at 6 -- the epic's close criterion does not move.
Gated metrics 48 -> 55, ledgered cells 100 -> 137, open-defect share 34/2296 ->
35/2645 (the one new defect is the makefile cell).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
squid-protocol
added a commit
that referenced
this pull request
Sep 7, 2026
Conflicts resolved by regeneration, not hand-merging: the four generated docs (bias_data.json, bias_report.md, bias_variance_chart.svg, findings_by_language.md) were regenerated with tools/bias_report.py on the merged code (main's #93 non-planted scoring included) against engine main 1dc25e08, which now carries gitgalaxy#2854. deviation_ledger.json resolved programmatically: main's two non-planted-sweep entries kept, this branch's test-contract-2852 append and its two entry edits re-applied (117 entries). Verified post-merge: zero test cells in cell_categories, extraction 26, open-defect 32/2645 on the re-scoped report; na_check/decoy_check/ ledger_orphan_check green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VnsC1A6TUhGS5QcmM7fg8L
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Group titles
Length and vocabulary merge because they answer one question — how big and how wordy did the same
program come out — and are ungated for one reason.
Languages in band, per row
Every row now prints the count in the band's own bottom-right corner (
43/45). The bar to the leftalready gives the share, but a reader comparing two rows at the same percentage still has to know
whether that is 43 of 45 or 4 of 5 — n varies per row as n/a cells and population-less languages
drop out. Drawn after the dots with a white halo (
paint-order="stroke"), because anything near+25% sits directly under the label; verified by rasterising the SVG rather than assuming.
Non-planted keyword extraction is now SCORED
It sat with length and vocabulary on the "languages vary too much for a band to mean anything"
argument. That argument does not apply to it: the corpus plants nothing these rules match, so the
honest reading is 0 in every language — which is exactly the comparable claim the chart exists to
make. It now scores on exact agreement against the zero median, the basis every zero-median metric
already uses, and sits directly after Keyword Extraction because it asks the same question with the
answer inverted.
Scoring it moves 37 nonzero cells from unverdicted to needing a verdict, so all 37 were audited
— each language's own rule run over its code and comment streams, reading what actually matched.
They resolve three ways, ledgered as
non-planted-rules-match-idiom-and-planted-tokens(intended-morphology):
const(javascript 17, typescript 14),
let(swift 11),val(kotlin/scala),final/FINAL,INTEGER, PARAMETER,.freeze;DISPLAY/WRITE/echoas the language's only outputprimitive;
%%as yacc's mandatory section separator.eval,iex,Type.forNameandsolidity's
assemblyare the high_risk_execution / safety_bypasses plants; jcl'sDISP=(OLDiskeyword-rosetta#72's; swift's
Sendableis on the immutability line above it.[SPEC-2732]tags SPEC.md plants in exactly those two languages, and dead_code jcl is
//*PROBEDEAD.unplanted_inputsis derived as "governed by a risk formula and not in the manifest's PLANTED18", so a signal the SPEC plants in a language or two without giving it a manifest column lands
in this group anyway. Worth knowing before the group's name is taken literally.
The one that was none of those
makefile
dead_code= 7, and every hit is prose.# decoy:×4 (the corpus's own furniture),# HACK:(the fragile_debt plant),# TODO:(planned_debt),# author:(ownership). makefile's isthe only comment-anchored
dead_coderule that is shape-anchored (<identifier>:) rather thankeyword-anchored — shell, python and yaml all require a real keyword, and those languages carry the
identical comments and correctly read 0. Two of the seven double-count the debt plants, and
dead_codefeedsrisk_dead_code.Filed as gitgalaxy#2851 and ledgered separately as
makefile-dead-code-reads-prose-labels(upstream-bug), so it reads as the open defect it is instead of hiding inside the morphology entry.
Effect
Verified end to end against engine
mainwithPYTHONPATHpointed at the same worktree — theprovenance guard added in #92 confirms it. All three ledger gates pass.
Artifacts are not committed here:
bias-history.ymlregenerates them on merge, and this PR touchestools/**so that runs automatically.