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

feat(intel): blast-risk detail page + helpers, 22/22 phase 4 tests green

- New route GET /{owner}/{repo_slug}/intel/blast-risk/detail?address=... - Joins musehub_intel_blast_risk with musehub_symbol_intel for raw inputs - _risk_color_class(): maps normalized sub-score to CSS fill class (critical/high/medium/low) - _score_bar_pct(): converts float score to int percentage, clamped [0,100] - New template intel_blast_risk_detail.html: header strip, sub-score bars with progress fills + raw input labels, blast_top dependents list, back link - Detail SCSS wired into components/_blast_risk.scss (score bars, deps card) - Unknown/missing address → 200 empty-state (not 404); XSS + path-traversal safe

sha256:6afe3d28b528165838df75e7f20317e8672bab2b7fef30eba02cdcd87a0ab60b sha
+49 symbols
sha256:4b4ae61c3aee0639a0d770b09ef8fe3bb3396e26948531a6eeec284aaa106552 snapshot
+49
symbols added
0
dead code introduced
Semantic Changes 49 symbols
+ TestDetailContent class class TestDetailContent L198–264
+ test_P4_05_symbol_address_in_html method async_method test_P4_05_symbol_address_in_html L201–208
+ test_P4_06_risk_score_in_html method async_method test_P4_06_risk_score_in_html L211–218
+ test_P4_07_all_four_sub_scores_rendered method async_method test_P4_07_all_four_sub_scores_rendered L221–233
+ test_P4_08_risk_tier_badge_rendered method async_method test_P4_08_risk_tier_badge_rendered L236–243
+ test_P4_09_blast_top_dependents_listed method async_method test_P4_09_blast_top_dependents_listed L246–254
+ test_P4_10_back_link_to_blast_risk_list method async_method test_P4_10_back_link_to_blast_risk_list L257–264
+ TestDetailE2E class class TestDetailE2E L310–344
+ test_P4_19_full_seed_to_html_round_trip method async_method test_P4_19_full_seed_to_html_round_trip L313–323
+ test_P4_20_empty_blast_top_renders_without_error method async_method test_P4_20_empty_blast_top_renders_without_error L326–344
+ TestDetailHelpers class class TestDetailHelpers L271–303
+ test_P4_11_risk_color_class_critical class method test_P4_11_risk_color_class_critical L273–275
+ test_P4_12_risk_color_class_high class method test_P4_12_risk_color_class_high L277–279
+ test_P4_13_risk_color_class_medium class method test_P4_13_risk_color_class_medium L281–283
+ test_P4_14_risk_color_class_low class method test_P4_14_risk_color_class_low L285–287
+ test_P4_15_score_bar_pct_zero method method test_P4_15_score_bar_pct_zero L289–291
+ test_P4_16_score_bar_pct_one method method test_P4_16_score_bar_pct_one L293–295
+ test_P4_17_score_bar_pct_half method method test_P4_17_score_bar_pct_half L297–299
+ test_P4_18_score_bar_pct_overflow_clamped method method test_P4_18_score_bar_pct_overflow_clamped L301–303
+ TestDetailHttpResponses class class TestDetailHttpResponses L164–191
+ test_P4_02_known_address_returns_200 method async_method test_P4_02_known_address_returns_200 L167–174
+ test_P4_03_unknown_address_returns_200_with_empty_state method async_method test_P4_03_unknown_address_returns_200_with_empty_state L177–184
+ test_P4_04_missing_address_param_returns_200_with_empty_state method async_method test_P4_04_missing_address_param_returns_200_with_empty_state L187–191
+ TestDetailRouteRegistration class class TestDetailRouteRegistration L152–157
+ test_P4_01_detail_route_registered method method test_P4_01_detail_route_registered L154–157
+ TestDetailSecurity class class TestDetailSecurity L351–373
+ test_P4_21_xss_in_address_param_escaped method async_method test_P4_21_xss_in_address_param_escaped L354–363
+ test_P4_22_path_traversal_in_address_safe method async_method test_P4_22_path_traversal_in_address_safe L366–373
+ _OWNER variable variable _OWNER L46–46
+ _REF variable variable _REF L48–48
+ _SLUG variable variable _SLUG L47–47
+ _seed_risk function async_function _seed_risk L51–84
+ _seed_symbol function async_function _seed_symbol L87–121
+ _uid function function _uid L42–43
+ detail_repo function async_function detail_repo L129–130
+ detail_repo_with_symbol function async_function detail_repo_with_symbol L134–145
+ AsyncClient import import AsyncClient L33–33
+ AsyncSession import import AsyncSession L35–35
+ annotations import import annotations L27–27
+ create_repo import import create_repo L39–39
+ db import import db L38–38
+ fake_id import import fake_id L37–37
+ pg_insert import import pg_insert L34–34
+ pytest import import pytest L31–31
+ pytest_asyncio import import pytest_asyncio L32–32
+ secrets import import secrets L29–29
+ _risk_color_class class function _risk_color_class L189–197
+ _score_bar_pct function function _score_bar_pct L200–202
+ intel_blast_risk_detail_page function async_function intel_blast_risk_detail_page L288–365
← Older Oldest on task/blast-risk-phase4
All commits
Newer → Latest on task/blast-risk-phase4

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