gabriel / muse public
fix patch fix/212-mist-push-namespace-crash #1 / 1
AI Agent gabriel · 8 hours ago · Oct 22, 2026 · Diff

fix: muse mist push crashed unconditionally with AttributeError (musehub#212)

mist.py::run_push() hand-built a types.SimpleNamespace with only 4 fields (remote, branch, force, json_output) and handed it to push.py's run(), which reads args.json_out (not json_output -- genuinely different name), args.branch_pos, and args.set_upstream_flag directly off the namespace -- none of which the hand-built namespace provided. muse mist push could not succeed under any circumstances; this is the documented 'manual workflow' from muse mist push --help.

Fixed by building the namespace through push.py's own argparse parser instead of hand-listing fields -- the same drift that caused this bug (push.py's parser gained set_upstream_flag/json_out at some point, mist.py's hand-built namespace was never updated to match) cannot recur, since every field push.py's run() could ever read now comes from the real parser's own defaults.

sha256:7cc8abb049561fa05083f7bdf6b66bd5cf0466506a38600bc92ac3e6f4cf7b3a sha
+1 ~2 symbols
2 changed · 1260 in snapshot files
sha256:75ccc896ac2e4ba1cb20b8b7c5b58f7bad0eb8fc7a295010f39b376688a5e0b0 snapshot
+1
symbol added
~2
symbols modified
2
files changed
1260
files in snapshot
0
dead code introduced
Semantic Changes 3 symbols
~ muse/cli/commands/mist.py .py 1 symbol modified
~ tests/test_mist_cli.py .py 1 symbol added, 1 symbol modified
+ test_M1d_run_push_does_not_crash_on_missing_namespace_attrs method method test_M1d_run_push_does_not_crash_on_missing_namespace_attrs L739–767
Files Changed
~2
1260 in snapshot
← Older Oldest on fix/212-mist-push-namespace-crash
All commits
Newer → Latest on fix/212-mist-push-namespace-crash

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