Skip to content

Commit 8db56fb

Browse files
chore: auto-commit ticket changes before merge (merge worktree-20260319-164427)
2 parents 9a23c2f + 666ca67 commit 8db56fb

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.tickets/w21-h8l1.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
id: w21-h8l1
3+
status: open
4+
deps: []
5+
links: []
6+
created: 2026-03-20T05:02:35Z
7+
type: bug
8+
priority: 1
9+
assignee: Joe Oakhart
10+
---
11+
# Bug: merge-to-main.sh fails when main has dirty files from another worktree session
12+
13+
14+
## Notes
15+
16+
**2026-03-20T05:02:52Z**
17+
18+
## Bug Description
19+
merge-to-main.sh fails with 'ERROR: Main repo has unexpected dirty files after merge' when another worktree session left uncommitted modified files on main. The script correctly detects the dirty files but has no recovery path — it blocks the push and leaves the merge in a half-completed state.
20+
21+
## Reproduction
22+
1. Session A (in another worktree) modifies files on main but doesn't commit them
23+
2. Session B runs merge-to-main.sh from its worktree
24+
3. merge-to-main.sh successfully merges the worktree branch into main
25+
4. Pre-push check detects dirty files (from Session A) and errors out
26+
5. The merge is done but not pushed — main is in a dirty state
27+
28+
## Dirty Files Observed
29+
plugins/dso/hooks/auto-format.sh, plugins/dso/hooks/lib/config-paths.sh, plugins/dso/hooks/lib/pre-bash-functions.sh, plugins/dso/scripts/check-persistence-coverage.sh, plugins/dso/scripts/reset-tickets.sh, plugins/dso/scripts/sprint-next-batch.sh, plugins/dso/scripts/validate-phase.sh, plugins/dso/scripts/validate.sh
30+
31+
## Workaround
32+
Rebase the worktree branch on main so the merge is a fast-forward with no dirty file interaction.
33+
34+
## Expected Behavior
35+
merge-to-main.sh should either: (a) stash dirty files before merge + unstash after push, or (b) warn about dirty files and offer to proceed anyway if the dirty files are unrelated to the merge.

0 commit comments

Comments
 (0)