Skip to content

docs(proofs): bring PROOF-STATUS up to PROOF-POLICY §1.2, §6 and §8 - #474

Open
hyperpolymath wants to merge 7 commits into
mainfrom
claude/stoic-brown-26h7xi
Open

hyperpolymath wants to merge 7 commits into
mainfrom
claude/stoic-brown-26h7xi

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

docs/PROOF-STATUS.adoc predated two PROOF-POLICY amendments: §8 Proof Witness Grades (4 Nov) and §1.2 Creusot, Pearlite and Verus (7 Nov). It also understated two legs that CI already proves. This PR is the first in a stacked series. The later ones split the meta-checker under §1, add Verus/Creusot contracts on the Rust, and do the Rocq/Lean rechecks.

Policy read at standards commit b8f60511e76c9015d86990317162dce653c92fe1.

Changes

  • §8 grades. The bare "Mathesis Grade 3" wording, which §8 forbids, is replaced by a PWG table. Only theory theorems are graded: Receipt is PWG-3, with its Rocq and Lean legs open / BRIDGE-PENDING.
  • R1 (Rust). Names Creusot, Pearlite and Verus, with each one's actual status. The Creusot job runs only on manual dispatch, and Verus isn't started.
  • R2 (Idris 2): argued → proven. Cites the Dogfood Idris2 (verification) job (127501094018). It builds all 11 modules of echidna-verif-proofs.ipkg.
  • R3 (Lean): open → proven-with-postulates.
    • Hosted: the Lean 4 (verification) job (127501093731) builds all five roots with Lean 4.13.0 and no Mathlib.
    • Local axiom census, run with Lean.collectAxioms over every theorem: 167 theorems; 109 use no axiom; 58 use only propext, Quot.sound and Classical.choice. There is no sorryAx and no project axiom.
    • The 2026-05-18 "all five fail" record is superseded, and the Mathlib question is closed by §2.
  • R4 (Agda). Cites the hosted Agda Meta-Checker run on exact main 2ab7574 (42551607796). It also records the owner's §1 decision: only Receipt is theory, and the rest of the meta-checker is split into parametric Agda theory plus Idris 2 specs, with the Rust then verified by Creusot/Pearlite and Verus.
  • R10. Records that no clamp_trust exists in the Rust, so the row is model-only. The module header's "no idris2 in CI" reason is out of date.
  • §6 deviation records. Adds the missing records for the Agda, Idris 2 and Lean lanes, in PROOF-STATUS and as comments in setup-agda.sh, dogfood-proofs-ci.yml and idris2-abi-ci.yml. They are comments only, with no uses: changes, so actions.lock is unaffected.

RSR Quality Checklist

Required

  • Tests pass: docs and comments only; workflow checks below
  • Code is formatted
  • Linter is clean: actionlint with shellcheck clean on both workflows; bash -n on setup-agda.sh
  • No banned language patterns
  • No unsafe blocks without // SAFETY: comments: n/a
  • No banned functions: n/a
  • SPDX license headers present on all new/modified source files
  • No secrets, credentials, or .env files included

As Applicable

  • docs/decisions/ / proof ledger updated: PROOF-STATUS is the §5 ledger
  • CHANGELOG: not for a ledger correction

Testing

Local rechecks on main 2ab7574 (2026-11-09):

Check Result
scripts/ci/check-agda.sh (Agda 2.7.0.1, executable sha256 6de41437…, stdlib v2.1 @ 97bc55e) exit 0; 9/9 fresh interfaces; 55 UnsupportedIndexedMatch at the same 6 sites; receipt controls accept 2, reject 3
proofs/agda under --safe --without-K --cubical-compatible 13/13 pass
Lean 4.13.0 lake build + axiom census build OK; 167 theorems: 109 axiom-free, 58 with only core axioms
Source digests at 2ab7574 vs the 2026-11-04 receipt all 10 identical
test-issue-regressions.sh, check-allow-fail-expiry.sh, check-workflow-duplicate-keys.sh, check-lock-sync.sh pass
asciidoctor --failure-level WARN docs/PROOF-STATUS.adoc renders, no warnings

One local deviation, recorded in the file: this session's network refuses codeload.github.com, so stdlib was fetched by its git tag rather than by the archive digest. It affects only the local corroboration; the hosted receipt is unaffected.


Generated by Claude Code

