Skip to content

HYP-S: delegate language-ban + sha-pinning criteria to live scanners (coverage 66→73%) - #624

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/standards-repo-architecture-6j606d
Jul 17, 2026
Merged

HYP-S: delegate language-ban + sha-pinning criteria to live scanners (coverage 66→73%)#624
hyperpolymath merged 1 commit into
mainfrom
claude/standards-repo-architecture-6j606d

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Track 1 coverage increment toward RSR v2.0 ratification. The oracle now delegates the criteria whose file-presence proxy was wrong or missing to hypatia's own live scanners, run once per score.

What changed

  • delegated_index/1 runs Hypatia.CLI.collect_findings/2 ([:cicd_rules, :workflow_audit] — offline, no network) once and indexes the findings; collect_findings/2 promoted from defp to def with a doc note (the oracle shouldn't reimplement the per-file scan driver).
  • Language bans 5.1.1/5.1.2/5.1.3/5.1.5cicd_rules/banned_language_file, keyed by file extension. This is carve-out-aware — a .ts in an approved path emits no finding, which the old no_ext/1 file-presence check could not honour — and it adds TS/ReScript, previously :unverified.
  • SHA-pinning 4.1.3workflow_audit/{unpinned_action,wrong_sha_pin} (previously :unverified).

Ground-truth mattered

The SSOT's detect strings are aspirational and disagree with reality — I probed the live scanners rather than trust them: sha-pinning fires as workflow_audit/* (not supply_chain/*), and all language bans collapse to one banned_language_file type distinguished by extension. Mapping is keyed on the observed (module,type). A scan failure degrades to no delegated verdicts (fall back to file-presence / :unverified) — never a false pass, never a crash.

The honest ceiling (a spec decision for you)

Literal 100% offline coverage is not achievable, by design — and forcing it would be overclaiming:

  • OpenSSF Scorecard 4.2.1/4.2.2 is intrinsically external (needs the Scorecard service/API);
  • licence 7.1.1 is flag-only (:review, never a pass/fail gate here).

These stay :unverified, so scorecards stay provisional, so firm (non-provisional) tier claims are blocked until RSR v2.0 decides how to admit an external attestation (e.g. accept a committed .machine_readable/scorecards/ result, or redefine coverage as "offline-automatable criteria"). That's a §10 spec choice — flagged, not silently resolved. Everything offline-automatable that maps cleanly is now delegated.

Evidence (live corpus, real SSOT)

Coverage 66% → 73%; standards correctly drops 61.6→58.9% (its unpinned actions now fail 4.1.3); language-ban verdicts are now authoritative (carve-out-aware).

Verification (Elixir 1.17.3 / OTP 25)

12 oracle tests green — 3 new delegation tests (planted .py fails 5.1.1; unpinned action fails 4.1.3; clean tree passes the bans). rules+a2ml domain 194 tests, same 3 pre-existing failures (2 vlang, 1 chapel). Warning-clean; mix format --check-formatted clean.

Guardrails

Licence 7.1.1 stays flag-only/:unverified — never delegated to a pass/fail here. collect_findings/2 is called with offline modules only.

🤖 Generated with Claude Code

https://claude.ai/code/session_0112RkdER2wtwHdNmbEhThUz


Generated by Claude Code

Track 1 coverage increment. The oracle now runs hypatia's offline content
scanners once per score (delegated_index/1 -> CLI.collect_findings/2, newly
public) and derives authoritative verdicts for the criteria whose file-presence
proxy was wrong or absent:

  * language bans 5.1.1/5.1.2/5.1.3/5.1.5 -> cicd_rules/banned_language_file,
    keyed by file extension. This is CARVE-OUT-AWARE (a .ts in an approved
    path emits no finding), which the previous no_ext/1 file-presence check
    could not honour — and it adds TS/ReScript, which were :unverified.
  * sha-pinning 4.1.3 -> workflow_audit/{unpinned_action,wrong_sha_pin}
    (previously :unverified).

Mapping is keyed on OBSERVED (module,type) finding keys, not the SSOT's
aspirational `detect` strings — ground-truthing showed they disagree (sha
pinning fires as workflow_audit/*, not supply_chain/*; all language bans
collapse to one banned_language_file type distinguished by extension). A scan
failure degrades to no delegated verdicts (criteria fall back to the
file-presence tranche / :unverified) — never a false pass, never a crash.

Honest ceiling: literal 100% offline coverage is not achievable — OpenSSF
Scorecard (4.2.x) is intrinsically external and licence (7.1.1) is flag-only.
Those stay :unverified, so scorecards stay provisional; firm tier claims will
require an accepted external attestation, a spec decision for RSR v2.0.x (§10).
Documented in the moduledoc.

Verified (Elixir 1.17.3/OTP 25): 12 oracle tests green incl. 3 new delegation
tests (planted .py fails 5.1.1; unpinned action fails 4.1.3; clean tree passes
the bans); rules+a2ml domain 194 tests, same 3 pre-existing failures. Live
corpus coverage 66% -> 73%; standards correctly drops (unpinned actions now
fail 4.1.3). Warning-clean; format clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112RkdER2wtwHdNmbEhThUz
@hyperpolymath
hyperpolymath marked this pull request as ready for review July 17, 2026 06:19
@hyperpolymath
hyperpolymath merged commit 21bc274 into main Jul 17, 2026
75 of 94 checks passed
@hyperpolymath
hyperpolymath deleted the claude/standards-repo-architecture-6j606d branch July 17, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants