Skip to content

Fix/proof gate sync - #43

Merged
hyperpolymath merged 4 commits into
mainfrom
fix/proof-gate-sync
Dec 2, 2026
Merged

hyperpolymath merged 4 commits into
mainfrom
fix/proof-gate-sync

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Changes

RSR Quality Checklist

Required

  • Tests pass (just test or equivalent)
  • Code is formatted (just fmt or equivalent)
  • Linter is clean (no new warnings or errors)
  • No banned language patterns (no Python, Go, TypeScript or ReScript; JavaScript runs Bun > Deno > pnpm > npm)
  • No unsafe blocks without // SAFETY: comments
  • No banned functions (believe_me, unsafeCoerce, Obj.magic, Admitted, sorry)
  • SPDX license headers present on all new/modified source files
  • No secrets, credentials, or .env files included

As Applicable

  • Repo deed (*_chora.deed) (status) / (maturity) updated (if project state changed)
  • Repo deed (ecosystem) updated (if integrations changed)
  • Repo deed (meta) and/or docs/decisions/ updated (if architectural decisions changed)
  • docs/status/ROADMAP.adoc updated (if milestones or next actions changed)
  • Documentation updated for user-facing changes
  • docs/architecture/TOPOLOGY.adoc updated (if architecture changed)
  • CHANGELOG or release notes updated
  • New dependencies reviewed for license compatibility (compatible with MPL-2.0)
  • ABI/FFI changes validated (src/interface/abi/ and src/interface/ffi/ consistent)

Testing

Screenshots

check_proofs_test (estate-rules) fails on atoma main (9 of 14 controls) because
atoma's scripts/check-proofs.sh is an older version than the template's. The
template's closes gate holes: lean 'sorry', coqc exiting 0 on Admitted (via
scripts/scan-dangerous.sh, already identical here), idris2 unsolved holes, and
the PROOF-POLICY section 2.1 Agda invocation (--cubical-compatible).

Atoma's copy also hard-coded two extra scan roots (verification/atoma,
examples/atoma). Checked, not assumed: atoma's agda and idris2 MANIFESTs already
name verification/atoma/agda and examples/atoma/frame-v1/abi, and all 4 .agda
and 3 .idr files under those trees sit under the named roots, so the template's
manifest-named-roots scan covers the same files today.

Verified locally: check_proofs_test rc 0 (was failing); the gate still fails,
not skips, with no toolchain (rc 1); bash -n ok.
NOT verified: Agda, Idris2, Coq and Lean are not installed here, so whether
atoma's real proofs pass the stricter gate and the added --cubical-compatible
flag is only shown by CI. If they do not, that is a finding to fix in the
proofs, not a reason to loosen the gate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7Zk1VxiWdKq68AQx2Ev
…ons the gates read

estate-rules fails on atoma main (and so on every open PR) at the proof-status
claims reader: PROOF-STATUS.adoc has no '== Claims' heading, because it is a
hand-authored 3-column Surface/Evidence/Limit table. The vocabulary test would
fail next (no ungraded/n-a bullets).

