gabriel / muse public
refactor patch task/utility-sweep-p4-p7-p9 #1 / 1
AI Agent gabriel · 154 days ago · Apr 20, 2026 · Diff

refactor: complete utility anti-pattern sweep — utility-reference.md 100% green

Resolves all remaining open items (☐) in docs/utility-reference.md across Patterns 2–11. Every production and test violation is now fixed or confirmed already fixed in prior sessions.

Pattern 2 (manual prefix stripping): all 11 production files confirmed fixed; all 11 test files confirmed fixed or already fixed. Pattern 3 (manual hashlib.sha256 for IDs): code/manifest.py, midi/manifest.py, midi/entity.py fixed with blob_id(); storage-boundary fix via long_id(strip=True). Pattern 4 (manual short ID truncation): all 7 production files confirmed fixed; 13 test files updated to short_id() via subagent. Pattern 5 (manual UTC timestamp): 8 test files updated to now_utc_iso(). Pattern 6 (manual JSON file loading): 3 test files updated to load_json_file(). Pattern 7 (uuid for content-addressed IDs): all 24 test files confirmed fixed. Pattern 8 (manual fake_id equivalent): test_security_agent_impersonation.py fixed. Pattern 9 (manual object path construction): test_cmd_gc_hardening.py fixed; all other listed files already used object_path(). Pattern 11 (--format flag instead of --json): intent.py replaced --format/-f with --json/-j bool; test_cmd_intent.py updated; test_cmd_reserve.py and test_cmd_watch_coord.py updated to remove --format references.

sha256:842bb1696caffed6d4d2449ef35d52b5c7918d2b230e7e6f4844ec8a98699593 sha
+38 ~177 −16 symbols
sha256:c02ba597e8b27ef35cee1e98f4b17b7099a4703b089da0af4535ba1231f7294e snapshot
+38
symbols added
~177
symbols modified
−16
symbols removed
0
dead code introduced
Semantic Changes 231 symbols
~ docs/utility-reference.md .md 11 symbols added, 11 symbols removed, 21 symbols modified
table@L387 section table@L387 L387–393
table@L183 section table@L183 L183–196
table@L205 section table@L205 L205–212
table@L223 section table@L223 L223–233
table@L238 section table@L238 L238–255
table@L261 section table@L261 L261–271
table@L279 section table@L279 L279–285
table@L290 section table@L290 L290–295
table@L304 section table@L304 L304–330
table@L336 section table@L336 L336–341
table@L348 section table@L348 L348–358
+ table@L383 section table@L383 L383–389
+ table@L181 section table@L181 L181–194
+ table@L203 section table@L203 L203–209
+ table@L220 section table@L220 L220–229
+ table@L234 section table@L234 L234–251
+ table@L257 section table@L257 L257–267
+ table@L275 section table@L275 L275–281
+ table@L286 section table@L286 L286–291
+ table@L300 section table@L300 L300–326
+ table@L332 section table@L332 L332–337
+ table@L344 section table@L344 L344–354
~ muse/cli/commands/intent.py .py 2 symbols modified
~ muse/plugins/code/manifest.py .py 2 symbols added, 6 symbols modified
+ blob_id import import blob_id L39–39
+ long_id import import long_id L39–39
~ muse/plugins/midi/entity.py .py 2 symbols added, 3 symbols modified
+ blob_id import import blob_id L60–60
+ split_id import import split_id L60–60
~ muse/plugins/midi/manifest.py .py 1 symbol added, 3 symbols modified
+ blob_id import import blob_id L48–48
~ tests/test_cmd_branch.py .py 1 symbol added, 4 symbols modified
~ tests/test_cmd_intent.py .py 3 symbols added, 3 symbols removed, 1 symbol modified
test_format_json_exits_zero method method test_format_json_exits_zero L282–287
test_format_json_has_required_keys method method test_format_json_has_required_keys L297–303
test_format_json_is_valid_json method method test_format_json_is_valid_json L289–295
+ test_json_flag_exits_zero method method test_json_flag_exits_zero L282–287
+ test_json_flag_has_required_keys method method test_json_flag_has_required_keys L297–303
+ test_json_flag_is_valid_json method method test_json_flag_is_valid_json L289–295
~ tests/test_cmd_read_commit.py .py 1 symbol added, 4 symbols modified
~ tests/test_cmd_read_snapshot.py .py 1 symbol added, 4 symbols modified
+ short_id import import short_id L20–20
~ tests/test_cmd_release_hardening.py .py 1 symbol removed
uuid import import uuid L23–23
~ tests/test_cmd_reserve.py .py 2 symbols added, 1 symbol removed, 9 symbols modified
~ tests/test_cmd_revert_hardening.py .py 1 symbol added, 4 symbols modified
~ tests/test_cmd_show.py .py 1 symbol added, 2 symbols modified
+ short_id import import short_id L26–26
~ tests/test_cmd_tag.py .py 1 symbol added, 3 symbols modified
+ short_id import import short_id L19–19
~ tests/test_release_analysis.py .py 1 symbol added, 3 symbols modified
+ now_utc_iso import import now_utc_iso L23–23
~ tests/test_workdir_integrity.py .py 1 symbol modified
← Older Oldest on task/utility-sweep-p4-p7-p9
All commits
Newer → Latest on task/utility-sweep-p4-p7-p9

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