Skip to content

Rosetta to green: cause-first batch plan + multi-session coordination (child of #2560) #2669

Closed

Description

@squid-protocol

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)

  1. gh issue view <this> --comments — the last comment per item is its true state.
  2. 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_REF deleted 2026-09-04).
  3. Read docs/bias_data.json / docs/bias_report.md from keyword-rosetta main — bias-history.yml regenerates 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.
  4. Claim: comment claiming <item id> — <model> — branch <name>. One item per session unless the
    item says "fan-out".
  5. Stop: comment status <item id>: <done|blocked|partial> — <branch/PR> — <what remains>.
    Unfinished branches are pushed, never left local.
  6. Never mix layers in one PR (rule regex | slicer/DAG | scoring). One Closes #N per 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).
  7. 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> then gh 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> --report shows exactly +1 high_risk_execution from the new literal and no other delta vs the current manifest except removed decoy hits. Each language = one commit on the shared branch corpus/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; apex Type.forName chain (gives apex a DAG); agc CA-register args; header @author swaps apex/agc/fortran; yaml single doc plant (drop one of name:/description:); cobol *> @return line (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 the risk_* 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 A plant already took it to the median); normalise every entry's signal to |-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

Batch C — graph layer (gitgalaxy), parallel with A/B

Batch D — design pass (gitgalaxy) tier: T1 only blocked on A, B, C merged

Batch E — bookkeeping

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.

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-owed when it moves the corpus). No ENGINE_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 tmp component.

Activity

  1. added
    core-engine
    epic
    metrics
    on Sep 2, 2026
  2. squid-protocol commented on Sep 2, 2026

    @squid-protocol
    OwnerAuthor

    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.

  3. squid-protocol commented on Sep 2, 2026

    @squid-protocol
    OwnerAuthor

    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:

    1. exactly one high_risk_execution match, and
    2. zero matches in any scored signal — the 21 PLANTED/measure columns plus the seven non-planted signals that feed a risk_* 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 rejects GOTO for ASSIGN, rust abort), which is what made me trust it. It also caught things a reading wouldn't: Thread.Abort (csharp) and Thread.stop (java) hit concurrency → risk_cognitive_load/risk_concurrency; iex (powershell) hits reflection_metaprogramming → risk_cognitive_load. All three were rejected. Filler words were checked the same way: text matches dart's and embedded_python's ui_framework rule, so those two use plain <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

    language danger keyword file verified deltas
    ada OS_Exit b.adb high_risk_execution 0→1, branch 1→0, state_mutation 6→2
    apex emptyRecycleBin b.cls high_risk_execution 0→1, branch 2→0, safety 1→0, state_mutation 6→2
    c system b.c high_risk_execution 0→1, branch 1→0, io 1→0, state_mutation 9→3
    cpp system b.cpp high_risk_execution 0→1, branch 1→0, safety 1→0, state_mutation 9→3
    csharp Process.Start b.cs high_risk_execution 0→1, branch 2→0, safety 1→0, state_mutation 6→2
    dart exit b.dart high_risk_execution 0→1, branch 2→0, safety 1→0, state_mutation 6→2
    dockerfile eval b.dockerfile branch 1→0, io 1→0, state_mutation 4→2
    embedded_python machine.reset b.py high_risk_execution 0→1, branch 2→0, safety 3→2, io 1→0, state_mutation 6→2
    go os.Exit b.go high_risk_execution 0→1, branch 1→0, state_mutation 11→5
    groovy execute b.groovy high_risk_execution 0→1, branch 2→0, safety 1→0, state_mutation 6→2
    haskell die b.hs high_risk_execution 0→1, branch 1→0, safety 1→0, state_mutation 6→2
    java Unsafe b.java high_risk_execution 0→1, branch 2→0, safety 1→0, state_mutation 6→2
    javascript eval a.js high_risk_execution 0→1, branch 2→0, safety 3→2
    kotlin System.exit b.kt high_risk_execution 0→1, branch 2→0, state_mutation 6→2
    livecode answer b.lc high_risk_execution 0→1, branch 2→0, safety 1→0, state_mutation 9→3
    lua os.remove b.lua high_risk_execution 0→1, branch 1→0, state_mutation 6→2
    m4 esyscmd b.m4 high_risk_execution 0→1
    makefile sudo b.mk high_risk_execution 0→1, io 1→0
    matlab exit b.m high_risk_execution 0→1, branch 2→0, safety 1→0, io 1→0, safety_bypasses 3→2, state_mutation 14→6
    objective-c abort b.mm high_risk_execution 0→1, branch 1→0, state_mutation 9→3
    perl system b.pl high_risk_execution 0→1, branch 2→0, safety 1→0, io 1→0, state_mutation 9→3
    php popen b.php high_risk_execution 0→1, branch 2→0, safety 1→0, state_mutation 6→2
    powershell kill b.ps1 high_risk_execution 0→1, branch 2→0, safety 1→0, io 1→0, state_mutation 6→2
    ruby system b.rb high_risk_execution 0→1, branch 1→0, safety_bypasses 3→2, state_mutation 6→2
    scala Runtime.getRuntime.exec b.scala high_risk_execution 0→1, branch 2→0, state_mutation 6→2
    scheme eval b.scm none — see below
    shell sudo b.sh high_risk_execution 0→1, branch 1→0, io 1→0, safety_bypasses 3→2, state_mutation 6→2
    solidity selfdestruct b.sol high_risk_execution 0→1, branch 2→0, state_mutation 9→3
    swift assertionFailure b.swift high_risk_execution 0→1, branch 2→0, api 4→3, state_mutation 6→2
    tcl exec b.tcl high_risk_execution 0→1, branch 2→0, safety 1→0, io 2→1, safety_bypasses 3→2, state_mutation 9→3
    typescript eval b.ts high_risk_execution 0→1, branch 2→0, safety 1→0, state_mutation 6→2
    zig std.process.exit b.zig high_risk_execution 0→1, branch 2→0, safety 1→0, state_mutation 6→2

    Placement: every literal already sat inside its probe_state-family function except javascript, which had it at module scope in a.js — the exact python pilot shape (flat 500-char fallback let probeSafety's typeof dampen it). Moved into probeGlobals; eval then reads +1. dockerfile and makefile have no function bodies to scope to and needed none (no safety keyword in either file).

    Four shapes worth recording

    • The common case (25 languages). The retired "if" was a phantom branch inside the mutation probe, so state_mutation collapses 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.
    • eval was never the danger keyword there. matlab, ruby, shell, tcl all match eval under safety_bypasses, not high_risk_execution — so their old decoy was measuring the wrong family and their safety_bypasses drops 3→2.
    • Already-counting decoys. dockerfile (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 prose if, so its decoy now says what it always measured.
    • swift api 4→3. The old sentence's "open" is a Swift access-level keyword, so it had been inflating api — 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_mutation medians 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.

  4. squid-protocol commented on Sep 2, 2026

    @squid-protocol
    OwnerAuthor

    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 io after that migration — the old sentence's SELECT is an io keyword there, so part of that 11 is corpus-side. Both edits are in the issue body.

  5. squid-protocol commented on Sep 2, 2026

    @squid-protocol
    OwnerAuthor

    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.

    file cell before → after planted as
    a.css globals 0 → 2 html {} / body {} inside probe-globals
    b.css safety_bypasses 0 → 2 *::before {} / *::after {} inside probe-bypass
    main.css doc 0 → 1 /** block on the entry at-rule
    main.css ownership 0 → 1 /* Author: ... */
    b.html telemetry 0 → 2 two navigator.sendBeacon(...) after probe_telemetry's <script>
    c.html cleanup 0 → 2 clearInterval(...) / clearTimeout(...) after probe_cleanup's

    The four choices that were not free

    • css safety_bypasses is 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. *::before matches safety_bypasses and misses globals (no {/, after the *). An #id { selector — the rule's other alternative — would have tripped the class_start = 0 tripwire.
    • css ownership is Author:, 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.
    • html plants are element text, not on*= handlers. onclick="clearInterval(1)" fires reflection_metaprogramming (an input to risk_cognitive_load, so a scored column moves) plus listeners. Measured, then rejected.
    • html telemetry is not <script src="…analytics…">. That is the rule's other form, but src= is an io keyword, so it would have added 2 io to b.html and muddied a planted column. And both plants sit deliberately outside the <script> tags: the polyglot splitter hands script bodies to the JS lens (ledger html-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

    • css io, state_mutation, cleanup, telemetry and html globals, high_risk_execution, state_mutation stay 0 because the registry defines no rule — those are n/a cells, not misses. Recorded in each manifest's notes.
    • css api, encapsulation, dead_code stay 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.
    • Expect the A.5 regen to move css risk_documentation (doc+ownership now nonzero), css risk_safety_score (safety_bypasses 0→2) and html risk_* 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.

  6. squid-protocol commented on Sep 2, 2026

    @squid-protocol
    OwnerAuthor

    A.2 follow-up pushed (plant(css): api + encapsulation on main.css) — gate now 80 assertions, PASS.

    api was the one that cost a cell: _calc_api_exposure short-circuits to 0.0 when api == 0, so css read risk_api_exposure 0.0 against a 5.29 median purely because the probe was unplanted. encapsulation was not even a manifest key before; it is now pinned 1/0/0/0 across the four files.

    dead_code deliberately 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 red risk_dead_code cell instead of closing one. Written into the manifest notes so it is not re-derived.

    For A.5 attribution: encapsulation_ratio is 1 - globals/(total_vars + globals) — a function of globals, not of the encapsulation signal. So A.2 planting globals 2 in a.css is 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.

  7. squid-protocol commented on Sep 2, 2026

    @squid-protocol
    OwnerAuthor

    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.

    item result
    perl =cut the big one — see below
    apex Type.forName chain dependency_links 0 → live; a/b/c popularity 1, betweenness .167/.167/0, closeness .25/.333/.375, producer_ratio .5/.5/1.0; api 0→3 each
    agc CA-register args args 2 → 13 (4/3/3/3), avg_func_args 0.167 → 1.0 = median
    header @author swaps apex only — agc and fortran were already clean
    yaml single doc plant doc 2 → 1
    cobol *> @return (#2661 step 1) doc 1 → 2 by design, ledgered, awaiting step 2
    abap / assembly / cobol / sqlite decoys migrated, all four gates green

    perl =cut was not a doc nit

    main.pl had =pod with no =cut. detector.py ~L3042 (the #2239 POD strip) blanks from a POD opener to the next =cut or, failing that, to end of file:

    m_end = pod_end.search(safe_code, m_start.start())
    end_idx = m_end.end() if m_end else len(safe_code)

    So the whole of main.pl was invisible to the structural slicer, and the corpus had been recording that as perl's morphology. One line:

    main.pl before after
    avg_func_loc 0.0 6.75
    avg_func_complexity 0.0 0.75
    func_internal_density 0.0 0.111
    structural_mass 104.52 11.9 (siblings 8.3 / 11.44 / 9.36)

    That was functions_found 9 against a 13 median — exactly main.pl's four subs — and it is the direct cause of perl's avg_func_loc -27%, avg_func_complexity -38%, max_func_complexity -50%, func_complexity_gini -53%, func_internal_density -49%, control_flow_ratio -40% and structural_mass +212%. Seven cells from one missing line. The only signal it moves is doc 1→2, because =cut is in the same alternation as the POD openers with no pairing — the #2658 shape. Filed as #2670, ledger perl-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_capture reads. 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 to api 3 (existing ledger shape, apex added to languages_seen). Deliberate collateral: Type.forName ×3 is also reflection_metaprogramming, a risk_cognitive_load input — 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 now AUTHOR. + the new line = 2. cobol cannot dodge this the way apex did: its ownership rule matches only AUTHOR. — there is no second header idiom — so the interim 2 is unavoidable, not a choice. Ledger cobol-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 with CAF ZERO, which looks like it should match and does not — \bZ\b fails against ZERO. Each function now opens with CA A (the argument arrives in the accumulator). b.agc's PROBESTATE had two args hits, so its surplus XCH Q became XCH TEMP, keeping state_mutation.

    Two process notes

    • A silent tooling bug, found and fixed: my notes-append helper compared 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 in chore(notes). Counts and decoy outcome fields — GATING's actual citation requirement — were correct throughout.
    • string-literal-selective-shielding updated: 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 is safety_bypasses not danger in matlab/ruby/shell/tcl; swift's api counted the prose open; abap's "third profile" was the Silencer Region; scheme moved no count at all; assembly keeps its ×3 flux because ret is a branch keyword).

    Batch A is now A.4 (ledger, T1) → A.5 (regen + PR, T1). Not claiming either yet.

  8. squid-protocol commented on Sep 2, 2026

    @squid-protocol
    OwnerAuthor

    claiming A.4 — claude-opus-5 — same branch corpus/decoy-migration-wave2 (keyword-rosetta).

    Session-start checks:

    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 A fix took its args 2 → 13 and avg_func_args 0.167 → 1.0, i.e. exactly the median. A.4's list was written against the stale bias_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.

  9. squid-protocol commented on Sep 2, 2026

    @squid-protocol
    OwnerAuthor

    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, disposition intended-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_start rule) declares no parameter list, and the args rule 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-wide args against 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:

    language args rule actually matches plant-anyway verdict
    css functional notation (calc|var|url|…) in declarations — all 3 hits are the @import chain's url("a.css") calc() reaches 13 at zero overlap cost — declined on meaning
    html attributes (data-*, name, value, …) — the 3 hits are a.html's data-testid ×2 and main.html's name="author" ownership meta data-probe= is clean (name=/value= also fires api) — declined on meaning
    dockerfile ARG — a file-scoped build variable, 1 per file by design 9 more ARGs are overlap-free (and unlike ENV, no globals) — declined: nothing would consume them
    yacc $$/$n, genuinely yacc's nearest parameter surface rejected on cost: { $$ = $1; } also scores state_mutation, so 12 actions move a planted scored column to fill an unplanted one
    yaml a with: block — which binds to uses:, never to the corpus's run: steps rejected on cost: a uses: line fires import and _dependency_capture → forged edges in the planted main→a→b→c DAG
    makefile $(call f,…) / $(1) — main.mk's one hit is its $(call probe_branch) dispatch rejected twice: define matches the macros rule, not func_start (converting probes would delete 12 planted func_starts), and $(call …) fires the scored reflection_metaprogramming
    sqlite placeholders, VALUES (…), CTE parameter lists — all DML rejected on cost: every DML verb that can carry one (SELECT|INSERT|UPDATE|DELETE|REPLACE) is also an io keyword here, and sqlite's io is B.4's largest residual

    cobol-args-clause-match-morphology keeps its id (cited in data/cobol/expected_signals.json) and its two cobol-specific sub-findings, and now cross-references the general shape. The generalisation also gains cobol avg_func_args, which that entry's args-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 A plant 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, every languages_seen a known language.

    Three rewrites were judgment rather than transcription:

    • The join is a cross-product, so a collective entry over languages with nothing itemised would mark their red cells explained — the exact "plausibly-explained wrong number" failure the tier table warns about. batch4-dual-keyword-overlaps drops dart, groovy, objective-c, scala, scheme, zig (no dual-rule keyword in their manifest notes; groovy's and objective-c's args behaviour belongs to ts-callparen-args); batch5-tier2-morphology-shapes drops markdown and yacc, both already covered by their own entries. Reasons recorded in each verdict, not just in this comment.
    • markdown removed from 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 a None import rule is not a None _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 therefore risk_api_exposure 0.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-tracked gets 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 _doc as the sentinel for that class.

    Two red cells become explained as a side effect: jcl/api (batch5 now names api; na_check.py --regenerate shrinks docs/na_baseline.json from 28 to 27) and markdown/avg_func_args, added with functions_found to markdown-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.py reports no new unreviewed absences.

    For A.5 and E.1

    • A.5: A.4 changed no corpus counts — only ledger, manifest notes and the n/a baseline — so the regen's movers are still A.1–A.3's alone. Attribution stays as A.1/A.2/A.3 predicted: branch/safety/io/state_mutation medians down across the board, css risk_api_exposure/risk_documentation/risk_safety_score, html telemetry/cleanup risk columns, perl's seven morphology cells, apex's seven graph+api cells, agc avg_func_args.
    • E.1: the join it needs is signal.split("|") × languages_seen, which bias_report.classify_na already 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 with still_reproduces: false describes a resolved shape and must not explain a live red cell; and the _doc contract should be enforced by the tool (unknown token, unsorted, unknown language → fail), otherwise the next entry re-introduces prose.
  10. squid-protocol commented on Sep 2, 2026

    @squid-protocol
    OwnerAuthor

    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.

  11. squid-protocol commented on Sep 2, 2026

    @squid-protocol
    OwnerAuthor

    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

    • Consistency 76% → 80% across 55 metrics; metrics at ≥80% green-band share 29 → 33.
    • 2306 comparable cells: red 301 → 273 (−28), amber 283 → 213 (−70), green 1722 → 1820 (+98).
    • 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.json 28 → 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:

    1. Signal layer is the reblessed corpus. All 828 planted-signal cells in bias_data.json equal the sum of their gated manifest. Zero mismatches. Nothing in the signal layer is unaccounted for by construction.
    2. No orphan movement. Every language with a moved cell has a corpus edit on this branch (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.
    3. Every moved risk_* cell has a moved input. 144 moved; 135 via a moved governed signal. The other 9 were run down individually: 4 rest on api/encapsulation, which are not report columns (apex api 0→9 from A.3's chain, css api 0→1 + encapsulation 0→1 from A.2, swift api 10→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 (agc risk_api_exposure/risk_verification, css/cobol/dockerfile risk_verification).

    The medians moved, and by more than A.1 guessed

    metric median before → after metric median before → after
    branch 5 → 3 (−40%) risk_state_flux 22.9 → 9.44 (−59%)
    state_mutation 6 → 2 (−67%) risk_cognitive_load 6.67 → 2.36 (−65%)
    cog_raw 0.1375 → 0.055 (−60%) high_risk_execution 2 → 3 (+50%, by design)
    control_flow_ratio 0.1665 → 0.09375 (−44%) dependency_density 0.370 → 0.531 (+44%)

    dependency_density needed chasing — it moved in 32 languages whose only edit was a decoy string. It is import_count / max(int(coding_loc × control_flow_ratio), 1) (record_keeper.py ~L487), so dropping the phantom branch shrinks the denominator. Downstream of control_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:

    cell status
    cobol doc 1→2 ledgered cobol-2661-author-doc-collision — unavoidable until #2661 step 2
    perl doc 1→2 ledgered perl-pod-delimiter-double-count (#2670)
    apex import 3→6 new — filed as #2671

    New engine issue #2671 (apex import rule) — B.1/B.3 material

    apex's import rule is compiled with re.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 "any word.word", so every qualified method call is an import. Micro-repro: foo.bar, conn.clear, Logger.info all match; recompiling the identical pattern without the flag returns nothing for all three. System.debug/Database.query are correctly excluded by the namespace lookahead. Swept every language — apex is the only rule combining IGNORECASE with 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. Ledger apex-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_REF needs a bump after #32 merges (repo admin, same gh api -X PATCH as Batch 0.1). This batch changes manifests and na_baseline.json, so gitgalaxy's rosetta-audit keeps testing the stale corpus until the pin moves; then gh workflow run rosetta-audit.yml --ref main to confirm green. ENGINE_REF stayed main throughout — Batch A is corpus-only, so there is no engine PR to sequence against.

    Handoff

  12. squid-protocol commented on Sep 2, 2026

    @squid-protocol
    OwnerAuthor

    A.5 CI: keyword-rosetta#32 green — verify PASS (4m48s, run 33672422860), MERGEABLE/CLEAN. Awaiting review + merge, then the KEYWORD_ROSETTA_REF bump.

  13. squid-protocol commented on Sep 2, 2026

    @squid-protocol
    OwnerAuthor

    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:

    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.

  14. 33 remaining items

  15. squid-protocol commented on Sep 4, 2026

    @squid-protocol
    OwnerAuthor

    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.py L1383 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 closing end) 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 of raw_state_slop_orphans, one heuristic. Through the Contextual Baseline Fix (orphans → api) it is also why ada, haskell, sqlite, yaml and dockerfile bottom out on risk_api_exposure and risk_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 RUN buckets 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 api gate without the rule matching anything: verify_language.py reads arch_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 NAME and no probe exports; go's is ^func [A-Z]… and every probe function is lowercase. It inverts the ten raw_arch_api cells too: those are the only languages where the rule fires. Fixing it turns ~36 languages red on api — a corpus wave of its own, deliberately not folded into F.4.

    Three things the regen forced

    1. The report could not run against engine main at all. _get_tier is gone (engine PR 1: language-strictness table + measured fidelity coefficient replace _get_tier (child of #2716) #2718), so scoring_tiers() raised — tonight's nightly would have failed. Replaced with scoring_strata() off analysis_lens.strictness_constants: stratum = the language's count of False strictness columns (irc0…irc4). This is the epic's "retire the within-tier banding" item, now shipped. Keys tiers/tier_sensitive → strata/constant_sensitive. The fidelity table is deliberately not held equal — it is generated from this corpus.
    2. The dependency map had silently lost an input. engine PR 2: per-file dynamism count replaces the flat irc term (child of #2716) #2719 moved reflection_metaprogramming out of _calc_documentation/_calc_cog_load into self._dynamism(), so the AST scan stopped seeing it — it had been carrying F.3's yacc verdict. risk_dependencies() now follows helper calls transitively.
    3. The risk family's length term is located: every corpus file is under 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's evidence-mass floor, so the density denominator is constant here and a numerator that grows with the program is unopposed.

    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 (shell risk_documentation 55.8 → 33.4, cobol 55.5 → 29.3, every cog_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 the irc0 median it is now compared with rather than tier-1's. New leak row: risk_documentation +0.64 within irc2.

    Census artifact: https://claude.ai/code/artifact/e7addb1b-578d-4af6-896e-1cc63e08c251

    Next: F.5 — the 19 singletons, now the whole remainder.

  16. squid-protocol commented on Sep 4, 2026

    @squid-protocol
    OwnerAuthor

    status F.5: done — same PR, keyword-rosetta#51. bias_report.py --gate exits 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 test 2 and state_mutation 2 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-level env: 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_found have 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-risk selector, yaml's jobs:, dockerfile's FROM stage, and kotlin's object Region {}, which is the globals plant. Also: m4's $1 is a use-site not a declaration (args 18 vs 13); Environment.Exit is both a global and a danger call in C#; dockerfile/sqlite functions_found are igniter buckets; html's func_start rule matches nine <script openers 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

  17. squid-protocol commented on Sep 5, 2026

    @squid-protocol
    OwnerAuthor

    #2729 done (the api gate + the corpus wave it predicted). keyword-rosetta#53: verify_language.py now reads raw_arch_api as api and pins the orphan conversion as api_orphan_credit; all 46 manifests re-blessed mechanically; 31 languages planted an explicit public surface in their own vocabulary. api fires in 37 of 46 languages, against 10 before. 46/46 gates PASS, na_check --ci clean, bias_report --gate exit 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:

    Note for whoever picks up the n/a sweep: raw_arch_api is no longer an exact-agreement-on-zero column, and risk_documentation is no longer a flat 29.896 in every strictness stratum — both were artefacts of nobody measuring api.

  18. squid-protocol commented on Sep 5, 2026

    @squid-protocol
    OwnerAuthor

    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

  19. squid-protocol commented on Sep 5, 2026

    @squid-protocol
    OwnerAuthor

    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:

    Result on the branch: na_check 0 unreviewed / baseline 0 cells, bias_report --gate exit 0 / 0 unexplained (engine a214192, measured values byte-identical — review-state flips only), and all 46 language_deviations.py gates 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).

  20. squid-protocol commented on Sep 5, 2026

    @squid-protocol
    OwnerAuthor

    Non-green cell pass, 2026-09-05 (engine 0e521e8, corpus 3b76b48)

    Scope: every cell of docs/bias_data.json outside 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) and tools/screen_plant.py.

    Filed (engine):

    Filed (corpus): squid-protocol/keyword-rosetta#59 — css/yaml/dockerfile safety read 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), jcl test (TYPRUN/IEBCOMPR 0 hits, no concept), solidity io (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/sqlite api (corpus tripwire / func_start overlap, not a rule gap), the args family (per-language verdicts hold), html func_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).

  21. squid-protocol commented on Sep 5, 2026

    @squid-protocol
    OwnerAuthor

    Red-cell triage pass, 2026-09-05 — 12 issues filed (#2763–#2774)

    Not a claim on an existing item. bias_report.py --gate exits 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 46 language_deviations.py outputs), then by metric ranked on consistency score. Engine 3b3568e0, corpus main 6183c4b, everything below measured rather than read off a ledger entry.

    Extraction / slicer

    # finding evidence
    #2763 tcl Mode B slices the parameter list as the function body — find(opener, start_idx) lands on {params}, not {body} 352/352 crucible tcl functions record loc 1, complexity 0; index table per match
    #2767 yaml: every extracted step is named run — func_start captures no name, so orphan + duplicate census and per-step identity are all dead 13 slices, one name; _closed_literal_capture returns frozenset() so it is not even a keyword bucket

    Rule contracts (the #2730 shape, four more rules that need it)

    # rule the finding
    #2765 state_mutation three incompatible definitions live at once (named verbs / mutable-binding declarations / bare =); haskell counts IORef in a type signature, dockerfile double-counts its own globals plants. Governs the two worst metrics
    #2766 encapsulation rust counts pub — 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)
    #2770 structural_boundaries 0–45 spread on identical intent; shell's rule is a coreutils inventory (ls/cp/mv/touch). It is control_flow_ratio's denominator
    #2772 immutability_locks rust's let invisible, swift's let scores 11 — the rule rewards notation, and it is subtracted at ×0.5 from risk_state_flux
    #2773 args objective-c (+62%) and typescript count call-site arguments; every extra hit is another signal's plant (XCTAssert, free, os_log)

    Signal scope

    # finding evidence
    #2764 assembly/agc branch counts unconditional transfers — ret 13, call 7, b 2, jmp 1 vs je/jne 2 #2545's shape and its "relocate, not delete" remedy; assembly is the ceiling on four shape descriptors

    Orphan census (three separate mechanisms, all post-#2754)

    # finding evidence
    #2768 the len(func_name) > 3 guard exempts short names outright 317/8838 crucible functions (lua 29%), incl. Go's New/Run/Set/Len and jQuery's on/off/get
    #2774 an export -f name line counts as a use shell A/B scan: raw_state_slop_orphans 0 with the export, 3 without. threat_locations["api"] already holds the exact line set to discount

    Scoring / reporting layer

    # finding evidence
    #2769 PATH_MODIFIERS "Structural Mass": a missing group makes tsx?$ a top-level alternative → every .ts/.tsx file gets ×0.1 byte-identical files: probe.js 6.16, probe.ts 0.62, widget.tsx 0.62
    #2771 raw_arch_api bands a per-file declaration count against a per-function median one granularity mismatch, three red columns (raw_arch_api 76% · risk_api_exposure 71% · risk_documentation 76%)

    Coverage against the weakest metrics

    metric consistency owning issue(s)
    control_flow_ratio 33% #2770
    risk_state_flux 42% #2765 (high tail) + #2772 (low tail)
    state_mutation 60% #2765
    raw_state_slop_orphans 61% #2774, #2768, #2767
    avg_func_complexity / func_internal_density 67% #2763 (the −100% floor) + #2764 (the +811% ceiling)
    immutability_locks 67% #2772
    branch 69% #2764
    risk_api_exposure / raw_arch_api / risk_documentation 71–76% #2771
    args / avg_func_args 73–80% #2773

    keyword_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

    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.

  22. squid-protocol commented on Sep 6, 2026

    @squid-protocol
    OwnerAuthor

    STRUCTURE COUNTS sweep — one issue per out-of-band dot

    Measured 2026-09-05 on engine main a59ecf6b / corpus main 2038a86. The bias chart's STRUCTURE COUNTS group has 12 cells outside the green band across the three extraction rows; pagerank is clean at 100%. Every one is already ledgered or derived (the gate's unexplained count stays 0) — these issues ask the next question, which is what would actually move them.

    row consistency out-of-band cells
    functions_found 91% sqlite +131%, html −100%, markdown −100% (red) · dockerfile +31% (amber)
    classes_found 89% cobol 1, css 1, jcl 1, dockerfile 4, kotlin 2 (all red — 0 median, exact-agreement basis)
    dependency_links 93% embedded_python +133% (red) · dockerfile +33%, jcl +33% (amber)

    functions_found — the slicer counts things that are not functions, and the report scores languages that have none.

    classes_found — five cells where the engine is right and the comparison is not.

    dependency_links — the column is not counting links.

    Two cross-cutting shapes fall out

    1. The structure-count rows have no n/a mechanism (functions_found[markdown] −100%: func_start is n/a for markdown but functions_found scores it anyway — the structure-count rows have no n/a mechanism #2795). Seven cells across five languages are n/a on the governing rule and scored on its structure count anyway. This is a prerequisite for functions_found: the function population counts slicer buckets that #2547/#2728 already agreed are not identifiers — sqlite +131%, dockerfile +31% #2792/#2793, whose honest fix turns an over-count into an absence, and for reading the classes_found row at all.
    2. Zero-median banding is not proportionate. Any nonzero against a 0 median is drawn at full radius, so cobol's 1 and dockerfile's 4 are 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.

  23. squid-protocol commented on Sep 6, 2026

    @squid-protocol
    OwnerAuthor

    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:

    # shape cells it covers
    #2792 the function population counts slicer buckets that #2547/#2728 already agreed are not identifiers functions_found sqlite +131%, dockerfile +31%
    #2795 the structure-count rows never got #2669 F.3's n/a mechanism functions_found markdown −100%, and 7 cells across 5 languages scored on rows whose governing rule is n/a
    #2796 five red cells on a 0 median are language morphology; the row needs a declaration-requirement stratum classes_found cobol, jcl, dockerfile, kotlin (+ css, see #2798)
    #2798 #1295's out-of-scope decision is honored by the tri-comparison and accuracy charts and not wired into bias_report.py classes_found css
    #2801 import_count = len(raw_imports) counts capture strings before _resolve_target runs dependency_links embedded_python +133%, dockerfile +33%, jcl +33%
    #2803 JCL's DSN= capture is a real dependency that is not a file — the case that decides #2801's fix dependency_links jcl

    Deleted as duplicates of the above: the per-language issues for jcl/dockerfile/kotlin classes_found, dockerfile dependency_links, and dockerfile functions_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

    1. The structure-count rows have no n/a mechanism (functions_found[markdown] −100%: func_start is n/a for markdown but functions_found scores it anyway — the structure-count rows have no n/a mechanism #2795) — prerequisite for functions_found: the function population counts slicer buckets that #2547/#2728 already agreed are not identifiers — sqlite +131%, dockerfile +31% #2792, whose honest fix turns an over-count into a −100% absence, and for reading classes_found: five red cells on a 0 median are language morphology, not extraction — the row needs a declaration-requirement stratum #2796's row at all.
    2. Zero-median banding is not proportionate — any nonzero against a 0 median is drawn at full radius, so cobol's 1 and dockerfile's 4 are 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.

  24. squid-protocol commented on Sep 6, 2026

    @squid-protocol
    OwnerAuthor

    Final status, 2026-09-06 — superseded by #2812

    bias_report.py --gate exits 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):

    What this epic established stays in force under #2812: the session protocol (claim/status comments, one layer per PR, one Closes per 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-engineepicmetrics

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions