Skip to content

Commit 3a179f4

Browse files
committed
test(core): temporary diagnostic for failing agent S2 writes
Logs the S2 append pipeline error (basin, stream, endpoint, message) when a session .out write fails, to capture why the agent's direct-to-S2 writes return an empty stream in CI while succeeding locally. To be reverted.
1 parent 71166f5 commit 3a179f4

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

packages/core/src/v3/realtimeStreams/streamsWriterV2.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,17 @@ export class StreamsWriterV2<T = any> implements StreamsWriter {
193193
this.log("[S2MetadataStream] Stream error occurred but stream was aborted");
194194
return;
195195
}
196+
console.error(
197+
"[S2WRITER-DIAG] pipeline error basin=",
198+
this.options.basin,
199+
"stream=",
200+
this.options.stream,
201+
"endpoint=",
202+
this.options.endpoint,
203+
"err=",
204+
error instanceof Error ? `${error.name}: ${error.message}` : String(error),
205+
(error instanceof Error ? error.stack ?? "" : "").split("\n").slice(1, 5).join(" || ")
206+
);
196207
this.logError("[S2MetadataStream] Error in stream pipeline:", error);
197208
throw error;
198209
}

0 commit comments

Comments
 (0)