Commit 1e3105b
feat(schema,scip): PR#10 slice 2 -- reference_verdicts + excludes dual-write (evidence ledger, read-only)
Continues the evidence-ledger work (slice 1: 47f5489). Re-verified the
"3 provider writers" premise from prior-session memory against live code
first (2 parallel Explore agents) and found it inaccurate: call_edges has
1 bulk static writer (already a projection per its own schema comment)
plus 2 mostly-UPDATE overlay passes (SCIP: 1 INSERT + 2 UPDATE; LSP: 0
INSERT, 3 UPDATE only). Also confirmed golden_graph_equivalence's fingerprint
is byte-for-byte strict on formal_source/evidence_state/ruled_out_by_scip,
not just from/to symbol -- and that no "materialize evidence into a derived
table" pattern exists anywhere in this codebase yet. Given that, this slice
deliberately does not touch any call_edges writer and does not attempt to
reproduce the static resolver's own output.
1. `record_external_proof_exclusion` (scip/ingest.rs) -- the 'excludes'
counterpart to record_external_proof_for_edge's 'supports' write, wired
into insert_missing_exact_edges's conflict branch under the same
proof_context guard. Closes the gap slice 1's own comment named as
future work.
2. `reference_verdicts` (new table) + `recompute_reference_verdicts` (new
function) -- a derived, fully recomputable reconciliation of
reference_evidence: for each (call_site_id, to_symbol) pair with real
evidence, what call_edges should say. Pure DELETE+repopulate, not wired
into any reindex/overlay pass or MCP tool. Only covers the subset of
edges with real evidence (the DoD's own "every VERIFIED edge is
explainable" wording), not a reproduction of the static resolver.
5 new tests, each checked against real code-produced call_edges/
evidence_conflicts state rather than hand-typed expectations. Full
workspace suite green (0 failed) plus an explicit golden_graph_equivalence
re-run confirming it's unaffected, since call_edges is never touched.
Still not done toward PR#10's full DoD (documented, not silent): the
writer cutover / "providers append evidence only" flip, wiring verdict
recomputation into any automatic pipeline, and B2/resolution_precision
re-runs (neither benchmark measures anything this slice touches). Details
in docs/plans/2026-08-20-product-uplift-and-b7v2-roadmap.md §15-§18.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 47f5489 commit 1e3105b
3 files changed
Lines changed: 635 additions & 16 deletions
File tree
- crates/calm-core/src
- db
- scip
- docs/plans
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
| |||
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
329 | 358 | | |
330 | 359 | | |
331 | 360 | | |
| |||
0 commit comments