Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(server): per-thread settlement and PR checks no longer rebuild the whole thread list #13691

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/13691/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 5 changed files with 144 additions and 7 deletions (loading 2).

x
0 of 5 viewed, 5 left
69 additions and 0 deletionsapps/server/src/orchestration/Layers/ProjectionSnapshotQuery.test.tsModified
View file
@@ -30,6 +30,7 @@
import { ProjectionSnapshotQuery } from "../Services/ProjectionSnapshotQuery.ts";
import { encodeThreadDetailPageCursor } from "../threadDetailCursor.ts";
import { projectThreadDetailSnapshot } from "../ActivityPayloadProjection.ts";
+import { readSweepSnapshot } from "../ThreadPullRequestReactor.ts";
import { makeSqlStatementCounter } from "../../../integration/SqlStatementCounter.integration.ts";
​
const asProjectId = (value: string): ProjectId => ProjectId.make(value);
@@ -3574,6 +3575,74 @@
+it.effect("reads one sweep thread and its projects like the shell snapshot", () => {
+ const layer = OrchestrationProjectionSnapshotQueryLive.pipe(
+ Layer.provide(ThreadBackgroundLiveness.layer),
+ Layer.provide(ThreadPlanProgress.layer),
+ Layer.provide(
+ Layer.succeed(RepositoryIdentityResolver.RepositoryIdentityResolver, {
+ resolve: () =>
+ Effect.succeed({
+ canonicalKey: "github.com/acme/web",
+ provider: "github",
+ displayName: "acme/web",
+ locator: {
+ source: "git-remote" as const,
+ remoteName: "origin",
+ remoteUrl: "https://github.com/acme/web.git",
+ },
+ }),