feat: normalize symbol intel into relational tables
Replace three unbounded JSON blobs (code.symbol_history, code.per_symbol_intel, code.hash_occurrence) in musehub_intel_results with normalized relational tables:
musehub_symbol_history_entries — one row per (repo_id, address, commit_id) musehub_symbol_intel — one row per (repo_id, address) musehub_hash_occurrence_entries — one row per (content_id, repo_id, address)
Alembic migration a1b2c3d4e5f6 creates the tables and deletes the stale blobs.
build_symbol_index now upserts into normalized rows. lookup_symbol_intel, load_symbol_history, and load_hash_occurrence query the new tables directly — O(1) point lookups regardless of repo commit history depth.
intel_summary and intel_snapshot remain as small aggregate blobs.
TDD: 93 tests green across test_intel_normalized_schema.py (40) and test_snapshot_symbol_indexer.py (53).
0 comments
muse hub commit comment sha256:c43ecbccbea7b2b0d9e9fe6a1ab0797867f57e88ff621423e8741e816cd55449 --body "your comment"
No comments yet. Be the first to start the discussion.