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
−
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
+
test_always_resets_origin_before_push
method
method test_always_resets_origin_before_push L263–314
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:ab2a6a9ecf2440e0e840c3a66bbcb52a42c92c060cb1f6cb247385185119cb1c --body "your comment"
No comments yet. Be the first to start the discussion.