Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): cache absent legacy transcripts for V2 threads #24707

MergedScottN-PV(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/24707/headmerged by maria-rcks View on GitHub

Showing 2 changed files with 67 additions and 4 deletions.

x
0 of 2 viewed, 2 left
65 additions and 0 deletionsapps/server/src/orchestration-v2/legacy/LegacyV1ThreadImporter.test.tsModified
View file
@@ -2,6 +2,8 @@
import {
ComposerContextId,
EventId,
+ ProjectId,
+ ProviderInstanceId,
type OrchestrationMessageContext,
ThreadId,
} from "@t3tools/contracts";
@@ -150,6 +152,69 @@
}).pipe(Effect.provide(layerTest)),
​
+it.effect("caches the absent legacy transcript for a native V2 thread", () =>
+ Effect.gen(function* () {
+ const importer = yield* LegacyV1ThreadImporter.LegacyV1ThreadImporter;
+ const eventSink = yield* EventSink.EventSinkV2;
+ const projections = yield* ProjectionStore.ProjectionStoreV2;
+ const threadId = ThreadId.make("thread:v2-born");
+ const providerInstanceId = ProviderInstanceId.make("codex");
+ const now = DateTime.makeUnsafe("2026-01-01T00:00:00.000Z");
+ yield* eventSink.write({
+ events: [
+ {
+ id: EventId.make("event:v2-born"),
+ type: "thread.created",
+ threadId,
+ occurredAt: now,
+ payload: {