Skip to content

rosetta[typescript]: cross-language consistency — 1 red / 0 amber metrics, 4 ledgered shapes #2604

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

  • 🔴 safety: 4 vs median 2 (+100%)

3. Risk-exposure consequences (downstream)

In band — no risk-score deviations.

Ledgered shapes touching typescript

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.ts state_mutation is recorded x3 when branch context exists in the file ('flux' semantics, matching the state_flux column name)
ts-callparen-args engine-semantic (notes) typescript's args rule counts statement-position call parens (describe(kit), expect(kit)) in addition to declaration params — a.ts args 5 for 3 declarations (finditer-co…
string-literal-selective-shielding upstream-question #2535 b.ts 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.ts · const note = "if eval fails, try open" (string): if + try count (branch +2, safety +1), eval does NOT (js/python selective profile); let+var 2 raw state tripled to 6. Ledger: string-literal-selective-shielding, state-flux-branch-weighting
  • c.ts · const HACK_LEVEL = level (code): inert (underscore)

Reproduce / evidence

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-engineModifications to the central physics and parsing enginemetricsHeuristics, risk exposures, and topological math updates

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions