ledger(control_flow_ratio): narrow the vocabulary-tally entry after gitgalaxy#2789 - #67
Merged
Merged
Conversation
…itgalaxy#2789
Corpus side of gitgalaxy#2770, step 2 of GATING.md's cross-repo flow. The engine
half is gitgalaxy#2789, merged at 08a08c6a with the rosetta:rebless-owed label.
No manifests move: dependency_density is a bias-report metric derived from the
import_count and coding_loc recorder columns, not a SIGNAL_SCHEMA key, so no
expected_signals.json cell changes and no verify_language gate moves --
confirmed by #2789's own rosetta-audit ("46 language(s) checked -- 0
regression(s), 2 pre-existing, 0 broken", the two pre-existing being the
objective-c/typescript args drift already re-blessed here by #66).
bias-history.yml regenerated the report against engine 08a08c6 in 8ba80c2, so
the numbers are already on main. This is the ledger work automation cannot do.
control-flow-ratio-denominator-is-a-vocabulary-tally -- NARROWED. Its reading of
the SPREAD stands and its cells stay explained, but two other claims did not
survive being checked against the engine source:
1. "No engine change is wanted" was scoped to control_flow_ratio itself and
silently covered its derived consumer: dependency_density divided by
max(int(coding_loc * control_flow_ratio), 1), so a GATED metric was reading
this ungoverned denominator. #2789 removed that dependency.
2. The "gitgalaxy compares control_flow_ratio between files WITHIN one
repository, where the vocabulary is held constant" defense has two holes
the entry never tested. It is a WITHIN-language defect that
control_flow_ratio is 0 for any branchless file -- measured over all 46
languages' 184 shells, 133 (72%) record 0, and in 39 of 46 languages
exactly three of the four do, since only main.* carries the planted
branches -- giving any consumer that multiplies by it a discontinuity of
21x on yaml and 6x on python when one `if` is added. And the
within-repository premise holds only for a monolingual repo:
security_auditor._build_feature_frame, the very consumer the entry cites,
one-hot encodes language but applies no per-language normalisation and no
groupby.
still_reproduces stays true -- the vocabulary tally is still what
control_flow_ratio's own cells measure. Under gitgalaxy#2770 shape (b), branch
over coding_loc, the metric becomes plantable and this entry retires instead.
no-dependency-capture-languages -- figures superseded, resolution unaffected.
Its resolved m4/yacc profile quotes dependency_density "1.0 on a/b and
0.1667-0.2 on main", measured when the denominator collapsed to 1 on a
branchless file, so "1.0 on a/b" was the raw import count rather than a density.
Re-measured at the new definition: 0.02 on a/b/main and 0.0 on c for both
languages -- still the healthy sibling shape, still_reproduces stays false. The
old numbers are kept in place because they are what was measured at the time.
docs/findings_by_language.md regenerates off the ledger, so #2770 joins the
issue list for the languages the narrowed entry covers. That is its whole diff.
Gates: bias_report.py --gate exit 0 (0 unexplained cells, 0 length leaks);
na_check.py exit 0 (0 unreviewed n/a cells). bias_report.md, bias_data.json and
bias_variance_chart.svg regenerate to a ZERO diff against 8ba80c2, confirming
this PR changes no measurement. dependency_density's consistency badge reads
93%, up from 83% -- and the old 83% was itself an artifact of the denominator
being the constant 1 for most cells.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016BHBDqfybkLJqnQt9AoyTt
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.
Corpus side of gitgalaxy#2770, step 2 of
docs/GATING.md§ "Cross-repo flow". The engine half is gitgalaxy#2789, merged tomainat08a08c6awith therosetta:rebless-owedlabel.No manifests move
dependency_densityis a bias-report metric derived from theimport_countandcoding_locrecorder columns — not aSIGNAL_SCHEMAkey, so noexpected_signals.jsoncell changes and noverify_languagegate moves. gitgalaxy#2789's ownrosetta-auditconfirmed this before it merged:(The two pre-existing were objective-c and typescript, already re-blessed here by #66.)
bias-history.ymlregenerated the report against engine08a08c6in8ba80c2, so the numbers are already onmain. This PR is the ledger work that automation cannot do.Ledger
control-flow-ratio-denominator-is-a-vocabulary-tally— narrowed. The entry's reading of the spread stands and its cells stay explained; two of its other claims did not survive being checked against the engine source:"No engine change is wanted" was scoped to
control_flow_ratioitself and silently covered its derived consumer.dependency_densitydivided bymax(int(coding_loc * control_flow_ratio), 1)— a gated metric reading this ungoverned denominator. gitgalaxy#2789 removed that dependency; the column is nowimport_count / max(coding_loc, EVIDENCE_MASS_FLOOR), the gitgalaxy#2655 doctrine every other per-file density already used.The "gitgalaxy compares
control_flow_ratiobetween files WITHIN one repository, where the vocabulary is held constant" defense has two holes the entry had never tested:control_flow_ratiois 0 for any file with no branches at all. Measured over all 46 languages' 184 program shells: 133 (72%) recordcontrol_flow_ratio == 0, and in 39 of the 46 languages exactly three of the four do — onlymain.*carries the planted branches, soa/b/care branchless by the corpus's own design. Any consumer multiplying by it sees a discontinuity when oneifis added: measured at 21× on yaml (denominator 1 → 21) and 6× on python, with the vocabulary held perfectly constant.security_auditor._build_feature_frame— the very consumer the entry cites — one-hot encodes language but applies no per-language normalisation and no groupby, so in a polyglot repository the vocabularies are not held constant.still_reproducesstays true: the vocabulary tally is still whatcontrol_flow_ratio's own cells measure. gitgalaxy#2770 shapes (a) and (b) remain open, and under shape (b) —branchovercoding_loc— the metric becomes plantable and this entry retires rather than narrows.no-dependency-capture-languages— figures superseded, resolution unaffected. Its resolved m4/yacc profile quotesdependency_density"1.0 on a/b and 0.1667-0.2 on main", measured under the old definition where the denominator collapsed to 1 on a branchless file — so "1.0 on a/b" was the raw import count, not a density. Re-checked at the new values: still the healthy sibling shape,still_reproducesstays false. The old numbers are kept in place rather than rewritten, because they are what was measured at the time.docs/findings_by_language.mdregenerates off the ledger, so#2770joins the issue list for the languages the narrowed entry covers. That is the whole of its diff.Gates
tools/bias_report.py --gate— exit 0.out-of-band cells: 0 unexplained;length leaks: 0 leak / 2 weak -- none.tools/na_check.py— exit 0,unreviewed n/a cells: 0, no new unreviewed absences.docs/bias_report.md,bias_data.jsonandbias_variance_chart.svgregenerated to a zero diff against8ba80c2— confirming the auto-update was already current and this PR changes no measurement.The measured effect
dependency_densitywas the metric gitgalaxy#2770 flagged as inheriting an ungoverned denominator. Across the 46-language corpus it now reads a flat0.015(0.02/0.035where a shell imports more), against a previous range of0.048–2.000. Its consistency badge goes 83% → 93%, and the old 83% was itself an artifact — the denominator was the constant1for most cells, so the column was reporting raw import counts, not a density.Cross-repo
main.verify.ymlis green by construction: no manifest changed.bias-history.yml's normal push regeneration.🤖 Generated with Claude Code
https://claude.ai/code/session_016BHBDqfybkLJqnQt9AoyTt