Skip to content

engine PR 1: language-strictness table + measured fidelity coefficient replace _get_tier (child of #2716) #2718

Closed

Description

@squid-protocol

Child of #2716. Same equations; the two constants they read come from a measured table and a documented table instead of a three-bucket lookup.

Scope

A. Fidelity coefficient (replaces fc, retires systems_buffer_ratio → closes #2717).

  • tests/tools/fidelity_table.py reads keyword-rosetta (docs/bias_data.json measured + data/<lang>/expected_signals.json planted) and writes gitgalaxy/standards/fidelity_table.json: {lang: {signal: min(1, planted/measured)}}, ledgered n/a and unplanted → 1.0.
  • signal_processor loads it once; fc becomes per-signal: defense_hits = safety×fid("safety") + test×fid("test") + doc×fid("doc") in _calc_safety, and the equivalent in _calc_documentation (doc, ownership), _calc_cog_load (doc cooling), _calc_verification (test, safety).
  • A test that fails when the committed table is stale against the sibling corpus (same shape as the audit runners: refuses to pass on zero languages).

B. Language-strictness table (replaces _get_tier + TIER_VARS, deletes dead FIDELITY_TIERS).

  • analysis_lens.LANGUAGE_STRICTNESS: per language, (static_types, enforced_errors, memory_safe, no_implicit_globals) or None for no-runtime languages; LANGUAGE_FAMILY maps dialects (embedded_python → python). Every LANGUAGE_DEFINITIONS key must resolve (test).
  • irc = number of False columns (0–4), ot = 1 + 0.1 × irc. Provisional; the magnitude is what the pilot (tooling: outcome-label pilot — do strictness / dynamism predict later fix commits? (child of #2716) #2720) will check. None → irc 0, ot 1.0.
  • _get_tier removed; tests at test_signal_processor.py L130 / L1199 updated.

C. Docs. 08-03: tier paragraph replaced by the chain (what a regex can't see → three inputs and sources → fixture → #2655 invariant); the strictness table and fidelity table rendered from the data files, not typed.

Expected movement

Every risk column in the golden master moves (both venvs) — that is the point. Attribution by running A and B separately before the bless (the C.2 differential method). rosetta-audit will report regressions: label rosetta:rebless-owed, corpus re-bless follows on main.

Closes #2653.

Activity

  1. added
    metrics
    core-engine
    on Sep 4, 2026
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