gabriel / muse public
feat patch worktree dev
AI Agent gabriel · 57 days ago · Apr 19, 2026 · Diff

feat(worktree): supercharge JSON output — exit_code, duration_ms, list envelope

All six worktree subcommands now emit exit_code and duration_ms in every --json response. muse worktree list switches from a bare array to a {worktrees, exit_code, duration_ms} envelope (same pattern as workspace).

New TypedDicts: _WorktreeListJson, _WorktreeStatusJson, _WorktreeRepairJson. Updated: _WorktreeAddJson, _WorktreeRemoveJson, _WorktreePruneJson.

All six handler docstrings document the new fields.

tests/test_worktree_supercharge.py: 51 new tests across 6 classes — TestDurationMs, TestExitCode, TestListEnvelope, TestTypedDicts, TestDocstrings, TestPerformance.

tests/test_cmd_worktree_hardening.py: updated 37 tests to handle the envelope shape — _parse_list unwraps worktrees array, j-alias comparisons pop duration_ms before equality, key-set assertions include exit_code and duration_ms, raw list access updated to raw["worktrees"].

sha256:03e1516d1c56d368f245ecaad9cb3a056ff8058c9dabdbacf84d165fba8415b9 sha
sha256:7f9fa578ee801c51bc807e329b6ed43a344ffb6d1ec3239e270836e5c9785581 snapshot
← 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:03e1516d1c56d368f245ecaad9cb3a056ff8058c9dabdbacf84d165fba8415b9 --body "your comment"