gabriel / musehub public
fix BREAKING task/symbol-intel-mapped-as-dataclass #1 / 1
AI Agent gabriel · 131 days ago · May 4, 2026 · Diff

fix: convert MusehubSymbolIntel to MappedAsDataclass

default=list/dict on plain Base subclasses only fires at INSERT, not at Python construction time. MappedAsDataclass + default_factory=list ensures each instance gets its own list at __init__, which fixes service code that accesses .blast_top/.weekly on freshly constructed (unflushed) objects.

All nullable optional fields get explicit default=None to satisfy MappedAsDataclass field ordering rules (required fields first).

26 tests pass in test_model_defaults.py.

sha256:94b4bd7c2eaf50a68ab332e5316894cc1e8b755c5d1484ea243d54283486b070 sha
+27 ~14 symbols
sha256:5b70548a7b488011a8de01b09853b550985461c39c7a48bb5ccf159298524ec5 snapshot
+27
symbols added
~14
symbols modified
0
dead code introduced
Semantic Changes 41 symbols
~ tests/test_model_defaults.py .py 27 symbols added, 7 symbols modified
+ _COMMENT_ID variable variable _COMMENT_ID L236–236
+ _EVENT_ID variable variable _EVENT_ID L233–233
+ _MIST_ID variable variable _MIST_ID L238–238
+ _RELEASE_ID variable variable _RELEASE_ID L237–237
+ _SESSION_ID variable variable _SESSION_ID L235–235
+ _WEBHOOK_ID variable variable _WEBHOOK_ID L234–234
+ MusehubIssueEvent import import MusehubIssueEvent L18–18
+ MusehubMist import import MusehubMist L18–18
+ MusehubProposalComment import import MusehubProposalComment L18–18
+ MusehubRelease import import MusehubRelease L18–18
+ MusehubSession import import MusehubSession L18–18
+ MusehubSymbolIntel import import MusehubSymbolIntel L18–18
+ MusehubWebhook import import MusehubWebhook L18–18
+ test_musehub_issue_event_defaults_at_construction function function test_musehub_issue_event_defaults_at_construction L241–250
+ test_musehub_issue_event_payload_is_isolated function function test_musehub_issue_event_payload_is_isolated L253–257
+ test_musehub_mist_defaults_at_construction function function test_musehub_mist_defaults_at_construction L349–364
+ test_musehub_mist_lists_are_isolated function function test_musehub_mist_lists_are_isolated L367–372
+ test_musehub_proposal_comment_defaults_at_construction function function test_musehub_proposal_comment_defaults_at_construction L304–315
+ test_musehub_proposal_comment_dimension_ref_is_isolated function function test_musehub_proposal_comment_dimension_ref_is_isolated L318–323
+ test_musehub_release_defaults_at_construction function function test_musehub_release_defaults_at_construction L326–339
+ test_musehub_release_download_urls_is_isolated function function test_musehub_release_download_urls_is_isolated L342–346
+ test_musehub_session_defaults_at_construction function function test_musehub_session_defaults_at_construction L280–293
+ test_musehub_session_lists_are_isolated function function test_musehub_session_lists_are_isolated L296–301
+ test_musehub_symbol_intel_arrays_are_isolated function function test_musehub_symbol_intel_arrays_are_isolated L387–391
+ test_musehub_symbol_intel_defaults_at_construction function function test_musehub_symbol_intel_defaults_at_construction L375–384
+ test_musehub_webhook_defaults_at_construction function function test_musehub_webhook_defaults_at_construction L260–270
+ test_musehub_webhook_events_is_isolated function function test_musehub_webhook_events_is_isolated L273–277
← Older Oldest on task/symbol-intel-mapped-as-dataclass
All commits
Newer → Latest on task/symbol-intel-mapped-as-dataclass

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