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

feat(revert): supercharge for agents — elapsed_ms, exit_code, file diff, staging, empty-snapshot

Agent-facing additions: - elapsed_ms + exit_code on ALL JSON paths (success and error) — consistent schema agents can parse without inspecting shell exit status - files_added / files_modified / files_removed on all success paths — agents get full file-level intel without a separate diff call - --no-commit now stages changes (write_stage) so muse commit picks them up without a manual muse code add step - Reverting to an empty parent snapshot no longer crashes — _apply_manifest_safe handles the empty-manifest case by deleting tracked files directly - Consistent error JSON envelope on every error path (format, ref-not-found, root-commit, parent-missing, snapshot-missing)

Docstring: full JSON schema section, file-diff field docs, agent recipe, HEAD/ HEAD~N ref docs, exit code 2 for not-a-repo.

Tests (29 new): - elapsed_ms / exit_code on normal, dry-run, no-commit, and all error paths - files_added / files_modified / files_removed: added, modified, deleted cases - full schema across all three paths - data integrity: content verified after revert - HEAD ref resolution - empty-snapshot revert (both normal and --no-commit) - --no-commit stages → muse commit succeeds without extra muse code add

Removed 4 slow stress tests: broken (env not propagated correctly across commits), hollow (CliRunner serializes threads so concurrency was fake), and no discriminating power over the existing integration tests.

sha256:afb1508ebf68ffe0cf90bd66abe4631a5aba3d723134a6dad2059bd45b874ba3 sha
sha256:a19d32166f6ca3855a62d6271d32ef1c4b68522b2ad53fcb7da732d20944c41c snapshot
← Older Oldest on task/supercharge-revert
All commits
Newer → Latest on task/supercharge-revert

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