@@ -813,6 +813,53 @@ describe("validateFixtures", () => {
813813 ) ;
814814 } ) ;
815815
816+ it ( "no warning: same userMessage but different turnIndex" , ( ) => {
817+ const fixtures = [
818+ makeFixture ( { match : { userMessage : "hello" , turnIndex : 0 } } ) ,
819+ makeFixture ( { match : { userMessage : "hello" , turnIndex : 1 } } ) ,
820+ ] ;
821+ const results = validateFixtures ( fixtures ) ;
822+ const duplicateWarnings = results . filter (
823+ ( r ) => r . severity === "warning" && r . message . includes ( "duplicate" ) ,
824+ ) ;
825+ expect ( duplicateWarnings ) . toHaveLength ( 0 ) ;
826+ } ) ;
827+
828+ it ( "no warning: same userMessage but different hasToolResult" , ( ) => {
829+ const fixtures = [
830+ makeFixture ( { match : { userMessage : "hello" , hasToolResult : false } } ) ,
831+ makeFixture ( { match : { userMessage : "hello" , hasToolResult : true } } ) ,
832+ ] ;
833+ const results = validateFixtures ( fixtures ) ;
834+ const duplicateWarnings = results . filter (
835+ ( r ) => r . severity === "warning" && r . message . includes ( "duplicate" ) ,
836+ ) ;
837+ expect ( duplicateWarnings ) . toHaveLength ( 0 ) ;
838+ } ) ;
839+
840+ it ( "no warning: same userMessage but different sequenceIndex" , ( ) => {
841+ const fixtures = [
842+ makeFixture ( { match : { userMessage : "hello" , sequenceIndex : 0 } } ) ,
843+ makeFixture ( { match : { userMessage : "hello" , sequenceIndex : 1 } } ) ,
844+ ] ;
845+ const results = validateFixtures ( fixtures ) ;
846+ const duplicateWarnings = results . filter (
847+ ( r ) => r . severity === "warning" && r . message . includes ( "duplicate" ) ,
848+ ) ;
849+ expect ( duplicateWarnings ) . toHaveLength ( 0 ) ;
850+ } ) ;
851+
852+ it ( "warning: same userMessage with identical turnIndex/hasToolResult/sequenceIndex" , ( ) => {
853+ const fixtures = [
854+ makeFixture ( { match : { userMessage : "hello" , turnIndex : 1 , hasToolResult : true } } ) ,
855+ makeFixture ( { match : { userMessage : "hello" , turnIndex : 1 , hasToolResult : true } } ) ,
856+ ] ;
857+ const results = validateFixtures ( fixtures ) ;
858+ expect ( results . some ( ( r ) => r . severity === "warning" && r . message . includes ( "duplicate" ) ) ) . toBe (
859+ true ,
860+ ) ;
861+ } ) ;
862+
816863 it ( "warning: catch-all not in last position" , ( ) => {
817864 const fixtures = [ makeFixture ( { match : { } } ) , makeFixture ( { match : { userMessage : "hello" } } ) ] ;
818865 const results = validateFixtures ( fixtures ) ;
0 commit comments