gabriel / musehub public
fix patch intel task/api-surface-fix-provider #1 / 1
AI Agent gabriel · 138 days ago · May 3, 2026 · Diff

fix(intel): rewrite ApiSurfaceProvider to parse stored objects — no subprocess

Replace _run_muse / muse api-surface subprocess call with pure-Python parse_symbols() on stored snapshot objects, mirroring TypeProvider.

On staging the on-disk repo checkout doesn't exist, so _run_muse returned None and the provider persisted nothing. The new path reads the HEAD snapshot manifest from musehub_snapshots.manifest_blob, fetches each source file's bytes via get_backend().get(), runs parse_symbols() (pure AST, no fork), filters with _is_public, and batch-upserts in chunks of 1,000 rows — identical architecture to TypeProvider.

Tests (T04/T05/T06) updated to mock get_backend and parse_symbols at module level instead of asyncio.create_subprocess_exec. All 30 pass.

sha256:c882f306b071953626c16622735517b01715bf9fb08087f66e0292a153d83b12 sha
+5 ~7 symbols
sha256:6d3692c1b9992617a4c61a61ae9d4b604791944b6c5750d9964b8d613a797ea8 snapshot
+5
symbols added
~7
symbols modified
0
dead code introduced
Semantic Changes 12 symbols
~ musehub/services/musehub_intel_providers.py .py 3 symbols added, 3 symbols modified
+ _is_public method method _is_public L1672–1673
+ get_backend import import get_backend L44–44
+ parse_symbols import import parse_symbols L41–41
~ tests/test_intel_api_surface.py .py 2 symbols added, 4 symbols modified
← Older Oldest on task/api-surface-fix-provider
All commits
Newer → Latest on task/api-surface-fix-provider

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