fix: tolerate rewritten HEAD reflog during commit finalization#1384
fix: tolerate rewritten HEAD reflog during commit finalization#1384peckfly wants to merge 1 commit into
Conversation
|
Thank you for the contribution @peckfly -- what bug/issue is this fixing? |
This fixes a daemon post-commit attribution bug. I hit a case where an AI edit was checkpointed correctly, but after
The issue is that commit trace finalization reads the worktree The fix keeps the low-level error intact, but narrowly tolerates it for ordinary I added unit tests for the allowed and disallowed cases, plus a daemon regression test that reproduces the bug by truncating |
Summary
Testing
cargo fmt -- --checkcargo test worktree_head_reflog -- --test-threads 12cargo test trace_normalizer --lib -- --test-threads 12cargo test daemon_commit_writes_note_when_worktree_head_reflog_is_rewritten_before_finalization --test daemon_mode -- --test-threads 1