gabriel / musehub public
feat BREAKING intel task/blast-risk-phase2 #1 / 1
AI Agent gabriel · 138 days ago · May 3, 2026 · Diff

feat(intel): blast-risk route SQL derivation + template, 20/20 phase 2 tests green

- Rewrite intel_blast_risk_page to query musehub_intel_blast_risk directly - Support ?risk=critical|high|medium|low filter and ?top=25|50|100|250 limit - Compute stat counts (critical/high/medium/low/total) from unfiltered DB query - Rewrite intel_blast_risk.html template with stat cards, filter bar, tier-badged rows - Delete old intel snapshot subprocess approach from route - Phase 2 TDD spec: 20 tests covering route, filtering, ordering, stats, isolation

sha256:e3894bffead268ac26f2f474b06203f0af4b2a971b4877f104ef342127f96a2d sha
+55 ~1 symbols
sha256:9984c703d63e580740e5e9803c27b54aa66ad3e0e298ed9b65c1285300dffdb6 snapshot
+55
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes 56 symbols
~ tests/test_phase2_blast_risk_route.py .py 53 symbols added
+ TestBlastRiskAllTiers class class TestBlastRiskAllTiers L374–385
+ test_P2_17_all_four_tiers_rendered method async_method test_P2_17_all_four_tiers_rendered L377–385
+ TestBlastRiskBasic class class TestBlastRiskBasic L144–158
+ test_P2_02_get_returns_200 method async_method test_P2_02_get_returns_200 L147–151
+ test_P2_15_content_type_html method async_method test_P2_15_content_type_html L154–158
+ TestBlastRiskEmptyState class class TestBlastRiskEmptyState L179–189
+ test_P2_04_empty_repo_shows_empty_state method async_method test_P2_04_empty_repo_shows_empty_state L182–189
+ TestBlastRiskFilterCritical class class TestBlastRiskFilterCritical L233–243
+ test_P2_07_filter_risk_critical_only method async_method test_P2_07_filter_risk_critical_only L236–243
+ TestBlastRiskFilterHigh class class TestBlastRiskFilterHigh L250–260
+ test_P2_08_filter_risk_high_only method async_method test_P2_08_filter_risk_high_only L253–260
+ TestBlastRiskInvalidFilter class class TestBlastRiskInvalidFilter L267–276
+ test_P2_09_invalid_risk_param_returns_all_rows method async_method test_P2_09_invalid_risk_param_returns_all_rows L270–276
+ TestBlastRiskIsolation class class TestBlastRiskIsolation L392–406
+ test_P2_18_other_repo_rows_absent method async_method test_P2_18_other_repo_rows_absent L395–406
+ TestBlastRiskNoSubprocess class class TestBlastRiskNoSubprocess L359–367
+ test_P2_16_no_subprocess_called method async_method test_P2_16_no_subprocess_called L362–367
+ TestBlastRiskNotFound class class TestBlastRiskNotFound L165–172
+ test_P2_03_unknown_repo_returns_404 method async_method test_P2_03_unknown_repo_returns_404 L168–172
+ TestBlastRiskOrdering class class TestBlastRiskOrdering L216–226
+ test_P2_06_highest_score_appears_before_lower method async_method test_P2_06_highest_score_appears_before_lower L219–226
+ TestBlastRiskRouteRegistration class class TestBlastRiskRouteRegistration L132–137
+ test_P2_01_blast_risk_route_registered method method test_P2_01_blast_risk_route_registered L134–137
+ TestBlastRiskRowsRendered class class TestBlastRiskRowsRendered L196–209
+ test_P2_05_seeded_rows_appear_in_response method async_method test_P2_05_seeded_rows_appear_in_response L199–209
+ TestBlastRiskStats class class TestBlastRiskStats L330–352
+ test_P2_12_critical_count_in_page method async_method test_P2_12_critical_count_in_page L333–338
+ test_P2_13_high_count_in_page method async_method test_P2_13_high_count_in_page L341–345
+ test_P2_14_total_count_in_page method async_method test_P2_14_total_count_in_page L348–352
+ TestBlastRiskTopParam class class TestBlastRiskTopParam L283–323
+ test_P2_10_top_25_limits_rows method async_method test_P2_10_top_25_limits_rows L286–302
+ test_P2_11_invalid_top_clamped_to_default method async_method test_P2_11_invalid_top_clamped_to_default L305–309
+ test_P2_19_top_100_accepted method async_method test_P2_19_top_100_accepted L312–316
+ test_P2_20_top_250_accepted method async_method test_P2_20_top_250_accepted L319–323
+ _OWNER variable variable _OWNER L57–57
+ _REF variable variable _REF L59–59
+ _SLUG variable variable _SLUG L58–58
+ _seed_risk function async_function _seed_risk L62–100
+ _uid function function _uid L53–54
+ AsyncClient import import AsyncClient L43–43
+ AsyncSession import import AsyncSession L46–46
+ annotations import import annotations L36–36
+ create_repo import import create_repo L50–50
+ db import import db L49–49
+ fake_id import import fake_id L48–48
+ patch import import patch L39–39
+ pg_insert import import pg_insert L45–45
+ pytest import import pytest L41–41
+ pytest_asyncio import import pytest_asyncio L42–42
+ secrets import import secrets L38–38
+ select import import select L44–44
+ risk_repo function async_function risk_repo L108–109
+ risk_repo_with_rows function async_function risk_repo_with_rows L113–125
~ musehub/api/routes/musehub/ui_intel.py .py 2 symbols added, 1 symbol modified
+ _RISK_TIER_ORDER variable variable _RISK_TIER_ORDER L185–185
+ _VALID_RISK_TIERS variable variable _VALID_RISK_TIERS L184–184
← Older Oldest on task/blast-risk-phase2
All commits
Newer → Latest on task/blast-risk-phase2

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