PROOF-STATUS predated two policy amendments (§8 Proof Witness Grades,
2026-11-04; §1.2 Creusot, Pearlite and Verus, 2026-11-07) and understated
two legs that CI already proves.

- Grades: replace the bare "Mathesis Grade 3" wording, which §8 forbids,
  with a PWG table. Only theory theorems are graded; Receipt is PWG-3 with
  both recheck legs open.
- R1: name Creusot, Pearlite and Verus, with the status of each.
- R2 (Idris 2): proven, citing the Dogfood "Idris2 (verification)" job,
  which builds all eleven modules of echidna-verif-proofs.ipkg.
- R3 (Lean): proven-with-postulates, citing the "Lean 4 (verification)"
  job and a local Lean 4.13.0 recheck. Of 167 theorems, 109 use no axiom
  and 58 use only propext, Quot.sound and Classical.choice. The Mathlib
  question is closed by §2.
- R4: cite the hosted Agda Meta-Checker run on 2ab7574 (exact commit),
  corroborated locally, and record the owner's §1 decision to split the
  meta-checker (theory to Agda, echidna types to Idris 2, Rust verified
  with Creusot/Pearlite and Verus).
- R10: no clamp_trust exists in the Rust, so the row is model-only; the
  module header's "no idris2 in CI" reason is out of date.
- §6: add the missing deviation records for the Agda, Idris 2 and Lean
  lanes, in PROOF-STATUS and as comments in the installing scripts and
  workflows. Comments only; no uses: changes.

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

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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 36 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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 38fee495-302c-4023-8750-235fdb02f1f9
Commits

Reviewing files that changed from the base of the PR and between 2ab7574 and f8acbaa.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 8

  • .github/workflows/dogfood-proofs-ci.yml
  • .github/workflows/idris2-abi-ci.yml
  • docs/PROOF-STATUS.adoc
  • meta-checker/README.adoc
  • scripts/ci/setup-agda.sh
  • src/rust/proof_search.rs
  • src/zig_ffi/chapel_bridge.zig
  • src/zig_ffi/runtime_owner.zig
  • 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 README claimed one postulate (funext), which --safe rules out and
which no module contains. It also listed four of the nine modules,
counted "30+ properties" that nobody had counted, gave run steps
without the PROOF-POLICY §2.1 flags, and said a green check guarantees
that the system's invariants hold.

It now lists all nine modules, says they prove properties of a model
rather than of the Rust, records that only Receipt is theory under §1,
documents the pinned setup and check scripts, and points to
PROOF-STATUS for receipts. Mathesis's reconciliation register cites the
stale funext note as an open ECHIDNA item; this removes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jzCHZx4Rt65NDaGLDrjLp
A statement-by-statement comparison of the Agda meta-checker with the
Rust, the Idris 2 corpus and the Lean corpus found problems that a
passing kernel check does not reveal:

- Dispatch.compute-trust gives Level 2 for a cross-checked result
  without a certificate; the Rust and Idris 2 give Level 3.
- Integrity.check maps an uninitialised manifest to Missing; the Rust
  and Lean give Uninitialized.
- Portfolio.portfolio-trust and ClampTrust.clamp-trust have no Rust
  counterpart.
- comment-skip-sound ignores its hypothesis, real-pattern-classified
  only proves totality, and two "determinism" theorems are cong.
- Idris 2 lacks Level 5 necessity and clamp idempotence.

The rows keep their proven token (the kernel did accept these proofs);
the review lists what the planned split must fix. The README now points
readers to it instead of implying the names are the guarantees.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jzCHZx4Rt65NDaGLDrjLp
Port of the rmcp lockfile change from #465 so this docs PR's dependency
audit is not red for a reason unrelated to it. Regenerated with
`cargo update -p rmcp --precise 3.9.0`; the windows-sys lines are
resolver output, identical to #465. No-op once #465 lands.

Verified locally: scripts/ci/audit-dependencies.sh passes for both
lockfiles; `cargo check -p echidna-mcp` builds.

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

Copy link
Copy Markdown
Owner Author

Dependency audit failed on ddb234e, and the cause is not in this PR. This PR changes documentation only and does not touch Cargo.lock. The audit failed because cargo-audit 0.22.2 now reports three advisories against rmcp 3.5.0, a version that is already on main:

