Skip to content

fix(server): cut background GitHub PR lookups (fork patch, board #15036) - #6

Open
MattRiddell wants to merge 1 commit into
build/2819-pr10m-fix16214from
fix/15036-pr-lookup-passes
Open

MattRiddell wants to merge 1 commit into
build/2819-pr10m-fix16214from
fix/15036-pr-lookup-passes

Conversation

@MattRiddell

Copy link
Copy Markdown
Owner

Fork patch for board pingdotgg#15036. It stacks on build/2819-pr10m-fix16214, the live install's source: the 10-min PR cache (#4) plus the grok fix (#5).

Why

The 10-min PR cache did not cut t3-server's GitHub GraphQL reads. On 2026-10-12, 05–10Z (Panama 00:00–05:00), it still ran 106–147 calls an hour. The target is ≤283 a day: −80% against the 2026-09-28 baseline of 1,414 a day.

What

Driver Change
Thread PR pass, every 1 min, over all unsettled threads Runs every 10 min. Expired lookups fall due together and share GraphQL documents.
Settlement sweep, every 1 min Runs every 10 min. Lookups run 25 at a time, not 8, to fill a background document (25 heads).
Run end and checkpoint forced refresh: true; refreshMissingPullRequest dropped the cached "no PR" answer Both read the cache. A PR opened mid-run shows within 10 min (Matt, q3440: "PR badges can lag up to 10 min"). User refreshes still bypass.
493 of 547 settlement candidates are Codex native subagents whose root is archived (231 of 267 lookup keys per pass) No branch lookup when the root is archived, settled or gone. They still settle by age.
git remote -v in a partial clone prints origin <url> (fetch) [blob:none]; the regex rejected it All 3 copies accept the [filter] suffix. Since 2026-10-12 ~10Z both product checkouts resolved to provider "unknown", so their PR badges and merge settlement stopped. Upstream main has the same bug.

Tests

  • Files run: GitManager, ThreadPullRequestService, ThreadSettlementService, RepositoryIdentityResolver, GitVcsDriver, GitVcsDriverCore.
  • Result: 362 passed, run with GIT_CONFIG_GLOBAL=/dev/null.
  • Without that, 5 hook tests fail. The base fails the same 5: eniac's global core.hooksPath causes it.
  • New or changed tests: 3. All 3 fail on the base.
  • tsc --noEmit: clean. vp lint on changed files: exit 0, no new warnings.

Install

Install is controller-only: t3-patched-build stages a new directory, then Matt restarts T3. The install packet is on board pingdotgg#15036.

🤖 Generated with Claude Code

…dotgg#15036)

The 10-minute PR cache (393c055) did not cut t3-server's GraphQL reads:
2026-10-12 05-10Z still ran 106-147 calls an hour against a 283/day target.

- The periodic thread PR pass and the settlement sweep run every 10 minutes,
  not every minute, so expired branch lookups fall due together and share
  GraphQL documents. Settlement lookups run 25 at a time to fill a document.
- A finished run or captured checkpoint reads the cached branch answer; it no
  longer forces a fresh read or drops a cached "no pull request" answer.
  A pull request opened during a run shows within the cache's 10 minutes
  (Matt, q3440: PR badges can lag up to 10 min). User refreshes still bypass.
- Provider-native subagents whose root thread is archived, settled or gone get
  no branch lookup (493 of 547 settlement candidates; 231 of 267 keys per
  pass). They still settle by age.
- `git remote -v` lines of a partial clone end with `[blob:none]`; the remote
  regex rejected them, so the checkout resolved to provider "unknown" and its
  PR badges and merge settlement stopped. The three copies accept the suffix.

Tests: GitManager, ThreadPullRequestService, ThreadSettlementService,
RepositoryIdentityResolver, GitVcsDriver, GitVcsDriverCore: 362 passed
(GIT_CONFIG_GLOBAL=/dev/null; eniac's global core.hooksPath fails 5 hook tests
on the base too). New tests fail on the base: 3 of 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Oct 13, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant