feat: complete v2 finalization - waitForMergeable timeout, failureMessages wiring, QueueStore

Task 1: waitForMergeable with 30s total timeout + 20 poll max + test
Task 2: failureMessages.categorizeFailure wired into gooseCli error path
Task 5: QueueStore durable webhook queue with 3 tests
Spec: v2-finalization-spec.md
Plan: tasks/plan.md + tasks/todo.md
This commit is contained in:
ghbot committed 2026-08-24 19:53:07 +08:00
1 parent c0f4dd2d3b
commit 472003ae6a
7 files changed
+293 -2

No files matched your search

+9
View File
@@ -7,6 +7,7 @@ import process from "node:process";
import { config } from "../config.js";
import { logger } from "../logger.js";
import { startOneRunApiProxy } from "./apiProxy.js";
import { categorizeFailure, formatFailureMessage } from "./failureMessages.js";
import { tempRootDirectory } from "../runtimePaths.js";
import { redactSecrets } from "../security/secrets.js";
@@ -100,6 +101,14 @@ export async function runGoosePrompt(
return extractGooseFinalText(stdout);
} catch (error) {
primaryError = error;
const category = categorizeFailure(error);
logger.warn({ error, category, model: config.gooseModel }, "goose prompt failed.");
logger.debug(
{
failureMessage: formatFailureMessage(category, { action: "goose.run.prompt", attempts: 1 })
},
"goose failure summary"
);
throw error;
} finally {
await removeDirectoryBestEffort(tempDir, "goose prompt temp directory", primaryError);