Repository navigation
proofs: PROOF-POLICY §2.1 invocation, grade records, ledger fixes - #19
Conversation
scripts/check-agda.sh now runs every module, unit test and expected rejection under `--safe --without-K --cubical-compatible`, the invocation PROOF-POLICY §2.1 makes canonical for theory proofs, and scans src/ for `postulate` outside comments (§8.4.6). The Agda leg of scripts/check-proofs.sh uses the same three flags. PROOF-STATUS uses the closed §5 vocabulary and records Proof Witness Grades: the Agda leg's invocation, version, import cone and receipt; Rocq and Lean legs OPEN; PWG-3 only at commits whose proofs.yml run used the canonical invocation. H-2 and N-2 had gone stale: occupancy-types adopted HWM (its O-1), and typed-wasm transcribes MinMax (tropMax = minMaxSeq) and checks the transcription against this tree. K-CUT-LOSS is proved in choreographic-types (its K-1). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y6FD63UrriRBHqmhhEca9t
|
Warning Review limit reachedYou'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 59 minutes. View limit details
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. |
…ble input
The postulate scan stripped `{- -}` blocks before line comments, so a
`{-` inside a `--` comment could hide a following `postulate` up to a
`-}` in a later comment. Its regex also mis-handled nested block
comments, ignored string literals, split file names on spaces, and
passed when perl could not read a file.
scripts/scan-postulates.pl reads each file in source order: `--`
comments run to the end of the line, `{- -}` comments nest, string and
character literals are skipped. It exits 2 on an unreadable file or an
empty file list. check-agda.sh passes the import cone to it as a
NUL-separated list and refuses an empty cone.
tests/scan_postulates_test.sh covers each case (comment-hidden, nested,
string, character literal, path with a space, unreadable file, no files)
and runs in proofs.yml before the gate.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Y6FD63UrriRBHqmhhEca9t
`mapfile < <(find ...)` ignored find's exit status, so a directory find could not read left a partial cone and the postulate scan could pass without seeing every source. find now writes to a temporary file and its failure stops the gate. Checked as an unprivileged user with an unreadable directory under the cone: the gate stops with "could not list the import cone". The scanner test uses [[ ]] for its comparisons. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y6FD63UrriRBHqmhhEca9t
A stub find on PATH prints one real file of the import cone and exits non-zero, as find does on a directory it cannot read. CI can stage this even when it runs as root, which a chmod 000 directory cannot. The gate must exit non-zero, say it could not list the cone, and not report the postulate scan as passed. Against the previous check-agda.sh (find in a process substitution) the test fails: the scan passed on the partial list. Runs in proofs.yml after the scanner tests. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y6FD63UrriRBHqmhhEca9t
The estate code-hygiene gate (cicd-suite code-hygiene-check) reads a whole-word STUB as an untracked debt marker and failed the Central Estate CI/CD Audit on the heredoc delimiter. Rename it; the test is unchanged and still passes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y6FD63UrriRBHqmhhEca9t
|
|
Two checks are red on this PR, but neither comes from its changes.
Generated by Claude Code |
|
I don't think this PR caused it:
I re-ran the failed job once at 14:52Z, and it is still queued. If it fails again, I'll treat it as a real regression and look for the cause. Generated by Claude Code |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
## Summary The Agda leg of `scripts/check-proofs.sh` ran `agda --safe`. PROOF-POLICY §2.1 (`metadatastician/standards`, `3-practice/PROOF-POLICY.adoc`) makes `agda --safe --without-K --cubical-compatible` the canonical invocation for theory proofs, required explicitly in local recipes and CI. Every repository minted from the template inherits this gate, so the template is where to fix it. hyperpolymath/resource-algebra#19 and hyperpolymath/occupancy-types#18 make the same change in their copies. ## Changes - `scripts/check-proofs.sh`: the `agda` case runs `agda --safe --without-K --cubical-compatible`. - `verification/proofs/agda/MANIFEST`: records that the template's `Properties.agda` checks under the new flags. - `CHANGELOG.adoc`: a *Changed* entry under `[Unreleased]`. ## RSR Quality Checklist ### Required - [x] Tests pass (see Testing) - [x] Code is formatted (`just fmt` or equivalent) - [x] Linter is clean (no new warnings or errors) - [x] No banned language patterns (no Python, Go, TypeScript or ReScript; JavaScript runs on Bun) - [x] No `unsafe` blocks without `// SAFETY:` comments - [x] No banned functions (`believe_me`, `unsafeCoerce`, `Obj.magic`, `Admitted`, `sorry`) - [x] SPDX license headers present on all new/modified source files - [x] No secrets, credentials, or `.env` files included ### As Applicable - [x] `CHANGELOG` or release notes updated ## Testing - `agda --safe --without-K --cubical-compatible -i /usr/share/agda-stdlib -i . Properties.agda` (Agda 2.6.3, standard library 1.7.3): exit 0. It prints `UnsupportedIndexedMatch` warnings from the standard library, none of them errors. Plain `--safe` also exits 0, so the change is not what makes this pass. - I did not run `scripts/check-proofs.sh agda` end to end here. In this environment the standard library is not registered as an Agda library, and that leg resolves imports through the library configuration. --- _Generated by [Claude Code](https://claude.ai/code/session_01Y6FD63UrriRBHqmhhEca9t)_ --------- Co-authored-by: Claude <[email protected]>
Main (#19-#21) ran the strict Agda flag set, recorded ledger corrections and added ⊕-least (C-2). Owner ruling: keep this branch's leg structure, reset every grade, add ⊕-least to both legs. - resource-algebra.agda-lib, check-agda.sh: main's flag sets. check-proofs.sh: main's agda line, this branch's `rocq compile`. - Rocq and Lean legs: add_least, the counterpart of Agda ⊕-least, with its Print Assumptions / #print axioms line. The Rocq proof checks under Coq 8.18 (stdlib renamed for that version) and is closed under the global context; CI checks both legs on Rocq 9.3.0 and Lean 4.35.0. - PROOF-STATUS.adoc: this branch's structure. Every pwg is reset to ungraded: the 9f175cc receipts predate the merge. C-2 cites ⊕-least and add_least; the invocation names main's flags; H-2 and N-2 take main's downstream statuses. S-1, S-2 and S-4 stay PROVEN, as main's own audit note says they are closed refutations. - PROOF-NEEDS.adoc: this branch's structure; PN-1 names main's flags. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7ZnmBahbhfkFEP6ark4
…23) ## Why "Core proofs and expected rejections" has failed on `main` since #21 (`aac649c`); it passed on `d8c5213` just before. The Agda proofs themselves pass: core proofs, unit tests and all 8 expected rejections. What fails is `tests/check_agda_find_failure_test.sh`: "FAIL: gate passed although find failed (exit 0)". #19 added a comment-aware postulate scan of the import cone (`src/`, PROOF-POLICY §8.4.6) to `scripts/check-agda.sh`, plus that test, which checks that a failing `find` stops the gate. #21's squash dropped the scan block from the script but kept the test. ## What `scripts/check-agda.sh` gets #19's block back unchanged, after the `flags=` line and before the first Agda call: list `src/**/*.agda` with `find` into a file (so a `find` failure stops the gate), refuse an empty cone, and run `scripts/scan-postulates.pl`, which is still on `main`. ## Testing - `tests/check_agda_find_failure_test.sh`: PASS ("a find failure stops the gate (exit 1) before the postulate scan passes"). Agda is not installed in this session, so `AGDA` pointed at a stub that prints a version; the test exits before any Agda call. - `scripts/check-agda.sh` with the same stub prints "PASS: no postulate in the import cone (src/)". - `tests/scan_postulates_test.sh`: PASS. - CI runs the full gate with the pinned Agda 2.6.4.3. --- _Generated by [Claude Code](https://claude.ai/code/session_0136P7ZnmBahbhfkFEP6ark4)_ Co-authored-by: Claude <[email protected]>



