gabriel / muse public
feat patch branch task/branch-json-schema #1 / 1
gabriel · 159 days ago · Apr 16, 2026 · Diff

feat(branch): add committed_at to list JSON + fix sha256: start-point resolution

- Add committed_at (ISO 8601) to each branch list entry — agents need this to know when a branch was last active without a separate muse show - Fix commit_id: empty string coerced to null in list JSON ("" → null) - Fix _resolve_start_point: catch ValueError from validate_branch_name when start_point contains ':' (sha256:-prefixed IDs are valid branch start points) - Fix _resolve_start_point: strip sha256: prefix before prefix-scan fallback so 'muse branch feat/x sha256:abc123' correctly resolves the partial SHA - Update docstring schema to document committed_at and null-able commit_id - Add tests/test_branch_json_schema.py (14 tests): list schema, mutation actions, error paths

sha256:fe389285541f508b9f142e9ee3cbf3574a0a204c0902a017a65655cf360b6fda sha
+29 ~2 symbols
sha256:a7d597fc0876ef1a58dcc63da9ce8e273e4e8169b22221a03689281a179acfba snapshot
+29
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 31 symbols
~ tests/test_branch_json_schema.py .py 29 symbols added
+ TestErrorPathsIII class class TestErrorPathsIII L183–200
+ test_III1_delete_nonexistent_json_error method method test_III1_delete_nonexistent_json_error L184–188
+ test_III2_delete_current_branch_json_error method method test_III2_delete_current_branch_json_error L190–194
+ test_III3_create_duplicate_json_error method method test_III3_create_duplicate_json_error L196–200
+ TestListSchemaI class class TestListSchemaI L73–135
+ test_I1_all_required_keys_present method method test_I1_all_required_keys_present L74–78
+ test_I2_committed_at_is_iso8601 method method test_I2_committed_at_is_iso8601 L80–86
+ test_I3_committed_at_null_for_empty_branch method method test_I3_committed_at_null_for_empty_branch L88–99
+ test_I4_commit_id_sha256_prefixed method method test_I4_commit_id_sha256_prefixed L101–107
+ test_I5_commit_id_null_not_empty_string method method test_I5_commit_id_null_not_empty_string L109–123
+ test_I6_exactly_one_current method method test_I6_exactly_one_current L125–130
+ test_I7_upstream_null_when_unset method method test_I7_upstream_null_when_unset L132–135
+ TestMutationOperationsII class class TestMutationOperationsII L143–175
+ test_II1_create_json_schema method method test_II1_create_json_schema L144–149
+ test_II2_delete_json_schema method method test_II2_delete_json_schema L151–159
+ test_II3_rename_json_schema method method test_II3_rename_json_schema L161–167
+ test_II4_copy_json_schema method method test_II4_copy_json_schema L169–175
+ _LIST_REQUIRED_KEYS variable variable _LIST_REQUIRED_KEYS L38–40
+ _branch function function _branch L47–50
+ _branch_raw function function _branch_raw L53–54
+ _env function function _env L43–44
+ cli variable variable cli L35–35
+ CliRunner import import CliRunner L33–33
+ annotations import import annotations L26–26
+ json import import json L28–28
+ pathlib import import pathlib L29–29
+ pytest import import pytest L31–31
+ repo function function repo L58–65
+ runner variable variable runner L36–36
← Older Oldest on task/branch-json-schema
All commits
Newer → Latest on task/branch-json-schema

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