feat: muse#53 item 4 server side — musehub_symlog_entries
Server-side companion to the muse-repo commit implementing remote symlog sharing. Mirrors musehub_reflog_entries (musehub side of muse#54 item 4), with one structural difference: symlog is per-symbol, not per-branch, so a single push batches every changed symbol's entries, and the table's content-hash entry_id includes symbol_addr rather than branch.
- New musehub_symlog_entries table (migration 0081): entry_id is a content hash of every field (repo_id, symbol_addr, old_content_id, new_content_id, commit_id, timestamp, author, operation). Entries are immutable history, so storage is pure ON CONFLICT DO NOTHING append-only, same as musehub_reflog_entries. ix_musehub_symlog_ entries_repo_symbol composite index since every read is scoped to one symbol's journal. - musehub/services/musehub_symlog.py: store_symlog_entries() (takes entries_by_symbol: dict[symbol_addr, list[entry]] for the batched multi-symbol push, unlike reflog's single-branch call) / list_symlog_entries() (returns dict[symbol_addr, list[entry]] grouped by symbol, unlike reflog's flat per-branch list). - wire_push_symlog (POST /{owner}/{slug}/symlog) / wire_get_symlog (GET, same path) on the existing bare-path wire.py router. No branch query param (unlike reflog's routes) since symlog has no branch scope; no force flag on push for the same reason reflog doesn't have one — nothing to conflict, entries are immutable. - test_migrations.py: _ALL_REVISIONS/_HEAD bumped to include 0081.
Covered by tests/test_musehub_symlog_service.py (7 cases: round-trip, re-push dedup via content-hash entry_id, batched multi-symbol push in one call, per-symbol isolation, oldest-first ordering within a symbol, empty-batch no-op, missing-commit_id skipped silently). Full suite run: 87 tests (symlog service + reflog service + version-tags service + migrations + schema-check) all passing, confirming migration 0081 applies cleanly on top of 0080 and the ORM model matches the DB schema exactly. Containers restarted and verified clean boot (schema check passed, 75 tables; alembic current = 0081 head) before live end-to-end verification from the muse-repo side: pushed a symbol's journal with --symlog to a scratch repo on the real local hub, confirmed idempotent re-push, pulled into a fresh clone and confirmed the local journal received the correct entry.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Semantic Changes
43 symbols
Files Changed
+3
~3
1097 in snapshot
0 comments
muse hub commit comment sha256:4fba330283cca0a6bdd067f2c0ad014062fcfda7e98b19ce8cd1e20290252b08 --body "your comment"
No comments yet. Be the first to start the discussion.