huskies: merge 668_bug_pipeline_advances_coder_work_to_merge_when_gates_passed_false

This commit is contained in:
dave
2026-04-27 11:33:36 +00:00
parent 65d2fb210c
commit 5da29c3d91
4 changed files with 299 additions and 13 deletions
+11
View File
@@ -119,6 +119,17 @@ pub(crate) async fn tool_run_tests(args: &Value, ctx: &AppContext) -> Result<Str
pid,
passed
);
// Capture positive test evidence in the DB so the pipeline
// advance salvage path (bug 645/668) can confirm the agent
// ran passing tests before it died. Only written when running
// in a story worktree (worktree_path arg provided); extract
// the story ID from the last path component.
if passed
&& args.get("worktree_path").is_some()
&& let Some(story_id) = working_dir.file_name().and_then(|n| n.to_str())
{
crate::db::write_content(&format!("{story_id}:run_tests_ok"), "1");
}
return serde_json::to_string_pretty(&json!({
"passed": passed,
"exit_code": exit_code,