Skip to content

refactor(retrieval): Unify file-to-memory resolution - #375

Merged
harshsinghmp merged 1 commit into
devfrom
feat/unified-code-resolver
Nov 9, 2026
Merged

harshsinghmp merged 1 commit into
devfrom
feat/unified-code-resolver

Conversation

@harshsinghmp

Copy link
Copy Markdown
Owner

W26-1: one canonical project/trust/freshness-aware resolver; pre-flight anchors and PR context are adapters. Contract test asserts they agree. Gate 1498/0; tsc clean; build 434.

Why: W26-1. Pre-flight anchored recall and PR context implemented the
same question twice with different matching, scoping and ranking, so the
two surfaces could disagree about which memories govern a file.

What:
- src/retrieval/code_context.ts: canonical resolver with normalized path
  matching, anchor-over-mention precedence, project/trust/freshness gates,
  type ranking and reason tokens.
- src/retrieval/anchors.ts: anchor-only adapter.
- src/orchestrator/bidirectional.ts: PR context delegates to the canonical
  resolver and keeps its constraint/negative/associated buckets.
- test/code_context.test.ts: project scoping, mention opt-in, adapter
  agreement and ranking.

Verification: bun test 1498 pass / 0 fail; tsc clean; build 434 modules.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@harshsinghmp
harshsinghmp merged commit 6fb922e into dev Nov 9, 2026
1 check failed
@harshsinghmp
harshsinghmp deleted the feat/unified-code-resolver branch November 9, 2026 08:00
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.

1 participant