Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): watched PRs wake the agent when they merge, close or leave the merge queue #29854

Closeddominic-r(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/29854/headopened View on GitHub

Showing 20 changed files with 103 additions and 0 deletions (loading 19).

x
0 of 20 viewed, 20 left
103 additions and 0 deletionsapps/server/src/orchestration-v2/ProjectionSettlement.test.tsModified
View file
@@ -478,3 +478,106 @@
assert.equal(all.threads.length, 4);
}).pipe(Effect.provide(layerSql)),
+​
+it.effect("sql: a watched merge settles only after its wake turn ends with nothing left", () =>
+ Effect.gen(function* () {
+ const store = yield* ProjectionStore.ProjectionStoreV2;
+ const watch = {
+ startedAt: DateTime.formatIso(old),
+ headSha: "abc1234",
+ failedChecks: [],
+ passed: true,
+ passedChecks: ["test"],
+ remarksThrough: DateTime.formatIso(old),
+ remarkIds: [],
+ conflicting: false,
+ wakes: 0,
+ };
+ const link = (number: number, state: "open" | "merged") => ({
+ host: "github.com",
+ repository: "acme/app",
+ number,
+ url: `https://github.com/acme/app/pull/${number}`,
+ source: "agent" as const,
+ linkedAt: DateTime.formatIso(old),
+ snapshot: {
+ state,
+ title: "Pull request",
+ headBranch: "feature",