Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): subagents drop pull request links they inherited from their parent #19054

ClosedMnigos(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/19054/headopened View on GitHub

Showing 6 changed files with 93 additions and 1 deletion (loading 3).

x
0 of 6 viewed, 6 left
74 additions and 0 deletionsapps/server/src/orchestration-v2/Orchestrator.control-reads.test.tsModified
View file
@@ -23,6 +23,8 @@
import * as SqlClient from "effect/sql/SqlClient";
import * as SqlitePersistence from "../persistence/Sqlite.ts";
import { CodexProviderCapabilitiesV2 } from "./Adapters/CodexAdapterV2.ts";
+import * as EventStore from "./EventStore.ts";
+import * as ProjectionMaintenance from "./ProjectionMaintenance.ts";
import * as Orchestrator from "./Orchestrator.ts";
import * as ProjectionStore from "./ProjectionStore.ts";
import * as ProviderAdapterRegistry from "./ProviderAdapterRegistry.ts";
@@ -624,3 +626,75 @@
assert.deepEqual(parentAfterChildLink.thread.pullRequests, parent.thread.pullRequests);
}).pipe(Effect.provide(layerTest)),
+​
+it.effect("removes pull request links in one replayable event, without tombstones", () =>
+ Effect.gen(function* () {
+ const orchestrator = yield* Orchestrator.OrchestratorV2;
+ const projections = yield* ProjectionStore.ProjectionStoreV2;
+ const maintenance = yield* ProjectionMaintenance.ProjectionMaintenanceV2;
+ const threadId = ThreadId.make("thread:remove-links");
+ const projectId = ProjectId.make("project:remove-links");
+ const key = (number: number) => ({
+ host: "github.com",
+ repository: "pingdotgg/t3code",
+ number,
+ });
+ const url = (number: number) => `https://github.com/pingdotgg/t3code/pull/${number}`;
+ yield* orchestrator.dispatch({
+ type: "thread.create",