feat: server-side storage for signed version tags (muse#57 item 3)
Adds signer_public_key/signature columns to musehub_version_tags, completing the server half of muse's new `muse tag add --sign` / `muse tag verify` feature (an Ed25519 signature over (repo_id, tag, commit_id), mirroring the existing signed-commit pattern).
Migration 0079 adds both columns (nullable TEXT, empty-string default -- no backfill needed, every existing row is legitimately unsigned). MusehubVersionTag's ORM model, store_version_tags (both the insert and the on-conflict-update branches, so re-signing and re-pushing a tag correctly updates the stored signature), and list_version_tags (so the already-existing GET /{owner}/{slug}/version-tags endpoint returns them) all updated to pass the two fields through.
Also fixed test_migrations.py's _ALL_REVISIONS/_HEAD, which had silently drifted (stuck at "0074" while migrations 0075-0078 already existed on disk, added by earlier unrelated work this session) -- caught while adding migration 0079's own entry.
New tests/test_musehub_version_tags_service.py (service-level, no HTTP, matching this repo's existing test_musehub_sessions_service.py convention): unsigned tag round-trips with empty signature fields, a signed tag's signer_public_key/signature round-trip through store -> list, force-push re-signing updates the stored signature (not just commit_id), and a payload with no signature keys at all (older client) defaults to unsigned rather than raising. Confirmed genuine RED (4/4 failed with KeyError) before GREEN with the fix restored.
Live-verified end-to-end against the actual local musehub instance (not just the test suite): applied migration 0079, restarted both musehub and musehub_worker containers, confirmed clean boot, then from the muse side signed a tag locally, pushed it, deleted the local copy, and confirmed `muse tag list --remote local` (muse#57 item 4) retrieved it from this server with signed=true -- the full cross-repo wire round-trip, not just mocked unit tests on either side.
Targeted regression suite -- test_musehub_version_tags_service.py (4, new), test_migrations.py (53, including the drift fix), test_authz_wire_push.py (10, covers the version-tags push endpoint's write-authz guard) -- all pass, zero regressions.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Semantic Changes
27 symbols
Files Changed
+2
~3
1090 in snapshot
0 comments
muse hub commit comment sha256:e86c5be4cf41151c1b4a4b7ac3562c87948faca51a0aa9e533a1ce63e1c51754 --body "your comment"
No comments yet. Be the first to start the discussion.