@@ -558,7 +558,7 @@ describe("session.llm-native.request", () => {
558558 it . effect ( "keeps the invalid fallback dispatchable without advertising it to the provider" , ( ) =>
559559 Effect . gen ( function * ( ) {
560560 let advertised : string [ ] = [ ]
561- let invalidInput : unknown
561+ const invalidInputs : unknown [ ] = [ ]
562562 let visibleCalls = 0
563563 const invalid = tool ( {
564564 description : "Internal fallback" ,
@@ -568,7 +568,7 @@ describe("session.llm-native.request", () => {
568568 required : [ "tool" , "error" ] ,
569569 } ) ,
570570 execute : async ( input ) => {
571- invalidInput = input
571+ invalidInputs . push ( input )
572572 return "fallback"
573573 } ,
574574 } )
@@ -587,6 +587,7 @@ describe("session.llm-native.request", () => {
587587 return Stream . fromIterable ( [
588588 LLMEvent . toolCall ( { id : "call-visible" , name : "VISIBLE" , input : { } } ) ,
589589 LLMEvent . toolCall ( { id : "call-invalid" , name : "write" , input : { } } ) ,
590+ LLMEvent . toolCall ( { id : "call-inherited" , name : "constructor" , input : { } } ) ,
590591 LLMEvent . finish ( { reason : "tool-calls" } ) ,
591592 ] )
592593 } ,
@@ -608,7 +609,10 @@ describe("session.llm-native.request", () => {
608609 const events = Array . from ( yield * native . stream . pipe ( Stream . runCollect ) )
609610 expect ( advertised ) . toEqual ( [ "visible" ] )
610611 expect ( visibleCalls ) . toBe ( 1 )
611- expect ( invalidInput ) . toEqual ( { tool : "write" , error : "Unknown tool: write" } )
612+ expect ( invalidInputs ) . toEqual ( [
613+ { tool : "write" , error : "Unknown tool: write" } ,
614+ { tool : "constructor" , error : "Unknown tool: constructor" } ,
615+ ] )
612616 expect ( events ) . toEqual (
613617 expect . arrayContaining ( [
614618 expect . objectContaining ( { type : "tool-call" , name : "visible" } ) ,
0 commit comments