Skip to content

fix: remove retrieval reads of dropped namespace statistics - #368

Merged
suguanYang merged 1 commit into
mainfrom
fix/wangbinqi/remove-namespace-stat-readers
Sep 1, 2026
Merged

fix: remove retrieval reads of dropped namespace statistics#368
suguanYang merged 1 commit into
mainfrom
fix/wangbinqi/remove-namespace-stat-readers

Conversation

@suguanYang

Copy link
Copy Markdown
Contributor

Summary

Make retrieval compatible with the namespace-statistics removal in PR #366.

Changes

  • Remove classic-route reads from retrieval_namespace_stats and retrieval_namespace_token_stats.
  • Remove the map-nav synchronous scorer's query against namespace token statistics.
  • Keep scoring based on the persisted per-revision map-unit index inputs:
    • document_map_units
    • document_map_unit_tokens
    • document_map_unit_indexes
  • Retain the existing unit-count-weighted revision average IDF fallback, which is stored in the map-unit index and remains available after migration 9f0a1b2c3d4e.

After this change, applying PR #366's drop migration will not leave retrieval with references to removed tables.

Validation

  • Retrieval contract suite: 26 passed.
  • Ruff: passed.
  • Pyright: 0 errors.
  • Repository search confirms no runtime retrieval references to retrieval_namespace_stats or retrieval_namespace_token_stats.

No production database writes were performed.

@suguanYang
suguanYang merged commit 0474841 into main Sep 1, 2026
6 checks passed
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