Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): preserve provider history across repeated rollbacks #12676

MergedDerpedyea(GitHub profile, opens in a new tab)merged 1 commit intot3code/codex-turn-mapping fromrefs/pull/12676/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 40 additions and 7 deletions.

x
0 of 2 viewed, 2 left
27 additions and 6 deletionsapps/server/src/orchestration-v2/CheckpointRollbackService.test.tsModified
View file
@@ -15,6 +15,7 @@
import { symlinksSupported } from "@t3tools/shared/testing/symlinks";
import * as Layer from "effect/Layer";
​
+import { resolveCodexRollbackTurnCount } from "./Adapters/CodexAdapterV2.ts";
import { isCheckpointRestoreIsolated } from "./CheckpointRestoreSafety.ts";
import { CheckpointServiceV2 } from "./CheckpointService.ts";
import {
@@ -24,6 +25,7 @@
import { EventSinkV2 } from "./EventSink.ts";
import { layer as idAllocatorLayer } from "./IdAllocator.ts";
import { ProjectionStoreReadError, ProjectionStoreV2 } from "./ProjectionStore.ts";
+import type { ProviderAdapterV2RollbackThreadInput } from "./ProviderAdapter.ts";
import { ProviderSessionManagerV2 } from "./ProviderSessionManager.ts";
import { RuntimePolicyV2 } from "./RuntimePolicy.ts";
​
@@ -377,7 +379,8 @@
{ restoreFiles: true, shared: "worktree" },
{ restoreFiles: false, shared: "worktree" },
{ restoreFiles: true, shared: "historical" },
-])("rewinds safely with %s", ({ restoreFiles, shared }) => {
+ { restoreFiles: false, shared: "none", targetOrdinal: 1 },
+])("rewinds safely with %s", ({ restoreFiles, shared, targetOrdinal = 0 }) => {
const threadId = ThreadId.make("rewind-files");
const providerThreadId = ProviderThreadId.make("rewind-provider");
const providerSessionId = ProviderSessionId.make("rewind-session");
@@ -398,11 +401,27 @@