Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): one bad legacy message no longer stops the server from starting #15920

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 8 commits intomain fromrefs/pull/15920/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 164 additions and 2 deletions (loading 1).

x
0 of 2 viewed, 2 left
164 additions and 2 deletionsapps/server/src/orchestration-v2/legacy/LegacyV1ThreadImporter.test.tsModified
View file
@@ -1,10 +1,17 @@
import { assert, it } from "@effect/vitest";
-import { EventId, ThreadId } from "@t3tools/contracts";
+import {
+ ComposerContextId,
+ EventId,
+ type OrchestrationMessageContext,
+ ThreadId,
+} from "@t3tools/contracts";
import * as DateTime from "effect/DateTime";
import * as Effect from "effect/Effect";
+import * as Exit from "effect/Exit";
import * as Layer from "effect/Layer";
import * as Tracer from "effect/Tracer";
import * as SqlClient from "effect/sql/SqlClient";
+import * as Statement from "effect/sql/Statement";
​
import * as SqlitePersistence from "../../persistence/Sqlite.ts";
import { listLinkedPullRequestThreads } from "../../pullRequest/linkedThreads.ts";
@@ -36,6 +43,113 @@
layerProjectionMaintenanceProvided,
);
​
+const seedPendingTranscripts = Effect.gen(function* () {
+ const sql = yield* SqlClient.SqlClient;
+ const importer = yield* LegacyV1ThreadImporter.LegacyV1ThreadImporter;
+ const threadIds = [ThreadId.make("thread:first"), ThreadId.make("thread:later")];
+ yield* sql`
+ INSERT INTO projection_projects (
+ project_id, title, workspace_root, scripts_json, created_at, updated_at