Skip to content

Commit 6b2b615

Browse files
committed
fix(server): tighten live Claude session replacement tests
Keep formatter wrapping and assert the live session was retained without comparing a stale start-time resume cursor.
1 parent becf02a commit 6b2b615

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎apps/server/src/orchestration/Layers/ProviderCommandReactor.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,8 +783,7 @@ const make = Effect.gen(function* () {
783783
requestedModelSelection !== undefined &&
784784
activeSession?.providerInstanceId !== requestedModelSelection.instanceId;
785785
const shouldRestartForModelChange = modelChanged && sessionModelSwitch === "unsupported";
786-
const previousModelSelection =
787-
threadModelSelections.get(threadId) ?? thread.modelSelection;
786+
const previousModelSelection = threadModelSelections.get(threadId) ?? thread.modelSelection;
788787
// Claude compares the full ModelSelection, including options. Cache
789788
// misses fall back to the thread's persisted selection so same-model
790789
// option changes still restart, without treating undefined vs

‎apps/server/src/provider/Layers/ClaudeAdapter.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4268,7 +4268,7 @@ describe("ClaudeAdapterLive", () => {
42684268
assert.equal(queries[0]?.closeCalls, 0);
42694269
assert.equal(yield* adapter.hasSession(THREAD_ID), true);
42704270
assert.equal(activeSessions.length, 1);
4271-
assert.deepEqual(activeSessions[0]?.resumeCursor, firstSession.resumeCursor);
4271+
assert.equal(activeSessions[0]?.threadId, firstSession.threadId);
42724272
assert.equal(activeSessions[0]?.runtimeMode, "full-access");
42734273
assert.equal(warnings.length, 1);
42744274
assert.equal(warnings[0]?.type, "runtime.warning");

0 commit comments

Comments
 (0)