Skip to content

feat(registry): proposed theorem-level claims registry deriving PWG from home receipts (ADR 0004) - #38

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/serene-sagan-un5t4q
Nov 9, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
claude/serene-sagan-un5t4q

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

For owner ratification. ADR 0004 proposes the theorem-level claims registry slice. The atlas says that slice "requires a separately reviewed, source-anchored claims registry". The brief calls it Stage 1 (schema) and Stage 4 (proof-level indexing).

To ratify, merge with the ADR's Status changed to Accepted (ratified by owner <date>). Until then the view says "proposed" on its face.

The design rule comes straight from PROOF-POLICY §8.4–§8.5 and this repo's AUTHORITY.adoc: mathesis never assigns a grade. It pins each claim's home-repository receipt by commit and sha256, re-derives the Proof Witness Grade from what the receipt records, and fails CI if a receipt asserts a grade its evidence does not support.

Changes

  • docs/decisions/0004-claims-registry.adoc: the decision, the record contract, the derivation rules, alternatives considered, and the work that follows ratification.
  • docs/registry/claims.json (I-JSON/JCS): source-anchored facts only.
    • Each record gives the repo (must be public in the census inventory), the claim id, its kind (theorem, demonstration or assumption), the statement in the home repository's wording, the Agda module and names, a 40-character commit, and the receipt {path, sha256}.
    • No grade, token, leg or flag is stored.
  • scripts/registry/claims-registry.mjs (Bun, beside the atlas): fetch, verify the digest, derive, render and check.
    • It requires the §2.1 flags and a proven token.
    • It counts legs by RECONCILED state only, and never derives PWG-1 in this slice.
    • It reports drift (fails) separately from pre-§8 vocabulary (a visible finding).
  • docs/registry/registry.adoc: the generated view. It opens with a §8.4.7 census line: counts with their denominator, never a percentage.
  • Tests: tests/registry/claims-registry.test.mjs, 7 tests and 31 assertions, hermetic via --receipts-dir.
  • Wiring: just registry and just registry-check, and a CI step in proven-tests.yml beside the atlas.
  • Pointers: README, atlas README, and the regenerated REPOSITORY-MAP.

Pilot result: 0 of 12 theorems graded, with reasons

  • secret-types eee4e40. The receipt's flags lack --cubical-compatible (waiver W-1), and it uses the pre-§8 grade-3 wording. hyperpolymath/secret-types#32 fixes both. After it merges, bumping the pin should derive PWG-3.
  • Lintel a0f2bae. It has no machine receipt yet. That is the first item after ratification.

RSR Quality Checklist

Required

  • Tests pass:
    • bun test tests/registry/claims-registry.test.mjs: 7 pass.
    • bun scripts/registry/claims-registry.mjs check passes against the live receipts.
    • A tampered view fails with exit 1.
  • Linter is clean. Each of these passes:
    • check-ijson-jcs.sh --enforce docs/registry;
    • check-adoc-renders.sh (178 files);
    • check-invisible-characters.sh;
    • check-no-md-in-docs.sh;
    • check-root-shape.sh. I placed the data under docs/registry/ rather than adding a root registry/ directory.
  • No banned language patterns: Bun JS, following the atlas precedent.
  • SPDX headers on all new files.
  • No secrets.

As Applicable

  • Documentation: the ADR, the README, and the atlas README.
  • docs/status/ROADMAP.adoc: not touched until ratification.

Testing

The tests cover:

  • the ladder: 3, 2i and 2ii by RECONCILED count; BRIDGE-PENDING and COQ-CHECKED do not count; PWG-1 is never derived;
  • each withheld reason: a missing §2.1 flag, a token that is not proven, no receipt, the claim absent, not a theorem;
  • an asserted :pwg above the evidence is drift, while a legacy :grade is only a finding;
  • a digest mismatch is refused;
  • validation fails closed on duplicate ids, bad commits, unknown kinds, theorems without Agda names, malformed receipts, and private repositories;
  • the census line has its denominator and no %, and rendering is deterministic.

Generated by Claude Code

…WG from home receipts (ADR 0004)

The atlas stops at repository counts and says the next slice needs a
separately reviewed, source-anchored claims registry.  This proposes it, for
the owner to ratify (ADR 0004, Status: Proposed).

- docs/registry/claims.json (I-JSON/JCS): source-anchored facts only.  Each
  record gives repo, claim id, kind, the statement in the home repository's
  wording, Agda module and names, a 40-character commit, and the receipt
  {path, sha256}.  No grade, token, leg or flag is stored.
- scripts/registry/claims-registry.mjs: fetch each receipt at its pinned
  commit, refuse a digest mismatch, and derive the Proof Witness Grade by
  PROOF-POLICY §8.2:
    * the §2.1 flags are required;
    * a proven token is required;
    * legs count only when RECONCILED;
    * PWG-1 is never derived in this slice.
  A receipt asserting a :pwg its evidence does not support is §8.4 drift and
  fails; pre-§8 ":grade" wording is a visible finding.
- docs/registry/registry.adoc: the generated view, opening with a §8.4.7
  census line (counts with denominator, no percentage).
- tests/registry: 7 hermetic tests, 31 assertions; just registry /
  registry-check; CI step in proven-tests.yml beside the atlas.
- Pilot: 17 claims from hyperpolymath/secret-types and
  metadatastician/lintel at their 2026-11-09 mains.  The result is 0 of 12
  theorems graded, and it says why:
    * secret-types: --cubical-compatible waived; its receipt uses the pre-§8
      wording (fixed by hyperpolymath/secret-types#32).
    * Lintel: no receipt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017yYi5JxzXZs6nz1ZSForfP
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a3dbe73 and 31d7710.

Files selected for processing: 10

  • .github/workflows/proven-tests.yml
  • Justfile
  • README.adoc
  • docs/architecture/REPOSITORY-MAP.adoc
  • docs/atlas/README.adoc
  • docs/decisions/0004-claims-registry.adoc
  • docs/registry/claims.json
  • docs/registry/registry.adoc
  • scripts/registry/claims-registry.mjs
  • tests/registry/claims-registry.test.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

Copy link
Copy Markdown
Owner Author

Canon lockstep fails on 31d7710. The failure is not caused by this PR.

The job compares mathesis_chora.deed's (canon …) pin with canon.lock, which it fetches live from hyperpolymath/standards main:

canon.lock now mathesis_chora.deed
version 2.1.5 2.1.3
gates-sha256 5c510bba… 2f31f46d…

This PR does not touch the deed, so main carries the same pin and fails the same way. secret-types and Lintel carry the same 2.1.3 pin too (see hyperpolymath/secret-types#32).

No fix exists yet. The fix is to bump the deed's (canon …) clause. That bump asserts the repository meets the changed gates table, which is an owner decision, so I am not widening this PR with it.


Generated by Claude Code

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 9, 2026 15:38
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T15:38:46.281047Z
We couldn’t complete this review. Comment @codex review to try again.
31d7710 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hyperpolymath
hyperpolymath merged commit f7f996e into main Nov 9, 2026
45 of 46 checks passed
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.

3 participants