gabriel / musehub public
fix BREAKING task/mist-encapsulation #1 / 1
AI Agent gabriel · 133 days ago · May 4, 2026 · Diff

fix: fork_parent_id NULL in self-referential mist fork

- In fork_mist(), set fork_row.fork_parent = source (relationship object) instead of fork_parent_id = source.mist_id (FK column). SQLAlchemy's self-referential adjacency-list handling inserts NULL for the FK column when only the column is set (fork_parent remains None), then never applies the post-update. Setting the relationship object directly lets SQLAlchemy resolve the persistent parent and write the correct FK in the INSERT statement. - Add synchronize_session=False on the bulk fork_count UPDATE to prevent the session from expiring fork_row after the bulk UPDATE. - Fixes TestSchemaForks, TestIntegrationForks, TestStressForks, TestSecurityForks, TestIntegrationForkList (5 pre-existing failures).

sha256:11ad3d64c4ecb6758a2fdcda6cae29e89e6be35ec7d47df60537cfbc0e7b1679 sha
+1 ~7 −1 symbols
sha256:1600d58d215b327795d2f616b1bfd0090495d833141a6bcb1ed007ee9f37a128 snapshot
+1
symbol added
~7
symbols modified
−1
symbol removed
0
dead code introduced
Semantic Changes 9 symbols
~ musehub/services/musehub_mist_push_validator.py .py 1 symbol added, 1 symbol removed, 2 symbols modified
_validate_mist_filename import import _validate_mist_filename L24–24
+ validate_mist_filename import import validate_mist_filename L24–24
~ musehub/services/musehub_mists.py .py 1 symbol modified
← Older Oldest on task/mist-encapsulation
All commits
Newer → Latest on task/mist-encapsulation

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