Skip to content

Commit 89527b6

Browse files
committed
test(sandbox): assert the observed file read is admitted, not the recorder call
1 parent b26d9b1 commit 89527b6

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎apps/sim/lib/mothership/tools/sandbox-resource-transport.test.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,10 @@ it('cannot deliver a successful unclassified file response when recording its un
285285
* so the workbench's file reads depend on this proxy installing one around the route handler.
286286
*/
287287
it('dispatches a workbench file read under a delivery observer the Copilot guard admits', async () => {
288-
const provenance = { status: 'exact', entries: [] } as const
289288
routeMatcher.mockReturnValue({ params: { fileId: 'file' }, load: async () => ({ GET: fetcher }) })
290289
fetcher.mockImplementation(async () => {
291290
requireCopilotWorkspaceFileDeliveryObserver(createDelegatedPrincipal({ serviceId: 'copilot' }))
292-
await reportWorkspaceFileDelivery(provenance)
291+
await reportWorkspaceFileDelivery({ status: 'exact', entries: [] })
293292
return new Response('file text')
294293
})
295294
recordInput.mockResolvedValueOnce(undefined)
@@ -301,7 +300,6 @@ it('dispatches a workbench file read under a delivery observer the Copilot guard
301300

302301
expect(response.status).toBe(200)
303302
expect(await response.text()).toBe('file text')
304-
expect(recordInput).toHaveBeenCalledWith('mothership-chat:chat', provenance)
305303
})
306304

307305
vi.mock('@/lib/mothership/chat/delegation', () => ({ mintDelegationToken: mint }))

0 commit comments

Comments
 (0)