Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): exclude between-turn edits from V2 turn diffs #10197

Closedemmsixx(GitHub profile, opens in a new tab)wants to merge 1 commit intot3code/codex-turn-mapping fromrefs/pull/10197/headopened View on GitHub

Showing 18 changed files with 62 additions and 2 deletions (loading 15).

x
0 of 18 viewed, 18 left
49 additions and 1 deletionapps/server/src/checkpointing/CheckpointDiffQuery.test.tsModified
View file
@@ -8,6 +8,7 @@
import type { ProjectionCheckpointContext } from "../orchestration-v2/ProjectionStore.ts";
import * as ThreadManagement from "../orchestration-v2/ThreadManagementService.ts";
import * as CheckpointDiffQuery from "./CheckpointDiffQuery.ts";
+import { checkpointStartRef } from "./Utils.ts";
import * as CheckpointStore from "./CheckpointStore.ts";
import {
CheckpointRefUnavailableError,
@@ -46,6 +47,7 @@
​
function makeLayer(input: {
readonly projection: Effect.Effect<ProjectionCheckpointContext, OrchestratorProjectionError>;
+ readonly hasStartSnapshot?: boolean;
readonly diffCheckpoints?: CheckpointStore.CheckpointStore["Service"]["diffCheckpoints"];
}) {
return CheckpointDiffQuery.layer.pipe(
@@ -55,6 +57,7 @@
getCheckpointContext: () => input.projection,
}),
Layer.mock(CheckpointStore.CheckpointStore)({
+ hasCheckpointRef: () => Effect.succeed(input.hasStartSnapshot ?? false),
diffCheckpoints: input.diffCheckpoints ?? (() => Effect.succeed("diff")),
}),
),
@@ -66,7 +69,11 @@
const diffCheckpoints = vi.fn((_input: CheckpointStore.DiffCheckpointsInput) =>
Effect.succeed("diff --git a/file b/file"),