Skip to content

rosetta[ada]: cross-language consistency — 3 red / 2 amber metrics, 4 ledgered shapes #2562

Closed as not planned

Description

@squid-protocol

Part of #2560 — per-language tracking for the keyword-rosetta control corpus (built for #1096). Planted intent is identical in every language, so every deviation below is measured bias vs. the 46-language median, validated in the corpus's deviation ledger. 🔴 = beyond ±50% of the cross-language median, 🟡 = ±25–50%.

Triage order (per the epic): structure detection first, then signal/keyword rules, then risk-score consequences — §3's numbers are downstream of §1–§2 and re-baseline as those fix. Cross-cutting engine issues (e.g. #2535/#2546) fix many languages at once; this issue tracks this language's residual after each cross-cutting fix lands, and closes when the language sits inside the ±25% band on every comparable metric (or every remaining deviation is ledgered as intended morphology).

1. Structure detection (fix first)

  • 🔴 functions_found: 0 vs median 13 (-100%)

2. Signal / keyword deviations

  • 🟡 keyword_hits: 176 vs median 247.5 (-29%)

3. Risk-exposure consequences (downstream)

  • 🔴 risk_api_exposure: 0 vs median 5.31104 (-100%)
  • 🔴 risk_cognitive_load: 24.2458 vs median 15.1444 (+60%)
  • 🟡 risk_tech_debt: 20 vs median 39.9576 (-50%)

Ledgered shapes touching ada

defect type issue evidence summary
census-requires-git-tracked engine-semantic — — GalaxyScope's census enumerates git-tracked files only; an untracked folder scans as '0 files mapped' with no per-file warning
state-flux-branch-weighting engine-semantic #2546 b.adb state_mutation is recorded x3 when branch context exists in the file ('flux' semantics, matching the state_flux column name)
ada-end-if-branch-inflation keyword-overlap — (notes) ada's closing 'end if' re-matches \bif\b: every well-formed if statement counts branch at least twice (if + end if)
string-literal-selective-shielding upstream-question #2535 b.adb Keywords inside one string literal ('if eval fails, try open') count toward branch (+2), safety (+1), io (+1) but eval does NOT count toward high_risk_execution (routes …
Decoy outcomes (file-level evidence)
  • main.adb · never calls OS_Exit and no loop keyword (comment): stripped: contributed 0
  • b.adb · Note := "if eval fails, try open" (string): if COUNTS (branch +1); eval/try/open inert in ada's rules. The phantom branch context triggers the flux weighting: 2 raw := become state_mutation 6. Ledger: string-literal-selective-shielding, state-flux-branch-weighting
  • c.adb · Hack_Level : Integer (code): inert (underscore + lowercase vs case-sensitive \bHACK\b); declared without := so no state hit

Reproduce / evidence

Activity

  1. added
    metrics
    core-engine
    on Aug 31, 2026
  2. squid-protocol commented on Sep 3, 2026

    @squid-protocol
    OwnerAuthor

    Status: 2🔴 / 2🟡 unexplained, 5 further out-of-band cell(s) accounted for

    Generated from docs/bias_data.json + deviation_ledger.json by tools/issue_status.py, using the same verdict machinery bias_report.py --gate runs on (gitgalaxy#2669 E.1), so this comment and the gate cannot disagree about what is left.

    Still unexplained — the work this issue tracks

    metric value median dev group
    🟡 token_mass 154.5 122 +27% signals
    🔴 risk_api_exposure 0 5.289 -100% risk
    🔴 risk_documentation 0 55.81 -100% risk
    🟡 risk_tech_debt 24.55 46.57 -47% risk

    Out of band, but accounted for

    derived — the deviation entered through an input that is itself out of band -- the same finding counted twice

    • avg_func_complexity — inherits branch
    • control_flow_ratio — inherits branch
    • max_func_complexity — inherits branch

    ledgered — a validated ledger entry names this language and this metric

    • avg_func_args — ada-typed-parameter-splits-into-three-args
    • branch — string-literal-selective-shielding, ada-end-if-branch-inflation

    Close criterion (gitgalaxy#2669 Batch E.4)

    python tools/language_deviations.py ada exits 1: 4 unexplained cell(s) remain. Each needs a fix, or a validated ledger entry saying why it is correct, before this issue can close.

  3. squid-protocol commented on Sep 6, 2026

    @squid-protocol
    OwnerAuthor

    Closed 2026-09-06 as superseded by #2812 (docs/contract_roadmap.md, decision D2). Every out-of-band cell for ada is accounted for (the gate reads 0 unexplained) and is now tracked by cause family, not by language: the ledger entry that explains it, its cause category in keyword-rosetta's docs/bias_data.json["cell_categories"] (echo / inherency / extraction / correlation / scoring), and the family issue #2812 lists for that cause. Live standing at any time: python tools/language_deviations.py ada in keyword-rosetta, or docs/findings_by_language.md#ada.

    This is a change of axis, not a claim that ada is green. The §10 capstone in docs/language_status/ada.md is written when the language reads clean by language_deviations.py, by whichever family PR gets it there — no longer tied to this issue.

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-enginemetrics

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions