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

feat(check-ignore): add elapsed_seconds, exit_code, summary, patterns_loaded, --ignored-only

- elapsed_seconds: wall-clock timing in all JSON output paths (default, --patterns-only). Absent from text output. - exit_code: always 0 on success in all JSON output paths. - summary block (default mode): total/ignored/not_ignored counts over the (possibly filtered) result set. Absent from --patterns-only. - patterns_loaded: added to --patterns-only JSON (was missing; list length was the only way to get count). - --ignored-only: filter results to paths matched by an ignore pattern. Primary agent workflow for 'what staged files will be excluded?'. Mutually exclusive with --patterns-only and --quiet (exit 1). - Fix test_path_traversal_is_safe: error goes to stderr, not stdout; test was asserting result.output but should assert result.stderr.

20 new tests across TestElapsed, TestExitCode, TestSummary, TestPatternsOnlyCount, TestIgnoredOnly. 65/65 passing.

sha256:aede21eeaf17d1c7fafdd1dc5b725a9716ce62c4a80906f69588c3c854cf5a31 sha
+27 ~4 symbols
sha256:5c218c5542ab97ce2b2dcfd669d878b916e28ec76311f3d39abea5bc2e91f3f5 snapshot
+27
symbols added
~4
symbols modified
0
dead code introduced
Semantic Changes 31 symbols
~ muse/cli/commands/check_ignore.py .py 2 symbols added, 2 symbols modified
+ _SummaryDict class class _SummaryDict L144–147
+ time import import time L124–124
~ run
~ tests/test_cmd_check_ignore.py .py 25 symbols added, 2 symbols modified
+ TestElapsed class class TestElapsed L420–437
+ test_elapsed_absent_from_text_output method method test_elapsed_absent_from_text_output L434–437
+ test_elapsed_in_default_json method method test_elapsed_in_default_json L421–426
+ test_elapsed_in_patterns_only_json method method test_elapsed_in_patterns_only_json L428–432
+ TestExitCode class class TestExitCode L445–456
+ test_exit_code_0_in_default_json method method test_exit_code_0_in_default_json L446–450
+ test_exit_code_in_patterns_only_json method method test_exit_code_in_patterns_only_json L452–456
+ TestIgnoredOnly class class TestIgnoredOnly L529–581
+ test_all_when_all_ignored method method test_all_when_all_ignored L543–547
+ test_empty_when_none_ignored method method test_empty_when_none_ignored L538–541
+ test_filters_to_ignored_paths method method test_filters_to_ignored_paths L530–536
+ test_incompatible_with_patterns_only method method test_incompatible_with_patterns_only L565–568
+ test_incompatible_with_quiet method method test_incompatible_with_quiet L578–581
+ test_stdin_compatible method method test_stdin_compatible L570–576
+ test_summary_reflects_filtered_count method method test_summary_reflects_filtered_count L549–555
+ test_text_format method method test_text_format L557–563
+ TestPatternsOnlyCount class class TestPatternsOnlyCount L504–521
+ test_patterns_loaded_matches_list_length method method test_patterns_loaded_matches_list_length L517–521
+ test_patterns_loaded_present method method test_patterns_loaded_present L505–510
+ test_patterns_loaded_zero_when_empty method method test_patterns_loaded_zero_when_empty L512–515
+ TestSummary class class TestSummary L464–496
+ test_summary_absent_from_patterns_only method method test_summary_absent_from_patterns_only L492–496
+ test_summary_all_ignored method method test_summary_all_ignored L475–482
+ test_summary_none_ignored method method test_summary_none_ignored L484–490
+ test_summary_present_in_default_json method method test_summary_present_in_default_json L465–473
← Older Oldest on task/supercharge-check-ignore
All commits
Newer → Latest on task/supercharge-check-ignore

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