Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): PR wakeups follow provider handoffs #17828

Closedvoltcrash(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/17828/headopened View on GitHub

Showing 3 changed files with 198 additions and 0 deletions (loading 2).

x
0 of 3 viewed, 3 left
198 additions and 0 deletionsapps/server/src/orchestration-v2/testkit/ProviderSwitch.integration.test.tsModified
View file
@@ -2240,6 +2240,204 @@
+ it.live("delivers an older queued PR wake to the provider that took over", () =>
+ Effect.scoped(
+ Effect.gen(function* () {
+ const cwd = yield* checkpointWorkspace("queued-pr-handoff");
+ const capturedTurns = yield* Ref.make<ReadonlyArray<CapturedTurn>>([]);
+ const started = yield* Deferred.make<void>();
+ const layerRegistry = ProviderAdapterRegistry.layerFromAdapters([
+ makeTestAdapter({
+ instanceId: CODEX_MODEL_SELECTION.instanceId,
+ driver: CODEX_DRIVER,
+ capabilities: CodexProviderCapabilitiesV2,
+ modelSelection: CODEX_MODEL_SELECTION,
+ responseByRunOrdinal: {},
+ capturedTurns,
+ holdFirstTurn: started,
+ }),
+ makeTestAdapter({
+ instanceId: CLAUDE_MODEL_SELECTION.instanceId,
+ driver: CLAUDE_DRIVER,
+ capabilities: ClaudeProviderCapabilitiesV2,
+ modelSelection: CLAUDE_MODEL_SELECTION,
+ responseByRunOrdinal: { 2: "PR update handled", 3: "Takeover complete" },
+ capturedTurns,
+ }),
+ ]);
+ const threadId = ThreadId.make("thread:queued-pr-handoff");