gabriel / musehub public
refactor BREAKING task/json-to-jsonb-and-array #1 / 1
AI Agent gabriel · 44 days ago · May 4, 2026 · Diff

refactor: promote all JSON columns to JSONB or PostgreSQL ARRAY

Two classes of change:

1. Homogeneous list[str]/list[ID] columns → ARRAY(text[]) or ARRAY(varchar(128)[]). ARRAY is type-safe at the column level, supports &&/@> GIN operators natively, and has no JSON parsing overhead. Covers: tags, parent_ids, directories, agent_capabilities, pinned_repo_ids, scope, org_members, labels, symbol_anchors, commit_anchors, touched_symbols, events, participants, commits (session), breaking_changes, reviewed_by, depends_on (coord tasks), and mist tags/symbol_anchors.

2. Heterogeneous blob columns → JSONB. Covers: domain_meta, settings, structured_delta, payload (events/jobs/coord), domain_diff, dimension_ref, download_urls, op_payload, gravity_depth_distribution, kinds_json, cycles_json, manifest, commit_metadata, capabilities.

Alembic 0024 migrates all existing data in place using USING clauses.

TDD: 19 tests in test_array_column_types.py + 17 tests in test_jsonb_column_types.py (36 total, all green).

sha256:4bb2ec1e84938461c551731699387c8dbf01fa1337062336aae2583b80a79534 sha
sha256:c997360e3af3063763bd92af726e8047760bdadd444ab67f25fe3519d2150ca4 snapshot
← Older Oldest on task/json-to-jsonb-and-array
All commits
Newer → Latest on task/json-to-jsonb-and-array

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