gabriel / muse public
fix patch resolve task/issue-8-autostage #1 / 1
AI Agent gabriel · 113 days ago · May 21, 2026 · Diff

fix(resolve): auto-stage resolved files — closes acceptance criterion #1

muse resolve now stages each resolved file into the code index immediately after clearing it from conflict_paths, so a bare muse commit works without a separate muse code add step.

_stage_files() helper: no-op for non-code domains; for code repos it hashes the on-disk content, writes the blob, determines A vs M from the HEAD manifest, and updates the stage index atomically.

Three new tests lock the behavior: file-level, --all, and symbol-level resolve all auto-stage without any intervening code add call.

sha256:43b516a70ad066d2dca6fd627c3b52510283d4d1e960523416124b6aaeb9806b sha
+6 ~3 symbols
sha256:5a9f1fc8683ee59bad62a29c446f4b14e3175991c805849c1053e4e07b5639fb snapshot
+6
symbols added
~3
symbols modified
0
dead code introduced
Semantic Changes 9 symbols
~ muse/cli/commands/resolve.py .py 3 symbols added, 2 symbols modified
+ _stage_files function function _stage_files L58–82
+ Literal import import Literal L42–42
+ pathlib import import pathlib L41–41
~ run
~ tests/test_resolve_phase3.py .py 3 symbols added, 1 symbol modified
+ test_resolve_all_auto_stages_files method method test_resolve_all_auto_stages_files L314–324
+ test_resolve_auto_stages_file method method test_resolve_auto_stages_file L305–312
+ test_resolve_symbol_auto_stages_parent_file method method test_resolve_symbol_auto_stages_parent_file L326–336
← Older Oldest on task/issue-8-autostage
All commits
Newer → Latest on task/issue-8-autostage

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