Repository navigation
ci(proofs): audit the proof ledger, reconcile the local ruling with the estate policy, and stop the record lying - #130
Closed
hyperpolymath wants to merge 51 commits into
Closed
hyperpolymath wants to merge 51 commits into
hyperpolymath wants to merge 51 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #57.
What changed, and why the shape changed
The first version of this PR wired
just proof-check-allinto CI and made itintolerant of missing provers. That was the right instinct and the wrong shape:
metadatastician/standards 3-practice/PROOF-POLICY.adoc§1 makes Agda the source of truthfor a theory proof and §2 makes Rocq and Lean its recheck legs. So CI now:
verification/proofs/LEDGER.json— the record of what has actuallybeen proven, at what grade, with which axioms, at which commit;
just proof-witness-check= registry gates + ledger audit + declared Rocq/Lean legs);
not something to re-derive in CI.
The witness verdict, in the policy's own vocabulary
XP-1, kindtheoryproven, receipt4c6b918/ run 41299544043, assumptions pinned (Agda 2.8.0, stdlib v2.3, echo-typesb0982c4, absolute-zerof486c29)2ineeds exactly one proven leg;2iineeds two and a non-DTT leg (Agda/Rocq/Lean are all DTT/CIC, so Rocq+Lean cannot get there);1needs AXLE/coq-lsp/isabelle-serverThe §2 recheck obligation for
XP-1is unmet, and the lane says so on everyrun: a
POLICY GAPline in the log, a::warning::annotation per open leg, anda
0 proven recheck leg(s)census in the annotations. A green run means theledger is honest, never the theorem is verified in an independent kernel.
The grade-3 rung is substantiated, not labelled
just proof-ledger-checkreads the tree and fails on drift:statement_anchor/statement_formalpinTP-ECHO-1..3and their types; the gate re-reads
EchoTyping.agda(whitespace-normalised) andfails if a recorded type is gone;
{-# OPTIONS #-}pragmas out of theproof files and the CLI flags out of
scripts/check-proofs.sh, and requiresthe ledger's
safety_flagsto equal their union;--safe --erasureor Full--cubicalfor grade 3; this proof runs
--safe --without-K --cubical-compatible. Thegrade stays 3, but the difference is recorded in
grade_deviation, and the gaterequires that field whenever the flags are not a named configuration;
--safe+ the comment-awarescans), not asserted.
historyfollows mathesis §6: entries need date/target/from/to/evidence, the lastentry for a target must equal the current value (no quiet downgrade or dropped
record), and a transition to a weaker state needs a reason. An honest, evidenced
regression passes.
The gate is verified both ways (§7)
tests/proofs/run-controls.shruns 15 ledger-form controls (no prover needed) and5 kernel controls, and the run reports the counts as annotations:
Print Assumptions: closed), a closed Leanproof (
#print axioms: no axioms), an honest evidenced regression;Admitted,sorry, a grade with no legbehind it, contradictory history, an unjustified regression, flag drift,
statement drift, a missing escape-hatch mechanism, an unrecorded deviation, a
non-existent anchor, a ghost source file, a witness planted on disk that no
ledger row claims, and a
2iclaim with 0 proven legs.Receipt: run 41314454646 —
15 expectation(s), 0 violationsand6 expectation(s), 0 violationsunder coqc 8.18.0 / lean 4.15.0.Anti-null-check work
Widened, not weakened:
MANIFEST/LEDGER.jsonare excluded from the proofregistries (they are the gates' inputs, not proofs);
tests/proofs/control/*isallowed through the coordination boundary only if each fixture declares itself and
stays <= 20 lines; the unclaimed-witness check no longer degrades to a no-op in a
tree without
.git; a zero-work guard fails if a leg is recorded proven with nogated module.
No
continue-on-error, no skip-on-missing-tool, no evidence fabricated. Missingtoolchain => BLOCKED, never a pass.
Remaining blockers
runbook is in
PROOF-STATUS.adocandjust proof-gradeprints the delta.per run (
sha256+ size in the receipt) and the toolchain is pinned by versionassertion. Agda remains sha256-pinned.
Workflow Security Linter -> Verify action lockfile coverageis red onmainalready; this lane adds no
uses:, so its lock entry is unchanged.Follow-up audit: five items, in order
An audit of this branch against the policy turned up five places where the repo
said one thing and did another. All five landed, each as its own commit:
D-2026-10-12("Coq, Mizar: archived", "Lean 4 is provenance") predates the estate policy
(owner ruling 2026-10-26, amended 2026-11-01). The decision now carries a
clause-by-clause amendment: the Agda-kernel, Idris2-ABI and
Isabelle-supplementary clauses stand; "Coq archived" and "Lean is provenance
only" are superseded; XP-1's open legs are obligations, not waivers (§4
waives a statement that cannot be expressed, not a tool the estate archived).
docs/decisions/README.adocis now an index that states the supersession.The policy is pinned in the ledger (
46ee1832…, ruling + amendment dates,vendored_here: false) because this repo has nostandards/directory — theold bare path was a dangling citation.
--safe-only success ishistorical evidence, not a receipt for
--safe --without-K --cubical-compatible. The receipt was re-baselined onto run 41314454646(
3cd1859), the first canonical-invocation run; the old one is kept ashistory. The gate's history rule now resolves a transition that names the
source leg.
criterion 2) and absolute-zero (115 Qed / 0 Admitted / 61 axioms, OND-6
open, Coq archived) are now tagged
external-development/proof-bearing-consumerwith relation, evidence and a caveat that names them;.source.import_conerecords the import closure module by module (3 modules,all
--safe --without-K --cubical-compatible, 0 postulates) and what isdeliberately outside it.
a pin check that did not exist. The gate now prints
metadatastician/standards … @ 46ee1832…and fails on a missing pin,phantom vendored copy, waiver-as-status, or
unavailableroute carrying a claim.hexadandlogtalk.HEXADis VeriSimDB's legacy VCL keyword for theoctad source (8 witnesses); the wire schema is
verisimdb.octad.v1and theAPI is
/api/v1/octads.logtalkwas removed as a Hypatia report format on2026-04-14. Both were inherited from gitbot-fleet templates and are reported
there with evidence: gitbot-fleet#640, gitbot-fleet#641.
Controls for the instrument went from 15 to 26, each asserting the specific
refusal rather than any non-zero exit — including two silent field-shift bugs in
the gate's own record reads, found because a control for a rule I had just
written passed when it should not have (
IFS=$'\t'collapses empty fields inbash; tabs are whitespace).
Still open
rocq [dtt]: open,lean4 [dtt]: open. Grade 2ineeds one proven leg; 2ii is unreachable while both legs are DTT.
Lean 4.15.0 from the release archive, not from a Guix manifest or the container.
hypatia-scan,governance,secret-scannerand the workflow linter fail onmainat 3bb3b0b as well — pre-existing, not from this branch. The linter'sfailing step is "Verify action lockfile coverage" (
gh-actions-lock --verify-local, exit 2); runner logs for the other three are unretrievable.