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

feat(cat-object): supercharge for agent pipelines

- Fix integrity check: compare bare hex digest against object_id.removeprefix('sha256:') instead of full prefixed string — raw format was exiting 3 on every valid object. - Add elapsed_seconds to --json / --format info output (present=true and present=false). Matches timing convention across all muse JSON commands. - Add --inline flag: when combined with --json, embeds content_b64 (base64) in the JSON payload. Saves agents a second round-trip for small config/metadata objects. Rejected without --json (exits 1 with clear error). - Fix tests: _store() now uses sha256: prefix (matches validate_object_id contract). All bare-hex OIDs in test fixtures updated to sha256: form. Error-path tests renamed to reflect what they actually test (bare hex rejection vs. missing object). - Add 7 new TestInline tests + 4 TestInfoFormat timing tests (54 total, all green).

sha256:45191f1a572c6b134b7e5b9a6ce82c3b5f18129e4b4edb06c83ad79436b25673 sha
+16 ~16 −2 symbols
sha256:3c12715f8bb4aad9a9843fdf2c8aadaa9a41c3aa3c391a8624691e0e5c3d63ce snapshot
+16
symbols added
~16
symbols modified
−2
symbols removed
0
dead code introduced
Semantic Changes 34 symbols
~ muse/cli/commands/cat_object.py .py 3 symbols added, 2 symbols modified
+ base64 import import base64 L87–87
+ hashlib import import hashlib L88–88
+ time import import time L93–93
~ run
~ tests/test_cmd_cat_object.py .py 13 symbols added, 2 symbols removed, 14 symbols modified
test_invalid_object_id_non_hex method method test_invalid_object_id_non_hex L206–209
test_invalid_object_id_uppercase method method test_invalid_object_id_uppercase L201–204
+ test_invalid_object_id_bare_hex_rejected method method test_invalid_object_id_bare_hex_rejected L217–221
+ test_invalid_object_id_non_hex_content method method test_invalid_object_id_non_hex_content L233–236
+ test_invalid_object_id_uppercase_content method method test_invalid_object_id_uppercase_content L228–231
+ test_json_elapsed_seconds_present_for_missing_object method method test_json_elapsed_seconds_present_for_missing_object L197–203
+ test_json_output_has_elapsed_seconds method method test_json_output_has_elapsed_seconds L186–195
+ TestInline class class TestInline L530–607
+ test_inline_binary_content_round_trips method method test_inline_binary_content_round_trips L556–564
+ test_inline_embeds_content_b64 method method test_inline_embeds_content_b64 L537–546
+ test_inline_empty_object method method test_inline_empty_object L589–597
+ test_inline_json_still_has_standard_fields method method test_inline_json_still_has_standard_fields L575–587
+ test_inline_missing_object_no_content_b64 method method test_inline_missing_object_no_content_b64 L566–573
+ test_inline_requires_json_flag method method test_inline_requires_json_flag L548–554
+ test_no_inline_flag_has_no_content_b64 method method test_no_inline_flag_has_no_content_b64 L599–607
~ _store
← Older Oldest on task/supercharge-cat-object
All commits
Newer → Latest on task/supercharge-cat-object

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