@@ -144,6 +144,32 @@ describe("destroy runtime", () => {
144144 expect ( result . partial ) . toBe ( false ) ;
145145 } ) ;
146146
147+ test ( "does not block destroy for a default Store whose Template and Identity were never recorded" , async ( ) => {
148+ const calls : string [ ] = [ ] ;
149+ const runtime = await ctx ( [ resource ( "environment" , "oncall-env" , "env_1" ) ] , adapter ( calls ) ) ;
150+ runtime . config . defaults = { provider : "qoder" , identity : "oncall" } ;
151+ runtime . config . identities = {
152+ oncall : { external_id : "oncall" } ,
153+ } ;
154+ runtime . config . agents = {
155+ "oncall-agent" : {
156+ model : { qoder : "auto" } ,
157+ instructions : "Help." ,
158+ delivery : { qoder : { type : "forward" } } ,
159+ default_memory_store : { name : "Oncall memory" , delete_on_destroy : true } ,
160+ } ,
161+ } ;
162+
163+ const plan = planDestroyProjectContext ( runtime ) ;
164+ expect ( plan . defaultMemoryStores ) . toEqual ( [ ] ) ;
165+
166+ const result = await destroyPlannedProjectResources ( plan ) ;
167+
168+ expect ( calls ) . toEqual ( [ "environment:env_1:plain" ] ) ;
169+ expect ( result . destroyed ) . toBe ( 1 ) ;
170+ expect ( result . partial ) . toBe ( false ) ;
171+ } ) ;
172+
147173 test ( "aborts destroy when the default Store preflight cannot capture its ID" , async ( ) => {
148174 const calls : string [ ] = [ ] ;
149175 const runtime = await ctx (
0 commit comments