Add the policy-vocabulary section (generic PROOF-POLICY definitions, copied from
the template, no statement about atoma's proofs) and a '== Claims' heading above
the existing table, with a visible NOTE that this is an interim shape: the table
is NOT yet in the PROOF-POLICY section 8.5 per-claim schema and no status token
or PWG grade has been assigned to any row.

The table rows are byte-identical to before. Nothing about atoma's proofs is
restated or graded here; converting the rows is the proof owner's.

Verified locally: proof-claims-rows rc 0; proof_claims_rows_test and
proof_status_vocabulary_test rc 0 (both failed before); check-adoc-renders rc 0
and its self-test rc 0 under asciidoctor 2.0.26 (the CI version).
Not fixed here: check_proofs_test. Not verified: a CI run.

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

gitnotebooks Bot commented Dec 2, 2026

Copy link
Copy Markdown

Review these changes at https://app.gitnotebooks.com/hyperpolymath/Atoma/pull/43

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-02T15:41:20.604306Z 14c1056 PR opened
🔒 Security Review ✅ Completed 2026-12-02T15:39:43.861313Z 14c1056 PR opened
ℹ️ 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.

Repository owner deleted a comment from coderabbitai Bot Dec 2, 2026
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
@hyperpolymath
hyperpolymath merged commit b3e2428 into main Dec 2, 2026
50 of 51 checks passed
@hyperpolymath
hyperpolymath deleted the fix/proof-gate-sync branch December 2, 2026 15:36
@sonarqubecloud

sonarqubecloud Bot commented Dec 2, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

mapfile -t scan_dirs < <({ echo "$PROOF_DIR"; sort -u "$roots_tmp"; } | sed 's#/*$##' | sort -u)
echo "=== manifest coverage (${scan_dirs[*]}) ==="
listed="$(sed 's#^\./##' "$listed_tmp" | sort -u)"
found="$(cd "$ROOT" && find -H "${scan_dirs[@]}" -name "*.$EXT" -not -path '*/build/*' -not -path '*/.git/*' 2>/dev/null | sed 's#^\./##' | sort -u)"

P2 Badge Keep scanning the established external proof trees

When a new proof is added under an unregistered sibling directory—such as examples/atoma/new-pilot/NewProof.idr or another directory beneath verification/atoma—this new directory list never sees it because it contains only verification/proofs/<prover> and roots already named in the manifest. The previous scan covered all of examples/atoma and verification/atoma, so this change allows precisely the new, not-yet-manifested external proof roots that the coverage gate is intended to reject to pass unnoticed.


** `PWG-3`: the Agda proof is `proven` under the canonical §2.1 invocation,
`agda --safe --without-K --cubical-compatible`;

P2 Badge Allow admissible postulates at PWG-3

When an Agda theorem is proven-with-postulates and every named axiom is admissible, this definition incorrectly leaves it below PWG-3; the referenced PROOF-POLICY §8.2 explicitly allows either PROVEN or PROVEN-WITH-AXIOMS at that rung. Proof owners following this vocabulary would therefore under-grade valid axiomatic proofs and produce a census inconsistent with the canonical policy.


** `n/a`: not on the ladder once it has a result: a test, a refusal fixture, an
assumption, or a discharged engineering proof in Idris2, SPARK, Creusot or
Verus. §8.1 puts these off the ladder. An `open` engineering obligation is not `n/a`: an `open` engineering
obligation stays `ungraded` until it has a receipt.

P2 Badge Keep theory tests and assumptions ungraded

When a theory obligation has a tested-only or argued result, it remains below PWG-3 and must be reported as ungraded, rather than moved off the ladder as n/a; conversely, PROOF-POLICY §8.1 excludes engineering obligations from PWG regardless of whether they are open or discharged. This definition reverses that boundary, so converting the claims table according to it would misclassify both theory evidence and open engineering work in the estate census.


** `PWG-1`: every counted witness has a current receipt for the exact commit;

P2 Badge Require isolated pinned receipts for PWG-1

When all three witnesses have ordinary current receipts for the exact commit but those runs were not headless, isolated, and pinned to an image digest, this summary still awards PWG-1. The referenced PROOF-POLICY §8.2 requires those additional properties for every counted witness; without them the theorem remains at PWG-2ii, so this abbreviated definition can overstate the strongest grade.


* *Recheck legs* (§2): `transported`, `re-proved`, `waived` or `unavailable`,
each with its §2.2 correspondence state, for example `BRIDGE-PENDING` or
`RECONCILED`. A leg counts towards a grade only when it is `RECONCILED`.

P2 Badge Require a proved status before counting a recheck leg

When a Rocq or Lean statement is RECONCILED but its result is only tested-only, argued, or otherwise not kernel-proved, this rule nevertheless says the leg counts toward PWG. PROOF-POLICY §8.2 requires both a PROVEN/PROVEN-WITH-AXIOMS target result and a RECONCILED correspondence state, so checking only the latter can incorrectly promote a theorem to PWG-2i or PWG-2ii.


# A module that compiles but uses an escape hatch (believe_me, sorry,
# Admitted, ...) in code is not a proof. Comments are ignored.
if ! out="$(bash "$ROOT/scripts/scan-dangerous.sh" "$root/$rel" 2>&1)"; then

P1 Badge Reject Idris partial and covering escape hatches

When a gated Idris module uses a partial declaration, %default partial, or %default covering, Idris can accept it and the REPL can report No holes, while scan-dangerous.sh does not match any of those constructs; check_one therefore returns PASS for a proof that can rely on nontermination. The repository's dedicated scripts/check-escape-hatches.sh:22-24 explicitly classifies these forms as escape hatches, so invoking the weaker scanner here leaves the new no-escape-hatch guarantee unsound.

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

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.

2 participants