HYP-S increment 3: rsr-conformance oracle + repo-wide mix format#622
Merged
Conversation
Pure `mix format` output, no semantic changes: main carried 132+ files that fail `mix format --check-formatted`, so the Format CI gate has been red on every PR regardless of content (observed on #600, #601 — both merged red). This makes the gate meaningful again: after this commit the repo-wide check passes, so a future Format failure means the PR actually introduced unformatted code. Verified: repo-wide `mix format --check-formatted` clean; `mix compile` clean; rules-domain test suite unchanged vs baseline. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0112RkdER2wtwHdNmbEhThUz
…tor tranche) RSR-SPEC-v2 names hypatia's `rsr-conformance` family as the ONE normative oracle. This implements the scoring engine faithfully per spec section 5: capability-gated applicable set (rsr-profile.a2ml declared capabilities; non-applicable criteria :na and excluded from the denominator), verdicts pass/partial(half-weight)/fail, category weight split equally per criterion (documented interpretation), tier from the catalogue's own thresholds. Detection is deliberately partial and HONEST about it: a built-in tranche of ~30 file-presence/record-dialect-parse detectors covers the mechanically checkable criteria; every other criterion is returned :unverified — reported, never assumed. automatable_coverage is published on every scorecard (spec section 7), and any coverage < 100% forces provisional = true: no firm tier claims from a partial oracle (no-overclaim). Rhodium additionally requires a non-provisional run with every applicable rhodium criterion passing. Scorecards serialize to A2ML record dialect via to_record_dialect/1 and round-trip through Hypatia.A2ml.RecordDialect — the oracle's output is itself a conforming record-dialect document (dogfood). Verified (Elixir 1.17.3/OTP 25): 8 new tests, 0 failures — synthetic fully-detectable catalogue exercising the non-provisional path, real SSOT scoring (empty tree, well-formed universal tree, malformed-descriptile parse gate), serialization round-trip, and a self-application smoke test scoring the hypatia repo itself. rules+a2ml domain: 190 tests, same 3 pre-existing failures. Zero new compile warnings; repo-wide format check clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0112RkdER2wtwHdNmbEhThUz
hyperpolymath
marked this pull request as ready for review
July 16, 2026 22:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review guide — two independent commits, review per-commit
style: apply mix format repo-wide— puremix formatoutput across 133 files, zero semantic change. Main carried 132+ files failingmix format --check-formatted, so the Format CI gate has been red on every PR regardless of content (ci: advance standards reusable-workflow pins to consume #466 (fix baseline gate) #600, HYP-S increment 2: record-dialect reader + RSR v2.0 criteria loader #601 both merged red). After this commit the repo-wide check passes, so a Format failure once again means something. Verify mechanically: check out the commit, runmix format --check-formatted(clean) andmix compile(clean).HYP-S increment 3: the rsr-conformance oracle— the feature (2 files: module + tests), written on the formatted base.(One PR because the designated working branch is single; the commits are strictly separated so the mechanical diff can't hide anything.)
The oracle
RSR-SPEC-v2.adoc§6 names hypatia'srsr-conformancefamily as the one normative oracle for RSR v2.0.Hypatia.Rules.RsrConformanceimplements the scoring engine per §5:.machine_readable/rsr-profile.a2ml(record dialect) for declared capabilities; non-applicable criteria are:naand excluded from the denominator. No profile ⇒ only universal criteria apply (and universal criterion3.2.2— profile presence — fails, which is the intended signal).pass/partial(half weight) /fail; category weight split equally per criterion (documented interpretation of the SSOT's category-level weights; flagged as a v2.0.x spec clarification).[tiers]thresholds; rhodium requires a non-provisional run with every applicable rhodium-tier criterion passing.Honesty guarantees (the load-bearing part)
Detection is deliberately partial in this increment: a built-in tranche of ~30 file-presence / record-dialect-parse detectors (community-health files,
.well-known/, the descriptile substrate incl. a real parse gate3.2.1, workflows). Every criterion outside the tranche is returned:unverified— reported, never assumed passed. Each scorecard publishesautomatable_coverage(§7), and any coverage < 100% forcesprovisional = true— a provisional scorecard MUST NOT be cited as a firm tier claim. This is what "no silent green" looks like in an oracle: the path from provisional to firm is extending the detector table, visible in a published number.to_record_dialect/1and round-trip throughHypatia.A2ml.RecordDialect— the oracle's output is itself a conforming record-dialect document.Verification (in-session toolchain, Elixir 1.17.3 / OTP 25)
:naexclusion, threshold→tier); real-SSOT scoring of an empty tree, a well-formed universal tree, and a malformed descriptile (parse gate fails, not just presence); serialization round-trip; self-application smoke — the oracle scores the hypatia repo itself without raising and reports its own pre-descriptiles layout honestly.mix format --check-formattedclean.What this unlocks
RSR v2.0's ratification bar (spec §10): step 1 (oracle consumes the SSOT) was #601; this delivers the scoring half of step 1 and makes step 3 (a published corpus run) executable. Remaining to leave Draft: detector coverage → 100% (or delegation to live scanner rules named in
detect), the dogfood gate wired in CI, and the corpus run to verisim-data.Guardrails
No licence content touched (criterion
7.1.1remains in the unverified set — licence detection stays flag-only with the live scanner, never this file-presence tranche). New files carryMPL-2.0SPDX perlib/convention.🤖 Generated with Claude Code
https://claude.ai/code/session_0112RkdER2wtwHdNmbEhThUz
Generated by Claude Code