Summary
Brings this repository's Agda gate and proof ledger into line with PROOF-POLICY (
metadatastician/standards,3-practice/PROOF-POLICY.adoc), sections 2.1, 5 and 8.agda --safe --without-K --cubical-compatible(§2.1). The gate ran without--cubical-compatible.DESIGNED, which is not in the closed §5 vocabulary, and recorded no Proof Witness Grades (§8.5).Changes
scripts/check-agda.sh:--safe --without-K --cubical-compatible(plus--no-libraries --ignore-interfaces --double-check).src/forpostulateoutside comments (§8.4.6), alongside--safe.scripts/check-proofs.sh: the template's manifest gate uses the same three flags for Agda.docs/status/PROOF-STATUS.adoc:proofs.yml), import cone, postulate count and receipt;PWG-3only at commits whoseproofs.ymlrun used the canonical invocation. Earlier runs count as historical evidence (§2.1).tropMax = minMaxSeq) and checks the transcription against this tree byrefl.README.adoc: the status column and thejust check-agdacomment.CHANGELOG.adoc: entry added.Not changed: no Agda source, statement or proof. The deed's IS-NOT line ("occupancy-types' own algebra, for which HWM is a proposal") is the owner's identity clause, so I left it. It is now out of date with H-2.
RSR Quality Checklist
Required
bash scripts/check-agda.sh, see Testing)just fmtor equivalent)unsafeblocks without// SAFETY:commentsbelieve_me,unsafeCoerce,Obj.magic,Admitted,sorry).envfiles includedAs Applicable
CHANGELOGor release notes updatedTesting
Run locally on Agda 2.6.3, the only version available in this environment:
bash scripts/check-agda.shpasses with the new flags (core proofs, unit tests, all 8 expected rejections refused for their stated reason).UnsupportedIndexedMatchwarnings under--cubical-compatible, none of them errors. CI runs Agda 2.6.4.3.postulate planted : SetinMorphism.agdafails the gate withERROR: postulate in the import cone (src/).postulatethat appears only in comments passes.proofs.ymlrun on Agda 2.6.4.3.Generated by Claude Code