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

feat: Phase 2 — 11 normalized code intel providers

New providers, each wrapping one muse code <command> --json subprocess: intel.code.coupling → MusehubIntelCoupling intel.code.entangle → MusehubIntelEntangle intel.code.dead → MusehubIntelDead intel.code.blast_risk → MusehubIntelBlastRisk intel.code.stable → MusehubIntelStable intel.code.velocity → MusehubIntelVelocity intel.code.clones → MusehubIntelClones intel.code.type → MusehubIntelType intel.code.api_surface → MusehubIntelApiSurface intel.code.languages → MusehubIntelLanguages intel.code.detect_refactor → MusehubIntelRefactorEvent

Supporting infrastructure: _run_muse() — async subprocess wrapper, returns None on non-zero exit _resolve_repo_root() — looks up owner/slug from payload or DB

job_types_for_push('code') now includes all 11 new job types. All 40 Phase 2 tests GREEN (80 total across Phase 1 + Phase 2).

sha256:473b53a8dbbcb0e60171d052056369df3fabed08a81be9bba29f3df4c2a79183 sha
+79 ~2 symbols
sha256:82ffae1d68c4978ba1020071aa95e3f1b459eff4d7b19786f3a7bacc2b95de9d snapshot
+79
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 81 symbols
~ tests/test_phase2_intel_providers.py .py 52 symbols added
+ TestPhase2ApiSurfaceProvider class class TestPhase2ApiSurfaceProvider L459–490
+ test_P2_15_api_surface_upserts_rows method async_method test_P2_15_api_surface_upserts_rows L462–490
+ TestPhase2BlastRiskProvider class class TestPhase2BlastRiskProvider L268–302
+ test_P2_10_blast_risk_upserts_rows method async_method test_P2_10_blast_risk_upserts_rows L271–302
+ TestPhase2ClonesProvider class class TestPhase2ClonesProvider L381–412
+ test_P2_13_clones_upserts_rows method async_method test_P2_13_clones_upserts_rows L384–412
+ TestPhase2CouplingProvider class class TestPhase2CouplingProvider L141–191
+ test_P2_06_coupling_upserts_rows method async_method test_P2_06_coupling_upserts_rows L144–166
+ test_P2_07_coupling_upsert_overwrites_on_re_run method async_method test_P2_07_coupling_upsert_overwrites_on_re_run L169–191
+ TestPhase2DeadProvider class class TestPhase2DeadProvider L235–261
+ test_P2_09_dead_upserts_rows method async_method test_P2_09_dead_upserts_rows L238–261
+ TestPhase2DetectRefactorProvider class class TestPhase2DetectRefactorProvider L531–602
+ test_P2_17_detect_refactor_upserts_rows method async_method test_P2_17_detect_refactor_upserts_rows L534–567
+ test_P2_18_detect_refactor_deduplicates_by_event_id method async_method test_P2_18_detect_refactor_deduplicates_by_event_id L570–602
+ TestPhase2Dispatch class class TestPhase2Dispatch L115–134
+ test_P2_03_job_types_for_push_code_includes_all_phase2_types method method test_P2_03_job_types_for_push_code_includes_all_phase2_types L117–121
+ test_P2_04_job_types_for_push_code_still_includes_legacy_types method method test_P2_04_job_types_for_push_code_still_includes_legacy_types L123–128
+ test_P2_05_job_types_for_push_midi_excludes_phase2_types method method test_P2_05_job_types_for_push_midi_excludes_phase2_types L130–134
+ TestPhase2EmptyOutput class class TestPhase2EmptyOutput L609–635
+ test_P2_19_empty_muse_output_returns_empty_list method async_method test_P2_19_empty_muse_output_returns_empty_list L625–635
+ TestPhase2EntangleProvider class class TestPhase2EntangleProvider L198–228
+ test_P2_08_entangle_upserts_rows method async_method test_P2_08_entangle_upserts_rows L201–228
+ TestPhase2ErrorHandling class class TestPhase2ErrorHandling L642–656
+ test_P2_20_nonzero_exit_returns_empty_list method async_method test_P2_20_nonzero_exit_returns_empty_list L646–656
+ TestPhase2LanguagesProvider class class TestPhase2LanguagesProvider L497–524
+ test_P2_16_languages_upserts_rows method async_method test_P2_16_languages_upserts_rows L500–524
+ TestPhase2Registry class class TestPhase2Registry L95–108
+ test_P2_01_all_phase2_job_types_in_registry method method test_P2_01_all_phase2_job_types_in_registry L97–100
+ test_P2_02_registry_providers_satisfy_protocol method method test_P2_02_registry_providers_satisfy_protocol L102–108
+ TestPhase2StableProvider class class TestPhase2StableProvider L309–336
+ test_P2_11_stable_upserts_rows method async_method test_P2_11_stable_upserts_rows L312–336
+ TestPhase2TypeProvider class class TestPhase2TypeProvider L419–452
+ test_P2_14_type_upserts_rows method async_method test_P2_14_type_upserts_rows L422–452
+ TestPhase2VelocityProvider class class TestPhase2VelocityProvider L343–374
+ test_P2_12_velocity_upserts_rows method async_method test_P2_12_velocity_upserts_rows L346–374
+ _ALL_PHASE2_JOB_TYPES variable variable _ALL_PHASE2_JOB_TYPES L60–72
+ _mock_process function function _mock_process L83–88
+ _now function function _now L79–80
+ _uid function function _uid L75–76
+ AsyncMock import import AsyncMock L51–51
+ AsyncSession import import AsyncSession L55–55
+ MagicMock import import MagicMock L51–51
+ annotations import import annotations L46–46
+ create_repo import import create_repo L58–58
+ datetime import import datetime L50–50
+ fake_id import import fake_id L57–57
+ json import import json L48–48
+ patch import import patch L51–51
+ pytest import import pytest L53–53
+ secrets import import secrets L49–49
+ select import import select L54–54
+ timezone import import timezone L50–50
~ musehub/services/musehub_intel_providers.py .py 27 symbols added, 2 symbols modified
+ ApiSurfaceProvider class class ApiSurfaceProvider L816–853
+ compute method async_method compute L819–853
+ BlastRiskProvider class class BlastRiskProvider L591–636
+ compute method async_method compute L594–636
+ ClonesProvider class class ClonesProvider L729–767
+ compute method async_method compute L732–767
+ CouplingProvider class class CouplingProvider L476–507
+ compute method async_method compute L479–507
+ DeadProvider class class DeadProvider L551–588
+ compute method async_method compute L554–588
+ DetectRefactorProvider class class DetectRefactorProvider L896–943
+ compute method async_method compute L899–943
+ EntangleProvider class class EntangleProvider L510–548
+ compute method async_method compute L513–548
+ LanguagesProvider class class LanguagesProvider L856–893
+ compute method async_method compute L859–893
+ StableProvider class class StableProvider L639–674
+ compute method async_method compute L642–674
+ TypeProvider class class TypeProvider L770–813
+ compute method async_method compute L773–813
+ VelocityProvider class class VelocityProvider L677–726
+ compute method async_method compute L680–726
+ _resolve_repo_root function async_function _resolve_repo_root L236–254
+ _run_muse function async_function _run_muse L214–233
+ asyncio import import asyncio L29–29
+ blob_id import import blob_id L39–39
+ repo_root_for import import repo_root_for L42–42
← Older Oldest on task/phase2-intel-providers
All commits
Newer → Latest on task/phase2-intel-providers

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