Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): thread lists keep syncing past 32,766 threads #25691

ClosedBilalIrfanContact(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/25691/headopened View on GitHub

Showing 2 changed files with 67 additions and 7 deletions.

x
0 of 2 viewed, 2 left
56 additions and 0 deletionsapps/server/src/orchestration-v2/ProjectionStore.test.tsModified
View file
@@ -1318,6 +1318,62 @@
}).pipe(Effect.provide(layerTest)),
+// regression: #25621 SQLite rejects statements with more than 32,766 bound parameters
+it.effect("reads a shell snapshot with more threads than SQLite allows bound parameters", () =>
+ Effect.gen(function* () {
+ const store = yield* ProjectionStore.ProjectionStoreV2;
+ const sql = yield* SqlClient.SqlClient;
+ const now = yield* DateTime.now;
+ const projectId = ProjectId.make("project:many-threads");
+ const threadId = ThreadId.make("thread:many:0");
+ yield* store.apply({
+ id: EventId.make("event:many:created"),
+ type: "thread.created",
+ threadId,
+ occurredAt: now,
+ payload: {
+ createdBy: "user",
+ creationSource: "web",
+ id: threadId,
+ projectId,
+ title: "Many threads",
+ providerInstanceId,
+ modelSelection,
+ runtimeMode: "full-access",
+ interactionMode: "default",
+ branch: null,
+ worktreePath: null,
+ activeProviderThreadId: null,