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.
This commit is contained in:
1 parent
cbf618845a
commit
813c7d2ef8
1 file changed
+1
-1
@@ -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([
|
||||
|
||||
Reference in new issue
Block a user