gabriel / muse public
fix patch fix/push-tags-when-branch-up-to-date #1 / 1
AI Agent gabriel · 18 days ago · Jul 2, 2026 · Diff

fix: muse push --tags must still sync tags when branch is up to date

push.py returned early with status=up_to_date whenever remote_head == local_head, BEFORE reaching the tag-push block further down - so 'muse push --tags' silently did nothing whenever the branch itself had no new commits to send, even with pending local tags and --tags explicitly passed.

Discovered while creating the first-ever real muse tag on this repo: tagged an already-pushed commit, ran 'muse push staging main --tags', got status=up_to_date with no error, and a fresh pull elsewhere showed zero tags. Every existing VT_29 test used a mock transport with branch_heads={} (remote_head always None), which only exercises the first-push path and never caught this.

Moved the --tags resolution and transport.push_version_tags() call to run before the up_to_date early return (token/url/transport are all already available at that point), and removed the now-duplicate computation later in the function that would otherwise double-push tags on a normal push. Added VT_29b covering the up-to-date + --tags case with a mock branch_heads matching local_head.

sha256:3681e49e76d2e2614dcd1208366ea7b5860a665ade7a0cc9941ac60725594b95 sha
+2 ~1 symbols
2 changed · 1120 in snapshot files
sha256:50195646343eaee9b244dd7afede80c4fe7862b59fddd0c5350d6e412f102d6c snapshot
+2
symbols added
~1
symbol modified
2
files changed
1120
files in snapshot
0
dead code introduced
Semantic Changes 3 symbols
~ muse/cli/commands/push.py .py 1 symbol modified
~ run
~ tests/test_cmd_version_tag_push.py .py 2 symbols added
+ TestVT29bPushTagsWhenBranchUpToDate class class TestVT29bPushTagsWhenBranchUpToDate L396–426
+ test_push_with_tags_when_branch_already_up_to_date method method test_push_with_tags_when_branch_already_up_to_date L399–426
Files Changed
~2
1120 in snapshot
← Older Oldest on fix/push-tags-when-branch-up-to-date
All commits
Newer → Latest on fix/push-tags-when-branch-up-to-date

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:3681e49e76d2e2614dcd1208366ea7b5860a665ade7a0cc9941ac60725594b95 --body "your comment"