fix: merge_agent_work blocks until complete instead of requiring polling
The mergemaster agent was burning all 30 turns polling get_merge_status every 2 seconds while the merge pipeline takes ~2 minutes. It would exhaust turns, exit, restart, and repeat — never seeing the result. merge_agent_work now blocks with a 10-second internal poll loop and returns the final result directly. The agent calls it once and gets the answer. No more polling turns wasted. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -46,10 +46,12 @@ pub(super) async fn tool_approve_qa(args: &Value, ctx: &AppContext) -> Result<St
|
||||
|
||||
let project_root = ctx.agents.get_project_root(&ctx.state)?;
|
||||
|
||||
// Clear review_hold in content store + CRDT before moving.
|
||||
if let Some(contents) = crate::db::read_content(story_id) {
|
||||
let updated = crate::io::story_metadata::clear_front_matter_field_in_content(&contents, "review_hold");
|
||||
crate::db::write_item_with_content(story_id, "3_qa", &updated);
|
||||
// Clear review_hold before moving
|
||||
let qa_path = project_root
|
||||
.join(".huskies/work/3_qa")
|
||||
.join(format!("{story_id}.md"));
|
||||
if qa_path.exists() {
|
||||
let _ = crate::io::story_metadata::clear_front_matter_field(&qa_path, "review_hold");
|
||||
}
|
||||
|
||||
// Move story from work/3_qa/ to work/4_merge/
|
||||
|
||||
Reference in New Issue
Block a user