Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf: make streaming projection and activity appends incremental #6608

Closedx1xhlol(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/6608/headopened View on GitHub

Showing 4 changed files with 211 additions and 0 deletions (loading 3).

x
0 of 4 viewed, 4 left
211 additions and 0 deletionsapps/server/src/orchestration/Layers/ProjectionPipeline.test.tsModified
View file
@@ -2086,6 +2086,217 @@
+ it.effect("maintains shell summary fields across message and activity streams", () =>
+ Effect.gen(function* () {
+ const projectionPipeline = yield* OrchestrationProjectionPipeline;
+ const eventStore = yield* OrchestrationEventStore;
+ const sql = yield* SqlClient.SqlClient;
+ const appendAndProject = (event: Parameters<typeof eventStore.append>[0]) =>
+ eventStore
+ .append(event)
+ .pipe(Effect.flatMap((savedEvent) => projectionPipeline.projectEvent(savedEvent)));
+​
+ yield* appendAndProject({
+ type: "project.created",
+ eventId: EventId.make("evt-shell-summary-1"),
+ aggregateKind: "project",
+ aggregateId: ProjectId.make("project-shell-summary"),
+ occurredAt: "2026-03-01T08:00:00.000Z",
+ commandId: CommandId.make("cmd-shell-summary-1"),
+ causationEventId: null,
+ correlationId: CorrelationId.make("cmd-shell-summary-1"),
+ metadata: {},
+ payload: {
+ projectId: ProjectId.make("project-shell-summary"),
+ title: "Project Shell Summary",
+ workspaceRoot: "/tmp/project-shell-summary",
+ defaultModelSelection: null,
+ scripts: [],