Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): large file edits no longer store their full diff twice #19316

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/19316/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 3 changed files with 106 additions and 3 deletions.

x
0 of 3 viewed, 3 left
80 additions and 0 deletionsapps/server/src/orchestration-v2/ProviderEventIngestor.test.tsModified
View file
@@ -29,6 +29,7 @@
import * as Fiber from "effect/Fiber";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
+import * as SqlClient from "effect/sql/SqlClient";
import * as Stream from "effect/Stream";
import * as TestClock from "effect/testing/TestClock";
​
@@ -58,6 +59,7 @@
);
​
const layerTest = Layer.mergeAll(
+ layerTestDatabase,
layerTestStores,
layerTestEventSink,
IdAllocator.layer,
@@ -1514,6 +1516,84 @@
+ it.effect("stores a bounded copy of a large file-change diff in both SQLite tables", () =>
+ Effect.gen(function* () {
+ const now = yield* DateTime.now;
+ const eventSink = yield* EventSink.EventSinkV2;
+ const projectionStore = yield* ProjectionStore.ProjectionStoreV2;
+ const ingestor = yield* ProviderEventIngestor.ProviderEventIngestorV2;
+ const idAllocator = yield* IdAllocator.IdAllocatorV2;
+ const threadEvent = yield* threadCreatedEvent(now);