Skip to content
Source
Docs
Explore
Skills
MCP servers
For agents
Search or jump to…
Sign in
Sign up
pingdotgg
/
t3code
Pull requests
pingdotgg
t3code
Public
Synced with GitHub
Popular #1
Fork
0
0
0
0
1
2
3
4
5
6
7
8
9
Code
Architecture
Issues
Pull requests
Community
Assets
CI
Agents
Settings
fix(server): switching a thread's provider no longer orphans its background work
#30447
Send to my agent
Closed
juliusmarminge
wants to merge 2 commits into
main
from
fix/issue-30430
·
opened
4 weeks ago
View on GitHub
Conversation
8
Commits
2
Files changed
2
Impact
Showing
2 changed files
with
180 additions
and
33 deletions
.
x
0 of 2 viewed, 2 left
Files
Hide whitespace
Unified
Split
124 additions and 0 deletions
+124
-0
apps/server/src/orchestration-v2/testkit/ProviderSwitch.integration.test.ts
Modified
Diff
Before/After
Viewed
apps/server/src/orchestration-v2/testkit/ProviderSwitch.integration.test.ts
View file
Expand up
Show all 2,661 lines
@@ -2662,6 +2662,130 @@
2662
2662
),
2663
2663
);
2664
2664
2665
+
// regression: #30430 a provider switch outside a send must not detach a session running background work
2666
+
it.
live
.
each
([
"provider.switch"
,
"thread.model-selection.set"
]
as
const
)(
2667
+
"%s refuses while the previous provider still runs background work"
,
2668
+
(commandType) =>
2669
+
Effect
.
scoped
(
2670
+
Effect
.
gen
(
function
* () {
2671
+
const
cwd =
yield
*
checkpointWorkspace
(
"configure-switch-background-work"
);
2672
+
const
capturedTurns =
yield
*
Ref
.
make
<
ReadonlyArray
<
CapturedTurn
>>([]);
2673
+
const
pendingBackgroundWork =
yield
*
Ref
.
make
(
false
);
2674
+
const
closedSessions =
yield
*
Ref
.
make
<
ReadonlyArray
<
string
>>([]);
2675
+
const
layerRegistry =
ProviderAdapterRegistry
.
layerFromAdapters
([
2676
+
makeTestAdapter
({
2677
+
instanceId
:
CLAUDE_MODEL_SELECTION
.
instanceId
,
2678
+
driver
:
CLAUDE_DRIVER
,
2679
+
capabilities
:
ClaudeProviderCapabilitiesV2
,
2680
+
modelSelection
:
CLAUDE_MODEL_SELECTION
,
2681
+
responseByRunOrdinal
: {
1
:
"First provider complete"
},
2682
+
capturedTurns,
2683
+
pendingBackgroundWork,
2684
+
closedSessions,
2685
+
}),
2686
+
makeTestAdapter
({
2687
+
instanceId
:
CODEX_MODEL_SELECTION
.
instanceId
,
2688
+
driver
:
CODEX_DRIVER
,
2689
+
capabilities
:
CodexProviderCapabilitiesV2
,
2690
+
modelSelection
:
CODEX_MODEL_SELECTION
,
Home
Search
Explore
Menu