From c24301d60cae8b1313343d19db541c8dbbbad62a Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 26 Feb 2026 13:45:40 +0000 Subject: [PATCH] story-kit: create 205_bug_mergemaster_marks_stories_as_done_without_squash_merging_code --- ...ies_as_done_without_squash_merging_code.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .story_kit/work/1_upcoming/205_bug_mergemaster_marks_stories_as_done_without_squash_merging_code.md diff --git a/.story_kit/work/1_upcoming/205_bug_mergemaster_marks_stories_as_done_without_squash_merging_code.md b/.story_kit/work/1_upcoming/205_bug_mergemaster_marks_stories_as_done_without_squash_merging_code.md new file mode 100644 index 0000000..54ea4e6 --- /dev/null +++ b/.story_kit/work/1_upcoming/205_bug_mergemaster_marks_stories_as_done_without_squash_merging_code.md @@ -0,0 +1,34 @@ +--- +name: "Mergemaster marks stories as done without squash-merging code" +--- + +# Bug 205: Mergemaster marks stories as done without squash-merging code + +## Description + +The mergemaster agent consistently moves stories from 4_merge to 5_done without actually squash-merging the feature branch code onto master. This was observed across stories #199, #200, #201, #202, #203, #204 — all marked done with unmerged commits still on their feature branches. + +The issue appears to be triggered when multiple stories are developed in parallel from different base points on master. The feature branches carry conflicting views of the codebase (e.g. one story adds watcher config, another removes it). The mergemaster either encounters conflicts/empty diffs and silently skips the merge, or the merge_agent_work pipeline doesn't actually perform the squash merge step before moving the story file. + +Additionally, the stale .story_kit/merge_workspace directory from a failed merge blocks subsequent merge_agent_work calls with a "directory already exists" error. + +## How to Reproduce + +1. Have multiple stories developed in parallel on feature branches from different points of master +2. Queue them for merge via 4_merge +3. Let mergemaster process them + +## Actual Result + +Stories are moved to 5_done with pipeline commit messages like "story-kit: done ..." but the feature branch code is never squash-merged onto master. Feature branches retain unmerged commits. + +## Expected Result + +Mergemaster should squash-merge feature branch code onto master before marking stories as done. If the merge fails (conflicts, empty diff, etc.) it should report the failure rather than silently skipping the merge and marking the story as done. + +## Acceptance Criteria + +- [ ] Mergemaster performs git merge --squash of the feature branch onto master before moving a story to done +- [ ] If the squash merge results in conflicts, the story is NOT moved to done — it stays in 4_merge with an error reported +- [ ] If the squash merge results in an empty diff (code already on master), the story is moved to done but the feature branch is cleaned up +- [ ] Stale .story_kit/merge_workspace directories are cleaned up before attempting a new merge