test(canvas): trace AI receipt protocol headers
This commit is contained in:
@@ -24,7 +24,7 @@ export async function verifyFoundryAI({open,transport,rootId,imageId,assets,call
|
||||
await reopen();assert.equal(posts('/ai/runs').length,admissionCount);assert.equal(engine.getSnapshot().runtime.ledger.requests.get(admission.id).body,admission.body);
|
||||
assert.ok(calls.some(call=>call.method==='GET'&&call.path.endsWith('/ai/operations/'+admission.id)));
|
||||
const recovered=engine.getSnapshot().runtime.ledger.requests.get(admission.id);
|
||||
assert.equal(recovered.phase,'resolved','AI admission recovery: '+JSON.stringify({phase:recovered.phase,error:recovered.error,receipt:engine.getSnapshot().runtime.receipts.get(admission.id)}));
|
||||
assert.equal(recovered.phase,'resolved','AI admission recovery: '+JSON.stringify({phase:recovered.phase,error:recovered.error,requestId:admission.id,operationId:first.operationIds[0],responses:calls.filter(call=>call.path.endsWith('/ai/runs')||call.path.endsWith('/ai/operations/'+admission.id)).map(call=>({method:call.method,response:call.response}))}));
|
||||
const firstRun=byOperation(first.operationIds[0]);assert.ok(firstRun,'resolved admission must publish a RunRecord');assert.equal(firstRun.status,'queued');
|
||||
assert.equal(engine.editor.dispatch({type:'element.geometry',target,patch:{x:77}}).status,'applied');await engine.settle();
|
||||
await control('execute');await poll();
|
||||
|
||||
Reference in New Issue
Block a user