Skip to content

✨ Vector candidate recall reports its completeness truthfully, and the tie-closure loop becomes shared adapter logic - #75

Open
ebigunso wants to merge 3 commits into
impl/v0-1-6-w1-task1-live-gatesfrom
impl/v0-1-6-w1-task2-port-contract
Open

✨ Vector candidate recall reports its completeness truthfully, and the tie-closure loop becomes shared adapter logic#75
ebigunso wants to merge 3 commits into
impl/v0-1-6-w1-task1-live-gatesfrom
impl/v0-1-6-w1-task2-port-contract

Conversation

@ebigunso

@ebigunso ebigunso commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

v0.1.6 Wave 1, Task_2 (port contract, ADR-I-0024), targeting the planning branch per the phase's merge shape.

  • The vector candidate port returns a result envelope: canonical candidates plus a completeness verdict in the public retrieval telemetry vocabulary (not requested, exhaustive, boundary tie closed, boundary tie open). The pipeline records it beside the returned count and never repairs, retries, or fails on it.
  • The service adapter's private tie-closure loop is extracted into a shared crate-visible module with an engine-neutral fetch callback and its unit tests, so the embedded adapter reuses it; the backend fetch cap propagates into the bound so hitting it reports open, never a false exhaustive.
  • Scope-only query: an empty object-type scope selects zero without issuing a search, and an empty configured scope is rejected at the boundary. A zero-norm query scores every candidate zero with a truthful verdict.
  • Every test fake reports exhaustive; the verdict type is re-exported from both public barrels with an external doctest.

Validation

  • Worker (cm-worker): fmt; Clippy -D warnings on Rust 1.95 and 1.97; full service-up cargo test; ignored Qdrant library tests 4/4; zero-hit census for match-or-unknown conditions and filters beyond object-type scope.
  • Reviewer (cm-reviewer, Tier D): approved at 5b30856 after one revision round (checked backend-limit conversion with a BoundaryTieOpen regression at the u32 cap; public re-exports); service-up suite 411 passed / 0 failed.

🤖 Generated with Claude Code

@ebigunso ebigunso self-assigned this Sep 3, 2026
@ebigunso
ebigunso requested a balanced review from Copilot September 3, 2026 15:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The zero-norm shortcut accepts wrong-dimensional embeddings by bypassing Qdrant’s dimension validation.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds truthful vector recall completeness telemetry and centralizes bounded tie-cohort closure.

Changes:

  • Introduces completeness verdicts and propagates them through retrieval telemetry.
  • Extracts shared tie-closure logic and adds zero-norm Qdrant handling.
  • Enforces explicit object-type scopes and updates test stores.
File summaries
File Description
src/usecases/retrieve.rs Validates scope and records completeness.
src/usecases/remember.rs Updates test vector store.
src/usecases/correct_forget.rs Adapts tests to recall envelopes.
src/test_support.rs Updates fake behavior and fixtures.
src/ports/vector_candidate.rs Defines the recall envelope.
src/models/vector/candidate_record.rs Requires scope and detects zero norm.
src/memory.rs Tests empty-scope rejection.
src/lib.rs Re-exports the verdict.
src/api/types/retrieval.rs Adds validation and telemetry vocabulary.
src/api/types.rs Exports the verdict through API types.
src/adapters/qdrant/tie_closure.rs Implements shared bounded tie closure.
src/adapters/qdrant/store.rs Produces truthful Qdrant recall verdicts.
src/adapters/qdrant.rs Exposes shared adapter logic.
src/adapters/oxigraph/tests.rs Updates test vector-store implementation.
Review details
  • Files reviewed: 14/14 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/adapters/qdrant/store.rs
@ebigunso
ebigunso changed the base branch from plan/v0-1-6-embedded-vector-recall to impl/v0-1-6-w1-task1-live-gates September 3, 2026 15:40
Copilot AI review requested due to automatic review settings September 3, 2026 16:50
@ebigunso

ebigunso commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

Fixed in 789d34a: a wrong-sized query embedding now fails with the existing collection-compatibility error (vector size mismatch) before either the zero-norm scroll or the vector search is chosen; the guard sits after the intentional empty-scope and zero-limit no-op and before tie closure. Regression test added. Reviewed internally (cm-reviewer, no findings); service-up suite and ignored Qdrant tests pass.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation matches ADR-I-0024, propagates verdicts without control-flow coupling, and covers the relevant boundary cases.

Review details
  • Files reviewed: 14/14 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@ebigunso
ebigunso force-pushed the impl/v0-1-6-w1-task2-port-contract branch from 789d34a to 9cdd50a Compare September 3, 2026 19:08
@ebigunso
ebigunso requested a balanced review from Copilot September 3, 2026 19:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The port, pipeline, adapter, exports, and tests consistently implement the stated completeness contract without unresolved defects.

Review details
  • Files reviewed: 14/14 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI review requested due to automatic review settings September 3, 2026 20:49
@ebigunso
ebigunso force-pushed the impl/v0-1-6-w1-task2-port-contract branch from 9cdd50a to acfdc08 Compare September 3, 2026 20:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The core public and port-level completeness semantics need explicit documentation to prevent incorrect adapter implementations and consumer interpretation.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 14/14 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread src/api/types/retrieval.rs
Comment thread src/ports/vector_candidate.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants