Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a running Claude turn keeps the catalog it started with #16583

Closedf4llenz(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/16583/headopened View on GitHub

Showing 2 changed files with 163 additions and 0 deletions (loading 1).

x
0 of 2 viewed, 2 left
163 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -7903,6 +7903,169 @@
+ it.effect("keeps a running turn's catalog through a refresh and a steer", () =>
+ Effect.gen(function* () {
+ let catalog: ClaudeModelCatalog = BUNDLED_CLAUDE_MODEL_CATALOG;
+ const harness = yield* makeWakeHarnessWithOptions({
+ modelCatalog: Effect.sync(() => catalog),
+ });
+ const input = makeClaudeTestTurnInput({
+ threadId: harness.threadId,
+ providerThread: harness.providerThread,
+ now: yield* DateTime.now,
+ attemptId: RunAttemptId.make("attempt-catalog-refresh"),
+ text: "Hello",
+ attachments: [],
+ });
+ yield* harness.runtime.startTurn(input);
+ const startWindow = harness.runtime.getModelContextWindow?.(CLAUDE_TEST_MODEL_SELECTION);
+ assert.isNumber(startWindow);
+ catalog = { models: [] };
+ const idAllocator = yield* IdAllocator.IdAllocatorV2;
+ yield* harness.runtime.steerTurn({
+ threadId: harness.threadId,
+ runId: input.runId,
+ providerThread: harness.providerThread,
+ providerTurnId: idAllocator.derive.providerTurn({
+ driver: ClaudeAdapterV2.CLAUDE_PROVIDER,
+ nativeTurnId: `turn:${input.attemptId}`,