gabriel / musehub public
refactor BREAKING task/phase4-split-musehub-models #1 / 1
AI Agent gabriel · 30 days ago · May 12, 2026 · Diff

refactor: split musehub_models.py monolith into 8 domain-specific files

Move all 56 ORM class definitions out of the 2240-line monolith into domain-specific modules:

- musehub_repo_models.py — repos, branches, commits, objects, snapshots, sessions, wire tags, bridge mirrors, mists (11 classes) - musehub_social_models.py — issues, proposals, forks (9 classes) - musehub_release_models.py — releases, release assets (2 classes) - musehub_webhook_models.py — webhooks, webhook deliveries (2 classes) - musehub_intel_models.py — all intel_* and symbol_* tables (23 classes) - musehub_identity_models.py — identities, attestations, mpay claims, profile snapshots (5 classes) - musehub_abuse_models.py — blocked hashes, push bytes, anomalies, stream rejections (4 classes) - musehub_jobs_models.py — background jobs (1 class)

musehub_models.py is now a 95-line pure re-export shim so all existing call sites (from musehub.db import musehub_models as db) continue to work without changes during incremental migration.

musehub/db/__init__.py updated to register domain modules with SQLAlchemy Base directly rather than through the shim.

sha256:005e14c7b1c6a27a8046826d9b49080f5f1ad11c8328f628e5310f5f4f6d8f90 sha
sha256:85051c445c484fea78beba447bb6f6a88c3a5eae12b978084049454f9689004d snapshot
← Older Oldest on task/phase4-split-musehub-models
All commits
Newer → Latest on task/phase4-split-musehub-models

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