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

feat(update-ref): supercharge — elapsed_ms, exit_code, JSON errors to stdout, TypedDicts

- elapsed_ms and exit_code in every JSON success path (create, update, delete) - _emit_error() helper: JSON mode errors route to stdout so agents always receive parseable output; text mode errors go to stderr - All error keys now structured: invalid_branch, invalid_commit_id, ref_not_found, cas_mismatch, missing_commit_id, write_error, invalid_format - CAS mismatch errors include current and expected fields in JSON output - TypedDicts: _UpdateRefJson and _DeleteRefJson for both success shapes - Module docstring updated: JSON error contract, CAS error schema, all exit codes - Fixed 2 pre-existing test failures (bare hex IDs without sha256: prefix) - 49 new tests (test_cmd_update_ref_supercharge.py) using long_id, short_id, blob_id utilities throughout: elapsed_ms/exit_code in all success paths, JSON errors to stdout on all error paths, schema completeness (error and success payloads), data integrity (exit_code 1 vs 3 semantics, previous field, CAS current/expected), performance bounds, security (no traceback on any error path, path traversal rejection, ANSI rejection), concurrency (16 threads updating independent branches in parallel)

sha256:f3d32594fe276d7432e986342461e5fb9b827a48eac879de87a9c06f353a891f sha
sha256:7b12fe7d3dac47994afadef6e1d1dbbe07f9b4dd2ba7e12958dd7f29b8296b61 snapshot
← Older Oldest on task/supercharge-update-ref
All commits
Newer → Latest on task/supercharge-update-ref

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