From c2c9d3f9cb6dc0160463b7fffeb72de7df5dbf36 Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 28 Mar 2026 19:19:17 +0000 Subject: [PATCH] storkit: create 445_bug_rate_limited_mergemaster_exits_advance_stories_to_done_without_merging --- ...advance_stories_to_done_without_merging.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .storkit/work/1_backlog/445_bug_rate_limited_mergemaster_exits_advance_stories_to_done_without_merging.md diff --git a/.storkit/work/1_backlog/445_bug_rate_limited_mergemaster_exits_advance_stories_to_done_without_merging.md b/.storkit/work/1_backlog/445_bug_rate_limited_mergemaster_exits_advance_stories_to_done_without_merging.md new file mode 100644 index 00000000..8dd1f7db --- /dev/null +++ b/.storkit/work/1_backlog/445_bug_rate_limited_mergemaster_exits_advance_stories_to_done_without_merging.md @@ -0,0 +1,28 @@ +--- +name: "Rate-limited mergemaster exits advance stories to done without merging" +--- + +# Bug 445: Rate-limited mergemaster exits advance stories to done without merging + +## Description + +When the mergemaster agent is immediately rate-limited (zero turns, zero tool calls), it exits and run_server_owned_completion runs acceptance gates on the existing worktree. Since the coder already committed working code, the gates pass, and the pipeline advances the story to done — even though the mergemaster never executed run_squash_merge and the code was never cherry-picked onto master. + +## How to Reproduce + +Observed on stories 439 and 442. All mergemaster log entries show: init → rate_limit_event → error result. Zero turns, zero MCP tool calls, duration under 350ms. Yet both stories ended up in done with no merge commit on master. + +## Actual Result + +Stories advance to done with no code on master. The mergemaster never ran but the pipeline treated its exit as a successful completion. + +## Expected Result + +If the mergemaster exits without completing its work (no merge commit produced), the story should stay in the merge stage for retry, not advance to done. + +## Acceptance Criteria + +- [ ] run_server_owned_completion must not run for mergemaster agents — mergemaster has its own completion path via start_merge_agent_work +- [ ] If the mergemaster process exits without producing a SquashMergeResult, the story stays in merge stage +- [ ] Rate-limited mergemaster exits are treated as transient failures, not gate-passing completions +- [ ] Story remains eligible for retry when mergemaster fails due to rate limiting