@@ -2243,12 +2243,7 @@ describe("runAgentTurnWithFallback", () => {
22432243 attempts : [ ] ,
22442244 } ) ) ;
22452245 state . runCliAgentMock . mockImplementationOnce (
2246- async ( params : {
2247- runId : string ;
2248- classifyCommentaryText ?: boolean ;
2249- emitCommentaryText ?: boolean ;
2250- } ) => {
2251- expect ( params . classifyCommentaryText ) . toBe ( false ) ;
2246+ async ( params : { runId : string ; emitCommentaryText ?: boolean } ) => {
22522247 expect ( params . emitCommentaryText ) . toBe ( false ) ;
22532248 const realAgentEvents = await vi . importActual < typeof import ( "../../infra/agent-events.js" ) > (
22542249 "../../infra/agent-events.js" ,
@@ -2311,12 +2306,7 @@ describe("runAgentTurnWithFallback", () => {
23112306 attempts : [ ] ,
23122307 } ) ) ;
23132308 state . runCliAgentMock . mockImplementationOnce (
2314- async ( params : {
2315- runId : string ;
2316- classifyCommentaryText ?: boolean ;
2317- emitCommentaryText ?: boolean ;
2318- } ) => {
2319- expect ( params . classifyCommentaryText ) . toBe ( false ) ;
2309+ async ( params : { runId : string ; emitCommentaryText ?: boolean } ) => {
23202310 expect ( params . emitCommentaryText ) . toBe ( false ) ;
23212311 const realAgentEvents = await vi . importActual < typeof import ( "../../infra/agent-events.js" ) > (
23222312 "../../infra/agent-events.js" ,
@@ -2402,12 +2392,7 @@ describe("runAgentTurnWithFallback", () => {
24022392 attempts : [ ] ,
24032393 } ) ) ;
24042394 state . runCliAgentMock . mockImplementationOnce (
2405- async ( params : {
2406- runId : string ;
2407- classifyCommentaryText ?: boolean ;
2408- emitCommentaryText ?: boolean ;
2409- } ) => {
2410- expect ( params . classifyCommentaryText ) . toBe ( false ) ;
2395+ async ( params : { runId : string ; emitCommentaryText ?: boolean } ) => {
24112396 expect ( params . emitCommentaryText ) . toBe ( false ) ;
24122397 const realAgentEvents = await vi . importActual < typeof import ( "../../infra/agent-events.js" ) > (
24132398 "../../infra/agent-events.js" ,
@@ -2481,12 +2466,7 @@ describe("runAgentTurnWithFallback", () => {
24812466 attempts : [ ] ,
24822467 } ) ) ;
24832468 state . runCliAgentMock . mockImplementationOnce (
2484- async ( params : {
2485- runId : string ;
2486- classifyCommentaryText ?: boolean ;
2487- emitCommentaryText ?: boolean ;
2488- } ) => {
2489- expect ( params . classifyCommentaryText ) . toBe ( true ) ;
2469+ async ( params : { runId : string ; emitCommentaryText ?: boolean } ) => {
24902470 expect ( params . emitCommentaryText ) . toBe ( true ) ;
24912471 const realAgentEvents = await vi . importActual < typeof import ( "../../infra/agent-events.js" ) > (
24922472 "../../infra/agent-events.js" ,
@@ -2541,7 +2521,7 @@ describe("runAgentTurnWithFallback", () => {
25412521 expect ( call ?. itemId ) . toBe ( "commentary-1" ) ;
25422522 } ) ;
25432523
2544- it ( "does not classify CLI commentary when commentary progress is explicitly disabled" , async ( ) => {
2524+ it ( "does not emit CLI commentary when commentary progress is explicitly disabled" , async ( ) => {
25452525 state . isCliProviderMock . mockReturnValue ( true ) ;
25462526 state . runWithModelFallbackMock . mockImplementationOnce ( async ( params : FallbackRunnerParams ) => ( {
25472527 result : await params . run ( "claude-cli" , "claude-opus-4-6" ) ,
@@ -2550,15 +2530,9 @@ describe("runAgentTurnWithFallback", () => {
25502530 attempts : [ ] ,
25512531 } ) ) ;
25522532 state . runCliAgentMock . mockImplementationOnce (
2553- async ( params : {
2554- runId : string ;
2555- classifyCommentaryText ?: boolean ;
2556- emitCommentaryText ?: boolean ;
2557- } ) => {
2558- // commentaryProgressEnabled: false (defined but off) must not engage
2559- // classification: with no commentary consumer wired, classified text
2560- // would be dropped instead of reaching the assistant stream (#91976).
2561- expect ( params . classifyCommentaryText ) . toBe ( false ) ;
2533+ async ( params : { runId : string ; emitCommentaryText ?: boolean } ) => {
2534+ // Defined-but-off commentary progress must leave commentary emission off
2535+ // so pre-tool text stays in the assistant stream (#92092).
25622536 expect ( params . emitCommentaryText ) . toBe ( false ) ;
25632537 return { payloads : [ { text : "done" } ] , meta : { } } ;
25642538 } ,
0 commit comments