Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): PR watch wakes the agent when a bot edits its review comment #15415

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

Showing 8 changed files with 30 additions and 5 deletions (loading 5).

x
0 of 8 viewed, 8 left
21 additions and 1 deletionapps/server/src/orchestration-v2/pullRequestWatch.test.tsModified
View file
@@ -1,7 +1,6 @@
import type {
PullRequestCheck,
PullRequestComment,
- PullRequestDetail,
ThreadPullRequestWatch,
} from "@t3tools/contracts";
import { assert, describe, it } from "@effect/vitest";
@@ -119,6 +118,27 @@
assert.deepEqual(again.next.remarkIds, [first.id, "late"]);
});
​
+ it("reports edits after the watermark once and counts them toward the wake limit", () => {
+ const old = remark("greptile[bot]", "2026-10-02T11:00:00Z");
+ const watching = watch({
+ headSha: "aaaaaaaaaa",
+ remarkIds: [old.id],
+ wakes: PULL_REQUEST_WATCH_WAKE_LIMIT - 1,
+ });
+ assert.deepEqual(evaluatePullRequestWatch(watching, detail(), [old]).changes, []);
+ const edited = { ...old, editedAt: "2026-10-02T12:06:00Z" };
+ const report = evaluatePullRequestWatch(watching, detail(), [edited]);
+ assert.deepEqual(report.changes, [{ kind: "remarks", remarks: [edited] }]);
+ assert.equal(report.next.remarksThrough, edited.editedAt);
+ assert.deepEqual(report.next.remarkIds, [old.id]);
+ assert.isTrue(report.exhausted);
+ assert.deepEqual(evaluatePullRequestWatch(report.next, detail(), [edited]).changes, []);
+ const late = { ...edited, id: "late" };
+ assert.deepEqual(evaluatePullRequestWatch(report.next, detail(), [edited, late]).changes, [
+ { kind: "remarks", remarks: [late] },