@@ -914,6 +914,7 @@ function compareCompletedEvents(
914914
915915 //compare ce and ce2, log differences
916916 const notMatching : string [ ] = [ ] ;
917+ const mismatchedKeys : string [ ] = [ ] ;
917918 const ceKeys = Object . keys ( ce ) as ( keyof typeof ce ) [ ] ;
918919 for ( const key of ceKeys ) {
919920 let val1 = ce [ key ] ;
@@ -938,6 +939,7 @@ function compareCompletedEvents(
938939 console . debug ( `Completed event match on key ${ key } :` , a ) ;
939940 } else {
940941 notMatching . push ( `${ key } (${ mismatchCount } /${ total } elements differ)` ) ;
942+ mismatchedKeys . push ( key ) ;
941943 console . error (
942944 `Completed event mismatch on key ${ key } : ${ mismatchCount } /${ total } elements differ` ,
943945 a ,
@@ -962,6 +964,7 @@ function compareCompletedEvents(
962964 console . debug ( `Completed event match on key charStats:` , a ) ;
963965 } else {
964966 notMatching . push ( `charStats (${ diffs . join ( ", " ) } )` ) ;
967+ mismatchedKeys . push ( "charStats" ) ;
965968 console . error ( `Completed event mismatch on key charStats:` , a , b ) ;
966969 }
967970 continue ;
@@ -1022,6 +1025,7 @@ function compareCompletedEvents(
10221025 ) ;
10231026 } else {
10241027 notMatching . push ( "chartData (one is 'toolong' and the other is not)" ) ;
1028+ mismatchedKeys . push ( "chartData" ) ;
10251029 console . error (
10261030 `Completed event mismatch on key chartData: one is "toolong" and the other is not` ,
10271031 v1 ,
@@ -1045,6 +1049,7 @@ function compareCompletedEvents(
10451049 console . debug ( `Completed event match on key chartData.${ field } :` , a ) ;
10461050 } else {
10471051 notMatching . push ( `chartData.${ field } (values differ)` ) ;
1052+ mismatchedKeys . push ( `chartData.${ field } ` ) ;
10481053 console . error (
10491054 `Completed event mismatch on key chartData.${ field } :` ,
10501055 a ,
@@ -1063,6 +1068,7 @@ function compareCompletedEvents(
10631068 ) ;
10641069 } else {
10651070 notMatching . push ( `keypressCountHistory (values differ)` ) ;
1071+ mismatchedKeys . push ( "keypressCountHistory" ) ;
10661072 console . error (
10671073 `Completed event mismatch on key keypressCountHistory:` ,
10681074 a ,
@@ -1084,6 +1090,7 @@ function compareCompletedEvents(
10841090 const diff = Numbers . roundTo2 ( Math . abs ( a - b ) ) ;
10851091 const dir = a > b ? "ce1 larger" : "ce2 larger" ;
10861092 notMatching . push ( `${ key } (off by ${ diff } , ${ dir } )` ) ;
1093+ mismatchedKeys . push ( key ) ;
10871094 console . error ( `Completed event mismatch on key ${ key } :` , a , b ) ;
10881095 }
10891096 } else if ( typeof val1 === "number" && typeof val2 === "number" ) {
@@ -1093,12 +1100,14 @@ function compareCompletedEvents(
10931100 const diff = Numbers . roundTo2 ( Math . abs ( a - b ) ) ;
10941101 const dir = a > b ? "ce1 larger" : "ce2 larger" ;
10951102 notMatching . push ( `${ key } (off by ${ diff } , ${ dir } )` ) ;
1103+ mismatchedKeys . push ( key ) ;
10961104 console . error ( `Completed event mismatch on key ${ key } :` , a , b ) ;
10971105 } else {
10981106 console . debug ( `Completed event match on key ${ key } :` , a ) ;
10991107 }
11001108 } else if ( JSON . stringify ( val1 ) !== JSON . stringify ( val2 ) ) {
11011109 notMatching . push ( `${ key } (values differ)` ) ;
1110+ mismatchedKeys . push ( key ) ;
11021111 console . error ( `Completed event mismatch on key ${ key } :` , val1 , val2 ) ;
11031112 } else {
11041113 console . debug ( `Completed event match on key ${ key } :` , val1 ) ;
@@ -1112,10 +1121,15 @@ function compareCompletedEvents(
11121121 // `Completed event mismatch: ${notMatching.join(", ")}`,
11131122 // { important: true },
11141123 // );
1124+ mismatchedKeys . sort ( ) ;
1125+ const groupKey = mismatchedKeys . join ( "," ) ;
11151126 Ape . results
11161127 . reportCompletedEventMismatch ( {
11171128 body : {
11181129 notMatching,
1130+ mismatchedKeys,
1131+ groupKey,
1132+ language : ce . language ,
11191133 mode : ce . mode ,
11201134 mode2 : ce . mode2 ,
11211135 difficulty : ce . difficulty ,
0 commit comments