Skip to content

Commit 6403f98

Browse files
restore the combined rollback-plus-streaming-error report
Reverts the 10-line deletion at src/core/tools/WriteToFileTool.ts 358-367 so the rollback failure is again reported once, carrying the captured streaming error as its cause, and so reportedRollbackFailures regains the only writer its :430 reader has. Requested by the campaign lead as Side B after CI's required context platform-unit-test (ubuntu-latest) 130302193166 failed on writeToFileTool.spec.ts:1581 at head 791b8ca. Nothing pushed.
1 parent 791b8ca commit 6403f98

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/core/tools/WriteToFileTool.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,16 @@ export class WriteToFileTool extends BaseTool<"write_to_file"> {
355355
// actionable report. These are two distinct failures, so reporting both does not break the
356356
// single-report rule.
357357
if (rollbackError) {
358+
this.reportedRollbackFailures.add(rollbackError)
359+
if (state.streamError) {
360+
await callbacks.handleError(
361+
"writing file",
362+
new Error(`write_to_file rollback failed after a streaming error: ${rollbackError.message}`, {
363+
cause: state.streamError,
364+
}),
365+
)
366+
return true
367+
}
358368
await callbacks.handleError(
359369
"writing file",
360370
new Error(`write_to_file rollback failed: ${rollbackError.message}`, { cause: rollbackError }),

0 commit comments

Comments
 (0)