Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(provider-acp): preserve Grok answers after early task completion #32229

ClosedSidreyas(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/32229/headopened View on GitHub

Showing 2 changed files with 66 additions and 13 deletions.

x
0 of 2 viewed, 2 left
58 additions and 5 deletionsapps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.tsModified
View file
@@ -8439,7 +8439,7 @@
it.effect(
- "staggered pre-settle completion keeps midTurn marks until last background task ends post-finalize",
+ "staggered pre-settle completion waits for native wake output after the last background task ends",
() =>
Effect.gen(function* () {
const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner;
@@ -8635,12 +8635,19 @@
"mutation-only end-notice must not count as post-settle wake evidence",
yield* sessionUpdateHandler!(bEndNotice);
- yield* Effect.yieldNow;
- yield* Effect.yieldNow;
+ assert.lengthOf(continuationRequests, 0, "a task end notice alone cannot start a wake");
+ assert.isTrue(yield* runtime.hasPendingBackgroundWork!);
+ yield* sessionUpdateHandler!({
+ sessionId: "mock-session-1",
+ update: {
+ sessionUpdate: "agent_message_chunk",
+ content: { type: "text", text: "Both background tasks finished." },
+ },
+ });
assert.lengthOf(
continuationRequests,
- "exactly one continuation when the last running task ends post-finalize with kept midTurn marks",
+ "the native report must start exactly one continuation",