Skip to content

[ADR-030] Retrieval Checkpoints and Proof References #327

@ohdearquant

Description

@ohdearquant

Summary

Restore checkpoint store support and reconcile proof/reference comments so retrieval and HNSW persistence no longer point to missing artifacts.

Source ADRs

  • F167 ADR-030 (CRIT): HnswCheckpoint and HnswCheckpointStore are commented out because khive_fold::Checkpoint is missing (from audit-platform/e5/ADR-030.md)
  • F170 ADR-030 (MAJ): Source comments reference proofs/Lion/Retrieval/Distance.lean, but find proofs -maxdepth 3 -type f returned no proofs/ directory in the repo root. (from audit-platform/e5/ADR-030.md)

Files affected

  • crates/khive-retrieval/src/lib.rs (190 sampled LOC)
  • crates/khive-hnsw/src/distance.rs (368 sampled LOC)
  • crates/khive-hnsw/src/checkpoint/mod.rs (423 sampled LOC)
  • proofs/README.md (new/planned path)
  • crates/khive-hnsw/src/lib.rs (133 sampled LOC)

Acceptance criteria

  • All source findings listed above are addressed exactly once in this cluster.
  • Public types, handlers, schema, and docs touched by the affected files agree on the ADR contract.
  • Regression tests cover happy path and edge cases for the changed public APIs or schema behavior.
  • cargo test -p khive-retrieval -p khive-hnsw passes.
  • cargo clippy --workspace -- -D warnings passes.
  • make ci passes.

Dependencies

  • Depends on: #[ADR-006] Deterministic Score and Fold Primitives
  • Depends on: #[ADR-011] Retrieval, Embed, and Lattice Boundary
  • Blocks: none

LOC estimate

~140 lines added/30 removed; 4 existing affected file(s) sampled at 1114 current LOC via wc -l, plus 1 new/planned path(s).

Risk notes

  • Same-file dependencies must merge first; dependency list includes the exact overlapping paths.
  • 1 affected path(s) are new/planned and were not present in rg --files --hidden; create them in the owning PR rather than in independent parallel work.
  • Contains CRIT findings; do not defer without owner approval.

Auto-generated by ADR alignment triage

Metadata

Metadata

Assignees

No one assigned

    Labels

    adr-alignmentADR v1 series alignment workplatformPlatform layer (ADR-016..030)

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions