gabriel / muse public
feat patch clean task/supercharge-clean #1 / 1
AI Agent gabriel · 160 days ago · Apr 17, 2026 · Diff

feat(clean): supercharge for agents — elapsed_seconds, exit_code, would_remove status

- Add elapsed_seconds (time.monotonic) and exit_code to all 3 JSON output paths - Introduce 'would_remove' status for dry-run with untracked files (was 'clean') - Move import json/time to module level (remove inline __import__) - Update _CleanResultJson TypedDict with new fields - Update module docstring with full JSON contract - Fix test_json_dry_run_shows_files to expect 'would_remove' (correct semantic) - Add TestElapsed, TestExitCode, TestDryRunStatus, TestJsonSchemaComplete (12 tests) - Add missing _init_repo() calls in new test class methods

sha256:66066aa50a6622711417985213c4661bd65b7a37b289fc49168b08a610f226be sha
+18 ~7 symbols
sha256:7e06d30e7bf7b49bc15fc79ad6409dcc22ef552ed0a968dfe678221ce141067f snapshot
+18
symbols added
~7
symbols modified
0
dead code introduced
Semantic Changes 25 symbols
~ muse/cli/commands/clean.py .py 2 symbols added, 2 symbols modified
+ json import import json L67–67
+ time import import time L71–71
~ run
~ tests/test_cmd_clean.py .py 1 symbol modified
~ _sha
~ tests/test_cmd_clean_hardening.py .py 16 symbols added, 4 symbols modified
+ TestDryRunStatus class class TestDryRunStatus L697–723
+ test_dry_run_no_files_status_is_clean method method test_dry_run_no_files_status_is_clean L710–715
+ test_dry_run_with_files_status_is_would_remove method method test_dry_run_with_files_status_is_would_remove L700–708
+ test_force_with_files_status_is_removed method method test_force_with_files_status_is_ L717–723
+ TestElapsed class class TestElapsed L637–667
+ test_dry_run_with_files_has_elapsed method method test_dry_run_with_files_has_elapsed L649–657
+ test_force_clean_has_elapsed method method test_force_clean_has_elapsed L659–667
+ test_nothing_to_clean_has_elapsed method method test_nothing_to_clean_has_elapsed L640–647
+ TestExitCode class class TestExitCode L670–694
+ test_dry_run_with_files_exit_code_0 method method test_dry_run_with_files_exit_code_0 L680–686
+ test_force_clean_exit_code_0 method method test_force_clean_exit_code_0 L688–694
+ test_nothing_to_clean_exit_code_0 method method test_nothing_to_clean_exit_code_0 L673–678
+ TestJsonSchemaComplete class class TestJsonSchemaComplete L726–756
+ test_dry_run_with_files_schema_complete method method test_dry_run_with_files_schema_complete L740–747
+ test_force_clean_schema_complete method method test_force_clean_schema_complete L749–756
+ test_nothing_to_clean_schema_complete method method test_nothing_to_clean_schema_complete L732–738
~ _sha
← Older Oldest on task/supercharge-clean
All commits
Newer → Latest on task/supercharge-clean

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