fix(prompt): treat post-dispatch failures as accepted

This commit is contained in:
YeonGyu-Kim
2026-05-20 11:42:32 +09:00
parent f540249838
commit d3e218f912
31 changed files with 503 additions and 76 deletions
+2 -2
View File
@@ -86,7 +86,7 @@ export type InternalPromptDispatchResult =
| { status: "active" }
| { status: "reserved"; reservedBy: string }
| { status: "unavailable" }
| { status: "failed"; error: unknown }
| { status: "failed"; error: unknown; dispatchAttempted: boolean }
export type PromptAsyncGateResult = InternalPromptDispatchResult
@@ -579,7 +579,7 @@ async function dispatchAfterSessionIdle<TInput>(args: {
return { status: "dispatched", response }
} catch (error) {
log(`[prompt-async-gate] ${sessionName} failed`, { sessionID, source, error: String(error) })
return { status: "failed", error }
return { status: "failed", error, dispatchAttempted }
} finally {
const current = promptAsyncReservations.get(sessionID)
if (current?.token === reservation.token) {