Repository navigation
Commit 1f6543e
refactor(upstream-fixes): PR watch single read defers to upstream
## Problem
The PR watch sweep spent about 10k GitHub GraphQL points an hour.
Every watching thread read its pull request each minute, conversation included (about 17 points).
Subagent children copied the parent's watches, so one PR was read many times a pass.
A budget pause also counted as a read failure, so watches ended with a false "could not read it" wake.
## Change
| Part | Before | After |
| --- | --- | --- |
| Read | one per watching thread | one per pull request a pass, shared |
| Conversation | every pass | on `updatedAt` change, or every 10 min |
| Degraded read | used once | read again next pass |
| Rate limit | counts towards stopping | waits, logs once |
| Subagent child | copies watches | copies links only |
Expected spend for 7 watched PRs: about 1.1k points an hour, down from about 10k.
### Not changed
| Item | Note |
| --- | --- |
| `githubGraphQlBudget.ts` | keeps the lower local balance; its tests pin that, and drift falls with the read count |
| Rebase | untagged upstream `f4f3abf71e9` also edits this reactor; the patch keeps clear of its hunks |
## Scope and approval
Closes #1625
## Verification
| Command | Result |
| --- | --- |
| `vp test run` on the two new `.fork.test.ts` files | 3 passed |
| Same tests on the unpatched reactor | both reactor tests fail |
| Watch tests in `runtimeLayer.test.ts` | 3 passed |
| Server `tsc --noEmit` | exit 0 |
| `vp run fork:ci` | exit 0 |
| `git merge-tree` against `upstream/main` | no head-only conflicts |
Model: Claude Opus 5.5 in Claude Code, inside T3 Code.
## Fork trailers
Squashes:
- 3d22470 fix(server): PR watches read each pull request once a pass (#1626) (#1626) (#188)
- 9adfbe8 refactor(upstream-fixes): retire the PR watch single-read fork test
Fork-Domain: upstream-fixes
Fork-Tier: bugfix
Fork-Upstreamable: yes1 parent 90ee696 commit 1f6543e
0 file changed
0 commit comments