test(canvas): drive real HTTP run polling with controlled timers
This commit is contained in:
@@ -1171,3 +1171,19 @@ A final ready plan has already crossed its required preparation durability
|
||||
barrier. Its encoded facts may therefore already exist, and the ready source
|
||||
can reuse them without an artificial yield. Tests distinguish first-time
|
||||
preparation slicing from ready-source byte/mapping preservation and reopening.
|
||||
|
||||
### AI wire negotiation
|
||||
|
||||
The AI service adapter explicitly requests `responseFormat: 'canvas-v2'` for
|
||||
admission, cancellation, output application, receipt queries, model catalogs
|
||||
and run polling. `createFoundryTransport` maps it to
|
||||
`Accept: application/vnd.foundry.canvas+json;version=2`. A custom `ServiceTransport`
|
||||
must preserve that negotiation as well as the frozen body, idempotency key,
|
||||
conditional version and account scope. The Next application proxy also declares
|
||||
v2, but an independent SDK consumer cannot rely on that proxy being present.
|
||||
|
||||
`runs.test.mjs` exercises all three writes and their receipt queries through the
|
||||
shared HTTP transport. `foundry-ai.integration.mjs` additionally requires a real
|
||||
successful 202 before testing lost admission recovery; a rejected admission is
|
||||
not evidence for response-loss recovery. Its remote worker fixture replaces
|
||||
only generation output, not authenticated HTTP, PostgreSQL or service receipts.
|
||||
|
||||
Reference in New Issue
Block a user