Skip to content

Commit 6599356

Browse files
only21milclaude
andcommitted
test(pi): pin that a later successful turn clears an earlier Pi error
An error followed by a successful assistant message_end with no reply text must report "Pi returned empty output.", not the stale error. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 1180e99 commit 6599356

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎packages/provider-pi/src/server/textGeneration.test.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,14 @@ it.effect("keeps the reply when Pi answers after a failed attempt", () =>
134134
assert.equal(result.subject, "Update README");
135135
}),
136136
);
137+
138+
it.effect("drops an earlier error once a later attempt succeeds", () =>
139+
Effect.gen(function* () {
140+
const error = yield* generateCommitMessage([
141+
failedTurn,
142+
{ type: "message_end", message: { role: "assistant", stopReason: "stop" } },
143+
]).pipe(Effect.flip);
144+
145+
assert.equal(error.detail, "Pi returned empty output.");
146+
}),
147+
);

0 commit comments

Comments
 (0)