fix(server): settled threads stop polling their pull requests #16762
Mergedt3dotgg(GitHub profile, opens in a new tab)merged 2 commits into
main fromrefs/pull/16762/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
juliusmarminge added labelsmacroscope-review
- apps/server/src/orchestration-v2/PullRequestSyncReactor.ts line 177Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -172,7 +172,6 @@172172 const isDue = (key: string, entries: ReadonlyArray<LinkEntry>, nowMs: number): boolean => {173173 if (requested.has(key) || retryStacks.has(key)) return true;174174 if (entries.some((entry) => entry.link.snapshot === null)) return true;175- if (entries.every((entry) => entry.link.snapshot?.state === "merged")) return false;176- if (entries.some((entry) => entry.link.snapshot?.state === "open" && isUnsettled(entry.thread)))177- return true;178- // Closed requests can reopen on the host, including after the thread settles.175+ // Settled threads stop watching their pull requests. Unsettling one makes its links due on176+ // the next sweep, since the cadence clock below kept running while it was settled.177+ const active = entries.filter((entry) => isUnsettled(entry.thread));
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed