Metadata
| Status | done |
|---|---|
| Assigned | agent-160 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-26T23:01:20.626338523+00:00 |
| Started | 2026-04-26T23:03:53.295109366+00:00 |
| Completed | 2026-04-26T23:41:29.757017215+00:00 |
| Tags | eval-scheduled |
| Eval score | 0.91 |
| └ blocking impact | 0.90 |
| └ completeness | 0.95 |
| └ coordination overhead | 0.90 |
| └ correctness | 0.95 |
| └ downstream usability | 0.85 |
| └ efficiency | 0.85 |
| └ intent fidelity | 0.79 |
| └ style adherence | 0.90 |
Description
Description
In src/commands/done.rs:222-228, the squash-merge commit step bails with "git commit failed" whenever the branch is already merged into main (e.g. on retry). The detection only checks for the literal substring "nothing to commit", but git commit actually emits "nothing added to commit but untracked files present" when there are untracked files (which happens in this repo because of stray .workgraph.* and .wg/ dirs).
This blocks wg done retries entirely after a previously-successful merge, even though the work is already on main. Encountered while completing migrate-manual-wg — the squash-merge commit (61106f20d) was already on main from a prior attempt, but every subsequent wg done call reported "git commit failed" because the message format did not match.
File scope: src/commands/done.rs
Validation
- Failing test written first: test_done_handles_already_merged_branch — invoke wg done twice and verify the second call returns NoCommits
-
Broaden the substring check at done.rs:225 to also accept "nothing added to commit" and "no changes added to commit" (or detect by
git diff --cached --quietbefore invoking commit) - cargo build + cargo test pass
Implement directly — do not decompose further.
Depends on
Required by
- (none)
Log
- 2026-04-26T23:03:52.363868633+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer is the best fit: experienced implementer (52 tasks, 0.58 score) with Careful tradeoff essential for precise git commit detection logic modification; needs full file access to write TDD test, refactor detection, and verify with cargo build/test.
- 2026-04-26T23:03:53.295116780+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-26T23:04:05.408399013+00:00 Starting work — reading done.rs to understand current squash-merge detection logic
- 2026-04-26T23:16:47.004055556+00:00 Validated: cargo build OK; cargo test --lib 1943 passed 0 failed; cargo test --bin wg 2823 passed, 1 pre-existing failure (provenance_full_lifecycle_all_ops_recorded) reproducible at HEAD without my changes; new tests test_is_no_changes_to_commit_detects_all_variants and test_done_handles_already_merged_branch both pass; all 62 commands::done tests pass.
- 2026-04-26T23:25:04.476036825+00:00 Committed: 4a0b900ac — pushed to remote
- 2026-04-26T23:35:24.018475777+00:00 Rebased onto origin/main (agent-154's fix-wg-done changes); resolved test-block conflict by keeping both blocks; new tests still pass; pre-existing test failures (36) confirmed unrelated — reproducible at HEAD~1 without my fix
- 2026-04-26T23:41:29.757028536+00:00 Task marked as done