Skip to content

Agda gate: check the prover's trusted base (PROOF-POLICY 8.4.7) - #27

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/questions-instance
Nov 11, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
claude/questions-instance

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Step 1 of 2 toward recorded grades. PROOF-POLICY §8.4.7 says the prover's own modules are in the import cone, and that their postulates are admissible only if the receipt lists them by name and binding and the gate checks that exact list. The Agda gate here scanned src/ only. This PR adds the check.

Step 2 (a proof receipt deed under verification/receipts/ and the grades it derives) must follow the merge of this PR, because a receipt describes a source commit whose gate already made the check.

Changes

  • scripts/check-agda.sh: the All.agda check also writes Agda's dependency graph. Each module of the cone is resolved to src/ or to the library supplied with the prover; a module in neither fails. The prover-supplied modules are scanned with scan-postulates.pl. The gate allows exactly Level, lzero, lsuc and _⊔_ in Agda.Primitive, each bound by its BUILTIN pragma, and no other postulate. It writes the list to _build/check-logs/trusted-base.txt. The existing scan of all of src/ is unchanged. Pattern: januskey scripts/check-agda.sh.
  • tests/check_agda_trusted_base_test.sh: a stub prover answers --print-agda-dir with a copy of Agda's library with one planted change. Four cases must stop the gate with their own message (a postulate in another builtin module, an extra name, an inline postulate, a removed binding), and the unchanged copy must pass.
  • .github/workflows/proofs.yml: one new step runs the test, and the Agda receipt gets a trusted-base line.
  • docs/status/PROOF-STATUS.adoc, CHANGELOG.adoc.

RSR Quality Checklist

Required

  • Tests pass: see Testing
  • Code is formatted (not run)
  • Linter is clean (shellcheck is not installed in the session)
  • No banned language patterns
  • No unsafe blocks (none)
  • No banned functions
  • SPDX license headers present on the new file, copied from the sibling files
  • No secrets, credentials, or .env files included

As Applicable

  • Documentation updated
  • CHANGELOG updated

Testing

  • bash scripts/check-agda.sh: pass. It reports 10 first-party and 6 prover-supplied modules (Agda 2.6.3 locally; CI pins 2.6.4.3).
  • bash tests/check_agda_trusted_base_test.sh: 5 of 5 pass (4 planted cases stop the gate, the unchanged library passes).
  • bash tests/check_agda_find_failure_test.sh: pass.
  • check-lock-sync, check-adoc-renders, check-invisible-characters, check-no-placeholders, check-root-shape: pass.
  • tests/workflows/actions_lock_sha_refs_test.sh needs mikefarah yq, which the session does not have. It fails the same way on main.

The commit is not signed. The session has no signing key.


Generated by Claude Code

check-agda.sh takes the import cone from Agda's dependency graph, scans
the modules supplied with the prover, and allows exactly Level, lzero,
lsuc and _⊔_ in Agda.Primitive, each bound by its BUILTIN pragma. A new
control test plants four changes in a copy of Agda's library and each
must stop the gate. proofs.yml runs the test and lists the four names
and bindings on the Agda receipt. No grade changes.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0136P7ZngnAq35mYcMvxDyS4
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • 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

The code-hygiene gate reads the heredoc delimiter STUB as a debt marker.
Rename it to FAKE_AGDA. Use [[ ]] on the four new conditionals and a
local variable in plant(), as SonarQube asks.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0136P7ZngnAq35mYcMvxDyS4
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 11, 2026 16:15
@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-11T16:15:26.152927Z
We couldn’t complete this review. Comment @codex review to try again.
a64f6c1 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.

@hyperpolymath
hyperpolymath merged commit f211fc1 into main Nov 11, 2026
46 checks passed
@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 deleted the claude/questions-instance branch November 11, 2026 16:15
hyperpolymath added a commit that referenced this pull request Nov 11, 2026
## Summary

Step 2 of 2 toward recorded grades, after #27 added the trusted-base
check to the Agda gate. This PR adds the machine-readable proof receipt
(PROOF-POLICY §8.5.1) for source commit
`f211fc1406d345fa6e972bcfc960c0acd57df1cd`, the merge of #27, and
records the grades that the standards reader derives from it.

The owner chose to record the derived grade (PWG-1), not the "at most
`2ii`" that the ledger text said before.

## Changes

- `verification/receipts/resource-algebra-proofs_praxis.deed` (new):
profile `proof-receipt`, the trusted base (`Level`, `lzero`, `lsuc`,
`_⊔_` in `Agda.Primitive` with their `BUILTIN` bindings), and one claim
per row of `PROOF-STATUS.adoc` (29). Each proven row has an Agda leg
(`source`), a Rocq leg and a Lean leg (`re-proved`, `RECONCILED`), each
with a `current` receipt naming its job in `proofs.yml` run
`43056527841` on that commit. C-4b and M-2 have an `open` Agda leg and
`unavailable` recheck legs.
- `docs/status/PROOF-STATUS.adoc`: census PWG-1: 27 · ungraded: 2; the
pwg column of 27 rows set to `1`; receipts and input digests for the new
run; the old run marked superseded; a paragraph on what the grade does
not cover (other commits, no gate writes the receipt yet, run summaries
expire).
- `CHANGELOG.adoc`.

No proof, gate or workflow changes.

## RSR Quality Checklist

### Required

- [x] Tests pass: see Testing
- [ ] Code is formatted (not run)
- [ ] Linter is clean (no code changed)
- [x] No banned language patterns
- [x] No `unsafe` blocks (none)
- [x] No banned functions
- [x] SPDX license headers present on the new file
- [x] No secrets, credentials, or `.env` files included

### As Applicable

- [x] `docs/status` and `CHANGELOG` updated

## Testing

- `bun deed_lint.js --proof-receipt-json` (standards `e2a03dc`) on the
new deed: accepted; derived census PWG-1: 27, ungraded: 2 (C-4b, M-2), 4
trusted-base primitives. Every recorded `:pwg` equals the derived one,
or the reader would refuse it.
- `.github/hooks/validate-deed.sh` with the same standards checkout: 3
deeds, 0 failing. The deed linter at the pin CI uses (`8e48b1c`) also
accepts the file; that version has no proof-receipt reader, so CI checks
the syntax only.
- Input digests in the ledger: computed from the tree at `f211fc1` with
the commands the `proofs.yml` receipt steps run.
- `check-adoc-renders`, `check-invisible-characters`,
`check-no-placeholders`, `check-root-shape`, `check-no-a2ml`,
`gen-repo-map` (no change), `just validate-claude-md`: pass.

The commit is not signed. The session has no signing key.

---
_Generated by [Claude
Code](https://claude.ai/code/session_0136P7ZngnAq35mYcMvxDyS4)_

Co-authored-by: Claude <[email protected]>
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