Skip to content

rosetta[abap]: cross-language consistency — 3 red / 3 amber metrics, 2 ledgered shapes #2561

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)

In band — no structure-level deviations.

2. Signal / keyword deviations

  • 🔴 doc: 2 vs median 1 (+100%)
  • 🔴 state_mutation: 2 vs median 6 (-67%)
  • 🟡 branch: 3 vs median 5 (-40%)
  • 🟡 keyword_hits: 162 vs median 247.5 (-35%)
  • 🟡 safety: 3 vs median 2 (+50%)

3. Risk-exposure consequences (downstream)

  • 🔴 risk_cognitive_load: 7.0764 vs median 15.1444 (-53%)

Ledgered shapes touching abap

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
string-literal-selective-shielding upstream-question #2535 b.abap 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.abap · never uses TRUNCATE and no WHILE loop (comment): stripped: contributed 0
  • b.abap · lv_note = 'IF TRUNCATE FAILS TRY SELECT AGAIN' (string): abap is a THIRD shielding profile: IF/TRY contribute NO branch, TRUNCATE no high_risk, SELECT no io — but TRY DOES count safety (+1, micro-repro isolated it to the string, comments contribute 0). Ledger: string-literal-selective-shielding
  • c.abap · hack_level = cv_level (code): inert (underscore + lowercase vs case-sensitive \bHACK\b)

Reproduce / evidence

Activity

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

    @squid-protocol
    OwnerAuthor

    Status: clean — every out-of-band metric is 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.

    Close criterion (gitgalaxy#2669 Batch E.4)

    python tools/language_deviations.py abap exits 0: nothing is unexplained and no n/a cell is unreviewed. That is not the same as "no metric deviates" — deviations remain, and each is named above with the reason it is not a defect. This issue has nothing language-specific left to do.

  3. squid-protocol commented on Sep 3, 2026

    @squid-protocol
    OwnerAuthor

    Closing per gitgalaxy#2669 Batch E.4: python tools/language_deviations.py abap exits 0 against the current corpus (keyword-rosetta main) and engine main.

    The criterion is not "no metric deviates" — abap still has out-of-band metrics, and the status comment above lists every one of them. It is that each carries a recorded reason it is not a defect: a validated ledger entry naming this language and metric, an inherited deviation from an input that is itself out of band, or a per-function descriptor for a language with no functions. Nothing is left that is specific to abap.

    That criterion only became machine-checkable in this batch: E.1 (keyword-rosetta#40) taught the report to read the ledger it already had, and Batch D (keyword-rosetta#41) supplied the five entries the shape-descriptor family needed. Re-run tools/issue_status.py abap after any future regen; if a new unexplained cell appears, this issue should be reopened rather than a new one filed.

  4. squid-protocol commented on Sep 3, 2026

    @squid-protocol
    OwnerAuthor

    Reopening. This was closed under Batch E.4 of #2669 because language_deviations.py abap exited 0 — true against the 57 comparable metrics the report measured at the time.

    keyword-rosetta has since started measuring four inputs the risk_* formulas read but the report never scored (api, encapsulation, orphaned_logic, duplicate_logic — the last two as their raw pre-adjustment snapshots, since galaxyscope's Contextual Baseline Fix rewrites the adjusted ones for any file with popularity > 0). At 61 columns, abap shows one amber cell: raw_state_slop_orphans 3.25 against a 2.5 median (+30%), roughly one orphaned function.

    Nothing about ABAP changed — the corpus started looking at a column it had never looked at. Reopening rather than leaving it closed against a criterion it no longer meets, since the whole value of that criterion is that it means something specific.

    The cell is not ABAP-specific and should not get a hasty per-language ledger entry: raw_state_slop_orphans is out of band in 16 of 46 languages the first time it was ever measured. Orphan detection varying that widely across identical planted intent is a finding in its own right and wants a dedicated pass.

    abap's §10 capstone has been corrected in the same breath (#2696) to say what "clean" was a statement about.

  5. 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 abap 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 abap in keyword-rosetta, or docs/findings_by_language.md#abap.

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