fix(prompt-retry): preserve async holds without blocking validation fallbacks
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
clearAllDelegatedChildSessionBootstrap,
|
||||
getDelegatedChildSessionBootstrap,
|
||||
} from "../../shared/delegated-child-session-bootstrap"
|
||||
import { dispatchInternalPrompt } from "../../shared/prompt-async-gate"
|
||||
import { dispatchInternalPrompt, releaseAllPromptAsyncReservationsForTesting } from "../../shared/prompt-async-gate"
|
||||
import { clearSessionPromptParams, getSessionPromptParams } from "../../shared/session-prompt-params-state"
|
||||
import {
|
||||
getSessionAgent,
|
||||
@@ -26,6 +26,7 @@ afterAll(() => { mock.restore() })
|
||||
|
||||
afterEach(() => {
|
||||
clearBackgroundTaskRegistryForTesting()
|
||||
releaseAllPromptAsyncReservationsForTesting()
|
||||
})
|
||||
|
||||
const TASK_TTL_MS = 30 * 60 * 1000
|
||||
|
||||
@@ -3,12 +3,14 @@ import {
|
||||
clearSessionPromptParams,
|
||||
getSessionPromptParams,
|
||||
} from "../../shared/session-prompt-params-state"
|
||||
import { releaseAllPromptAsyncReservationsForTesting } from "../../shared/prompt-async-gate"
|
||||
import { createTask, startTask } from "./spawner"
|
||||
import type { BackgroundTask } from "./types"
|
||||
|
||||
describe("background-agent spawner agent-not-found fallback", () => {
|
||||
afterEach(() => {
|
||||
clearSessionPromptParams("session-fallback")
|
||||
releaseAllPromptAsyncReservationsForTesting()
|
||||
})
|
||||
|
||||
test("retries with 'general' agent when promptAsync fails with Agent not found", async () => {
|
||||
|
||||
Reference in New Issue
Block a user