gabriel / musehub public
feat BREAKING intel/type task/intel-type-ui #1 / 1
AI Agent gabriel · 136 days ago · May 3, 2026 · Diff

feat(intel/type): Type Health dashboard — Phase 1 complete

- Migration 0013: add return_annotation VARCHAR(256) nullable to musehub_intel_type - ORM: MusehubIntelType.return_annotation mapped column - TypeProvider: batch-upsert fix — single SQL call per chunk of 1000 (was N calls for N symbols) - Route: intel_type_page at /{owner}/{repo}/intel/type with tier/kind/top filters - Template: intel_type.html — SVG coverage ring (spectral gradient), 4 stat chips, ranked symbol table - SCSS: pages/_type.scss (structural) + components/_type.scss (visual, spectral theme) - Dashboard: type health card always visible; shows coverage_pct + worst-3 preview - Tests: 30-test suite (TDD, unit, integration, E2E, stress, state integrity, performance, security) - 69/69 tests passing (intel_fidelity + phase2 + type)

sha256:3b295f958659f1cfe1781ecfbdbf7d51860c25afe696a6b1591f39921ffecf40 sha
+69 ~4 symbols
sha256:edd59648a9fd6736bfaef5bedd98863124ffa740ca0c0a4de6ee214618af7faa snapshot
+69
symbols added
~4
symbols modified
0
dead code introduced
Semantic Changes 73 symbols
+ branch_labels variable variable branch_labels L16–16
+ depends_on variable variable depends_on L17–17
+ down_revision variable variable down_revision L15–15
+ downgrade function function downgrade L27–28
+ Union import import Union L9–9
+ annotations import import annotations L7–7
+ op import import op L12–12
+ sa import import sa L11–11
+ revision variable variable revision L14–14
+ upgrade function function upgrade L20–24
~ tests/test_intel_type.py .py 54 symbols added
+ TestDBExtension class class TestDBExtension L104–135
+ test_T01_return_annotation_column_exists_on_model method method test_T01_return_annotation_column_exists_on_model L106–111
+ test_T02_return_annotation_is_nullable method method test_T02_return_annotation_is_nullable L113–116
+ test_T03_return_annotation_stored_and_retrieved method async_method test_T03_return_annotation_stored_and_retrieved L119–135
+ TestE2E class class TestE2E L343–390
+ test_T15_coverage_fraction_rendered_as_pct method async_method test_T15_coverage_fraction_rendered_as_pct L346–353
+ test_T16_symbol_address_in_html method async_method test_T16_symbol_address_in_html L356–362
+ test_T17_return_annotation_in_html method async_method test_T17_return_annotation_in_html L365–371
+ test_T18_any_badge_rendered_for_any_polluted_symbol method async_method test_T18_any_badge_rendered_for_any_polluted_symbol L374–381
+ test_T19_dashboard_card_links_to_type_page method async_method test_T19_dashboard_card_links_to_type_page L384–390
+ TestPerformance class class TestPerformance L489–576
+ test_T23_route_responds_under_200ms_for_10k_symbols method async_method test_T23_route_responds_under_200ms_for_10k_symbols L492–529
+ test_T24_db_query_uses_repo_index method async_method test_T24_db_query_uses_repo_index L532–544
+ test_T25_batch_upsert_500_symbols_under_500ms method async_method test_T25_batch_upsert_500_symbols_under_500ms L547–576
+ TestProviderBatch class class TestProviderBatch L142–226
+ test_T04_type_provider_issues_one_sql_per_chunk method async_method test_T04_type_provider_issues_one_sql_per_chunk L145–193
+ test_T05_upsert_500_symbols_under_500ms method async_method test_T05_upsert_500_symbols_under_500ms L196–226
+ TestRoute class class TestRoute L233–336
+ test_T06_returns_200_with_empty_repo method async_method test_T06_returns_200_with_empty_repo L236–243
+ test_T07_returns_200_with_data method async_method test_T07_returns_200_with_data L246–251
+ test_T08_summary_stats_match_db_counts method async_method test_T08_summary_stats_match_db_counts L254–264
+ test_T09_filter_tier_untyped method async_method test_T09_filter_tier_untyped L267–274
+ test_T10_filter_tier_partial method async_method test_T10_filter_tier_partial L277–285
+ test_T11_filter_tier_any method async_method test_T11_filter_tier_any L288–295
+ test_T12_filter_kind_function method async_method test_T12_filter_kind_function L298–306
+ test_T13_default_sort_score_ascending method async_method test_T13_default_sort_score_ascending L309–319
+ test_T14_top_param_limits_results method async_method test_T14_top_param_limits_results L322–336
+ TestSecurity class class TestSecurity L583–642
+ test_T26_xss_in_address_is_escaped method async_method test_T26_xss_in_address_is_escaped L586–602
+ test_T27_xss_in_return_annotation_is_escaped method async_method test_T27_xss_in_return_annotation_is_escaped L605–618
+ test_T28_unknown_tier_param_treated_as_all method async_method test_T28_unknown_tier_param_treated_as_all L621–626
+ test_T29_non_integer_top_param_returns_422 method async_method test_T29_non_integer_top_param_returns_422 L629–634
+ test_T30_private_repo_returns_403_or_404_unauthenticated method async_method test_T30_private_repo_returns_403_or_404_unauthenticated L637–642
+ TestStateIntegrity class class TestStateIntegrity L397–482
+ test_T20_push_twice_produces_one_row_per_symbol method async_method test_T20_push_twice_produces_one_row_per_symbol L400–426
+ test_T21_second_push_overwrites_type_score method async_method test_T21_second_push_overwrites_type_score L429–460
+ test_T22_repo_delete_cascades_type_rows method async_method test_T22_repo_delete_cascades_type_rows L463–482
+ _REF variable variable _REF L30–30
+ _insert_type_row function async_function _insert_type_row L37–70
+ _make_repo_via_client function async_function _make_repo_via_client L656–658
+ _mock_process function function _mock_process L649–653
+ AsyncClient import import AsyncClient L23–23
+ AsyncMock import import AsyncMock L18–18
+ AsyncSession import import AsyncSession L25–25
+ annotations import import annotations L15–15
+ create_repo import import create_repo L28–28
+ dbm import import dbm L27–27
+ patch import import patch L18–18
+ pg_insert import import pg_insert L24–24
+ pytest import import pytest L20–20
+ pytest_asyncio import import pytest_asyncio L21–21
+ sa import import sa L22–22
+ time import import time L17–17
+ type_repo function async_function type_repo L74–97
~ musehub/api/routes/musehub/ui_intel.py .py 4 symbols added, 1 symbol modified
+ _VALID_TYPE_KINDS variable variable _VALID_TYPE_KINDS L1953–1953
+ _VALID_TYPE_TIERS variable variable _VALID_TYPE_TIERS L1951–1951
+ _VALID_TYPE_TOPS variable variable _VALID_TYPE_TOPS L1952–1952
+ intel_type_page function async_function intel_type_page L1957–2162
~ musehub/services/musehub_intel_providers.py .py 1 symbol added, 2 symbols modified
+ sa import import sa L35–35
← Older Oldest on task/intel-type-ui
All commits
Newer → Latest on task/intel-type-ui

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:3b295f958659f1cfe1781ecfbdbf7d51860c25afe696a6b1591f39921ffecf40 --body "your comment"