gabriel / muse public
feat patch trust task/supercharge-trust #1 / 1
AI Agent gabriel · 58 days ago · Apr 18, 2026 · Diff

feat(trust): supercharge — elapsed_ms, exit_code, IO error handling, count fields, docstrings

All five subcommands (_run_add, _run_remove, _run_list, _run_hub_list, _run_hub_reset): - Add elapsed_ms (float, ms) and exit_code to every JSON success output - _emit_error() helper in add and remove: OSError → JSON error to stdout in JSON mode so agents always receive parseable output regardless of outcome - _run_list: add count field (len(trusted_dirs)) for agent convenience - _run_hub_list: add count field (len(fingerprints)) for agent convenience - Add full function docstrings to all five _run_* functions (were undocumented) - Update module docstring: document JSON error format and exit codes - Add import time

New tests/test_cmd_trust_supercharge.py: 29 tests covering U1-U10 elapsed_ms + exit_code present in every JSON success path E1-E2 OSError → JSON error on stdout (mocked) S1 IO-error JSON schema completeness SC1-SC2 count field in list and hub-list JSON D1-D5 data integrity (path normalisation, idempotency, absent-path exit codes) P1-P2 performance (elapsed_ms is float, < 5000 ms) Sec1-3 security (relative path expansion, dotdot collapse, ANSI safety) C1-C2 concurrency (isolated parallel adds, concurrent TOML reads)

sha256:1294f732fe20f8dc1aa07278313a2033f05a7bd937bfe1a185f6f9b5b795d24c sha
sha256:ce089651710ec3025282a1ad939b087128dc0501d3a7e94c84cb68a6bb5d3734 snapshot
← Older Oldest on task/supercharge-trust
All commits
Newer → Latest on task/supercharge-trust

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