From 1f4d165aa29dc162ae0943cd9712aeb4b73c26de Mon Sep 17 00:00:00 2001 From: Yichen Jiang Date: Tue, 8 Sep 2026 13:51:16 +0800 Subject: [PATCH] test(snapshot): release the ACP diagnostic hold from the caller-bound wait The scenario's barrier plugin patched ctx.jobs.wait, which the consolidated seam no longer has: waits live on the operations forCaller hands out, so the hold file was never removed and the mock ACP server never released the prompt. The barrier now wraps forCaller and releases on that view's wait. --- .../release-on-job-output.mjs | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/snapshots/session/subagent-acp-diagnostic/release-on-job-output.mjs b/snapshots/session/subagent-acp-diagnostic/release-on-job-output.mjs index 5704cf5625..6d32ffafdd 100644 --- a/snapshots/session/subagent-acp-diagnostic/release-on-job-output.mjs +++ b/snapshots/session/subagent-acp-diagnostic/release-on-job-output.mjs @@ -16,15 +16,23 @@ export function apply(ctx) { }) ctx.effect(() => { const jobs = ctx.jobs - const wait = jobs.wait - jobs.wait = function (...args) { - // The registry registers its waiter synchronously, unlike the tool middleware. - const pending = wait.apply(this, args) - rmSync(HOLD) - return pending + const forCaller = jobs.forCaller + // Waits live on the caller-bound operations, so the barrier wraps every + // view the registry hands out and releases on the wait itself. + jobs.forCaller = function (...args) { + const view = forCaller.apply(this, args) + return { + ...view, + wait: (...waitArgs) => { + // The registry registers its waiter synchronously, unlike the tool middleware. + const pending = view.wait(...waitArgs) + rmSync(HOLD) + return pending + }, + } } return () => { - jobs.wait = wait + jobs.forCaller = forCaller rmSync(HOLD, { force: true }) } })