Commit 89c36a5
committed
feat(verisim): first-class Proof / TacticApplication / ProofVersion / ProofStateRecord
src/rust/verification/proof.rs
New module (verisim-feature-gated) materialising the four entities the
E-R audit flagged as missing from the Verisim schema. Each closes one
of the FK-discipline gaps identified in the 2026-04-19 audit:
* Proof{id, goal_hash, theorem_hash, theorem_name, prover, first_seen}
makes the SHA-256 digest already produced by
proof_encoding::proof_identity() a first-class row. theorem_hash
(new helper theorem_identity) and goal_hash let cross-prover and
cross-goal joins index on fixed-width columns without re-deriving
the triple from the primary key.
* TacticApplication{proof_id, step, tactic, goal_hash, status,
goals_after, duration_ms, applied_at} persists the proof DAG.
Success/Closed/Error TacticStatus is kept (not just success) so
MCTS/agentic search retains failed-branch training signal.
* ProofVersion{proof_id, version, snapshot_id, goals_remaining,
is_qed, actor, recorded_at} is the append-only audit log that
OctadPayload.temporal.versions currently lacks — the latter is
render-only; this is durable. `initial()` and `next()` chain
monotonically so versions never collide.
* ProofStateRecord{proof_id, step, goal_hash, prover, prover_version,
state_cbor_b64, features, relevant_premises, label_confidence,
source} is the typed corpus schema replacing the ad-hoc JSONL dict.
state_cbor_b64 round-trips the tree structure the JSONL format
loses; label_confidence separates human-verified ground truth from
weak heuristics; prover_version attributes MRR deltas to solver
builds.
The module adds 8 unit tests (hash-derivation correctness, FK wiring,
monotonic version chaining, QED marking, round-trip serde). Existing
OctadPayload posting continues unchanged — these rows are intended to
be written alongside, not instead of, the octad, via an incremental
migration path.
src/rust/verification/mod.rs
Export the new types behind the existing `verisim` feature gate,
matching how proof_encoding is gated.
src/rust/proof_encoding.rs + src/rust/verisim_bridge.rs
Drive-by fix: the `verisim` feature tests referenced
ProverKind::Lean4 (doesn't exist; the Lean 4 variant is ProverKind::Lean,
Lean 3 is the sibling ProverKind::Lean3) and a hardcoded "Lean4" Debug
string. Restoring the 27 previously-uncompilable verisim-feature
tests so the new proof.rs tests can share the harness.
Test counts: 613 default, 640 with --features verisim (0 failures).1 parent 055e13e commit 89c36a5
4 files changed
Lines changed: 405 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
| 157 | + | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
0 commit comments