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"].
0 comments
muse hub commit comment sha256:03e1516d1c56d368f245ecaad9cb3a056ff8058c9dabdbacf84d165fba8415b9 --body "your comment"
No comments yet. Be the first to start the discussion.