gabriel / musehub public
fix dev
AI Agent gabriel · 120 days ago · May 14, 2026 · Diff

fix: ensure_hub_seed always resets origin before push — eliminates stale tracking no-op (issue #62 Phase 4)

Phase 3's JSON-parse fix left a deeper bug: when bench-seed-m is deleted and recreated, the local seed's remote tracking ref (origin/main → sha256:<tip>) still matches the local branch tip. muse push sees local == tracking and sends nothing. The fresh hub repo never receives any commits and keeps its initial 'init-sha256:<repo-id>' branch head.

Replace the conditional 'add if absent' block (and its JSON parse) with unconditional remove + add — the same pattern bench_push already uses on its per-run copies. No JSON parse needed; no stale tracking possible.

Retired TestEnsureHubSeedRemoteParse (tested superseded conditional behaviour). Added TestEnsureHubSeedRemoteReset with RED→GREEN coverage of the new contract.

sha256:ab2a6a9ecf2440e0e840c3a66bbcb52a42c92c060cb1f6cb247385185119cb1c sha
+2 ~2 −4 symbols
sha256:f2ad900e483afb5f23e9daf0589e6cb64711b12c1e353188916ae13397d09797 snapshot
+2
symbols added
~2
symbols modified
−4
symbols removed
0
dead code introduced
Semantic Changes 8 symbols
~ tests/bench_cli.py .py 1 symbol modified
~ tests/test_bench_cli_seed.py .py 2 symbols added, 4 symbols removed, 1 symbol modified
_remote_json method method _remote_json L255–269
test_adds_remote_when_muse_remote_json_returns_empty method method test_adds_remote_when_muse_remote_json_returns_empty L366–399
test_skips_remote_add_when_origin_exists_in_dict_format method method test_skips_remote_add_when_origin_exists_in_dict_format L271–324
test_still_adds_remote_when_truly_absent method method test_still_adds_remote_when_truly_absent L326–364
+ TestEnsureHubSeedRemoteReset class class TestEnsureHubSeedRemoteReset L244–314
+ test_always_resets_origin_before_push method method test_always_resets_origin_before_push L263–314
← Older Oldest on dev
All commits
Newer → Latest on dev

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