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)
0 comments
muse hub commit comment sha256:f3d32594fe276d7432e986342461e5fb9b827a48eac879de87a9c06f353a891f --body "your comment"
No comments yet. Be the first to start the discussion.