runtime: suppress stale owner progress flush
This commit is contained in:
@@ -517,6 +517,24 @@ export class MessageTurnController {
|
||||
* pending text differs from the final text.
|
||||
*/
|
||||
private async flushPendingProgress(finalText: string): Promise<void> {
|
||||
if (
|
||||
this.options.canDeliverFinalText &&
|
||||
!this.options.canDeliverFinalText()
|
||||
) {
|
||||
this.log.info(
|
||||
{
|
||||
runId: this.options.runId,
|
||||
deliveryRole: this.options.deliveryRole ?? null,
|
||||
turnId: this.options.pairedTurnIdentity?.turnId ?? null,
|
||||
pendingLength: this.pendingProgressText?.length ?? 0,
|
||||
finalLength: finalText.length,
|
||||
},
|
||||
'Skipped flushing pending progress because this run no longer owns the active paired turn attempt',
|
||||
);
|
||||
this.pendingProgressText = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
this.pendingProgressText &&
|
||||
(this.options.pairedTurnIdentity?.role === 'reviewer' ||
|
||||
|
||||
Reference in New Issue
Block a user