Repository navigation
Description
Child of epic #2560. Full assessment with the cell-family breakdown: https://claude.ai/code/artifact/9bc0a5a3-5268-4e6a-8d2c-ea8924a45889
This issue is the handoff surface. Every session (any model, any vendor) working rosetta reads
this issue top to bottom including comments before touching anything, claims one item by
comment, and leaves a status comment when it stops. The per-language issues (#2561–#2607) are
not the work queue; they get a scripted status comment after each batch's regen (Batch E).
Session start protocol (every session, every time)
gh issue view <this> --comments— the last comment per item is its true state.- Re-bless check (replaces the pin check, retired by Cross-repo choreography is circular, and every way it broke today failed green — drop the ENGINE_REF dance, machine-check the invariants #2682/ci: rosetta-audit without pins -- baseline-classified, refuses to no-op (#2682) #2699):
gh issue list --repo squid-protocol/keyword-rosetta --search "corpus owes a re-bless against engine main" in:title --state open. If that issue is open, the corpus is behind engine main and the first job is the re-bless it lists. There is no pin to compare any more (KEYWORD_ROSETTA_REFdeleted 2026-09-04). - Read
docs/bias_data.json/docs/bias_report.mdfrom keyword-rosetta main —bias-history.ymlregenerates it on every corpus push and nightly against engine main, and the report header names the engine SHA. Do not regenerate locally to triage; regenerate only to verify a change before a PR. - Claim: comment
claiming <item id> — <model> — branch <name>. One item per session unless the
item says "fan-out". - Stop: comment
status <item id>: <done|blocked|partial> — <branch/PR> — <what remains>.
Unfinished branches are pushed, never left local. - Never mix layers in one PR (rule regex | slicer/DAG | scoring). One
Closes #Nper line in PR bodies — a comma-list closes only the first (yaml: missing "ownership" rule — action.yml author: / OpenAPI info.contact: idiom uncaptured #2646/yaml: missing "cleanup" rule — shell-embedded teardown verbs (rm -rf <path>, docker rm/down, kill) inside run:/script: blocks uncaptured #2647 stayed open for a day because of it). - From Batch F on, claim a family, not a language or a batch (F.5 is the one fan-out).
Model tiers
| tier | use for | why |
|---|---|---|
| T1 — Fable / Opus | classification across languages, writing fix shapes, ledger verdicts, attributing regen movers, every golden-master bless review, Batch D | judgment work; the failure mode is a plausibly-explained wrong number baked into a baseline |
| T2 — Sonnet | implementing a filed fix shape + strict tests, the regen/PR mechanics after a T1 review, tools scripting in Batch E, resolver fix in C | bounded tasks with a machine gate (verify_language.py, pytest, crucible_check.py) |
| T3 — Haiku / Gemini flash-class | the 32 per-language decoy edits (fan-out), #2660's 11 per-language anchor checks (fan-out), capstone prose from the template | templated, one language at a time, each self-checked by the verifier before it can be wrong |
Rule of thumb: a T3 item must have a mechanical pass/fail the model runs itself; a T2 item must
have a written fix shape from T1; T1 owns anything that ends in a manifest number or a bless.
Batch 0 — unblock the gate owner: repo admin tier: none
- 0.1
gh api -X PATCH repos/squid-protocol/gitgalaxy/actions/variables/KEYWORD_ROSETTA_REF -f value=<corpus main sha>thengh workflow run rosetta-audit.yml --ref main→ green. (Run 33657474420 proved the stale state: 13 languages fail = PR Update README with improved mapping description #29's set.) - 0.2 Process: add "bump KEYWORD_ROSETTA_REF" as the last checklist line of the engine-PR template's Cross-repo section.
Batch A — corpus only (keyword-rosetta), one PR, one regen
- A.1 fan-out, T3 — decoy migration per rosetta#17 template (PR test(security): add comprehensive test suite for security and complia… #23 is the worked example) for: ada apex c cpp csharp dart dockerfile embedded_python go groovy haskell java javascript kotlin livecode lua m4 makefile matlab objective-c perl php powershell ruby scala scheme shell solidity swift tcl typescript zig. Done criterion per language:
verify_language.py <lang> --reportshows exactly +1high_risk_executionfrom the new literal and no other delta vs the current manifest except removed decoy hits. Each language = one commit on the shared branchcorpus/decoy-migration-wave2. - A.2 T2 — css/html empty probe bodies: plant css doc/globals/ownership/safety_bypasses and html cleanup/telemetry per SPEC.md; ~20 cells.
- A.3 T2 — authoring fixes: perl
=cut; apexType.forNamechain (gives apex a DAG); agc CA-register args; header@authorswaps apex/agc/fortran; yaml single doc plant (drop one of name:/description:); cobol*> @returnline (cobol: doc rule's AUTHOR-vs-ownership collision needs a corpus-side doc line planted before the engine fix (#2659 follow-up) #2661 step 1). Plus the four languages A.1's list missed — abap, assembly, cobol, sqlite still carry the retired shared sentence translated into their own vocabulary ('IF TRUNCATE FAILS TRY SELECT AGAIN',"if jmp fails try syscall again",'IF ALTER FAILS TRY OPEN AGAIN','IF UPDATE FAILS TRY SELECT AGAIN'): same rosetta#17 template, same per-language gate, and screen the keyword against therisk_*inputs and the filler words too (see A.1's status comment for what that catches). - A.4 T1 — ledger: extend Tier-2 args-morphology entry to css/html/yacc/yaml/makefile/dockerfile/sqlite (not agc — A.3's
CA Aplant already took it to the median); normalise every entry'ssignalto|-joined metric names (needed by E.1). - A.5 T1 — regen (
bias_report.py), attribute every mover, manifest notes, PR with Cross-repo section. Expect branch/io/safety medians to move; say so in the body. → keyword-rosetta#32 (Batch A). Pin bump owed after merge.
Batch B — engine batch 3 (gitgalaxy), one PR + one corpus rebless + pin bump
- B.1 T1 — file: doc-block double-count (java groovy kotlin php scala:
/**+@param; solidity///+@param; apex@authorin doc, livecode (+~14 siblings): doc rule claims 'Author:' which ownership already owns — every header author line double-counts (ada has the correct pattern) #2659 shape; cobol cobol: doc rule's AUTHOR-vs-ownership collision needs a corpus-side doc line planted before the engine fix (#2659 follow-up) #2661 step 2). One issue, fix shape = count a docblock once (pair opener with tags, python/embedded_python: doc rule counts each docstring twice (open and close delimiters both match, no pairing) #2658 precedent). → doc rules count one doc comment once per marker AND once per tag — 18 languages, 8 red rosetta cells (the #2658 shape, unswept) #2672, family widened to 18 languages (adds c cpp objective-c dart javascript typescript swift yacc csharp as latent off-corpus double-counters); absorbs perl doc: a correctly-closed POD block counts twice (=pod + =cut) — the #2658 delimiter shape #2670 and cobol: doc rule's AUTHOR-vs-ownership collision needs a corpus-side doc line planted before the engine fix (#2659 follow-up) #2661 step 2. apex@authoris dormant, not a live cell — A.3 dodged it corpus-side; fix shape covers it anyway. - B.2 fan-out, T3 — globals rule audit: 11 more languages share zig/dart's ^[ \t]* any-indentation anchor (#2651 follow-up) #2660: for each of assembly cpp css dockerfile go haskell kotlin livecode lua perl scheme, scratch-scan an indented same-named declaration; report real/not-real with the scan output. T1 decides the list. → report on globals rule audit: 11 more languages share zig/dart's ^[ \t]* any-indentation anchor (#2651 follow-up) #2660. Only
gois real with the zig + dart: globals rule anchors ^[ \t]* so function-local var/const count as globals (+150% on the rosetta corpus) #2651 fix shape. assembly/css/lua/perl: fix harmful (indentation is not scope). cpp/dockerfile/haskell: inert or 0 incidence. livecode: not in the family (no anchor). kotlin/scheme: real FP but the col-0 anchor deletes the true positive too — need their own issue. B.3 ships go only. - B.3 T2 — implement B.1 + confirmed B.2 + yacc: %union type declarations have real record/struct morphology but class_start is wired None #2644 html: srcdoc attribute (embedded document + script) is invisible to every structural signal #2645 yaml: missing "ownership" rule — action.yml author: / OpenAPI info.contact: idiom uncaptured #2646 yaml: missing "cleanup" rule — shell-embedded teardown verbs (rm -rf <path>, docker rm/down, kill) inside run:/script: blocks uncaptured #2647 swift: api rule matches bare 'open' anywhere, including inside string literals #2544 groovy func_start: paren-less builder call (
raw _("x")) misdetected as function when no longer masked by a nested FP #2558, each with strict positive/negative tests (+ ReDoS detonation for new quantified regexes) intests/extraction/languages/test_<lang>_strict.py. → DONE: wave 1 fix(core-engine): Rosetta batch 3 wave 1 — five registry-regex fixes with no corpus movement (#2669) #2677 (go/kotlin/swift/groovy + groovy func_start: statement keywords (new/return/throw) pass as prefix tokens, so 'throw new Foo(x)' and 'return bar(x)' misdetect as declarations — 8.6% of real branch-1 matches #2676), wave 2 fix(core-engine): Rosetta batch 3 wave 2 — doc-comment pairing, rule over-claims, three None rules (#2669) #2681 (doc family 17 langs, apex apex import rule: re.IGNORECASE neutralises the [A-Z] guard, so every qualified reference (foo.bar) counts as an import #2671, safety_bypasses/io over-claim: four rules count tokens another rule owns (livecode global, lua _G+collectgarbage, fortran COMMON, dockerfile apt-get clean) — the #2659 shape #2675 three langs, html/yaml None rules). yacc: %union type declarations have real record/struct morphology but class_start is wired None #2644 pulled (needs a slicer-layer allowlist change); fortran withdrawn from safety_bypasses/io over-claim: four rules count tokens another rule owns (livecode global, lua _G+collectgarbage, fortran COMMON, dockerfile apt-get clean) — the #2659 shape #2675 (documented intentional double-classification). - B.4 T1 — post-A residuals: sqlite io 11, tcl io 8, haskell/livecode/lua safety_bypasses 4 — classify, file with fix shapes, add to B.3 only if regex-level. Re-read sqlite's io after A.3 migrates its decoy: the old sentence's
SELECTis an io keyword there, so part of that 11 is corpus-side, not engine-side. Same caution for tcl (A.1 already took its io 2→1 by dropping the proseopen) and for haskell/livecode/luasafety_bypasses. → all figures were pre-A and the set was incomplete. Post-A: io RED sqlite 9, tcl 7, dockerfile 5 (missed); safety_bypasses RED lua/livecode/haskell 4 and swift/sqlite/html 0 (the low side, entirely missed), amber apex/fortran 3, yaml 1. Split: engine-side regex → safety_bypasses/io over-claim: four rules count tokens another rule owns (livecode global, lua _G+collectgarbage, fortran COMMON, dockerfile apt-get clean) — the #2659 shape #2675 (livecode/lua/fortransafety_bypasses+ dockerfileioall claim tokens another rule owns; all four land on planted — B.3 material). Corpus-side → keyword-rosetta#33 (emptyprobe_bypassin html/sqlite/swift, half-planted yaml, apex risk-idiom collision, sqlite decoy via SELECT). Remainder is ledger, not fix: tclsourcedual import/io, the cleanup-closefamily in c/lua/tcl, haskellunsafePerformIO(unavoidable). - B.5 T1 — scoped-diff check, golden-master bless (user go-ahead), corpus rebless PR with
ENGINE_REF=pull/N/head, pin bump in the engine PR. → DONE: scoped diff 710 diffs / 0 unexplained; both golden masters blessed (e994d2a); corpus rebless keyword-rosetta#35 merged with ENGINE_REF=pull/2681/head; pin bumped to 216d57ab (full 40-char SHA).
Batch C — graph layer (gitgalaxy), parallel with A/B
- C.1 T1 — filed as network_risk_sensor: dependency resolver drops relative imports that carry an extension (./b.sh -> key 'sh'), zeroing every network metric for shell/powershell/yaml/javascript #2668:
network_risk_sensor._resolve_targetrewrites./b.sh→//b/sh, looks upsh, builds no edge; zeroes popularity/betweenness/closeness/producer_ratio for shell, powershell, yaml, javascript. Guard already exists ingalaxyscope.py~L1870. → DONE — filed as network_risk_sensor: dependency resolver drops relative imports that carry an extension (./b.sh -> key 'sh'), zeroing every network metric for shell/powershell/yaml/javascript #2668 with the fix shape and the four token forms. - C.2 T2 — implement: strip leading
.//../, skip dot→slash when the trailing segment is a known extension; strict test with the four token forms + typescript/c controls. Add_dependency_capturefor m4include()and yacc#include(scheme: no _dependency_capture — whole DAG missing, and orphan->api conversion can never fire (tech-debt systematically inflated) #2652 shape). → fix(core-engine): graph layer — relative-import resolution (#2668) + m4/yacc dependency capture (#2669 C.2) #2685 MERGED (aacfe5da). Shipped as ordered lookup forms rather than a known-extension gate — literal path first, dot-rewrite last — which needs no extension set in the sensor and cannot regress (272-case differential vs the legacy implementation: 26 changes, allNone→correct or wrong→correct). m4/yacc captures included. New bug found while attributing the diff: galaxyscope popularity tally: a bare filename import raises popularity on every same-stemmed file in the repo, unscoped by language or directory (#2540's shape, in the tally instead of the DAG) #2684 (the popularity tally credits every same-stemmed file in a scan — fortran USE targets resolve case-sensitively in the dependency DAG (uppercase legacy style loses the whole import graph) #2540's shape in the tally rather than the DAG). - C.3 T1 — bless review: real repos with
./x.jsimports gain edges; the diff must be graph-only. Corpus rebless PR; remove m4/yacc fromno-dependency-capture-languages. → DONE: diff verified graph-only (no extraction-signal column moved); both golden masters blessed (160 zero-dep / 165 full-precision, byte-identical to the pre-bless attribution); corpus rebless keyword-rosetta#38 MERGED withENGINE_REF=pull/2685/head; ledger entry retired (languages_seenemptied,still_reproducesfalse); bias report red 270 → 236 with all 38 band changes improvements.ENGINE_REFreset open as keyword-rosetta#39; pin bump still owed after it merges.
Batch D — design pass (gitgalaxy) tier: T1 only blocked on A, B, C merged
- D.1 design issue: shape-descriptor invariance (avg_func_complexity, control_flow_ratio, cog_raw, gini, internal density, structural_mass — 166 cells), risk formulas: audit language-tier membership (embedded_python lands tier3) + decide how rosetta bias reporting treats documented Fc/Irc tier constants #2653 tier constants, ×3 flux (state-flux ×3 branch-context weighting: undocumented, and phantom-triggered by branch keywords inside string literals #2546) with matlab: mandatory 'out = x' return-convention assignments count as state_mutation (+450% vs median) — intended? #2654 as sub-case. Options: normalise against planted branch count / exclude as documented design / ledger as morphology. User approval before any edit. → Design (D.1): shape-descriptor comparability — the 160 cells decompose into five mechanisms, only 15 of which are a real design question #2689. The premise did not survive measurement: the 160 cells (not 166 — post-C figure) are five mechanisms wanting four different answers, and none of them needs an engine code change. 18 = markdown/html have zero functions so every per-function descriptor is undefined (report n/a, GATING.md's None-rule precedent). 30 =
control_flow_ratiodivides bystructural_boundaries, which the corpus never plants, gates or displays — branch is pinned at 3-4 while the denominator ranges 0-45, so "normalise against planted branch count" cannot help. 92 = composites of inputs that are already ledgered (E.1 just needs to follow derivation edges). 5 = slicer segmentation. 15 = the real question: mainstream languages whose inputs are all in band but whose composite is not, i.e. formula non-linearity. Also tested and REJECTED the median-mixes-populations hypothesis (procedural-only median moves the counts by 0-1 cells). - D.2 implement per approved design; large rebless; corpus regen. → DONE: keyword-rosetta#41. Five validated ledger entries take the shape family to zero unexplained cells and the corpus-wide count 224 → 175. No engine change, as D.1 predicted — but verifying each mechanism instead of asserting "morphology" turned up two real engine bugs, filed as functions_found counts the slicer's synthetic __global_context__ buckets, inflating every per-function descriptor for 5 languages #2691 (the slicer's
__global_context__bucket counted as a function in 5 languages, diluting every per-function descriptor) and ada: a single typed parameter counts as 3 args — the comma-free whitespace-split fallback splits 'Env : Integer' into three tokens #2692 (ada counts one typed parameter as three via a whitespace-split fallback). D.1's own recommendation to plantstructural_boundarieswas withdrawn: it is a per-language vocabulary tally, not a structural count, so planting cannot equalise it.
Batch E — bookkeeping
- E.1 T2, can start now — keyword-rosetta tools: after A.4,
bias_report.py/language_deviations.pymark a red cell "explained" when a validated entry names that metric+language; exit code = epic close criterion. → keyword-rosetta#40. 444 out-of-band cells, 220 already accounted for (116 ledgered, 92 derived, 12 undefined), 224 genuinely unexplained — the ledger was carrying 116 answers the report never read, machine-readable only because A.4 normalised thesignalfields.--gateexits nonzero while anything is unexplained (off by default;verify.ymlunaffected).control_flow_ratio(21 cells) deliberately left unexplained rather than marked derived, because its denominatorstructural_boundariesis unplanted — see Design (D.1): shape-descriptor comparability — the 160 cells decompose into five mechanisms, only 15 of which are a real design question #2689 bucket B. - E.2 T2 — script: one status comment per language issue from
bias_data.json+ ledger (before/after bands, buckets, owning batch). Run after each batch regen. rosetta[jcl]: cross-language consistency — 13 red / 7 amber metrics, 2 ledgered shapes #2581's jcl comment is the template. → DONE: keyword-rosetta#43.tools/issue_status.pygenerates each language's status comment frombias_data.json+ ledger with the gate's own verdicts; posted to all 46 (rosetta[abap]: cross-language consistency — 3 red / 3 amber metrics, 2 ledgered shapes #2561–rosetta[zig]: cross-language consistency — 4 red / 2 amber metrics, 5 ledgered shapes #2607). Resolves issues by title search, not a stored map. - E.3 T3 —
generate the 41 missing §10 capstones→ re-scoped by docs: rosetta capstones for the two languages that qualify (#2669 E.3) #2696: a capstone is written when a language's tracking issue closes, as part of closing it (thelanguage-statusskill forbids a §10 before a real sweep). abap + groovy delivered; shell needs §1–§9 first. Standing rule, owned by F.6. - E.4 T1 — close per-language issues whose tool exit code is 0; comment the criterion that applies. → DONE: abap rosetta[abap]: cross-language consistency — 3 red / 3 amber metrics, 2 ledgered shapes #2561, groovy rosetta[groovy]: cross-language consistency — 2 red / 2 amber metrics, 4 ledgered shapes #2576, shell rosetta[shell]: cross-language consistency — 1 red / 5 amber metrics, 5 ledgered shapes #2599 closed — the three whose gate exits 0. Each closing comment states what the criterion is not: all three still have out-of-band metrics; what makes them clean is that every one carries a recorded reason. Flagged, not silently fixed: cobol rosetta[cobol]: cross-language consistency — 4 red / 8 amber metrics, 5 ledgered shapes #2567 and jcl rosetta[jcl]: cross-language consistency — 13 red / 7 amber metrics, 2 ledgered shapes #2581 are closed but no longer pass the gate (closed pre-E.1 under human judgement) — reopening is an epic-owner call.
Batch F — the last 152, one cause family per session approved 2026-09-04
Plan: https://claude.ai/code/artifact/0f9f00d4-818e-4895-9e52-7ceb5fa4fc4d. State at approval: bias_report.py --gate unexplained = 152 (444 → 224 → 175 → 152), corpus main 6d26261 vs engine a334839. The regen is free and automatic now, so the unit of work is a cause family, not a batch-and-regen. Each session ends with one number here: unexplained before → after, read from corpus main the next morning.
- F.1 T1 decided, T2 build → keyword-rosetta#48 (152 → 91 with F.2; leaks filed as length leaks: func_internal_density, avg_func_loc and control_flow_ratio read file length with content and tier held equal (rosetta F.1 design pass) #2705; tier must be held equal — see status comment) — — verbosity family (
keyword_hits17,coding_loc13,total_loc12,token_mass7 = 49 cells). Decision: out of the gate. They measure how long the 12-probe program came out, which the corpus does not control (mainstream languages all sit within a few % of the median; the out-of-band tail is markdown/m4/yacc/jcl/css/html/dockerfile/makefile/yaml/sqlite short, haskell/scheme dense). Report them as a context group, excluded from banding and--gate; say so in SPEC.md + GATING.md. Plus the length-leak check: for each derived metric, over the languages whose planted inputs for it are all on the median, correlate the metric againstcoding_loc; a strong correlation is ONE engine finding on that formula (cite the source line, asDERIVED_INPUTSdoes), not N language cells. Known candidates:dependency_density(= import / (coding_loc × control_flow_ratio)),cog_raw's LOC term,structural_mass'sloc/50,risk_tech_debtLOC normalisation (risk formulas: audit language-tier membership (embedded_python lands tier3) + decide how rosetta bias reporting treats documented Fc/Irc tier constants #2653's note). Each flag becomes a UEF small-file normalization isn't achieving its intent — redesign scoring so identical intent scores identically regardless of file size (design pass for Fable) #2655-style design question, filed as an engine issue, not fixed in this PR. Expected: 152 → ~103 before any leak is acted on. - F.2 T2 → keyword-rosetta#48 (12 cells derived; betweenness js/python → F.5) — — derivation edges for the graph family (
dependency_density10,dependency_links2,betweenness_score2):dependency_density→ (import,coding_loc,control_flow_ratio),dependency_links→import, betweenness → the DAG inputs, each with the record_keeper/sensor line cited. Same keyword-rosetta tools PR as F.1. markdown'sdependency_density0.75 with a None import rule does not fit the formula — send it to F.5 if it survives. Expected 8–10 of 14 become derived. - F.3 T1 design → keyword-rosetta#50 (91 → 67; stratified tier medians + ungated unplanted inputs + vocabulary label; membership audit on risk formulas: audit language-tier membership (embedded_python lands tier3) + decide how rosetta bias reporting treats documented Fc/Irc tier constants #2653 awaiting a decision) — — risk formulas: audit language-tier membership (embedded_python lands tier3) + decide how rosetta bias reporting treats documented Fc/Irc tier constants #2653 tier constants (33
risk_*cells with every input in band; ~20 are tiers). Evidence:risk_tech_debtis byte-identical (29.88) across exactly the engine's tier-1 set {csharp, dart, go, java, rust, swift, typescript};risk_documentationsteps 29.9 / 40.8 / 55.8 by tier with doc/ownership on plant. Decision: option (a) —bias_report.pydivides Fc/Irc out before banding, raw values stay inbias_data.json; plus the membership audit risk formulas: audit language-tier membership (embedded_python lands tier3) + decide how rosetta bias reporting treats documented Fc/Irc tier constants #2653 already narrowed (embedded_python is python). Classify the 13 non-tier cells in the same session:risk_api_exposure/risk_documentationat 0 for ada/haskell/sqlite/yaml/dockerfile (theapi == 0short-circuit A.2 met in css),risk_concurrencyon a zero median for agc_assembly/swift,risk_stabilitymarkdown. Output: design comment on risk formulas: audit language-tier membership (embedded_python lands tier3) + decide how rosetta bias reporting treats documented Fc/Irc tier constants #2653, then one corpus tools PR, and an engine PR only if membership changes. - F.4 T1 classify → T2/T3 execute — orphan/api/encapsulation census (
raw_state_slop_orphans16,raw_arch_api10,def_encapsulation7,encapsulation_ratio5,state_slop_duplicates1 = 39). Outputs of galaxyscope's Contextual Baseline Fix, mostly on no-call-graph languages (dockerfile, makefile, markdown, yaml, sqlite, jcl, css, html) plus a mainstream tail (python, go, perl, zig, javascript). Method:galaxyscope --db-only --debug, read[WORKER-TRACE] extracted functions forper language (CLAUDE.md recipe), sort into (i) no call graph so every probe is an orphan, (ii) orphan→api conversion via popularity, (iii) genuine over-count (orphan census counts non-function shapes on non-call-graph languages, making orphan→api conversion unauditable #2547 shape). Verify (iii) on language-crucible before filing — B.2's lesson. Expected: one ledger family for the no-call-graph languages (~25 cells), a few plants, at most one engine issue. - F.5 fan-out, T3 + T1 verdicts — the 17 single cells:
classes_foundcobol/css/dockerfile/jcl/kotlin,class_startcobol/css/jcl/yaml,argsm4,globalscsharp,high_risk_executionyacc,state_mutationyaml,testyaml,functions_founddockerfile/html/sqlite, plus whatever F.2 leaves. Per cell: reproduce withverify_language.py <lang> --report, one paragraph of cause, propose plant / rule fix / ledger; mechanical check = the change moves exactly that cell and nothing else in the manifest. yacc: %union type declarations have real record/struct morphology but class_start is wired None #2644 (yaccclass_start) stays blocked on the detector allowlist and may end as a ledgered n/a. One corpus PR per wave of accepted verdicts; engine cells filed with fix shapes. - F.6 T2, standing — closure loop after every nightly regen:
tools/issue_status.py <lang> --postfor languages that moved; close any language whoselanguage_deviations.pyexits 0, writing its capstone as part of closing (E.3's rule); reopen any closed language that no longer passes (decision 2026-09-04: F.6 owns reopening automatically — today cobol rosetta[cobol]: cross-language consistency — 4 red / 8 amber metrics, 5 ledgered shapes #2567 and jcl rosetta[jcl]: cross-language consistency — 13 red / 7 amber metrics, 2 ledgered shapes #2581 fail the gate, abap rosetta[abap]: cross-language consistency — 3 red / 3 amber metrics, 2 ledgered shapes #2561 drifted to 1 amber). apex, matlab and solidity qualify for closure today.
Order is by cells closed per decision: F.1+F.2 (one PR, → ~95) → F.3 (→ ~75) → F.4 (→ ~45) → F.5 (→ ~0), F.6 throughout. Housekeeping done at approval: #2544 + #2558 closed (shipped in #2677, comma-list Closes), keyword-rosetta#17 closed (40/40 migrated), KEYWORD_ROSETTA_REF variable deleted.
Stacking rules (unchanged from GATING.md, restated so no session has to rediscover them)
- Commit corpus edits before verifying (census walks tracked files only).
- Every manifest number cites a validated ledger entry; unexplained delta = stop.
- One layer per engine PR; one corpus rebless PR per engine PR, opened against engine main after the engine PR merges (label the engine PR
rosetta:rebless-owedwhen it moves the corpus). NoENGINE_REF, no pin. - Scoped-diff check before every bless; unrelated movers are attributed to a named merged PR or the bless waits.
- Worktrees outside any path containing a
tmpcomponent.
Activity
squid-protocol commentedon Sep 2, 2026
claiming A.1 — claude-opus-5 — branch `corpus/decoy-migration-wave2` (keyword-rosetta)
Session-start checks:
Running the 32 languages sequentially rather than fanning out to T3 sessions (single-session run, same mechanical gate per language: `verify_language.py --report`, one commit per language). Will report per-language results here.
squid-protocol commentedon Sep 2, 2026
status A.1: done — branch
corpus/decoy-migration-wave2(keyword-rosetta, pushed, 32 commits, one per language). No PR yet: Batch A is one PR + one regen, so A.1 waits for A.2–A.5 on the same branch.All 32 languages migrated to the danger-only string decoy per rosetta#17 / SPEC §String decoy, and all 32 gates PASS. Baseline was green for all 32 before the first edit, so every number below is a clean before→after.
Method (the mechanical self-check this item asked for)
Keyword choice was not eyeballed. For each language I ran the candidate literal through the language's live compiled rules (
tools/_registry.active_rules) and required:high_risk_executionmatch, andPLANTED/measure columns plus the seven non-planted signals that feed arisk_*formula (concurrency,sync_locks,reflection_metaprogramming,immutability_locks,spec_exposure,debug_prints,llm_api), derived from_registry.risk_dependencies()rather than assumed.That rule reproduces all three pilot choices unaided (python
eval, fortran rejectsGOTOforASSIGN, rustabort), which is what made me trust it. It also caught things a reading wouldn't:Thread.Abort(csharp) andThread.stop(java) hitconcurrency→risk_cognitive_load/risk_concurrency;iex(powershell) hitsreflection_metaprogramming→risk_cognitive_load. All three were rejected. Filler words were checked the same way:textmatches dart's and embedded_python'sui_frameworkrule, so those two useplain <kw> decoy line. Unscored collateral (panics_and_aborts,ipc_rpc_bridges,serialization_parsing,structural_boundaries) was allowed and is named in each commit.Then, per language: edit → commit (census walks tracked files) →
verify_language.py --report→ account for every delta → manifest + decoy entry + notes → gate.Results
OS_Exitb.adbhigh_risk_execution0→1,branch1→0,state_mutation6→2emptyRecycleBinb.clshigh_risk_execution0→1,branch2→0,safety1→0,state_mutation6→2systemb.chigh_risk_execution0→1,branch1→0,io1→0,state_mutation9→3systemb.cpphigh_risk_execution0→1,branch1→0,safety1→0,state_mutation9→3Process.Startb.cshigh_risk_execution0→1,branch2→0,safety1→0,state_mutation6→2exitb.darthigh_risk_execution0→1,branch2→0,safety1→0,state_mutation6→2evalb.dockerfilebranch1→0,io1→0,state_mutation4→2machine.resetb.pyhigh_risk_execution0→1,branch2→0,safety3→2,io1→0,state_mutation6→2os.Exitb.gohigh_risk_execution0→1,branch1→0,state_mutation11→5executeb.groovyhigh_risk_execution0→1,branch2→0,safety1→0,state_mutation6→2dieb.hshigh_risk_execution0→1,branch1→0,safety1→0,state_mutation6→2Unsafeb.javahigh_risk_execution0→1,branch2→0,safety1→0,state_mutation6→2evala.jshigh_risk_execution0→1,branch2→0,safety3→2System.exitb.kthigh_risk_execution0→1,branch2→0,state_mutation6→2answerb.lchigh_risk_execution0→1,branch2→0,safety1→0,state_mutation9→3os.removeb.luahigh_risk_execution0→1,branch1→0,state_mutation6→2esyscmdb.m4high_risk_execution0→1sudob.mkhigh_risk_execution0→1,io1→0exitb.mhigh_risk_execution0→1,branch2→0,safety1→0,io1→0,safety_bypasses3→2,state_mutation14→6abortb.mmhigh_risk_execution0→1,branch1→0,state_mutation9→3systemb.plhigh_risk_execution0→1,branch2→0,safety1→0,io1→0,state_mutation9→3popenb.phphigh_risk_execution0→1,branch2→0,safety1→0,state_mutation6→2killb.ps1high_risk_execution0→1,branch2→0,safety1→0,io1→0,state_mutation6→2systemb.rbhigh_risk_execution0→1,branch1→0,safety_bypasses3→2,state_mutation6→2Runtime.getRuntime.execb.scalahigh_risk_execution0→1,branch2→0,state_mutation6→2evalb.scmsudob.shhigh_risk_execution0→1,branch1→0,io1→0,safety_bypasses3→2,state_mutation6→2selfdestructb.solhigh_risk_execution0→1,branch2→0,state_mutation9→3assertionFailureb.swifthigh_risk_execution0→1,branch2→0,api4→3,state_mutation6→2execb.tclhigh_risk_execution0→1,branch2→0,safety1→0,io2→1,safety_bypasses3→2,state_mutation9→3evalb.tshigh_risk_execution0→1,branch2→0,safety1→0,state_mutation6→2std.process.exitb.zighigh_risk_execution0→1,branch2→0,safety1→0,state_mutation6→2Placement: every literal already sat inside its
probe_state-family function except javascript, which had it at module scope ina.js— the exact python pilot shape (flat 500-char fallback letprobeSafety'stypeofdampen it). Moved intoprobeGlobals;evalthen reads +1.dockerfileandmakefilehave no function bodies to scope to and needed none (no safety keyword in either file).Four shapes worth recording
"if"was a phantom branch inside the mutation probe, sostate_mutationcollapses by exactly ×3 on the scoped hits (state-flux-branch-weighting). E.g. matlab 14→6 = 4 scoped mutations dropping to ×1 plus 2 elsewhere.evalwas never the danger keyword there. matlab, ruby, shell, tcl all matchevalundersafety_bypasses, nothigh_risk_execution— so their old decoy was measuring the wrong family and theirsafety_bypassesdrops 3→2.eval) and scheme (eval) already scored the danger hit; the redesign only strips the branch/io contamination. scheme moved no count at all — its sexp-anchored branch rule never matched the proseif, so its decoy now says what it always measured.api4→3. The old sentence's"open"is a Swift access-level keyword, so it had been inflatingapi— a planted, scored column — from inside a string this whole time.Not in A.1, noticed while sweeping
Four languages still carry the old shared sentence in their own vocabulary and are not on A.1's list: abap (
'IF TRUNCATE FAILS TRY SELECT AGAIN'), assembly ("if jmp fails try syscall again"), cobol ('IF ALTER FAILS TRY OPEN AGAIN'), sqlite ('IF UPDATE FAILS TRY SELECT AGAIN'). Same defect, same fix shape. cobol and sqlite both have open items in this batch already (A.3's cobol*> @return, B.4's sqlite io 11) — suggest folding these four into A.3 rather than opening a wave 3. Seven languages have no string decoy at all (agc_assembly, css, html, jcl, markdown, yacc, yaml); css/html are A.2's.After this branch's A.2–A.4 land, the A.5 regen should expect the
branch/safety/io/state_mutationmedians to move down across the board — the pilot's bucket-5 "honest language vs inflated median" wobble resolving, since 35 of 46 languages now read the same way.squid-protocol commentedon Sep 2, 2026
claiming A.2 — claude-opus-5 — same branch
corpus/decoy-migration-wave2(Batch A is one PR, so A.2 stacks on A.1's 32 commits).Also done as asked: A.3 now carries the four languages A.1's list missed (abap, assembly, cobol, sqlite), and B.4 is annotated to re-read sqlite's
ioafter that migration — the old sentence'sSELECTis an io keyword there, so part of that 11 is corpus-side. Both edits are in the issue body.squid-protocol commentedon Sep 2, 2026
status A.2: done — 2 commits on
corpus/decoy-migration-wave2(plant(css),plant(html)), pushed. Both gates PASS, 6 planted cells filled, nothing else moved.a.cssglobalshtml {}/body {}insideprobe-globalsb.csssafety_bypasses*::before {}/*::after {}insideprobe-bypassmain.cssdoc/**block on the entry at-rulemain.cssownership/* Author: ... */b.htmltelemetrynavigator.sendBeacon(...)after probe_telemetry's<script>c.htmlcleanupclearInterval(...)/clearTimeout(...)after probe_cleanup'sThe four choices that were not free
safety_bypassesis not a bare*line. The rule's first alternative is^[ \t]*\*, but*is also in the globals alternation (:root|html|body|\*), so* {}would have counted twice, in two different planted columns.*::beforematches safety_bypasses and misses globals (no{/,after the*). An#id {selector — the rule's other alternative — would have tripped theclass_start = 0tripwire.ownershipisAuthor:, not@author. The doc rule is/\*\*\s*|/\*\s*@(?:param|return|author|…), so a/* @author … */header lands in both doc and ownership. That is the livecode (+~14 siblings): doc rule claims 'Author:' which ownership already owns — every header author line double-counts (ada has the correct pattern) #2659 shape B.1 is filing a fix for — not something to bake into a baseline on purpose.on*=handlers.onclick="clearInterval(1)"firesreflection_metaprogramming(an input torisk_cognitive_load, so a scored column moves) pluslisteners. Measured, then rejected.<script src="…analytics…">. That is the rule's other form, butsrc=is an io keyword, so it would have added 2iotob.htmland muddied a planted column. And both plants sit deliberately outside the<script>tags: the polyglot splitter hands script bodies to the JS lens (ledgerhtml-script-func-start-unreachable, html func_start is unreachable end-to-end: the polyglot splitter consumes <script>/<style> tags before html's rules run #2549), so a body inside the tag would exercise javascript's rules, not html's — the opposite of what this corpus measures.For A.4 / A.5
io,state_mutation,cleanup,telemetryand htmlglobals,high_risk_execution,state_mutationstay 0 because the registry defines no rule — those are n/a cells, not misses. Recorded in each manifest's notes.api,encapsulation,dead_codestay 0 but are plantable (@property,@scope,/* .foo {). SPEC treats those four as plant-if-plantable, so they are a genuine gap — just not one A.2 asked for. Noted in the manifest so nobody re-derives it; suggest deciding in A.4 whether they get planted before the A.5 regen or ledgered as deliberate.risk_documentation(doc+ownership now nonzero), cssrisk_safety_score(safety_bypasses 0→2) and htmlrisk_*touching telemetry/cleanup. All six cells are planted intent, so they should move toward the medians, not away.Next: A.3 (now including the four abap/assembly/cobol/sqlite decoys) unless you want A.4 first.
squid-protocol commentedon Sep 2, 2026
A.2 follow-up pushed (
plant(css): api + encapsulation onmain.css) — gate now 80 assertions, PASS.apiwas the one that cost a cell:_calc_api_exposureshort-circuits to0.0whenapi == 0, so css readrisk_api_exposure0.0 against a 5.29 median purely because the probe was unplanted.encapsulationwas not even a manifest key before; it is now pinned 1/0/0/0 across the four files.dead_codedeliberately left at 0, though/* .foo {} */matches: no language in the corpus plants it, its median is 0, and the report scores a zero median on exact agreement — planting it in css alone would manufacture a redrisk_dead_codecell instead of closing one. Written into the manifest notes so it is not re-derived.For A.5 attribution:
encapsulation_ratiois1 - globals/(total_vars + globals)— a function of globals, not of theencapsulationsignal. So A.2 planting globals 2 ina.cssis what moves css off 1.0 toward the 0.75 median. Attribute it to the globals plant, not to the encapsulation one.claiming A.3 — claude-opus-5 — same branch
corpus/decoy-migration-wave2.squid-protocol commentedon Sep 2, 2026
status A.3: done — 10 commits on
corpus/decoy-migration-wave2, pushed. Full-corpus gate re-run: 46/46 PASS. Every listed item plus the four folded-in decoys.=cutType.forNamechain@authorswaps*> @return(#2661 step 1)perl
=cutwas not a doc nitmain.plhad=podwith no=cut.detector.py~L3042 (the #2239 POD strip) blanks from a POD opener to the next=cutor, failing that, to end of file:So the whole of
main.plwas invisible to the structural slicer, and the corpus had been recording that as perl's morphology. One line:avg_func_locavg_func_complexityfunc_internal_densitystructural_massThat was
functions_found9 against a 13 median — exactly main.pl's four subs — and it is the direct cause of perl'savg_func_loc-27%,avg_func_complexity-38%,max_func_complexity-50%,func_complexity_gini-53%,func_internal_density-49%,control_flow_ratio-40% andstructural_mass+212%. Seven cells from one missing line. The only signal it moves is doc 1→2, because=cutis in the same alternation as the POD openers with no pairing — the #2658 shape. Filed as #2670, ledgerperl-pod-delimiter-double-count, and it belongs in B.1's single fix shape.apex: one missing chain, seven cells
apex was the only language with no dependency chain at all — SPEC's main→a→b→c was never expressed, because apex has no import statement and nobody had planted
Type.forName, the one idiom its_dependency_capturereads. Planting it closed dependency_links, dependency_density, popularity, betweenness, closeness, producer_ratio and risk_api_exposure: with popularity > 0 the Contextual Baseline Fix converts each file's 3 uncalled probes toapi3 (existing ledger shape, apex added tolanguages_seen). Deliberate collateral:Type.forName×3 is alsoreflection_metaprogramming, arisk_cognitive_loadinput — attribute any cog movement there at A.5.Header swapped
// @author:→// Author:: apex's doc rule still lists@author, which ownership owns exclusively, so doc read 2 against a planted 1. agc and fortran needed nothing — post-#2659 their author line gives ownership only and a separate line gives doc. Verified, not assumed.cobol is stuck at doc 2 until the engine moves
Planted
*> @return the probe result, so doc is nowAUTHOR.+ the new line = 2. cobol cannot dodge this the way apex did: its ownership rule matches onlyAUTHOR.— there is no second header idiom — so the interim 2 is unavoidable, not a choice. Ledgercobol-2661-author-doc-collision, still_reproduces true; settles at 1 when #2661 step 2 lands.agc: the gap was invisible for a reason
args counts register-target ops,
\b(CA|CS|TS|…)[ \t]+(A|Q|L|Z)\b. Most probes opened withCAF ZERO, which looks like it should match and does not —\bZ\bfails against ZERO. Each function now opens withCA A(the argument arrives in the accumulator). b.agc's PROBESTATE had two args hits, so its surplusXCH QbecameXCH TEMP, keeping state_mutation.Two process notes
json.dumps(old)(ASCII-escaped) against the file text, so any manifest whose notes contained an em dash matched nothing and kept its old notes while the tool reported success. Ten A.1 manifests were affected (ada, c, cpp, csharp, dockerfile, haskell, m4, perl, scala, tcl). Caught by auditing all 34 manifests for the marker string instead of trusting exit codes; backfilled inchore(notes). Counts and decoyoutcomefields — GATING's actual citation requirement — were correct throughout.string-literal-selective-shieldingupdated: it still said "remaining 37 languages_seen re-author as their sweeps touch them". All 40 are done, and the entry now carries the screening rule and the five findings (eval issafety_bypassesnot danger in matlab/ruby/shell/tcl; swift'sapicounted the proseopen; abap's "third profile" was the Silencer Region; scheme moved no count at all; assembly keeps its ×3 flux becauseretis a branch keyword).Batch A is now A.4 (ledger, T1) → A.5 (regen + PR, T1). Not claiming either yet.
squid-protocol commentedon Sep 2, 2026
claiming A.4 — claude-opus-5 — same branch
corpus/decoy-migration-wave2(keyword-rosetta).Session-start checks:
KEYWORD_ROSETTA_REF=c8edf78= keyword-rosettaorigin/main✅docs/bias_data.json2026-09-02 12:38:49 > last engine merge on main 12:27:35 (3ac9182 / feat(metrics): evidence-mass floor replaces the UEF's six small-file guards (#2655) #2667) ✅origin/corpus/decoy-migration-wave2(A.1–A.3, 46 commits).One correction to the item before I start, from the current branch rather than from the pre-A cache: agc_assembly is already out of the args set. A.3's
CA Afix took itsargs2 → 13 andavg_func_args0.167 → 1.0, i.e. exactly the median. A.4's list was written against the stalebias_data.json. So the extension covers seven languages — css, html, yacc, yaml, makefile, dockerfile, sqlite — and agc gets recorded as resolved-by-authoring, not ledgered as morphology.squid-protocol commentedon Sep 2, 2026
status A.4: done — 2 commits on
corpus/decoy-migration-wave2(keyword-rosetta, pushed). Full-corpus gate re-run: 46/46 PASS. Batch A is now A.5 (regen + PR) only.Part 1 — the args shape
New ledger entry
args-no-parameter-surface-morphology,signal: args|avg_func_args, dispositionintended-morphology, over cobol + css, dockerfile, html, makefile, sqlite, yacc, yaml. Cited in all eight manifests' notes.The shared criterion, checked per language against the live registry rather than asserted: the construct the corpus counts as a function (the language's
func_startrule) declares no parameter list, and theargsrule matches a different construct entirely — so SPEC's "each probe taking exactly one argument where the language expresses arguments" has nothing to attach to. Corpus-wideargsagainst the 13 median: css 3, html 3, dockerfile 4, yacc 2, makefile 1, sqlite 1, cobol 1, yaml 0.Where planting anyway is mechanically possible I priced it with finditer instead of hand-waving, and the split is the interesting part:
calc|var|url|…) in declarations — all 3 hits are the@importchain'surl("a.css")calc()reaches 13 at zero overlap cost — declined on meaningdata-*,name,value, …) — the 3 hits are a.html'sdata-testid×2 and main.html'sname="author"ownership metadata-probe=is clean (name=/value=also firesapi) — declined on meaningARG— a file-scoped build variable, 1 per file by designENV, noglobals) — declined: nothing would consume them$$/$n, genuinely yacc's nearest parameter surface{ $$ = $1; }also scoresstate_mutation, so 12 actions move a planted scored column to fill an unplanted onewith:block — which binds touses:, never to the corpus'srun:stepsuses:line firesimportand_dependency_capture→ forged edges in the planted main→a→b→c DAG$(call f,…)/$(1)— main.mk's one hit is its$(call probe_branch)dispatchdefinematches themacrosrule, notfunc_start(converting probes would delete 12 planted func_starts), and$(call …)fires the scoredreflection_metaprogrammingVALUES (…), CTE parameter lists — all DMLSELECT|INSERT|UPDATE|DELETE|REPLACE) is also aniokeyword here, and sqlite's io is B.4's largest residualcobol-args-clause-match-morphologykeeps its id (cited indata/cobol/expected_signals.json) and its two cobol-specific sub-findings, and now cross-references the general shape. The generalisation also gains cobolavg_func_args, which that entry'sargs-only signal never reached.agc_assembly is not in the entry — as flagged on claiming. Its args rule matches register-target operands and the AGC calling convention really does pass an argument in the accumulator, so it has a parameter surface; A.3's
CA Aplant took args 2 → 13 and avg_func_args 0.167 → 1.0. Item list ticked with that correction written in.Part 2 — signal normalisation
16 of the 61 entries held prose (
import DAG / popularity),+separators, or(various). Every token is now a canonical name — a bias-report metric or a registry signal key — sorted and unique, with the contract written into the ledger's_doc. Audit: 62/62 conformant, everylanguages_seena known language.Three rewrites were judgment rather than transcription:
batch4-dual-keyword-overlapsdrops dart, groovy, objective-c, scala, scheme, zig (no dual-rule keyword in their manifest notes; groovy's and objective-c's args behaviour belongs tots-callparen-args);batch5-tier2-morphology-shapesdrops markdown and yacc, both already covered by their own entries. Reasons recorded in each verdict, not just in this comment.no-dependency-capture-languages— a real mis-record, worth C.2/C.3 knowing. The entry had markdown as "no import rule at all", but aNoneimport rule is not aNone_dependency_capture: markdown defines a live capture (the inline-link form[text](target), wired by markdown: capture relative links as dependency edges (rosetta #2587, dependency_links 0 vs median 3) #2638) and its DAG resolves — dependency_links 3, popularity 0.75, betweenness 0.0833, producer_ratio 0.5, the same profile as python/fortran/swift. m4 and yacc remain, and their pinned family is now named in full: links/density/popularity/betweenness/closeness/producer_ratio 0, pagerank at the uniform 1/N 0.2, blast radius 200, api 0 and thereforerisk_api_exposure0.0 against a 5.29 median — that red cell is what this entry has to own, so the signal list says so.census-requires-git-trackedgets an empty signal. It is a workflow fact (untracked folders produce no numbers at all), not an explanation for a cell, and an empty signal can never match the join. Documented in_docas the sentinel for that class.Two red cells become explained as a side effect: jcl/api (batch5 now names
api;na_check.py --regenerateshrinksdocs/na_baseline.jsonfrom 28 to 27) and markdown/avg_func_args, added withfunctions_foundtomarkdown-lit-plane-morphology, whose verdict already established both ("no callable units … hence functions_found 0"). That was the last red args-family cell in the corpus with no entry naming it.na_check.pyreports no new unreviewed absences.For A.5 and E.1
risk_api_exposure/risk_documentation/risk_safety_score, html telemetry/cleanup risk columns, perl's seven morphology cells, apex's seven graph+api cells, agcavg_func_args.signal.split("|") × languages_seen, whichbias_report.classify_naalready does for n/a cells — E.1 is the same predicate applied to red cells. Two things to build in rather than rediscover: an entry withstill_reproduces: falsedescribes a resolved shape and must not explain a live red cell; and the_doccontract should be enforced by the tool (unknown token, unsorted, unknown language → fail), otherwise the next entry re-introduces prose.squid-protocol commentedon Sep 2, 2026
claiming A.5 — claude-opus-5 — same branch
corpus/decoy-migration-wave2. Pin/cache re-checked at the top of this session (comment above); the regen is what supersedes the cache. Batch A is one PR, so this closes it.squid-protocol commentedon Sep 2, 2026
status A.5: done — Batch A is open as keyword-rosetta#32 (49 commits, 46/46 gates PASS). Batch A is closed out; B and C are unblocked.
Headline
avg_func_complexity(28%) leaves the weakest-metric list;control_flow_ratio(30%) is the new floor.na_check.py: no new unreviewed absences;na_baseline.json28 → 27.Attribution — 628 moved cells, done mechanically
The item says "attribute every mover", and at 628 cells prose per cell would be theatre, so it is three machine checks instead:
bias_data.jsonequal the sum of their gated manifest. Zero mismatches. Nothing in the signal layer is unaccounted for by construction.git diff origin/main...HEAD -- data/). Languages with derived movement but no planted move and no file change: none. yacc (notes-only) moved nothing, as it should.risk_*cell has a moved input. 144 moved; 135 via a moved governed signal. The other 9 were run down individually: 4 rest onapi/encapsulation, which are not report columns (apexapi0→9 from A.3's chain, cssapi0→1 +encapsulation0→1 from A.2, swiftapi10→9 from A.1), and 5 rest on the ungoverned structural inputs these formulas also read —loc, token mass,control_flow_ratio— which is the caveat GATING.md already spells out (agcrisk_api_exposure/risk_verification, css/cobol/dockerfilerisk_verification).The medians moved, and by more than A.1 guessed
branchrisk_state_fluxstate_mutationrisk_cognitive_loadcog_rawhigh_risk_executioncontrol_flow_ratiodependency_densitydependency_densityneeded chasing — it moved in 32 languages whose only edit was a decoy string. It isimport_count / max(int(coding_loc × control_flow_ratio), 1)(record_keeper.py~L487), so dropping the phantom branch shrinks the denominator. Downstream ofcontrol_flow_ratio, not of any import change.101 cells worsened band. 98 are that median shift — honest languages measured against a median no longer inflated by 35 of 46 decoys, which is the bucket-5 wobble A.1 predicted resolving with the sign it was always going to have. Worth saying plainly for Batch D: the residual spread in the state-flux and cognitive families is now a clean read of the ×3 flux weighting rather than decoy contamination, so #2546/#2654 finally have an uncontaminated baseline to design against.
Exactly 3 worsened against an unchanged median, which is the only category that needed a verdict:
doc1→2cobol-2661-author-doc-collision— unavoidable until #2661 step 2doc1→2perl-pod-delimiter-double-count(#2670)import3→6New engine issue #2671 (apex import rule) — B.1/B.3 material
apex's
importrule is compiled withre.IGNORECASE, which neutralises the[A-Z]guard in its type-reference alternative\b[a-zA-Z_]\w*\.[A-Z]\w*\b. The alternative degrades from "lowercase receiver, capitalised member" to "anyword.word", so every qualified method call is an import. Micro-repro:foo.bar,conn.clear,Logger.infoall match; recompiling the identical pattern without the flag returns nothing for all three.System.debug/Database.queryare correctly excluded by the namespace lookahead. Swept every language — apex is the only rule combiningIGNORECASEwith an[A-Z]guard, so blast radius is apex alone.It surfaced now because A.3 gave apex its first real chain: 3
Type.forName+ 3 incidental calls = 6 against a median of 3. Before the chain it read 3 — the right number for the wrong reason, which is why four sweeps missed it. Corpus keeps the 6 and keeps the ordinary Apex calls that expose it; deleting them would hide the defect. Ledgerapex-import-ignorecase-type-guard, apex re-blesses to 3 when the fix lands.Same family as #2544: a guard that does not guard. Suggest B.1 files it alongside the doc-block double-count, since both are one-rule regex fixes with the same test shape.
Cross-repo — one thing owed
KEYWORD_ROSETTA_REFneeds a bump after #32 merges (repo admin, samegh api -X PATCHas Batch 0.1). This batch changes manifests andna_baseline.json, so gitgalaxy'srosetta-auditkeeps testing the stale corpus until the pin moves; thengh workflow run rosetta-audit.yml --ref mainto confirm green.ENGINE_REFstayedmainthroughout — Batch A is corpus-only, so there is no engine PR to sequence against.Handoff
|-joined canonical signals with the contract in the ledger_doc. Two things to build in rather than rediscover — an entry withstill_reproduces: falsedescribes a resolved shape and must not explain a live red cell, and the tool should enforce the_doccontract (unknown token, unsorted, unknown language → fail), or the next entry re-introduces prose.squid-protocol commentedon Sep 2, 2026
A.5 CI: keyword-rosetta#32 green —
verifyPASS (4m48s, run 33672422860),MERGEABLE/CLEAN. Awaiting review + merge, then theKEYWORD_ROSETTA_REFbump.squid-protocol commentedon Sep 2, 2026
claiming B.1 — claude-opus-5 — no branch (B.1 is a filing item: one issue + fix shape, no engine edit).
Session-start checks, both green — and the item owed at the end of Batch A is already settled:
KEYWORD_ROSETTA_REF=357345f= keyword-rosettaorigin/main✅ (keyword-rosetta#32 merged 2026-09-02 19:32Z, pin bumped behind it)docs/bias_data.json2026-09-02 15:16:30 > last engine merge on gitgalaxy main 12:27:35 (3ac9182 / feat(metrics): evidence-mass floor replaces the UEF's six small-file guards (#2655) #2667) ✅ — the post-A regen is newer than every parsing-affecting merge, so B.1 triages against post-A numbers.Scope I am taking, per the item text plus A.5's handoff: one issue for the doc-delimiter double-count family — java/groovy/kotlin/php/scala
/**+@param, solidity///+@param, plus the already-filed members of the same shape (#2670 perl=pod/=cut, #2659 apex@author, #2661 cobol) — with a single fix shape on the #2658 precedent. Every language claim gets verified against the live registry rule and the post-A corpus rather than carried forward from the pre-A triage; anything that does not reproduce gets said so.33 remaining items
squid-protocol commentedon Sep 4, 2026
status F.4: done — keyword-rosetta#51 (ledger + tools + docs; no manifest change). Unexplained 67 → 20 (engine 4c283ed, corpus main 397fa8b + this PR).
The census
One line explains nearly all of it —
detector.pyL1383 defines an orphan as a function whose identifier appears once in the file, with no call graph anywhere behind it. So the count is a property of the language's syntax: ada/haskell/livecode repeat the name (end Probe_Globals;, a type signature, a handler's closingend) and report 0.00 orphans/file; yaml/sqlite's slices are 3-char or synthetic and are skipped; cobol/m4/scheme/makefile/abap/jcl/objective-c never repeat it and report 3.25, i.e. every function orphaned; the baseline is 2.50. Both tails ofraw_state_slop_orphans, one heuristic. Through the Contextual Baseline Fix (orphans → api) it is also why ada, haskell, sqlite, yaml and dockerfile bottom out onrisk_api_exposureandrisk_documentation—if api_hits == 0: return 0.0.Seven validated entries; three issues filed with fix shapes: #2727 (orphan heuristic — count occurrences outside the function's own span), #2728 (dockerfile's
RUNbuckets reaching the duplicate check, the #2547 shape), #2729.#2729 is the one to read. 36 of the 44 languages that define an api rule pass the
apigate without the rule matching anything:verify_language.pyreadsarch_api, which is post-conversion, and the manifests were recorded from it. shell/a.sh — manifest 3, rule 0, orphans converted 3, gate reads 3. Shell's rule is^export NAMEand no probe exports; go's is^func [A-Z]…and every probe function is lowercase. It inverts the tenraw_arch_apicells too: those are the only languages where the rule fires. Fixing it turns ~36 languages red onapi— a corpus wave of its own, deliberately not folded into F.4.Three things the regen forced
_get_tieris gone (engine PR 1: language-strictness table + measured fidelity coefficient replace _get_tier (child of #2716) #2718), soscoring_tiers()raised — tonight's nightly would have failed. Replaced withscoring_strata()offanalysis_lens.strictness_constants: stratum = the language's count ofFalsestrictness columns (irc0…irc4). This is the epic's "retire the within-tier banding" item, now shipped. Keystiers/tier_sensitive→strata/constant_sensitive. The fidelity table is deliberately not held equal — it is generated from this corpus.reflection_metaprogrammingout of_calc_documentation/_calc_cog_loadintoself._dynamism(), so the AST scan stopped seeing it — it had been carrying F.3's yacc verdict.risk_dependencies()now follows helper calls transitively.Numbers
First regen since #2718 + #2719: 311 of 3174 metric cells moved, all risk family +
cog_raw— the flat Irc leaving cognitive load and documentation, as predicted (shellrisk_documentation55.8 → 33.4, cobol 55.5 → 29.3, everycog_raw→ 0.0205). cobol #2567 passes its gate again as a side effect.Remaining 20 = F.5's 19 singletons + swift/
risk_documentation, newly out of band against theirc0median it is now compared with rather than tier-1's. New leak row:risk_documentation+0.64 withinirc2.Census artifact: https://claude.ai/code/artifact/e7addb1b-578d-4af6-896e-1cc63e08c251
Next: F.5 — the 19 singletons, now the whole remainder.
squid-protocol commentedon Sep 4, 2026
status F.5: done — same PR, keyword-rosetta#51.
bias_report.py --gateexits 0.Unexplained 19 → 0. Full trajectory: 444 → 224 (E.1) → 175 (D.2) → 152 → 91 (F.1+F.2) → 67 (F.3) → 20 → 19 (F.4) → 0 (F.5).
Three of the 19 were corpus gaps against SPEC, not deviations — SPEC plants
test2 andstate_mutation2 everywhere and skips the string decoy only if the language has no string literals, and yaml/yacc have them (yacc was never in the 40 A.1/A.3 migrated): yacc b.y gains(void)"plain abort decoy text";in probe_state (high_risk_execution 2 → 3), yaml a.yml's pytest step becomes a block scalar running it twice (test 1 → 2), yaml b.yml gains a step-levelenv:block (state_mutation 1 → 2). Screened first; the pre-bake gate failed on exactly those three and nothing else.The other 16 are seven validated entries. The headline one: the probe program declares no types, so
class_start/classes_foundhave a median of 0 and every language that cannot be a file without a container declaration reads out of band — cobol's PROGRAM-ID, jcl's JOB card, css's.rosetta-riskselector, yaml'sjobs:, dockerfile's FROM stage, and kotlin'sobject Region {}, which is the globals plant. Also: m4's$1is a use-site not a declaration (args 18 vs 13);Environment.Exitis both a global and a danger call in C#; dockerfile/sqlitefunctions_foundare igniter buckets; html's func_start rule matches nine<scriptopeners but the elements are empty, so splice records 0 — the same rule-vs-recorded-column split as #2729; and package.json/pyproject.toml are a fifth graph node in exactly two folders, which is what moves betweenness.Where the epic stands
still_reproduceswhen it lands.squid-protocol commentedon Sep 5, 2026
#2729 done (the api gate + the corpus wave it predicted). keyword-rosetta#53:
verify_language.pynow readsraw_arch_apiasapiand pins the orphan conversion asapi_orphan_credit; all 46 manifests re-blessed mechanically; 31 languages planted an explicit public surface in their own vocabulary.apifires in 37 of 46 languages, against 10 before. 46/46 gates PASS,na_check --ciclean,bias_report --gateexit 0 / 0 unexplained (the first run after the wave had 31, all six families classified into the ledger).Two engine issues fell out of it, both new work rather than anything the wave broke:
arch_apicounts a declared-public, uncalled function twice (go/a.go: 3 functions,raw_arch_api3, orphans 3,arch_api6). Invisible until a language had both halves. It is the cause of 21 bias cells and it inflatesrisk_api_exposure/risk_documentationmost on library-shaped real code.publictoken #2730 — the api rule has no stated contract: seven languages' own visibility idiom is invisible to it (abap FORM, ada body, dart top-level function, matlab function file, objective-c @interface method, rubypublic :name, shellexport -f), while java/csharp/php/kotlin count any barepublictoken and go counts capitalised references. Corpus-paired work per AGENTS rule 8.Note for whoever picks up the n/a sweep:
raw_arch_apiis no longer an exact-agreement-on-zero column, andrisk_documentationis no longer a flat 29.896 in every strictness stratum — both were artefacts of nobody measuring api.squid-protocol commentedon Sep 5, 2026
claiming n/a sweep (post-F.5 unreviewed-absence worklist, now 26 cells incl. non-planted risk inputs) — Fable 5 — branch ledger/na-sweep-nonplanted-inputs
squid-protocol commentedon Sep 5, 2026
status n/a sweep (post-F.5 worklist): done — keyword-rosetta#54 (branch ledger/na-sweep-nonplanted-inputs, awaiting merge) — remains: user merges #54; the two filed engine issues are future paired work.
The worklist had grown from F.5's 12 cells to 26 (the report now audits the non-planted risk-formula inputs: concurrency, sync_locks, dead_code, encapsulation, immutability_locks, reflection_metaprogramming, spec_exposure). All 26 reviewed:
concurrency:mutex is already owned by its concurrency rule, cobol-api overlap precedent; no-visibility jcl/yaml; jcl no-const/no-metaprogramming; m4 "mutable by design" per the engine's own registry comment).Result on the branch:
na_check0 unreviewed / baseline 0 cells,bias_report --gateexit 0 / 0 unexplained (engine a214192, measured values byte-identical — review-state flips only), and all 46language_deviations.pygates exit 0 — first time corpus-wide. Also fixed in the PR: verify.yml's path filter missed deviation_ledger.json/na_baseline.json, so a ledger-only PR ran zero checks (#14's gap shape).Closure state this unlocks (F.6): css #2570, m4 #2585, markdown #2587, yacc #2605 were the last languages blocked on n/a cells and now qualify; the reopen question resolves itself — cobol #2567 and jcl #2581 both pass the gate again, no reopen needed. Every other open language issue also passes; mass closure remains the epic owner's call (capstone standing rule).
fix(core-engine): the api rule's own declarations are not new orphan …
feat(core-engine): yacc's %union is a real class_start, with the allo…
squid-protocol commentedon Sep 5, 2026
Non-green cell pass, 2026-09-05 (engine 0e521e8, corpus 3b76b48)
Scope: every cell of
docs/bias_data.jsonoutside the green band — 445 cells (180 ledgered · 120 derived · 10 undefined · 135 ungated context) plus the 34 signal and 12 derived n/a cells — re-read in the under-detection direction only: is there a rule the language's own idiom could fire that reads 0 or n/a today? Each ledgered "intended morphology" verdict was checked against the live rules on main, the language-crucible corpus (grep counts) andtools/screen_plant.py.Filed (engine):
//name PROCis the callable surface half of every real EXEC step invokes #2748 jclapi—//name PROCdeclares the surface 185 of crucible's 376 EXEC steps invoke; rule is None.cleanup—DISP=(…,DELETE)(36 normal-position + 12 abend-position hits, 25 files); feat(core-engine): jcl sync_locks counts the exclusive-ENQ dispositions (#2733) #2742's narrowed-subset + accepted-overlap argument for OLD/MOD reopens prism: JCL //* comments are never stripped — comment surface structurally dead for jcl (comment_lines ~0, debt/doc rules can never fire) #2610's rejection.globals— JOBLIB/STEPLIB, job-level SET/PROC params, EXPORT SYMLIST; dockerfile ENV is the dual globals+state precedent; corpus already reads 2 with no plant.high_risk_execution— everyPGM=counts (IEFBR14 26, compilers 26 of 190 crucible hits); the corpus avoids the rule rather than measuring it.io— all 117 crucibleurl()fetches are non-@importresource loads (the crucible writes@importin string form) and onlyargssees them; html counts the same fetch as io.args— only awith:block (0 crucible hits) counts;inputs:declarations invisible; a block counts as one argument.Filed (corpus): squid-protocol/keyword-rosetta#59 — css/yaml/dockerfile
safetyread 1 of 2 and screen clean to plant;DISP=OLD(#2742) and%union(#2737) plants owed; pairing table for the six above.Looked at and not filed (verdict stands): jcl
doc(0 structured header keys in 1,610 crucible comment lines — nothing to anchor), jcltest(TYPRUN/IEBCOMPR 0 hits, no concept), solidityio(events/ipc rules own it), css cleanup/state_mutation/telemetry and html globals/state_mutation (no unclaimed construct), class_start for shell/makefile/m4/agc (no entity declaration), markdown (lit plane by design), objective-c/sqliteapi(corpus tripwire / func_start overlap, not a rule gap), theargsfamily (per-language verdicts hold), htmlfunc_start(#2549 already open), orphan census cells (#2727 open). Over-detection cells (branch/io/state_mutation HIGH) were out of this pass's scope.Already resolved on main since the last plan note, for anyone reading older memory: yacc
%union(#2737), yaml cleanup/ownership (#2681), html srcdoc (#2681), jcl sync_locks (#2742), jcl/yaml comment-stream rules (#2736), api contract (#2743).squid-protocol commentedon Sep 5, 2026
Red-cell triage pass, 2026-09-05 — 12 issues filed (#2763–#2774)
Not a claim on an existing item.
bias_report.py --gateexits 0 and unexplained is 0, so this pass asked the next question instead: of the cells that are red but explained, which ones can be made green? Two rounds — first by language (the 46language_deviations.pyoutputs), then by metric ranked on consistency score. Engine3b3568e0, corpus main6183c4b, everything below measured rather than read off a ledger entry.Extraction / slicer
find(opener, start_idx)lands on{params}, not{body}loc 1,complexity 0; index table per matchrun—func_startcaptures no name, so orphan + duplicate census and per-step identity are all dead_closed_literal_capturereturnsfrozenset()so it is not even a keyword bucketRule contracts (the #2730 shape, four more rules that need it)
state_mutation=); haskell countsIORefin a type signature, dockerfile double-counts its ownglobalsplants. Governs the two worst metricsencapsulationpub— the public modifier — where every other language counts non-public; agc_assembly's rule is a bare^[ \t]*[A-Za-z0-9_]that matches every column-0 token (50 hits/4 files)structural_boundariesls/cp/mv/touch). It iscontrol_flow_ratio's denominatorimmutability_locksletinvisible, swift'sletscores 11 — the rule rewards notation, and it is subtracted at ×0.5 fromrisk_state_fluxargsXCTAssert,free,os_log)Signal scope
branchcounts unconditional transfers —ret13,call7,b2,jmp1 vsje/jne2Orphan census (three separate mechanisms, all post-#2754)
len(func_name) > 3guard exempts short names outrightNew/Run/Set/Lenand jQuery'son/off/getexport -f nameline counts as a useraw_state_slop_orphans0 with the export, 3 without.threat_locations["api"]already holds the exact line set to discountScoring / reporting layer
PATH_MODIFIERS"Structural Mass": a missing group makestsx?$a top-level alternative → every.ts/.tsxfile gets ×0.1probe.js6.16,probe.ts0.62,widget.tsx0.62raw_arch_apibands a per-file declaration count against a per-function medianraw_arch_api76% ·risk_api_exposure71% ·risk_documentation76%)Coverage against the weakest metrics
control_flow_ratiorisk_state_fluxstate_mutationraw_state_slop_orphansavg_func_complexity/func_internal_densityimmutability_locksbranchrisk_api_exposure/raw_arch_api/risk_documentationargs/avg_func_argskeyword_hits(63%) is deliberately out of scope — it is a context column under F.1.Two things this pass ruled OUT, recorded so nobody re-derives them
andas a branch keyword looked like a rule defect and is not: 30 of 46 languages count boolean operators inbranch(&&/||/and/or), including python, c, java and rust. livecode is following the corpus-wide convention.state_mutationrule hits against the recorded value: 44 of 46 record their raw count exactly. Only assembly is amplified (2 → 6), and its phantom branch context is aret— so it resolves through assembly/agc_assembly: branch counts unconditional transfers — 23 of 25 hits are call/ret/jmp, not decisions (#2545's shape) #2764, not through the amplifier. matlab (19 → 4) and apex (4 → 3) move the other way, via dampeners.Sequencing note: #2767 should land before #2768, or #2768's corpus effect is masked by yaml's naming; #2765 and #2772 are one PR's worth of thinking and should be claimed together since they are the two inputs to the same formula.
feat(core-engine): css io counts resource-fetching declarations (#2752)…
squid-protocol commentedon Sep 6, 2026
STRUCTURE COUNTS sweep — one issue per out-of-band dot
Measured 2026-09-05 on engine main
a59ecf6b/ corpus main2038a86. The bias chart's STRUCTURE COUNTS group has 12 cells outside the green band across the three extraction rows;pagerankis clean at 100%. Every one is alreadyledgeredorderived(the gate's unexplained count stays 0) — these issues ask the next question, which is what would actually move them.functions_foundclasses_founddependency_linksfunctions_found— the slicer counts things that are not functions, and the report scores languages that have none.CREATEstatement; scales with statement volume, not with the planted programRUN/CMD/HEALTHCHECK; detector: slicer keyword buckets (dockerfile RUN, css keyframes) reach the duplicate/orphan checks as if they were functions #2728's keyword-bucket family is excluded from orphan/duplicate but not from the populationfunc_startis n/a,functions_foundis scored anyway — the structure-count rows never got Rosetta to green: cause-first batch plan + multi-session coordination (child of #2560) #2669 F.3's n/a mechanismclasses_found— five cells where the engine is right and the comparison is not.PROGRAM-IDis the compilation unitFROMstage per file, and the fourth of five structural columns measuring the instruction grammarobjects ARE the two planted globals — one plant counted twicedependency_links— the column is not counting links.import_count = len(raw_imports)counts capture strings before_resolve_target;popularity,blast_radiusandbetweennessall read the median 3 edges while this column reads 7FROM scratchDSN=CORPUS.DATA— a real dependency that is not a file, and the case that decides the family's fixTwo cross-cutting shapes fall out
classes_foundrow at all.1and dockerfile's4are the same dot. Cheap, independent chart improvement.Nine of the twelve need no corpus plant change. Re-bless is owed only if #2792/#2793 and #2801–#2803 land.
squid-protocol commentedon Sep 6, 2026
Correction to my comment above — I filed one issue per out-of-band dot, which is the wrong granularity for this repo. GATING's own rule is "one entry per deviation shape … not per occurrence — a shape appearing in 30 languages is one systematic cause, not 30 findings," and six of the twelve were per-language restatements whose only action item was "do what the family issue says." Those six are deleted; their unique content is folded into the survivors. Six issues stand, one per shape:
functions_foundsqlite +131%, dockerfile +31%functions_foundmarkdown −100%, and 7 cells across 5 languages scored on rows whose governing rule is n/aclasses_foundcobol, jcl, dockerfile, kotlin (+ css, see #2798)bias_report.pyclasses_foundcssimport_count = len(raw_imports)counts capture strings before_resolve_targetrunsdependency_linksembedded_python +133%, dockerfile +33%, jcl +33%DSN=capture is a real dependency that is not a file — the case that decides #2801's fixdependency_linksjclDeleted as duplicates of the above: the per-language issues for jcl/dockerfile/kotlin
classes_found, dockerfiledependency_links, and dockerfilefunctions_found.Also deleted: the html
functions_found−100% issue. Its action item is #2549 (open) plus a corpus follow-on, so it is now a comment there rather than a second issue about the same splitter — html is the one cell in this group where the engine genuinely finds nothing it could have found, and the corpus deliberately planted empty<script>bodies because of #2549, so the plant is strictly blocked on that fix.The two cross-cutting shapes still stand
1and dockerfile's4are the same dot. Cheap, independent chart improvement, folded into classes_found: five red cells on a 0 median are language morphology, not extraction — the row needs a declaration-requirement stratum #2796 as shape (b).Four of the six need no corpus plant change at all. Re-bless is owed only if #2792 or #2801/#2803 land.
squid-protocol commentedon Sep 6, 2026
Final status, 2026-09-06 — superseded by #2812
bias_report.py --gateexits 0 and has since keyword-rosetta#51; this issue's remaining items fold into the contract roadmap (docs/contract_roadmap.md, PR #2811; epic #2812 is the handoff surface from here):encapsulationencapsulation has no stated contract: rust counts pub (the public modifier) and agc_assembly's rule matches every column-0 token #2766, the api census orphaned_logic reports 100% dead code for five languages whose invocation model never names the callee — the family #2727 closed without covering #2806,raw_state_slop_orphansunder detector: an orphan is a name seen once in the file, so any language that repeats the name in its own syntax reports zero orphans #2727's shape.inherencyin the cause table and get the contract-leveln/atreatment in Phase 3.issue_status.py --post, reopen-on-drift) → retired with the per-language issues (D2). Capstones are written when a language reads clean bylanguage_deviations.py, decoupled from any issue.What this epic established stays in force under #2812: the session protocol (claim/status comments, one layer per PR, one
Closesper line, no pins, family not language), the model tiers, and the stacking rules. What changed is the unit of measurement: the consistency badge counted validated inherency as red, and the report now says what each red cell is (Phase 0) so the number to drive down is the open-defect share.Closing.