Skip to content

rosetta[dockerfile]: cross-language consistency — 5 red / 11 amber metrics, 5 ledgered shapes #2572

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: 4 vs median 13 (-69%)
  • 🟡 dependency_links: 4 vs median 3 (+33%)
  • 🟡 func_start: 17 vs median 13 (+31%)
  • 🟡 functions_found: 17 vs median 13 (+31%)
  • 🟡 import: 4 vs median 3 (+33%)

2. Signal / keyword deviations

  • 🔴 io: 6 vs median 3 (+100%)
  • 🟡 high_risk_execution: 3 vs median 2 (+50%)
  • 🟡 keyword_hits: 185 vs median 247.5 (-25%)
  • 🟡 safety: 1 vs median 2 (-50%)

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_state_flux: 39.9982 vs median 19.9999 (+100%)
  • 🟡 risk_documentation: 38.1027 vs median 57.1208 (-33%)
  • 🟡 risk_safety_score: 55.625 vs median 37.297 (+49%)
  • 🟡 risk_spec_match: 61.3333 vs median 96 (-36%)
  • 🟡 risk_verification: 1.70158 vs median 2.3628 (-28%)

Ledgered shapes touching dockerfile

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.dockerfile state_mutation is recorded x3 when branch context exists in the file ('flux' semantics, matching the state_flux column name)
batch4-dual-keyword-overlaps keyword-overlap — — Collective entry for batch 4's finditer-confirmed dual-rule keywords, each detailed in its language's manifest notes: agc RESUME (cleanup+branch), livecode global (globa…
orphan-conversion-opaque-counts upstream-question #2547 — On languages without a same-file call graph the orphan census includes non-function shapes, so the orphan->api conversion count diverges from visible function counts: sh…
string-literal-selective-shielding upstream-question #2535 b.dockerfile 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)
  • b.dockerfile · RUN export NOTE="if eval fails, try curl" (string): if (branch +1), curl (io +1) AND eval (high_risk +1) all count — dockerfile is unshielded. state 4 = this export's 1 raw x3 (its own literal provides the branch context — per-RUN flux scope) + the COUNTER export x1. Ledger: string-literal-selective-shielding, state-flux-branch-weighting

Reproduce / evidence

Activity

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

    @squid-protocol
    OwnerAuthor

    Status: 4🔴 / 7🟡 unexplained, 10 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
    🟡 dependency_links 4 3 +33% structure
    🟡 functions_found 17 13 +31% structure
    🟡 keyword_hits 76 148 -49% structure
    🔴 coding_loc 7.75 17.12 -55% signals
    🟡 dependency_density 0.775 0.5312 +46% signals
    🟡 token_mass 75.25 122 -38% signals
    🟡 total_loc 14.75 24.75 -40% signals
    🔴 risk_api_exposure 0.8814 5.289 -83% risk
    🔴 risk_documentation 12.15 55.81 -78% risk
    🟡 risk_safety_score 58 42.05 +38% risk
    🔴 risk_state_flux 18.88 9.439 +100% 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_loc — inherits total_loc, coding_loc, func_start
    • func_internal_density — inherits args, func_start
    • structural_mass — inherits args, total_loc, coding_loc, func_start

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

    • args — args-no-parameter-surface-morphology
    • avg_func_args — args-no-parameter-surface-morphology
    • control_flow_ratio — control-flow-ratio-denominator-is-a-vocabulary-tally
    • func_start — batch4-dual-keyword-overlaps
    • import — batch4-dual-keyword-overlaps
    • safety — string-literal-selective-shielding, batch4-dual-keyword-overlaps
    • state_mutation — string-literal-selective-shielding, state-flux-branch-weighting, batch4-dual-keyword-overlaps

    Close criterion (gitgalaxy#2669 Batch E.4)

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

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