fix(426): verify cherry-pick landed on master before marking story done
After the cherry-pick step in run_squash_merge, verify: 1. project_root is on the base branch (not a merge-queue branch) 2. HEAD commit has actual code changes (not an empty/story-only diff) If either check fails, return success=false so the story stays in merge stage for retry instead of being phantom-advanced to done. Also rename move_story_to_archived → move_story_to_done. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::agents::{
|
||||
close_bug_to_archive, feature_branch_has_unmerged_changes, move_story_to_archived,
|
||||
close_bug_to_archive, feature_branch_has_unmerged_changes, move_story_to_done,
|
||||
};
|
||||
use crate::http::context::AppContext;
|
||||
use crate::http::workflow::{
|
||||
@@ -246,7 +246,7 @@ pub(super) fn tool_accept_story(args: &Value, ctx: &AppContext) -> Result<String
|
||||
));
|
||||
}
|
||||
|
||||
move_story_to_archived(&project_root, story_id)?;
|
||||
move_story_to_done(&project_root, story_id)?;
|
||||
ctx.agents.remove_agents_for_story(story_id);
|
||||
|
||||
Ok(format!(
|
||||
@@ -1331,7 +1331,7 @@ mod tests {
|
||||
.output()
|
||||
.unwrap();
|
||||
|
||||
// Create story file in current/ so move_story_to_archived would work.
|
||||
// Create story file in current/ so move_story_to_done would work.
|
||||
let current_dir = tmp.path().join(".storkit/work/2_current");
|
||||
std::fs::create_dir_all(¤t_dir).unwrap();
|
||||
std::fs::write(
|
||||
|
||||
Reference in New Issue
Block a user