fips205-slhdsa-verified/verification
mrwulf f2f262ae90 Phase 3b: a kernel-side axiom gate, because the environment walk has a blind spot
Ported from the ed25519 forks and the accumulator, where it exists because a
round-7 reviewer DEMONSTRATED the gap rather than argued it.

Phase 3's audit runs inside Lean and reads `env.constants` after the imports —
an ELABORATION-TIME view. Anything declared AFTER the command that performs the
walk is in the compiled object file but not in the environment while the walk
runs. The walker then reports "no axiom, no claim" and is telling the truth
about what it could see.

This phase reads the OBJECT FILES via `readModuleData`: a different view of the
same modules, with no such ordering. Deliberately a second, independently
implemented gate on the property that matters most — that nothing in the proof
corpus DECLARES AN AXIOM, whatever its indentation, attributes or position.

DEMONSTRATED, not asserted. An `axiom cheat : ∀ (P : Prop), P` appended to
Proofs/Audit.lean after its audit command:

    === Phase 3: in-Lean audit …            <- PASSED, saw nothing
    === Phase 3b: kernel-side axiom gate    <- AXIOM DECLARED under Proofs/
                                               Audit.olean: cheat
    exit 1

The environment walk passed it and the kernel gate caught it, which is the
whole argument for having both.

PLACEMENT IS LOAD-BEARING. Written first as Phase 2b — the forks' position — it
died with COVERAGE, because Phase 2 compiles the eight certificate modules and
Proofs/Audit.lean is only compiled by Phase 3. That failure was correct: a gate
that skipped a missing module would be vacuous exactly where it matters, since
the audit driver is the one module whose own declarations no other gate
examines. Covering it requires waiting for it, so the gate runs after Phase 3.

Fails closed three ways: a manifest module whose artifact is absent, an axiom in
any module, and a scan that read zero declarations (an empty result and a clean
result must not share a code path). Membership from this script's PROOFS array
plus the driver, never a glob.

Result: 298 declarations across 9 compiled modules, none an axiom.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-03 15:57:48 +02:00
..
gen/SlhVerify correspondence: keep the artifact that says what the model must answer 2026-08-03 15:49:16 +02:00
Proofs review round 5: bind the policy, the specification bodies, and the harness 2026-07-27 22:57:46 +02:00
AUDIT-MANIFEST.txt review round 6: pin the auditor, purge every olean, pin gen/ as a set 2026-07-28 09:22:12 +02:00
check-selftest.sh round 8: self-deriving harness pins, honest extraction guarantees, attestation basis 2026-07-28 14:40:39 +02:00
check.sh Phase 3b: a kernel-side axiom gate, because the environment walk has a blind spot 2026-08-03 15:57:48 +02:00
drill.sh drill: the post-flight drill becomes a button (drill.sh) 2026-07-23 15:36:00 +02:00
extract.sh re-pin source @ a3ce8e8 (extraction-script honesty fixes) and rotate extract.sh's harness pin 2026-07-28 14:42:46 +02:00
lean-guard lean-guard: surface clamp/kill diagnostics on stderr (operator incident 2026-07-24) 2026-07-24 21:37:05 +02:00
model-correspondence.py correspondence: keep the artifact that says what the model must answer 2026-08-03 15:49:16 +02:00
MODEL-CORRESPONDENCE.txt correspondence: keep the artifact that says what the model must answer 2026-08-03 15:49:16 +02:00
PROVENANCE.json correspondence: keep the artifact that says what the model must answer 2026-08-03 15:49:16 +02:00
RECORDED-RUN.md provenance: name the pin the machine actually enforces 2026-08-03 15:28:57 +02:00