Repository navigation
proof: meet the canonical Agda invocation (--cubical-compatible); grades as PWG-3 - #26
hyperpolymath wants to merge 2 commits into
Conversation
…des as PWG-3 PROOF-POLICY §2.1 names `agda --safe --without-K --cubical-compatible` as the canonical invocation, and §8.2 (owner ruling 2026-11-04) makes PWG-3 conditional on it. The gate lacked the flag (waiver W-1), so the proved rows were `ungraded` under §8, although PROOF-STATUS said "mathesis Grade 3". The last blocker was 13 `-WUnsupportedIndexedMatch` warnings: the proofs matched `exec fuel c s ≡ just t` against `refl`, which needs injectivity of `just`. W-1 said only a relational semantics would remove them, at the cost of restating N-5. That was unnecessary. SecretTypes.Prelude now defines `from-just` and `just-injective e = cong (from-just a) e`, a retraction (the same move `suc-dec` makes with `pred`), and Noninterference.Generic routes the six affected clauses through one helper, `≈-just`. The semantics, N-5 and every theorem statement are unchanged. - scripts/proof-flags.sh: adds --cubical-compatible to the single flag set. check.sh, minimal-laws.sh and the receipt all read it. - Receipt renamed agda-grade3_praxis.deed to agda-pwg_praxis.deed. It records `cubical-compatible "met"` and a §8.5 `:pwg` per claim: 3 for the theorems, n/a for the checked demonstrations (§8.1). - PROOF-STATUS, README, EXPLAINME and proof-debt now say PWG-3, never a bare grade. W-1 is recorded closed, with the history and the corrected arm. The Rocq and Lean legs stay `unavailable`, and PWG-3 is stated not to discharge them (§8.4). Checked locally on Agda 2.6.4.3: scripts/check.sh (core proofs, all 4 expected rejections at their intended declarations), scripts/minimal-laws.sh (3 laws, each needed), grade-receipt.sh --check (15 modules), and DEED lint of the new receipt against standards@8e48b1c. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BYbQRtNu216R13jtZLmoqs
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
🟠 indeterminate · commit Advisory: 11 row(s), worst 🔴 high (0 critical, 9 high) — reported, never grading the change.
Hypatia scan: error — the scanner produced no findings array
panic-attack assail: 14 finding(s)
pons asinorum: 9 finding(s)
finishingbot (release readiness): 173 finding(s)
glambot (presentation quality): 93 finding(s)
rhodibot (RSR compliance): 13 finding(s)
accessibilitybot: not_applicable — template default: enrol once the repository serves HTML
cipherbot: not_applicable — template default: enrol once the repository implements cryptography
echidnabot: not_applicable — template default: enrol once the repository carries proofs and an ECHIDNA engine is configured
panicbot: not_applicable — panic-attack is already graded by the verdict grid's own panic-attack row, from static-analysis-gate.yml evidence; enrolling panicbot would report one scanner twice and give two rows that can disagree
seambot: not_applicable — template default: enrol once a seam register exists at spec/seams/seam-register.json
sustainabot: not_applicable — reserved fleet slot; no adapter exists (gitbot-fleet bots/sustainabot/README.adoc)
Scope: static findings reported by each row's tool at the named commit. The table grades only findings in files this change touches, so the colour answers "does this change introduce anything?", not "what does the whole repository still carry?". Standing findings are counted in each accordion and in report.json; the baseline filter remains the place where acknowledged debt is recorded. The lane state is the worst GATING row; advisory rows are listed and counted but never set it. Purple, red, yellow and blue grade the worst GRADED finding present; orange is evidence missing, malformed or a scanner that did not run; grey is an explicit scope exclusion with its reason. No row is a security certification. report.json, badge.json and the raw findings are in the verdict-grid artifact on the linked run. |
…o Canon lockstep goes green here) Canon lockstep is red on main. standards' canon.lock records 2.1.5 (#1424: gate table 0.3.1 and the applicability policy changed; the criteria did not), and this deed declared 2.1.3. Port of hyperpolymath/rsr-template-repo#298, the spine's adoption. - secret-types_chora.deed (canon): :version 2.1.3 to 2.1.5, and :gates-sha256 2f31f46d… to 5c510bba…. The criteria hash is unchanged. The (provenance) clause keeps 2.1.3: it records the canon this repository was minted against, which is history. - tests/workflows/governance_policy_test.sh expects the 2.1.5 tuple. That test already fails on main earlier, on the governance.yml pull_request filter that #15's caller carries; this does not change that. canon.lock marks 2.1.5 status "draft"; this adopts the identity the lock records, which is what the lockstep gate compares. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BYbQRtNu216R13jtZLmoqs
|
|
The two reds on this PR come from
This PR's own gates pass on
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. |
…-3 receipt and proof-status (#22) ## Summary `standards/3-practice/PROOF-POLICY.adoc` §2.1 names `agda --safe --without-K --cubical-compatible` as the canonical Agda invocation. Under §8 (owner ruling 2026-11-04), grades are derived only from receipts, and a proof reaches `PWG-3` only under that invocation. Lintel met neither condition: - the gate ran without `--cubical-compatible`; - there was no receipt; - `docs/status/PROOF-STATUS.adoc` was the template placeholder ("0% proven", Idris ABI rows). So the proofs were `ungraded`, and the mathesis census read a status file that never described them. This PR makes the proofs meet §2.1 with no statement changes, adds the receipt, and writes the real proof-status record. **Depends on hyperpolymath/secret-types#26.** The sibling needs the matching change (`just-injective`), so this PR pins secret-types to that branch's commit, `2f342bc`, the same way #17 did. Once #26 merges, a follow-up re-pins secret-types to its `main`. ## Changes - **`src/Lintel/Lattice.agda`**: `⊒-trans`, `⊒-antisym` and `∨-least` matched a second `_⊒_` proof whose indices were already fixed. That needs constructor injectivity, which `--cubical-compatible` refuses. They now return that proof unmatched, or go through the new `⊒-open`. - **`src/Lintel/Composition.agda`**: `writes-flow` matched the typing derivation and the `Writes` derivation together on one `Cmd` index. It now reads `Writes` into a private `Writes′` (the same relation, computed by recursion on the command) and recurses on the typing derivation alone. `Writes`, the relation L-7 is stated over, is unchanged. - **`scripts/proof-flags.sh`** (new): the single flag set, ported from secret-types. It is the §2.1 invocation plus `--no-libraries --ignore-interfaces --double-check -W error`. `scripts/check.sh` reads it, and so does the fixture in `tests/check-coverage-test.sh`. - **`scripts/grade-receipt.sh`** (new), which writes `verification/receipts/agda-pwg_praxis.deed`: - It records the flags, the Agda pin and a §8.5 `:pwg` for each claim. - It hashes the import cone: the 4 Lintel modules plus the 7 secret-types modules they reach, at the pin. - It cross-checks claim IDs against the README table, in both directions. - `proofs.yml` now checks the receipt for drift and re-emits it for the commit under test. - **`docs/status/PROOF-STATUS.adoc`**: the real §8.5 record. - `PWG-3` for L-1 to L-4, L-6 and L-7. - `n/a` for L-5 (checked refusals) and A-1 (an assumption). - The Rocq and Lean legs are `unavailable`, and the file says `PWG-3` does not discharge them (§8.4). - **`docs/status/PROOF-NEEDS.adoc`**: lists the project's own obligations, both recheck legs included. - **`README.adoc`**: the proof paragraph now states the flags, the pin and the grade. ## RSR Quality Checklist ### Required - [x] Tests pass. Locally on Agda 2.6.4.3, with secret-types at `2f342bc`, `bash scripts/check.sh` passes every step: coverage, the sibling, `Lintel.All`, 5 positive controls, 4 expected rejections (each at its `invalid` declaration), and the negative control. `bash tests/check-coverage-test.sh` and `bash scripts/grade-receipt.sh --check` also pass. - [x] Code is formatted - [x] Linter is clean: the DEED lint passes on every deed, the new receipt included. - [x] No banned language patterns - [x] No `unsafe` blocks without `// SAFETY:` comments - [x] No banned functions: `scripts/scan-dangerous.sh` is clean and the trust-base counts are all 0. - [x] SPDX license headers present on all new/modified source files - [x] No secrets, credentials, or `.env` files included ### As Applicable - [x] Documentation updated: README, PROOF-STATUS and PROOF-NEEDS. - [ ] Repo deed `(status)` / `(maturity)`: not changed. ## Not in this PR - The Rocq and Lean legs (R-1, R-2 in PROOF-NEEDS). These are the only way past `PWG-3`. - The re-pin to secret-types `main` after #26 merges. - `scripts/check-no-placeholders.sh` fails on `main` already, and this PR does not change that. --- _Generated by [Claude Code](https://claude.ai/code/session_01BYbQRtNu216R13jtZLmoqs)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
#27) ## Summary Canon lockstep is red on `main`. standards' `canon.lock` now records canon 2.1.5 (metadatastician/standards#1424): the gate table moved to 0.3.1 and the applicability policy changed, but the criteria did not. This deed still declares 2.1.3. This ports hyperpolymath/rsr-template-repo#298, the template's adoption. I've also ported the same commit into #25 and #26 so Canon lockstep goes green there; the port becomes a no-op once this PR merges. ## Changes - **`secret-types_chora.deed` `(canon …)`**: `:version` goes from 2.1.3 to 2.1.5, and `:gates-sha256` from `2f31f46d…` to `5c510bba…`. The criteria hash is unchanged. - **The `(provenance)` clause keeps 2.1.3.** It records the canon this repository was minted against, which is history. - **`tests/workflows/governance_policy_test.sh`** now expects the 2.1.5 tuple. ## RSR Quality Checklist ### Required - [x] Linter is clean: the DEED lint passes against standards@8e48b1c. - [x] No banned language patterns - [x] No secrets, credentials, or `.env` files included - [ ] Tests pass: `governance_policy_test.sh` already fails on `main`, before it reaches the canon assertion. Its first check rejects `governance.yml`'s `pull_request: branches: [main, master]` filter, which came in with #15's canonical caller. This PR doesn't change that; `deed-field.sh` returns the 2.1.5 tuple. ## Testing `deed-field.sh` returns version 2.1.5, criteria `6a5aa885…` and gates `5c510bba…`, the same values `canon.lock` has on standards `main`. `canon.lock` still marks 2.1.5 as `status = "draft"`. This PR adopts the identity the lock records, which is what the lockstep gate compares. --- _Generated by [Claude Code](https://claude.ai/code/session_01BYbQRtNu216R13jtZLmoqs)_ Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
The owner chose #32 as the base for the cubical-compatible change, so this branch now builds on it instead of #26. - Proof code, proof-flags.sh: #32's version (Prelude.just-inj, tests/flag-control/IndexedMatch.agda). The legs do not depend on the Agda helper names. - Receipt: verification/receipts/agda_praxis.deed (#32's name), written by grade-receipt.sh --write. #32 derives each PWG from the legs' §2.2 states, so N-1..3 and N-7..9 now carry route re-proved and state RECONCILED for both legs, and their grade derives as 2ii. A RECONCILED leg's token is proven. This branch's (legs) block, leg input hashes and the correspondence-record check are carried over. - proofs.yml: #32's receipt step plus this branch's legs job. - PROOF-STATUS, README, EXPLAINME, proof-debt: #32's wording, with this branch's leg facts and the new receipt path. Checked locally with Agda 2.6.4.3, Coq 8.18.0 and Lean 4.24.0: check.sh (core proofs, 4 rejections, flag control), minimal-laws.sh, check-legs.sh (both legs), grade-receipt.sh --check (15 modules), check-escape-hatches.sh and the invisible-character scan. Negative control: removing the N-9 row from verification/legs/README.adoc makes grade-receipt.sh --check fail with "only in grade-receipt.sh: N-9". check-adoc-renders.sh was not run here (no asciidoctor in this session). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZmAsYpFA9gxfQLF3F6 Signed-off-by: Claude <noreply@anthropic.com>
My earlier merge (ba2484f) took #32's head before #32 was updated (3bf7f8e), because the local ref was stale. So this branch lacked main's later changes (the template sync #28, canon 2.1.5 #27, https-only edges #25) and kept some #26-only text. This merge corrects that. Each conflicted file is a 3-way merge on 3bf7f8e (the #32 commit the earlier merge used), so only this PR's legs changes are carried onto main. Files the legs work does not own take main's version: tests/workflows/governance_policy_test.sh, and docs/proof-debt.adoc except its legs bullet (this restores #32's dated W-1 record). The receipt is regenerated. The diff against main is now the legs work: the Rocq and Lean sources, check-legs.sh, the legs CI job, the receipt's (legs) block and RECONCILED leg states (PWG-2ii derived), and the matching doc lines. Checked with Agda 2.6.4.3, Coq 8.18.0 and Lean 4.24.0: check.sh, minimal-laws.sh, check-legs.sh, grade-receipt.sh --check (15 modules), check-escape-hatches.sh, the invisible-character scan and tests/workflows/governance_policy_test.sh. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZmAsYpFA9gxfQLF3F6 Signed-off-by: Claude <noreply@anthropic.com>
|
Superseded: #30 landed Generated by Claude Code |
## Summary This PR replaces #29, on the same branch. #29 was stacked on #26, and GitHub refuses to move a stacked PR's base. #26 is superseded by #30 and #32, which are both on `main`, so this PR targets `main` directly. It adds the two recheck legs that `PROOF-POLICY` §2 asks for, Rocq and Lean, for every proved theory claim: N-1, N-2, N-3, N-7, N-8 and N-9. They are hand re-proofs, because transport is not available: Agda2Dedukti is an Agda backend pinned to a fork of Agda and cannot run on the pinned 2.6.4.3, and no Dedukti or Lambdapi exporter to Lean 4 has been released. Both legs check with no library and no axioms, and the statements are compared in a §2.2 record. `main` (#32) derives each grade from the legs' §2.2 states, and only `RECONCILED` counts. With both legs `RECONCILED`, the 6 claims derive `PWG-2ii`. **For the owner to review (doctrine 4):** the statement comparison in `verification/legs/README.adoc` was written by Claude Code and is labelled provisional until you review it. No tool checks it. The `PWG-2ii` grade rests on it. ## Changes - `verification/legs/rocq/SecretTypes.v`: Coq 8.18.0, prelude only, with no `Require`. 11 theorems. `Print Assumptions` reports "Closed under the global context" for each. - `verification/legs/lean/`: Lean 4.24.0, core only (the lakefile has no `require`, so no Mathlib). 11 theorems. `#print axioms` reports "does not depend on any axioms" for each. `exec` is defined structurally through `run`, so no well-founded recursion brings in `propext`. - `scripts/check-legs.sh`: pins both checker versions, refuses any library and any `sorry`, `admit`, `Admitted`, `Axiom` or `Parameter`, and fails unless all 22 axiom lines are clean. - `.github/workflows/proofs.yml`: new `legs` job. Coq is pinned by its Ubuntu package version, Lean by the sha256 of its release tarball. It uses only the already-locked `actions/checkout` pin. - `verification/legs/README.adoc`: the §2.2 correspondence record (route and reason, versions and invocations, residual assumptions (none), universe discipline, a point-by-point statement comparison, and a claim-by-claim map from each Agda name to its Lean and Rocq names). State: `RECONCILED`. - `scripts/grade-receipt.sh` and `verification/receipts/agda_praxis.deed`: - the 6 claims carry route `re-proved` and state `RECONCILED` for both legs, so their grade derives as `2ii`; a `RECONCILED` leg's token is `proven`; - the receipt gains a `(legs)` block: pins, invocations, axioms, and the sha256 of every leg input; - the script refuses a `RECONCILED` leg without a row in the correspondence record, and the reverse. - `PROOF-STATUS.adoc`, `README.adoc`, `docs/EXPLAINME.adoc`, `docs/proof-debt.adoc`: the new grade and legs. Not `PWG-1`: no per-commit receipt captures each checker's observed result yet. Not foundation-diverse: Agda, Rocq and Lean are all dependent type theories. ## RSR Quality Checklist ### Required - [x] Tests pass. Run locally with Agda 2.6.4.3, Coq 8.18.0 and Lean 4.24.0: `check.sh` (core proofs, 4 expected rejections, flag control), `minimal-laws.sh`, `check-legs.sh`, `grade-receipt.sh --check` (15 modules), `check-escape-hatches.sh`, the invisible-character scan, `tests/workflows/governance_policy_test.sh`, and `tests/e2e/use_template_mint_test.sh` (self-skips: this is a minted tree). - [x] No banned language patterns. The new code is Lean, Coq and bash. `lake-manifest.json` is git-ignored. - [x] No banned functions: `check-legs.sh` refuses `sorry`, `admit`, `Admitted`, `Axiom` and `Parameter`. - [x] SPDX headers on every new file except `lean-toolchain`, which Lean reads whole as the toolchain name. - [x] No secrets. ### As Applicable - [x] Documentation updated: PROOF-STATUS, README, EXPLAINME, proof-debt. ## Testing Negative controls: - Removing the N-9 row from `verification/legs/README.adoc` makes `grade-receipt.sh --check` fail with `only in grade-receipt.sh: N-9`. - Touching a leg source makes the receipt check fail on that file's sha256. Not run locally: `scripts/check-adoc-renders.sh` (no asciidoctor in the authoring session). CI runs it. --- _Generated by [Claude Code](https://claude.ai/code/session_0136P7ZmAsYpFA9gxfQLF3F6)_ --------- Signed-off-by: Claude <noreply@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>



Summary
standards/3-practice/PROOF-POLICY.adoc§2.1 namesagda --safe --without-K --cubical-compatibleas the canonical invocation. §8.2 (owner ruling 2026-11-04) grantsPWG-3only to proofs checked under that invocation. The gate did not run--cubical-compatible(waiver W-1), so under §8 the proved rows wereungraded, although PROOF-STATUS said "mathesis Grade 3". This PR makes the gate meet §2.1 without changing any theorem statement, and records the result asPWG-3.The last blocker was 13
-WUnsupportedIndexedMatchwarnings intini,go,confineandconfineW. Each came from matching an equationexec fuel c s ≡ just tagainstrefl, which needsjustto be injective. W-1 said only a relational big-step semantics would remove them, and that this would restate N-5. It turns out not to be necessary.SecretTypes.Preludenow definesfrom-justandjust-injective e = cong (from-just a) e. This is a retraction: both sides reduce to the two values, so no injectivity rule is used. It is the same movesuc-decalready makes withpred. The six affected clauses go through one helper,≈-just. The semantics, N-5 and every statement are unchanged; the receipt's module hashes record the two changed modules.Changes
src/SecretTypes/Prelude.agdaaddsfrom-justandjust-injective. They replace the comment that said such a lemma could not exist.src/SecretTypes/Noninterference/Generic.agdaadds≈-refland≈-just. Six clauses no longer matchjust … ≡ just ….scripts/proof-flags.shadds--cubical-compatibleto the single flag set thatcheck.sh,minimal-laws.shand the receipt all read.verification/receipts/agda-grade3_praxis.deedis renamed toagda-pwg_praxis.deed, andscripts/grade-receipt.shemitscubical-compatible "met". Each claim carries a §8.5:pwg:3for the six theorems, andn/afor N-4 to N-6, which are checked demonstrations, not theorems (§8.1). The references inproofs.ymlandproofs.justfollow the rename.PROOF-STATUS.adoc,README.adoc,docs/EXPLAINME.adocanddocs/proof-debt.adocnow sayPWG-3and never a bare "Grade". W-1 is recorded as closed, with its history and the corrected arm.unavailable, and the text saysPWG-3does not discharge them (§8.4).--cubical-compatibleamong the checker flags. That was not true until this PR.RSR Quality Checklist
Required
bash scripts/check.sh: core proofs pass, and all 4 expected rejections fail at their intended declarations.bash scripts/minimal-laws.sh: 3 laws, each needed.bash scripts/grade-receipt.sh --check: 15 modules, all sha256 verified.unsafeblocks without// SAFETY:commentsscripts/check-escape-hatches.shis clean and the trust-base counts are all 0..envfiles includedAs Applicable
(status)/(maturity): not changed. The project state is the same; only its grade wording is corrected.Testing
As above. I also ran
metadatastician/lintel's full gate against this branch with--cubical-compatibleadded on lintel's side. It needs one small lintel change of its own, which will be a separate lintel PR pinned to this branch's commit.Not in this PR
PWG-3.main: Canon lockstep (standards moved to a draft canon 2.1.5), canary, and estate-rules (the inherited mint test).Generated by Claude Code
Summary by CodeRabbit