Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): the V1 transcript import no longer stalls on each thread's V1 events #21050

Mergedderektrimm(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/21050/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 72 additions and 1 deletion.

x
0 of 2 viewed, 2 left
69 additions and 0 deletionsapps/server/src/orchestration-v2/legacy/LegacyV1ThreadImporter.test.tsModified
View file
@@ -534,3 +534,72 @@
}),
});
+​
+it.layer(layerTest)("LegacyV1ThreadImporter transcript lookup", (it) => {
+ it.effect("finds imported messages on the V2 thread index, past the thread's V1 events", () =>
+ Effect.gen(function* () {
+ const sql = yield* SqlClient.SqlClient;
+ const importer = yield* LegacyV1ThreadImporter.LegacyV1ThreadImporter;
+ const threadId = ThreadId.make("thread:legacy-lookup");
+ yield* sql`
+ INSERT INTO projection_projects (
+ project_id, title, workspace_root, default_model_selection_json, scripts_json,
+ created_at, updated_at, deleted_at
+ ) VALUES (
+ 'project:legacy-lookup', 'Legacy project', '/tmp/legacy-lookup',
+ '{"instanceId":"codex","model":"gpt-5.4"}', '[]',
+ '2026-01-01T00:00:00.000Z', '2026-01-01T00:00:00.000Z', NULL
+ )
+ `;
+ yield* sql`
+ INSERT INTO projection_threads (
+ thread_id, project_id, title, model_selection_json, runtime_mode, interaction_mode,
+ created_at, updated_at
+ ) VALUES (
+ ${threadId}, 'project:legacy-lookup', 'Migrated conversation',
+ '{"instanceId":"codex","model":"gpt-5.4"}', 'full-access', 'default',
+ '2026-01-01T00:00:00.000Z', '2026-01-01T00:00:00.000Z'
+ )