Skip to content

risk_secrets_risk is a density over LOC — measured leak rho -0.91 on the control corpus (score-contract territory) #2979

Closed as not planned

Description

@squid-protocol

With the keyword-rosetta corpus now planting one identical secret in every language's c.<ext> (46/46), the bias report's length-leak check measures risk_secrets_risk at Spearman rho = -0.91 against coding_loc across 11 irc2 languages with all governed inputs held in band — the strongest leak on the board. _calc_secrets_risk (signal_processor.py:1818) computes density = leak_mass / (loc + 50) * 100 and sigmoids it: same planted secret, longer file, lower score.

On the tiny corpus shells the sigmoid saturates, so the displayed spread is minor (all 44 measurable languages read 25.000 at 3 decimals) — but the shape is exactly the one #2655 named and #2908 fixed for risk_documentation (a density over lines where the honest quantity is a ratio over units, or a saturating leak-count curve independent of file length). One secret in a 2000-line file is not less leaked than one secret in a 20-line file.

This is Phase-4 score-contract territory (#2812): the fix is a stated ScoreContract for risk_secrets_risk with a unit-honest equation, not a corpus edit. Evidence regenerates on every corpus push (bias_report.md § Length leaks).

Activity

  1. squid-protocol commented on Sep 13, 2026

    @squid-protocol
    OwnerAuthor

    Superseded by #2992 (the measurement-tier scoring reform): the density formula critiqued here is frozen as a deprecated legacy alias rather than reworked — all new measurement flows through count-based families, snapshot percentiles, and count-over-count relations. Closing as superseded.

  2. added
    bug
    metrics
    on Sep 13, 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

    bugmetrics

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions