fix: muse code invariants — two bugs found via dog fooding
Bug 1: --commit HEAD~1 crashed with ValueError get_head_commit_id() called validate_branch_name() which rejects '~'. Fix: skip branch-name lookup when ref contains ref-syntax chars (~^@: etc). resolve_commit_ref() handles relative refs directly.
Bug 2: --rule filter no-match path emitted JSON without exit_code/duration_ms Both the no-match-filter and no-rules early-exit paths were missing the envelope fields that every other JSON path carries. Fix: add exit_code=0 and duration_ms=elapsed() to both paths.
Also: - Expand test_invariants_supercharge.py with 8 new tests covering both bugs (TestEarlyExitPaths, TestRelativeRefSyntax)
sha256:b013fd1234af86b3dfb8d852e9e98b10d11483c14f1ad09dc712765caa32078f
sha
sha256:717320a68ef2d9db9c4cdfe3781944933008c6df8808e3b75a95289915d77241
snapshot
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:b013fd1234af86b3dfb8d852e9e98b10d11483c14f1ad09dc712765caa32078f --body "your comment"
No comments yet. Be the first to start the discussion.