Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): delete checkpoint refs when threads are deleted #13273

Closedaquamoth(GitHub profile, opens in a new tab)wants to merge 6 commits intomain fromrefs/pull/13273/headopened View on GitHub

Showing 15 changed files with 94 additions and 5 deletions (loading 12).

x
0 of 15 viewed, 15 left
74 additions and 0 deletionsapps/server/src/orchestration-v2/CheckpointCaptureService.test.tsModified
View file
@@ -485,6 +485,80 @@
}),
​
+ // Deletion cancels the run while its capture is still queued. The thread's
+ // cleanup only deletes recorded refs, so capture must not write a new one.
+ it.effect("captures nothing for a deleted thread", () =>
+ Effect.gen(function* () {
+ const projectionStore = yield* ProjectionStore.ProjectionStoreV2;
+ const now = yield* DateTime.now;
+ const deletedThreadId = ThreadId.make("thread:checkpoint-capture-deleted");
+ const thread = {
+ createdBy: "user" as const,
+ creationSource: "web" as const,
+ id: deletedThreadId,
+ projectId,
+ title: "Checkpoint capture after delete",
+ providerInstanceId,
+ modelSelection,
+ runtimeMode: "full-access" as const,
+ interactionMode: "default" as const,
+ branch: null,
+ worktreePath: null,
+ activeProviderThreadId: null,
+ lineage: {
+ parentThreadId: null,
+ relationshipToParent: null,
+ rootThreadId: deletedThreadId,
+ },
+ forkedFrom: null,