Skip to content

rosetta[html]: cross-language consistency — 14 red / 7 amber metrics, 3 ledgered shapes #2578

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)

  • 🔴 args: 3 vs median 13 (-77%)
  • 🔴 func_start: 0 vs median 13 (-100%)
  • 🔴 functions_found: 0 vs median 13 (-100%)

2. Signal / keyword deviations

  • 🔴 cleanup: 0 vs median 2 (-100%)
  • 🔴 doc: 2 vs median 1 (+100%)
  • 🔴 globals: 0 vs median 2 (-100%)
  • 🔴 high_risk_execution: 0 vs median 2 (-100%)
  • 🔴 safety_bypasses: 0 vs median 2 (-100%)
  • 🔴 state_mutation: 0 vs median 6 (-100%)
  • 🔴 telemetry: 0 vs median 2 (-100%)
  • 🟡 branch: 3 vs median 5 (-40%)
  • 🟡 comment_lines: 15 vs median 30 (-50%)
  • 🟡 keyword_hits: 135 vs median 247.5 (-45%)

3. Risk-exposure consequences (downstream)

  • 🔴 risk_api_exposure: 1.0506 vs median 5.31104 (-80%)
  • 🔴 risk_cognitive_load: 4 vs median 15.1444 (-74%)
  • 🔴 risk_safety_score: 0 vs median 37.297 (-100%)
  • 🔴 risk_state_flux: 0 vs median 19.9999 (-100%)
  • 🟡 risk_documentation: 32.3996 vs median 57.1208 (-43%)
  • 🟡 risk_spec_match: 52 vs median 96 (-46%)
  • 🟡 risk_tech_debt: 20 vs median 39.9576 (-50%)
  • 🟡 risk_verification: 1.1948 vs median 2.3628 (-49%)

Ledgered shapes touching html

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
batch5-tier2-morphology-shapes keyword-overlap — — Collective entry for Tier-2 finditer/report-confirmed shapes, detailed per-manifest: css at-rules triple-count (func+branch, @supports also safety; args tracks @import u…
html-script-func-start-unreachable upstream-bug #2549 main.html html's func_start rule (<script>/<style> tags) never fires end-to-end: the polyglot splitter consumes the tags before html's rules run (micro-repro: <script>var x=1;</sc…
Decoy outcomes (file-level evidence)
  • main.html · 13 <script></script> tags corpus-wide (code): func_start 0 EVERYWHERE despite raw-regex matches: the polyglot splitter consumes the <script>/<style> tags before html's rules run (micro-repro: a script with real JS records the JS body's signals but func 0). Ledger html-script-func-start-unreachable; gitgalaxy#2549

Reproduce / evidence

Activity

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

    @squid-protocol
    OwnerAuthor

    Status: 6🔴 / 3🟡 unexplained, 14 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
    🔴 functions_found 0 13 -100% structure
    🔴 keyword_hits 59 148 -60% structure
    🔴 coding_loc 7 17.12 -59% signals
    🟡 encapsulation_ratio 1 0.75 +33% signals
    🟡 token_mass 79.75 122 -35% signals
    🔴 total_loc 10.5 24.75 -58% signals
    🔴 risk_api_exposure 0.8814 5.289 -83% risk
    🔴 risk_spec_match 0 100 -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

    • cog_raw — inherits args, total_loc, coding_loc
    • structural_mass — inherits args, total_loc, coding_loc, func_start

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

    • args — batch5-tier2-morphology-shapes, args-no-parameter-surface-morphology
    • control_flow_ratio — control-flow-ratio-denominator-is-a-vocabulary-tally
    • func_start — html-script-func-start-unreachable, batch5-tier2-morphology-shapes
    • high_risk_execution — batch5-tier2-morphology-shapes, html-srcdoc-invisible-execution-gap
    • risk_documentation — path-and-extension-modifiers
    • risk_state_flux — path-and-extension-modifiers

    undefined — a per-function descriptor for a language with no functions: the quotient has no value, so this is not a deviation

    • avg_func_args — language records no functions
    • avg_func_complexity — language records no functions
    • avg_func_loc — language records no functions
    • func_complexity_gini — language records no functions
    • func_internal_density — language records no functions
    • max_func_complexity — language records no functions

    Close criterion (gitgalaxy#2669 Batch E.4)

    python tools/language_deviations.py html exits 1: 9 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 html 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 html in keyword-rosetta, or docs/findings_by_language.md#html.

    This is a change of axis, not a claim that html is green. The §10 capstone in docs/language_status/html.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