Repository navigation
fix(server): keep PR-status lookups for ten minutes, not one (fork patch on nightly 2819, board #15036) - #4
Open
MattRiddell wants to merge 1 commit into
Conversation
…tch, board pingdotgg#15036) The settlement and thread-PR sweeps run every minute and re-read every open PR from GitHub once their one-minute cache entries expire: 500 to 1,100 GraphQL calls an hour on the fleet box (listPullRequestsByHead from ThreadPullRequestServiceV2.synchronize and ThreadSettlementServiceV2.sweep, getPullRequestSummary from PullRequestReadCache). - GitManager: PR_LOOKUP_CACHE_TTL 60 s -> 10 min; the no-open-PR TTL 5 min -> 10 min. Refresh paths (turn end, push, create PR, user refresh) still bypass the cache; failure backoff is unchanged. - PullRequestReadCache: entries and scope invalidations last ENTRY_TTL (10 min) instead of 60 s, so an invalidation still outlives any entry read before it. PR badges and external merges can lag up to ten minutes. Matt, q3440 (Telegram 2026-10-10T00:17:56Z): "q3440: 1".
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Board pingdotgg#15036. Matt, q3440 (Telegram 2026-10-10T00:17:56Z, "q3440: 1"): "Patch our T3 fork: PR-status caches from about 1 min to 10 min; re-apply on each T3 upgrade; PR badges can lag up to 10 min".
What
GitManager:PR_LOOKUP_CACHE_TTL60 s → 10 min;PR_LOOKUP_NO_OPEN_PR_CACHE_TTL5 min → 10 min. Refresh paths (turn end, push, create PR, user refresh) still bypass the cache. Failure backoff is unchanged.PullRequestReadCache: entries and scope invalidations lastENTRY_TTL(10 min), not 60 s. An invalidation still outlives any entry read before it.Why
On live nightly 2819, the trace shows 204
GitHubApi.sendcalls in 16.6 min (about 740 an hour), all from the one-minute sweeps:listPullRequestsByHeadfromThreadPullRequestServiceV2.synchronizelistPullRequestsByHeadfromThreadSettlementServiceV2.sweepgetPullRequestSummaryfromPullRequestReadCache.get(settlement sweep 42 + sync reactor 14)Baseline before T3 called GitHub itself: 1,414 a day.
Tests
vp test run src/pullRequest/PullRequestReadCache.test.ts src/git/GitManager.test.ts: 130 passed, 2 failed. The 2 failures are the commit-hook tests ("emits ordered progress events for commit hooks", "emits action_failed when a commit hook rejects"). They fail the same way on the unpatched tag on this host, so the patch does not cause them.tsc --noEmit(apps/server): clean.Build
t3-patched-buildagainst the live install~/.local/lib/t3-20261008-2819: VERDICT=PATCH-ONLY changed_lines=12, staged at~/.local/lib/t3-20261008-2819-pr10m(sha256 19dd53abca631526…), boot smoke 200. The live switch is a controller drop-in that takes effect at Matt's next restart.🤖 Generated with Claude Code