Skip to content

Commit d05552d

Browse files
committed
test(mothership): model attributed CLI runs with their secret actor
1 parent a8312c0 commit d05552d

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

‎apps/sim/lib/mothership/agent-cli/project-file-read.integration.ts‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,12 @@ check('sim_cli for a callerless run holds only the read API scopes', async () =>
341341
expect(await workflows()).toEqual([])
342342
expect(await projectFiles()).toEqual([])
343343

344-
const attributed: ToolExecutionContext = { ...f.context, workflowId: '', userPermission: 'admin' }
344+
const attributed: ToolExecutionContext = {
345+
...f.context,
346+
workflowId: '',
347+
userPermission: 'admin',
348+
secretActorUserId: f.userId,
349+
}
345350
for (const [argv, owner] of writes) {
346351
const written = await simCli(argv, attributed, owner)
347352
expect(written.success, written.error).toBe(true)
@@ -384,7 +389,12 @@ check('sim_cli services for a callerless run refuse the writes they route', asyn
384389
)
385390
expect(read.success, read.error).toBe(true)
386391

387-
const attributed: ToolExecutionContext = { ...f.context, workflowId: '', userPermission: 'admin' }
392+
const attributed: ToolExecutionContext = {
393+
...f.context,
394+
workflowId: '',
395+
userPermission: 'admin',
396+
secretActorUserId: f.userId,
397+
}
388398
for (const [name, input] of writes) {
389399
const written = await service(name, input, attributed)
390400
expect(written.success, `${name}: ${written.error}`).toBe(true)

0 commit comments

Comments
 (0)