Repository navigation
perf(server): PR watch folds no longer read every run of the thread - #51
Conversation
The reactor's fold check and the orchestrator's queued-wake rewrite each loaded all of a thread's runs to find one wake. The reactor now reads only queued runs, and the orchestrator finds the wake by its message ID. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Summary
The fork's PR watch fold loaded every run of a thread to find one queued wake, once in the reactor's fold check and again when the orchestrator rewrote the wake. Long threads paid for their whole run history on each watch pass with news, which upstream has been removing from its own hot paths (pingdotgg#29521, pingdotgg#36100, pingdotgg#36130). Both reads are now narrow; behavior is unchanged.
Evidence
apps/serveris clean.runtimeLayer.test.ts,PullRequestSyncReactor.test.tsandOrchestrator.control-reads.test.tspass (257 tests), including both fold cases: news folds into a queued wake and is told again once the agent is past it, and one PR's fold is sent alone while another PR's news queues its own wake.Merge Danger
Door: two-way
Blast Radius: PR-watch wakes
A wrong lookup would show up as a second wake instead of a folded one, or a rejected sync. Reverting restores the old reads.
🤖 Generated with Claude Code