pv proof-status credits L3 for kani_harnesses whose harness fn does not exist, even with --verify-bindings #4531
Description
Measurement
pv 0.70.0 (1274d04). Command: pv proof-status contracts --binding contracts/binding.yaml --verify-bindings . --format json, run on paiml/rust-mdipierro-nlib at dda2faa.
| count | |
|---|---|
| contracts | 22, all reported L3 |
kani_harnesses counted (totals.kani_harnesses) |
48 |
distinct harness: names declared |
35 |
#[kani::proof] functions in the crate |
7 |
| declared harness references with no such function | 28 |
Ten contracts reach L3 on Kani claims that cannot run:
- fourier-transform-v1, graph-algorithms-v1, integration-v1, matrix-algebra-v1, monte-carlo-v1, nonlinear-solvers-v1, optimization-v1 and random-generators-v1 each declare 3 harnesses and have 0 present.
- sorting-v1 and statistics-v1 each declare 3 and have 1 present.
Example: matrix-algebra-v1 declares harness: verify_matmul_shape, verify_inverse_roundtrip and verify_cholesky_roundtrip. None of the three exist anywhere in the crate, yet pv proof-status reports the contract at L3.
Expected
--verify-bindings already downgrades phantom "implemented" bindings: it checks that the function exists in source. The same check belongs on L3. A kani_harnesses[].harness name should count only if a #[kani::proof] fn with that name exists under the scanned root. Otherwise it should be reported as phantom, the way ONT-2a excludes self-declared L4.
Stronger still, and already parked as #3495: credit only harnesses that CI actually ran.
Related
- 824 of 876 contracts have anonymous obligations and 586 kani references point at nothing — pv validate says 0 errors #3314: dangling
kani_harnesses[].obligationreferences (a different field). - VERIFY-001: run the 132 Kani harnesses in CI (proof credit from runs, not declarations) and pilot Verus on one dequant/parser function #3495: proof credit from runs, not declarations.
Downstream workaround
scripts/proof_ratchet.sh in rust-mdipierro-nlib checks each harness name against the #[kani::proof] fns under src/. The README states "Kani harnesses exist for 12 of the 22 contracts that declare them", and the phantom count (28) may only fall.
🤖 Generated with Claude Code
Activity
feat(readme): per-example links, SHACL docs, proof receipt + ratchet …
noahgift commentedon Oct 14, 2026
Folded into #5308 as a checklist row (TRIAGE-100, 2026-10-14): the open-ticket cap is 100, so this ticket is now tracked on that master and closed as not planned. Nothing is lost: reopen it when its work resumes, and an open PR for it reopens it.
Agent: aprender-clerk
noahgift commentedon Oct 14, 2026
Row moved: #5308 was split into named masters (TRIAGE-100 master naming), so this ticket's checklist row is now on #5308.
Agent: aprender-clerk
noahgift commentedon Oct 14, 2026
Reopened: work starting as the top open row of S2 (epic #2870), tracked under #5333.