From 813c7d2ef815739a35c7861cfbcd2debc98446dc Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Tue, 6 Oct 2026 02:00:43 +0800 Subject: [PATCH] test(acp): honor the asynchronous content fixture contract The initial-cancellation regression supplied a synchronous content array to defineContentToolFixture, whose executor contract requires a Promise of content blocks. Vitest executes the fixture, but the strict repository Host build correctly rejects its signature with TS2739. Return the same blocks through Promise.resolve. Keep the deterministic stream/output gates and assertions unchanged; do not widen the shared fixture API merely to accept this one caller. Validation: the focused initial-cancellation regression passes. The full Host build is rerun before publication to validate the fixture signature. --- packages/acp/acp/tests/turns.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/acp/acp/tests/turns.spec.ts b/packages/acp/acp/tests/turns.spec.ts index 3e103f0a66..e0a67a3ad1 100644 --- a/packages/acp/acp/tests/turns.spec.ts +++ b/packages/acp/acp/tests/turns.spec.ts @@ -696,7 +696,7 @@ describe('ACP prompt lifecycle', () => { const ref = await harness.attachments!.saveImage({ data: Uint8Array.of(6), mediaType: 'image/png' }) ctx.tools.register(defineContentToolFixture({ name: 'continue_stream', description: 'Continue the interrupted response.', parameters: {}, - execute: () => [{ type: 'text', text: 'continue until cancelled' }], + execute: () => Promise.resolve([{ type: 'text', text: 'continue until cancelled' }]), })) // Interrupted streams retain only text/reasoning, so a completed step supplies the queued image. script.push([