@@ -10,7 +10,7 @@ import { isInvocationActive, readBoundedContainerFile, retainSetupCleanup,
1010import { captureInvocation , type InvocationInput } from '../agents/contract.ts' ;
1111import { buildAgentImage } from '../agents/container/image.ts' ;
1212import { createContainerProfile , disposeContainerProfile , type ContainerProfile } from '../agents/container/profile.ts' ;
13- import { prepareTaskFilesystems , removeTaskFilesystems } from '../agents/container/run.ts' ;
13+ import { disposeValidatedContainer , prepareTaskFilesystems , removeTaskFilesystems } from '../agents/container/run.ts' ;
1414import { createVendorNetwork } from '../agents/network/network.ts' ;
1515import { createIsolationProbeCommand , createPhasePolicy , type IsolationProbe } from '../agents/policy.ts' ;
1616import { createTaskClone } from '../git/clone.ts' ;
@@ -174,6 +174,7 @@ describe('container invocation supervisor', () => {
174174 const current = profile ( fixture ( ) , 'ignore-term' , 'cloned-profile' ) ;
175175 const first = startProfileInvocation ( current , { timeoutMs : 30_000 } ) ;
176176 const clone = Object . freeze ( { ...current } ) ;
177+ expect ( ( ) => disposeValidatedContainer ( clone ) ) . toThrow ( 'not created by the trusted profile builder' ) ;
177178 expect ( ( ) => startProfileInvocation ( clone ) ) . toThrow ( 'not created by the trusted profile builder' ) ;
178179 expect ( isInvocationActive ( 'cloned-profile' ) ) . toBe ( true ) ;
179180 expect ( spawnSync ( 'docker' , [ 'container' , 'inspect' , current . name ] ) . status ) . toBe ( 0 ) ;
0 commit comments