@@ -279,35 +279,6 @@ describe("CodexAppServerEventProjector assistant projection", () => {
279279 expect ( snapshot ) . toContain ( coda ) ;
280280 } ) ;
281281
282- it ( "lets a later unphased message replace an earlier final answer" , async ( ) => {
283- const projector = await createProjector ( await createParams ( ) ) ;
284-
285- await projector . handleNotification (
286- forCurrentTurn ( "item/started" , {
287- item : { type : "agentMessage" , id : "answer-1" , phase : "final_answer" , text : "" } ,
288- } ) ,
289- ) ;
290- await projector . handleNotification ( agentMessageDelta ( "First candidate" , "answer-1" ) ) ;
291- await projector . handleNotification (
292- forCurrentTurn ( "item/completed" , {
293- item : {
294- type : "agentMessage" ,
295- id : "answer-1" ,
296- phase : "final_answer" ,
297- text : "First candidate" ,
298- } ,
299- } ) ,
300- ) ;
301- await projector . handleNotification ( agentMessageDelta ( "Later unphased reply" , "answer-2" ) ) ;
302- await projector . handleNotification (
303- turnCompleted ( [ { type : "agentMessage" , id : "answer-2" , text : "Later unphased reply" } ] ) ,
304- ) ;
305-
306- const result = projector . buildResult ( buildEmptyToolTelemetry ( ) ) ;
307- expect ( result . assistantTexts ) . toEqual ( [ "Later unphased reply" ] ) ;
308- expect ( JSON . stringify ( result . messagesSnapshot ) ) . not . toContain ( "First candidate" ) ;
309- } ) ;
310-
311282 it ( "drops a pre-unphased final when a later final follows the replacement" , async ( ) => {
312283 const projector = await createProjector ( await createParams ( ) ) ;
313284
@@ -453,52 +424,6 @@ describe("CodexAppServerEventProjector assistant projection", () => {
453424 expect ( JSON . stringify ( result . messagesSnapshot ) ) . not . toContain ( "First candidate" ) ;
454425 } ) ;
455426
456- it ( "drops a trailing silent final when an earlier audible final remains" , async ( ) => {
457- const projector = await createProjector ( await createParams ( ) ) ;
458-
459- await projector . handleNotification (
460- forCurrentTurn ( "item/started" , {
461- item : { type : "agentMessage" , id : "answer-1" , phase : "final_answer" , text : "" } ,
462- } ) ,
463- ) ;
464- await projector . handleNotification ( agentMessageDelta ( "Keep this answer" , "answer-1" ) ) ;
465- await projector . handleNotification (
466- forCurrentTurn ( "item/completed" , {
467- item : {
468- type : "agentMessage" ,
469- id : "answer-1" ,
470- phase : "final_answer" ,
471- text : "Keep this answer" ,
472- } ,
473- } ) ,
474- ) ;
475- await projector . handleNotification (
476- forCurrentTurn ( "item/started" , {
477- item : { type : "agentMessage" , id : "answer-2" , phase : "final_answer" , text : "" } ,
478- } ) ,
479- ) ;
480- await projector . handleNotification ( agentMessageDelta ( "NO_REPLY" , "answer-2" ) ) ;
481- await projector . handleNotification (
482- forCurrentTurn ( "item/completed" , {
483- item : {
484- type : "agentMessage" ,
485- id : "answer-2" ,
486- phase : "final_answer" ,
487- text : "NO_REPLY" ,
488- } ,
489- } ) ,
490- ) ;
491- await projector . handleNotification (
492- turnCompleted ( [
493- { type : "agentMessage" , id : "answer-2" , phase : "final_answer" , text : "NO_REPLY" } ,
494- ] ) ,
495- ) ;
496-
497- const result = projector . buildResult ( buildEmptyToolTelemetry ( ) ) ;
498- expect ( result . assistantTexts ) . toEqual ( [ "Keep this answer" ] ) ;
499- expect ( JSON . stringify ( result . messagesSnapshot ) ) . not . toContain ( "NO_REPLY" ) ;
500- } ) ;
501-
502427 it ( "drops a trailing JSON silent payload when an earlier audible final remains" , async ( ) => {
503428 const projector = await createProjector ( await createParams ( ) ) ;
504429 const jsonSilent = '{"action":"NO_REPLY"}' ;
0 commit comments