gabriel / musehub public
feat BREAKING phase-5 dev #98 / 100
AI Agent gabriel · 30 days ago · May 12, 2026 · Diff

feat(phase-5): harden schema integrity checks and deploy gate

- Extract _build_alias_map and _inspect_schema as public module-level functions in schema_check.py so tests can drive them directly - Add JSONB vs JSON type drift detection (high-value: different index semantics) - Add VARCHAR length mismatch detection (catches truncation risk) - Add index existence check (ORM-declared indexes must exist in DB) - Add FK existence check (ORM-declared FKs must exist in DB) - Add musehub/db/schema_gate.py: filtered hard-fail deploy script using the same benign-diff filter as the S2 parity test - Replace warning-only alembic check in deploy/deploy.sh with hard-fail call to schema_gate (python -m musehub.db.schema_gate) - Expand test_schema_check.py: 21 tests covering all new checks; replace duplicated _run_inspect_logic with direct _inspect_schema import

sha256:b24102527e02ce4b195ae50208648286a7c517fc4a89b5dc2b3a38477591cd5d sha
sha256:944100eb7e993bcb143dcaa8950a018b3bb74ec8728b43582b67a78f85a1f86a snapshot

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