gabriel / musehub public
feat patch symbols-v2-p2 feat/symbols-v2-p2-route-join #1 / 1
AI Agent gabriel · 129 days ago · May 6, 2026 · Diff

feat(symbols-v2-p2): enrich symbol list rows with vitals LEFT JOIN

Extracts _fetch_symbol_list() from symbol_list_page — a single LEFT JOIN between musehub_symbol_intel and musehub_symbol_vitals that returns coupling_count, first_introduced, and the authoritative change_count per symbol row. Zero aggregation at request time.

Symbols without a vitals row still appear (LEFT JOIN semantics). Signal flags (is_hotspot, is_dead, is_blast_risk) remain decorated from the intel snapshot after the fetch.

8 TDD tests (R201–R208): coupling_count, first_introduced, change_count from vitals, LEFT JOIN safety, pagination, kind filter, search filter.

sha256:ce791fff6512310e0bed85c7dd1178ec18cec91af324cfc680b807e24e789b20 sha
+30 ~1 symbols
sha256:e44bee332eb8bbba05ac3dd238f60eedb99c73bfaf11d48f87887cdf5d1714cc snapshot
+30
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes 31 symbols
+ _cid function function _cid L54–55
+ _lid function function _lid L58–59
+ _now function function _now L50–51
+ _seed_intel_only function async_function _seed_intel_only L111–138
+ _seed_symbol function async_function _seed_symbol L62–108
+ AsyncSession import import AsyncSession L39–39
+ _dt import import _dt L34–34
+ annotations import import annotations L32–32
+ blob_id import import blob_id L42–42
+ create_repo import import create_repo L43–43
+ db import import db L41–41
+ long_id import import long_id L42–42
+ pytest import import pytest L38–38
+ secrets import import secrets L35–35
+ timezone import import timezone L36–36
+ test_r201_fetch_returns_coupling_count function async_function test_r201_fetch_returns_coupling_count L146–160
+ test_r202_coupling_count_zero_when_no_partners function async_function test_r202_coupling_count_zero_when_no_partners L168–181
+ test_r203_fetch_returns_first_introduced function async_function test_r203_fetch_returns_first_introduced L189–207
+ test_r204_change_count_from_vitals_not_churn function async_function test_r204_change_count_from_vitals_not_churn L215–233
+ test_r205_symbol_without_vitals_still_appears function async_function test_r205_symbol_without_vitals_still_appears L241–253
+ test_r206_pagination_still_works_after_join function async_function test_r206_pagination_still_works_after_join L261–285
+ test_r207_kind_filter_works_after_join function async_function test_r207_kind_filter_works_after_join L293–307
+ test_r208_search_filter_works_after_join function async_function test_r208_search_filter_works_after_join L315–329
~ musehub/api/routes/musehub/ui_symbols.py .py 7 symbols added, 1 symbol modified
+ _fetch_symbol_list function async_function _fetch_symbol_list L64–136
+ MusehubSymbolIntel import import MusehubSymbolIntel L61–61
+ MusehubSymbolVitals import import MusehubSymbolVitals L61–61
+ outerjoin import import outerjoin L60–60
+ sa import import sa L59–59
+ sa_func function import sa_func L60–60
+ select import import select L60–60
← Older Oldest on feat/symbols-v2-p2-route-join
All commits
Newer → Latest on feat/symbols-v2-p2-route-join

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:ce791fff6512310e0bed85c7dd1178ec18cec91af324cfc680b807e24e789b20 --body "your comment"