corpus: re-bless the api columns against engine main (gitgalaxy#2729) - #57
Merged
Conversation
100 manifest cells across 27 languages, re-blessed mechanically from one full-precision scan at engine main 19262fb0 -- no hand-edited numbers. Two causes, both upstream fixes that have already merged: * gitgalaxy#2731 (shipped as #2734) -- api_orphan_credit 3 -> 0 in a/b/c for 25 languages (makefile 4 -> 3 in c.mk). The Contextual Baseline Fix now credits only the orphans the api rule did not already declare, so a probe that is both declared public and uncalled stops counting twice. New ledger entry api-declared-orphans-are-not-new-surface, and the entry that predicted this -- api-double-count-inflates-scored-api -- flips still_reproduces to false with the go/a.go numbers that verify it. * gitgalaxy#2730 (shipped as #2743) -- api 0 -> 3 per file (4 in main) for abap, ada, dart, matlab and perl, whose own visibility idiom the api rule could not see before it was given a stated contract; and c 6/9/7/7 -> 4/5/3/3, where the rule had been counting body-local declarations and two-word statements (`return NULL;`) as public surface. api-no-plantable-idiom narrows from seven languages to objective-c and sqlite, with the reason each of those two stays recorded. shell's plant moves from `export PROBE_GLOBALS=1` to `export -f probe_globals`. #2730 made the `-f` form matchable, and it is the only way a shell script publishes a FUNCTION rather than a variable -- the old plant was green for the wrong reason. api is unchanged at 3 per file; the cost is api_orphan_credit 3 -> 0, so shell joins api-export-names-suppress-orphan-credit, which now records why that trade is worth making here when it was refused for makefile and m4. Verification: verify_language.py 46/46 PASS, na_check.py --ci clean (0 unreviewed absences), bias_report.py --gate exit 0 with 0 unexplained out-of-band cells. Ledgered cells fall 194 -> 184 and derived 116 -> 115: fewer cells need excusing because fewer are out of band. raw_arch_api rises 0 -> 3.25 for abap and ada and falls 7.25 -> 3.75 for c, which is the language bias gitgalaxy#2729 was filed for, measured gone. Closes #56. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfeHRWra1d6Z5uSReFajSq
squid-protocol
added a commit
that referenced
this pull request
Sep 5, 2026
Conflict was in the generated report only: bias-history auto-committed a regenerated docs/ set on main (2d18562) after #57 merged, while this branch carried its own regen. Resolved the same way as any generated file -- took origin/main's docs/, then re-ran bias_report.py so they are recalculated from the merged ledger rather than stitched together. deviation_ledger.json merged clean and both narrowed entries survived verbatim. The regenerated delta against origin/main is exactly the narrowing and nothing else: ledgered 185 -> 180, derived 115 -> 120, and the two retired entries drop out of ada / dockerfile / haskell / yaml's findings tables (their explained-by- ledger counts fall 7->5, 14->12, 12->10, 14->12). Gate still exit 0, 0 unexplained. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfeHRWra1d6Z5uSReFajSq
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.
Closes #56.
Corpus half of squid-protocol/gitgalaxy#2729, and the paired re-bless owed by
squid-protocol/gitgalaxy#2743 (
rosetta:rebless-owed).100 manifest cells across 27 languages, re-blessed mechanically from one full-precision scan at
engine main
19262fb0— no hand-edited numbers.Two causes, both already merged upstream
1.
api_orphan_credit3 → 0 — gitgalaxy#2731, shipped as #273425 languages in a/b/c, plus
makefile4 → 3 inc.mk.api_orphan_creditisarch_api − raw_arch_api: what galaxyscope's Contextual Baseline Fix addson top of the api rule's own count when an imported file has uncalled functions. It used to add
all of them, so a function that is both declared public and uncalled counted twice —
data/go/a.gorecordedfunction_count3,raw_arch_api3,raw_state_slop_orphans3 andarch_api6. The fix credits onlyorphans − api_declared_orphans. In this corpus every probeis declared public by its own language's idiom (that is exactly what #2729's wave planted) and
uncalled in its own file, so the overlap is total and the credit is correctly 0.
New ledger entry
api-declared-orphans-are-not-new-surface. The entry that predicted this —api-double-count-inflates-scored-api, whose verdict said it "resolves when #2731 credits only theorphans the rule did not already count" — flips
still_reproducesto false, with the verifyingnumbers:
go/a.goarch_api3 (was 6),risk_api_exposure3.022 (was 5.939),risk_documentation40.613 (was 79.155).The cost, recorded rather than worked around: the credit was the gate's only assertion that the
main→a→b→c chain resolved — it is how gitgalaxy#2543 and #2540 were caught. 26 of 46 languages now
assert 0 for it. The chain is still asserted by every language's
importcount and by the 20languages whose api rule does not reach every probe.
2.
apimoves — gitgalaxy#2730, shipped as #2743abapFORMsubroutine is public by defaultadadart_matlabfunctionis its file-level surfaceperlsubis package-public, and the only perl form that does not also move a plantedstate_mutationorimportccis the "too broad" direction:return NULL;alone was 513 of 8675 matches on thelanguage-crucible corpus. Its manifest note said "api counts every external-linkage (non-static)
file-scope declaration"; that is now true, where before it also counted every indented one.
api-no-plantable-idiomnarrows from seven languages to two, with the reason each survivorstays:
objective-c— the rule can now see an@interfacemethod declaration, so the engine half isdone, but planting an
@interfacewould create a class and SPEC.md rule 2 pinsclass_startat0 as a false-positive tripwire in every language. A corpus constraint, not a rule gap.
sqlite— unchanged: every spelling its rule accepts (CREATE [TEMP] VIEW,CREATE VIRTUAL TABLE) is afunc_startorclass_starthit, so there is still no form that does not move aplanted count.
One plant change:
shellexport PROBE_GLOBALS=1→export -f probe_globals, in all four files.#2730 made the
-fform matchable — the old rule demanded a bare identifier straight afterexport, so shell could only ever measure exported variables, and the plant's variable namemerely resembled the probe.
apiis unchanged at 3 per file; the count was never the point. Thecost is that
export -f probe_globalsnames the function, so under gitgalaxy#2727'sname-recurrence census the probe stops reading as an orphan and
api_orphan_creditdrops 3 → 0 —shell joins
api-export-names-suppress-orphan-credit, which now records why that trade is worthmaking here when it was refused for
makefileandm4: it is no longer a distinctive cost, since25 other languages reach the same place in this same PR, and the alternative is measuring the wrong
construct.
Verification
verify_language.py— 46/46 PASSna_check.py --ci— clean, 0 unreviewed absencesbias_report.py --gate— exit 0, 0 unexplained out-of-band cellsLedgered cells fall 194 → 184 and derived 116 → 115: fewer cells need excusing because fewer are
out of band. The headline is
raw_arch_api, the column #2729 was filed about —abapandadarise 0 → 3.25,
cfalls 7.25 → 3.75, andrisk_api_exposure/risk_documentationcome into bandwith them. The
jcl/risk_api_exposureregistry mismatch in the report header is byte-identical towhat is already on
main: pre-existing, unchanged, already carried byapi-contextual-baseline-fix.Cross-repo
the
rosetta:rebless-owedlabel and itsrosetta-auditnamed these languages before merging.verify_language.py46/46 andbias_report.py --gateexit 0, both restored here.ENGINE_REF/KEYWORD_ROSETTA_REFare retired, and this was blessed againstengine
main, perdocs/GATING.md's cross-repo flow.bias-history.ymlregenerates the report and closes corpus owes a re-bless against engine main #56; thentools/issue_status.pyfor the languages that moved, per gitgalaxy#2669 F.6.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WfeHRWra1d6Z5uSReFajSq