#465 already contains the fix, and I have ported its rmcp part here as 45c0c93. That commit runs cargo update -p rmcp --precise 3.9.0 and changes only the lockfile. It will become a no-op once #465 lands. Locally, scripts/ci/audit-dependencies.sh now passes for both lockfiles, and cargo check -p echidna-mcp builds.

The red scan / *-secrets, Patch Bridge CVE triage and Dogfooding compliance summary runs are on the superseded commit 0c75f67. The secret scans ended with "No completed scan receipt" because their upstream scan was cancelled. None of these checks ran on the current head.


Generated by Claude Code

The owner chose #477's reading of PROOF-POLICY §1 for the split. Generic
theory (Receipt; E9 composition in #471) stays in Agda. Echidna-specific
statements are verified on the Rust with Creusot/Pearlite and Verus,
not restated in Idris 2. Each meta-checker module retires once its Rust
contracts carry a receipt.

R1 now points at #477's trust kernel as the first Creusot target. R10
has no Rust target (there is no clamp_trust), so it retires with its
module. The Lean re-homing note distinguishes Rust behaviour
(Creusot/Verus) from API/ABI properties (Idris 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jzCHZx4Rt65NDaGLDrjLp
Validate Hypatia Baseline fails on this PR. It reports four unannotated
zig_ptr_cast/zig_align_cast findings in src/zig_ffi/, which are also red
on main and unrelated to this docs PR. This ports #465's fix unchanged:
- inline `hypatia: allow` annotations with a justification on each cast
  (comments only; the code is unchanged);
- its rustfmt reflow of src/rust/proof_search.rs.
Both become no-ops once #465 lands. `rustfmt --check` passes on
proof_search.rs.

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

Copy link
Copy Markdown
Owner Author

governance / Validate Hypatia Baseline is failing because of main, not this PR. The gate reports four unfiltered high findings, code_safety/zig_ptr_cast and zig_align_cast, in src/zig_ffi/chapel_bridge.zig and src/zig_ffi/runtime_owner.zig. Those findings are red on main too, and this PR does not touch either file.

#465 has the fix, so I ported it here unchanged as d4ef769:

Both changes become no-ops once #465 lands.


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

@coderabbitai review


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Owner Author

Static Analysis / Patch Bridge CVE triage is red, and the cause is on main, not in this PR. The gate stops with "Scanner completion receipt is missing, incomplete or inconsistent". The pinned panic-attack 410a8f8 labels 190 config and markup files unsupported, so coverage is partial, and --fail-on-incomplete exits 2 before it counts any findings. #478 confirms this check has failed on every commit since #455, and this PR's diff doesn't touch any scanner input that would change that.

There's no fix to port. #478 moves the pin to f2a6a70, and by its own account the gate then fails on 2 Critical ProofDrift findings: the deliberate sorry fixtures in tests/corpus_fixtures/. Clearing those needs an owner decision. Bringing #478 in here would swap one red check for another, so this PR leaves it alone and stays docs-scoped. This check will go green when #478 and its follow-up land.


Generated by Claude Code

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

chatgpt-codex-connector Bot commented Nov 9, 2026 •

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 ✅ Completed 2026-11-09T15:45:52.300192Z f8acbaa New commits
🔒 Security Review ❌ Failed 2026-11-09T15:43:14.546235Z
We couldn’t complete this review. Comment @codex security review to try again.
f8acbaa New commits
ℹ️ 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

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d4ef769802

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread meta-checker/README.adoc Resolved
Comment thread docs/PROOF-STATUS.adoc Resolved
…a recipe

Fixes two Codex review findings on #474:
- R10 said no Rust clamp_trust exists. One does:
  echidna_core_creusot::clamp_trust(level, min, max), with a written but
  undischarged Creusot bounds contract and the exhaustive unit test PO-7.
  R10 now records how it corresponds to the Agda model. Only the bounds
  statement carries over; the Agda model clamps ℕ, so its ℕ-specific
  statements do not. The split targets the Rust function, not
  retirement.
- The README's local recipe did not work. Outside Actions, setup-agda.sh
  only prints the paths. The recipe now provides GITHUB_ENV/GITHUB_PATH
  files and loads them, so it goes through the script's own export code.
  The loading step was tested here with values in the script's format.
  The full setup was not run locally, because the agda-stdlib archive
  host is blocked in this sandbox.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jzCHZx4Rt65NDaGLDrjLp
@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 9, 2026 22:54
@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 9, 2026 23:22

This branch has not been deployed

No deployments
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