Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(checkpoint): pulls and rebases no longer flood a turn's changed files #17161

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 10 commits intomain fromrefs/pull/17161/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 12 changed files with 89 additions and 9 deletions (loading 10).

x
0 of 12 viewed, 12 left
30 additions and 0 deletionsapps/server/src/checkpointing/CheckpointDiffQuery.test.tsModified
View file
@@ -48,6 +48,7 @@
function layerFor(input: {
readonly projection: Effect.Effect<ProjectionCheckpointContext, OrchestratorProjectionError>;
readonly diffCheckpoints?: CheckpointStore.CheckpointStore["Service"]["diffCheckpoints"];
+ readonly authoredPaths?: ReadonlySet<string>;
}) {
return CheckpointDiffQuery.layer.pipe(
Layer.provide(
@@ -57,6 +58,7 @@
}),
Layer.mock(CheckpointStore.CheckpointStore)({
diffCheckpoints: input.diffCheckpoints ?? (() => Effect.succeed("diff")),
+ listAuthoredPaths: () => Effect.succeed(input.authoredPaths ?? null),
}),
),
),
@@ -93,6 +95,34 @@
}).pipe(Effect.provide(layer));
});
​
+it.effect("leaves Git imports out of large turn diffs", () => {
+ const ownPaths = Array.from({ length: 1_000 }, (_, index) => `src/module-${index}/file.ts`);
+ const diffCheckpoints = vi.fn((input: CheckpointStore.DiffCheckpointsInput) =>
+ Effect.succeed(
+ input.format === "numstat"
+ ? [...ownPaths, "upstream.ts"].map((path) => `1\t0\t${path}\0`).join("")
+ : (input.filePaths ?? ["all"]).join("\n"),
+ ),