gabriel / musehub public
feat BREAKING task/phase1-intel-schema #1 / 1
AI Agent gabriel · 139 days ago · May 3, 2026 · Diff

feat: Phase 1 intel schema — 11 new tables + extend symbol_intel (issue #8)

Adds 11 normalized intel tables replacing JSON blobs for coupling, entangle, dead, blast-risk, stable, velocity, clones, type, api-surface, languages, and refactor-events intel types. Extends musehub_symbol_intel with last_commit_id and op columns. Migration 0004 handles all DDL. 40 TDD tests all GREEN.

sha256:1e3360a81c5b92e19c74bd66ed2d12ff35c8c03b4e24e5c069737e7ec61f619f sha
+78 ~1 symbols
sha256:0773b536192a9b115a578dbb3957a54279b079c262d6c16f2fd61df86fee9edb snapshot
+78
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes 79 symbols
+ branch_labels variable variable branch_labels L36–36
+ depends_on variable variable depends_on L37–37
+ down_revision variable variable down_revision L35–35
+ downgrade function function downgrade L181–194
+ Sequence import import Sequence L29–29
+ Union import import Union L29–29
+ annotations import import annotations L27–27
+ op import import op L32–32
+ sa import import sa L31–31
+ revision variable variable revision L34–34
+ upgrade function function upgrade L40–178
~ tests/test_phase1_intel_schema.py .py 56 symbols added
+ TestPhase1Cascade class class TestPhase1Cascade L454–517
+ test_P1_36_cascade_delete_removes_coupling method async_method test_P1_36_cascade_delete_removes_coupling L457–472
+ test_P1_37_cascade_delete_removes_dead method async_method test_P1_37_cascade_delete_removes_dead L475–494
+ test_P1_38_cascade_delete_removes_refactor_events method async_method test_P1_38_cascade_delete_removes_refactor_events L497–517
+ TestPhase1DatabaseTables class class TestPhase1DatabaseTables L524–559
+ test_P1_39_all_new_tables_exist_in_db method async_method test_P1_39_all_new_tables_exist_in_db L527–546
+ test_P1_40_symbol_intel_extended_columns_in_db method async_method test_P1_40_symbol_intel_extended_columns_in_db L549–559
+ TestPhase1SchemaModels class class TestPhase1SchemaModels L53–173
+ test_P1_01_coupling_model_importable method method test_P1_01_coupling_model_importable L55–57
+ test_P1_02_coupling_columns method method test_P1_02_coupling_columns L59–62
+ test_P1_03_entangle_model_importable method method test_P1_03_entangle_model_importable L64–66
+ test_P1_04_entangle_columns method method test_P1_04_entangle_columns L68–74
+ test_P1_05_dead_model_importable method method test_P1_05_dead_model_importable L76–78
+ test_P1_06_dead_columns method method test_P1_06_dead_columns L80–83
+ test_P1_07_blast_risk_model_importable method method test_P1_07_blast_risk_model_importable L85–87
+ test_P1_08_blast_risk_columns method method test_P1_08_blast_risk_columns L89–95
+ test_P1_09_stable_model_importable method method test_P1_09_stable_model_importable L97–99
+ test_P1_10_stable_columns method method test_P1_10_stable_columns L101–104
+ test_P1_11_velocity_model_importable method method test_P1_11_velocity_model_importable L106–108
+ test_P1_12_velocity_columns method method test_P1_12_velocity_columns L110–116
+ test_P1_13_clones_model_importable method method test_P1_13_clones_model_importable L118–120
+ test_P1_14_clones_columns method method test_P1_14_clones_columns L122–125
+ test_P1_15_type_model_importable method method test_P1_15_type_model_importable L127–129
+ test_P1_16_type_columns method method test_P1_16_type_columns L131–137
+ test_P1_17_api_surface_model_importable method method test_P1_17_api_surface_model_importable L139–141
+ test_P1_18_api_surface_columns method method test_P1_18_api_surface_columns L143–146
+ test_P1_19_languages_model_importable method method test_P1_19_languages_model_importable L148–150
+ test_P1_20_languages_columns method method test_P1_20_languages_columns L152–155
+ test_P1_21_refactor_events_model_importable method method test_P1_21_refactor_events_model_importable L157–159
+ test_P1_22_refactor_events_columns method method test_P1_22_refactor_events_columns L161–167
+ test_P1_23_symbol_intel_extended_columns method method test_P1_23_symbol_intel_extended_columns L169–173
+ TestPhase1Write class class TestPhase1Write L180–447
+ test_P1_24_coupling_insert method async_method test_P1_24_coupling_insert L183–200
+ test_P1_25_entangle_insert method async_method test_P1_25_entangle_insert L203–222
+ test_P1_26_dead_insert method async_method test_P1_26_dead_insert L225–241
+ test_P1_27_blast_risk_insert method async_method test_P1_27_blast_risk_insert L244–265
+ test_P1_28_stable_insert method async_method test_P1_28_stable_insert L268–287
+ test_P1_29_velocity_insert method async_method test_P1_29_velocity_insert L290–314
+ test_P1_30_clones_insert method async_method test_P1_30_clones_insert L317–335
+ test_P1_31_type_insert method async_method test_P1_31_type_insert L338–359
+ test_P1_32_api_surface_insert method async_method test_P1_32_api_surface_insert L362–380
+ test_P1_33_languages_insert method async_method test_P1_33_languages_insert L383–401
+ test_P1_34_refactor_event_insert method async_method test_P1_34_refactor_event_insert L404–424
+ test_P1_35_symbol_intel_extended_columns_write method async_method test_P1_35_symbol_intel_extended_columns_write L427–447
+ _now function function _now L45–46
+ _uid function function _uid L41–42
+ AsyncSession import import AsyncSession L36–36
+ annotations import import annotations L29–29
+ create_repo import import create_repo L38–38
+ datetime import import datetime L32–32
+ inspect import import inspect L35–35
+ pytest import import pytest L34–34
+ select import import select L35–35
+ text import import text L35–35
+ timezone import import timezone L32–32
+ uuid import import uuid L31–31
~ musehub/db/musehub_models.py .py 11 symbols added, 1 symbol modified
+ MusehubIntelApiSurface class class MusehubIntelApiSurface L1327–1344
+ MusehubIntelBlastRisk class class MusehubIntelBlastRisk L1215–1235
+ MusehubIntelClones class class MusehubIntelClones L1284–1301
+ MusehubIntelCoupling class class MusehubIntelCoupling L1155–1171
+ MusehubIntelDead class class MusehubIntelDead L1195–1212
+ MusehubIntelEntangle class class MusehubIntelEntangle L1174–1192
+ MusehubIntelLanguages class class MusehubIntelLanguages L1347–1364
+ MusehubIntelRefactorEvent class class MusehubIntelRefactorEvent L1367–1387
+ MusehubIntelStable class class MusehubIntelStable L1238–1255
+ MusehubIntelType class class MusehubIntelType L1304–1324
+ MusehubIntelVelocity class class MusehubIntelVelocity L1258–1281
← Older Oldest on task/phase1-intel-schema
All commits
Newer → Latest on task/phase1-intel-schema

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