gabriel / muse public
fix patch task/ergonomic-fixes #1 / 1
AI Agent gabriel · 136 days ago · Apr 25, 2026 · Diff

fix: four ergonomic improvements to CLI test infrastructure

1. CliRunner stdout/stderr separation — result.output is stdout-only, result.stderr is stderr-only. Migrated all 93 affected assertions. 2. CliRunner cwd= parameter — invoke(cwd=path) chdir/restores atomically. 3. muse branch -b writes a reflog entry (git-idiomatic). 4. muse cat / muse code cat fall back to disk for untracked files.

sha256:a7e43b26ec69b4f31093727303ca6632016af79cca353a578de5cdd902871b54 sha
+19 ~158 symbols
sha256:a0fd7f42eac2b4f9e4b04d7af4f8009700c9fcaf876ed93bb14f453b81dcbe4b snapshot
+19
symbols added
~158
symbols modified
0
dead code introduced
Semantic Changes 177 symbols
~ muse/cli/commands/branch.py .py 1 symbol added, 1 symbol modified
+ append_reflog import import append_reflog L63–63
~ run
~ muse/cli/commands/cat.py .py 1 symbol modified
~ tests/cli_test_helper.py .py 2 symbols modified
~ tests/test_app.py .py 9 symbols added
+ TestCliRunnerCwd class class TestCliRunnerCwd L267–292
+ test_cwd_initialises_repo_in_target method method test_cwd_initialises_repo_in_target L270–274
+ test_cwd_isolates_concurrent_calls method method test_cwd_isolates_concurrent_calls L283–292
+ test_cwd_restores_after_invoke method method test_cwd_restores_after_invoke L276–281
+ TestCliRunnerStdoutStderr class class TestCliRunnerStdoutStderr L238–264
+ test_json_stdout_unpolluted_by_stderr method method test_json_stdout_unpolluted_by_stderr L256–264
+ test_stderr_only_in_stderr method method test_stderr_only_in_stderr L249–254
+ test_stdout_only_in_output method method test_stdout_only_in_output L241–247
+ json import import json L30–30
~ tests/test_cmd_branch.py .py 4 symbols added
+ TestCreateReflog class class TestCreateReflog L520–539
+ test_branch_create_reflog_contains_branch_created method method test_branch_create_reflog_contains_branch_created L527–532
+ test_branch_create_reflog_records_start_point method method test_branch_create_reflog_records_start_point L534–539
+ test_branch_create_writes_reflog method method test_branch_create_writes_reflog L521–525
~ tests/test_cmd_cat.py .py 5 symbols added
+ TestCatDiskFallback class class TestCatDiskFallback L646–673
+ test_internal_config_file_readable method method test_internal_config_file_readable L664–668
+ test_nonexistent_file_still_errors method method test_nonexistent_file_still_errors L670–673
+ test_untracked_file_is_readable method method test_untracked_file_is_readable L649–654
+ test_untracked_file_json_returns_content method method test_untracked_file_json_returns_content L656–662
← Older Oldest on task/ergonomic-fixes
All commits
Newer → Latest on task/ergonomic-fixes

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