Skip to content

rosetta[jcl]: cross-language consistency — 13 red / 7 amber metrics, 2 ledgered shapes #2581

Closed

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: 1 vs median 13 (-92%)
  • 🟡 dependency_links: 4 vs median 3 (+33%)

2. Signal / keyword deviations

  • 🔴 cleanup: 0 vs median 2 (-100%)
  • 🔴 comment_lines: 5 vs median 30 (-83%)
  • 🔴 doc: 0 vs median 1 (-100%)
  • 🔴 fragile_debt: 0 vs median 1 (-100%)
  • 🔴 globals: 0 vs median 2 (-100%)
  • 🔴 planned_debt: 0 vs median 1 (-100%)
  • 🔴 safety: 0 vs median 2 (-100%)
  • 🔴 safety_bypasses: 0 vs median 2 (-100%)
  • 🔴 state_mutation: 2 vs median 6 (-67%)
  • 🔴 telemetry: 0 vs median 2 (-100%)
  • 🔴 test: 0 vs median 2 (-100%)
  • 🟡 branch: 3 vs median 5 (-40%)
  • 🟡 keyword_hits: 158 vs median 247.5 (-36%)

3. Risk-exposure consequences (downstream)

  • 🔴 risk_cognitive_load: 4 vs median 15.1444 (-74%)
  • 🟡 risk_api_exposure: 6.93756 vs median 5.31104 (+31%)
  • 🟡 risk_spec_match: 64 vs median 96 (-33%)
  • 🟡 risk_tech_debt: 20 vs median 39.9576 (-50%)
  • 🟡 risk_verification: 1.70246 vs median 2.3628 (-28%)

Ledgered shapes touching jcl

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…

Reproduce / evidence

Activity

  1. added
    metrics
    core-engine
    legacy-modernization
    priority: high
    on Aug 31, 2026
  2. squid-protocol commented on Aug 31, 2026

    @squid-protocol
    OwnerAuthor

    Status 2026-08-31: 13🔴/7🟡 → 6🔴/8🟡

    Root-caused per the epic's triage order. Three distinct causes, three deliverables:

    1. Real engine gap (filed #2610, fixed in PR #2611): prism never extracted JCL //* comments — jcl's line_exclusive delimiter list is deliberately empty (// prefixes every statement, so the stateless stripper can't express the whole-line positional form), and no positional path existed either. Every //* line stayed in the code stream: doc_loc 0 engine-wide, comment_analysis (doc/ownership/debt) structurally dead for JCL, ownership counting only by accident on the wrong surface. PR #2611 adds a line-count-preserving whole-line stripper (with a JES3 //*MAIN-verb guard) plus the signal rules JCL has genuine morphology for: safety = COND= RC-tests, safety_bypasses = COND=EVEN/ONLY, telemetry = MSGLEVEL=/MSGCLASS=, and the shared comment-anchored debt patterns.

    2. Corpus authoring gap (keyword-rosetta PR #4, draft until #2611 merges): args: 1 was not morphology — JCL expresses per-step arguments via PARM= and the engine rule already handled it (#2482); the shell just under-planted. Every EXEC step now carries PARM= → args 13, exactly at median, clearing the §1 structure red. Plants added for the new rules: safety 2, bypasses 2, telemetry 2, debt 1/1 — all land exactly (report-confirmed, strict gate PASS 76 assertions).

    3. Ledgered intended morphology (jcl-2610-rebaseline-residual-morphology, validated): cleanup deliberately has no rule (DISP=(...,DELETE) would double-count io's DISP= — recorded decision in #2610); doc/test/globals have no JCL concept to plant; dependency_links 4 = the DD DSN= capture (deliberate blast-radius design); comment_lines residual = the no-blank-lines proxy artifact; branch 3 / state_mutation 2 match planted intent exactly — their deviation is median inflation by the #2545 return-in-branch family and #2546 flux weighting, and re-baselines when those cross-cutting fixes land.

    Remaining after both PRs merge

    Everything in §1–§2 that is fixable at the jcl level is now fixed or ledgered.

  3. squid-protocol commented on Aug 31, 2026

    @squid-protocol
    OwnerAuthor

    Closing: every remaining deviation is ledgered, fixed, or owned by a named cross-cutting issue

    Final state after the full sweep (engine PRs #2611/#2618, corpus PRs keyword-rosetta#4/#6/#8):

    13🔴 / 7🟡 at open → 2🔴 / 8🟡, with 4 ledgered n/a

    Residuals tracked by #2545 / #2546 / epic #2560's scoring-side item — nothing left that is jcl-specific.

  4. 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
    🟡 keyword_hits 87 148 -41% structure
    🔴 coding_loc 6 17.12 -65% signals
    🟡 encapsulation_ratio 1 0.75 +33% signals
    🔴 total_loc 9.75 24.75 -61% signals

    Out of band, but accounted for

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

    • avg_func_loc — function-body-length-morphology
    • control_flow_ratio — control-flow-ratio-denominator-is-a-vocabulary-tally
    • dependency_links — jcl-2610-rebaseline-residual-morphology
    • func_internal_density — function-body-length-morphology
    • high_risk_execution — batch5-tier2-morphology-shapes

    Unreviewed n/a cells

    The registry defines no rule here, and no validated ledger entry records why — each is either real morphology to ledger or a missing-rule engine gap of the kind gitgalaxy#2610 turned out to be: risk_concurrency, risk_dead_code.

    Close criterion (gitgalaxy#2669 Batch E.4)

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

  5. squid-protocol commented on Sep 5, 2026

    @squid-protocol
    OwnerAuthor

    Reopen flag resolved (E.4 had noted this issue was closed pre-E.1 but no longer passed the machine gate): as of keyword-rosetta#54's n/a sweep, language_deviations.py jcl exits 0 again — jcl's remaining n/a cells are all reviewed (5 ledgered as morphology; dead_code/spec_exposure filed as gitgalaxy#2732, sync_locks as design question gitgalaxy#2733). No reopen owed; F.6's loop reopens automatically on future drift.

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-enginelegacy-modernizationmetricspriority: high

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions