gabriel / muse public
feat patch dev
gabriel · 163 days ago · Apr 16, 2026 · Diff

feat: canonical muse status --json schema — always the same shape

- Single _StatusJson TypedDict replaces _StatusJson + _StagedStatusJson. The schema is identical regardless of domain or whether a stage index exists. - New fields: staged {added,modified,deleted}, unstaged {added,modified,deleted}, untracked — always present; staged/unstaged are null for non-stage domains. - Flat added/modified/deleted always populated (union of staged + unstaged). - clean = not staged and not unstaged; untracked files do not affect clean. - Code-domain repos always route through _render_staged_status so staged/unstaged are never null, even when the index file is absent (clean state). - Gitism glossary updated: canonical status shape documented with trap table. - Delete _StagedStatusJson (absorbed into _StatusJson). - TDD: new test_status_json_schema.py with 16 tests covering all invariants.

sha256:5f72134e6ed10a234a5607bdc033c9b4296e516c729b8660f25e93ad5e9c87e5 sha
+36 ~10 −2 symbols
sha256:481d142476505d4676b1220928491be58be7f47e67ca56e7dbbabb4be2fe2e28 snapshot
+36
symbols added
~10
symbols modified
−2
symbols removed
0
dead code introduced
Semantic Changes 48 symbols
~ tests/test_status_json_schema.py .py 32 symbols added
+ TestFlatViewCorrectnessII class class TestFlatViewCorrectnessII L228–319
+ test_II1_flat_added_is_union_of_staged_and_unstaged method method test_II1_flat_added_is_union_of_staged_and_unstaged L229–244
+ test_II2_flat_modified_is_union_of_staged_and_unstaged method method test_II2_flat_modified_is_union_of_staged_and_unstaged L246–268
+ test_II3_flat_deleted_is_union_of_staged_and_unstaged method method test_II3_flat_deleted_is_union_of_staged_and_unstaged L270–289
+ test_II4_total_changes_is_sum_of_flat method method test_II4_total_changes_is_sum_of_flat L291–304
+ test_II5_file_in_both_staged_and_unstaged_appears_once_flat method method test_II5_file_in_both_staged_and_unstaged_appears_once_flat L306–319
+ TestSchemaInvariantsI class class TestSchemaInvariantsI L136–220
+ test_I1_clean_repo_all_required_keys_present method method test_I1_clean_repo_all_required_keys_present L137–156
+ test_I2_staged_file_schema_unchanged method method test_I2_staged_file_schema_unchanged L158–176
+ test_I3_unstaged_file_schema_unchanged method method test_I3_unstaged_file_schema_unchanged L178–191
+ test_I4_both_staged_and_unstaged method method test_I4_both_staged_and_unstaged L193–209
+ test_I5_untracked_files_in_list method method test_I5_untracked_files_in_list L211–220
+ TestSpecificFieldValuesIV class class TestSpecificFieldValuesIV L365–399
+ test_IV1_branch_matches_current_branch method method test_IV1_branch_matches_current_branch L366–370
+ test_IV2_head_commit_is_sha256_prefixed method method test_IV2_head_commit_is_sha256_prefixed L372–379
+ test_IV3_clean_true_only_when_no_changes method method test_IV3_clean_true_only_when_no_changes L381–387
+ test_IV4_dirty_is_not_clean method method test_IV4_dirty_is_not_clean L389–399
+ TestStageDomainVsNonStageIII class class TestStageDomainVsNonStageIII L327–357
+ test_III1_code_domain_staged_and_unstaged_are_dicts method method test_III1_code_domain_staged_and_unstaged_are_dicts L328–339
+ test_III2_no_stage_index_staged_and_unstaged_are_null method method test_III2_no_stage_index_staged_and_unstaged_are_null L341–357
+ _REQUIRED_TOP_KEYS variable variable _REQUIRED_TOP_KEYS L96–103
+ _STAGED_BUCKET_KEYS variable variable _STAGED_BUCKET_KEYS L105–105
+ _env function function _env L108–109
+ _status_json function function _status_json L112–115
+ cli variable variable cli L89–89
+ code_repo function function code_repo L119–128
+ CliRunner import import CliRunner L87–87
+ annotations import import annotations L80–80
+ json import import json L82–82
+ pathlib import import pathlib L83–83
+ pytest import import pytest L85–85
+ runner variable variable runner L90–90
~ docs/agent-guide.md .md 3 symbols added, 5 symbols modified
+ muse status --json — always the same shape section muse status --json — always the same shape L422–472
+ code[json]@L427 variable variable code[json]@L427 L427–452
+ table@L465 section table@L465 L465–471
~ muse/cli/commands/status.py .py 1 symbol added, 2 symbols removed, 3 symbols modified
− _StageEntryMap variable variable _StageEntryMap L96–96
− _StagedStatusJson class class _StagedStatusJson L173–188
+ _StagedBucket class class _StagedBucket L135–140
~ run
← 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:5f72134e6ed10a234a5607bdc033c9b4296e516c729b8660f25e93ad5e9c87e5 --body "your comment"