Repository navigation
Pull request lookup follow-ups from #16793 #16807
Copy link
Copy link
Closed as not planned
Description
Follow-ups from the review of #16793 (conversation pull request lookup). None blocks the feature; each is a known limit.
- Epoch and workspace come from separate snapshots.
resolveCodeExecutionWorkspaceContextcaptures the attachment, thengetConvoLaneContextreads the attachment epoch. An A to B to A move between the two reads would satisfy both fences. Fix: return the epoch with the persisted workspace decision (shared decision path inpackages/api/src/code). - Fork pull request check runs. Checks are read from the base repository. Sampled on this repo: Add Deploy to Railyard button #16787 has its check runs on the base repo, Port company upload-menu customizations to v0.8.7 release baseline #16776 on the fork. A fork PR whose checks live on the fork reads as
none. Fix: keep the head repository from the pull detail and read checks there, under an explicit authorization scope. - Proxy-aware transport. The route passes global
fetchtocreateGitHubPullRequestSource. Deployments behind a proxy need the proxy dispatcher injected at that one argument. - History search bound. A branch name reused more than
maxCandidatePullRequeststimes can hide an older matching pull request. Pagination within a configured budget would remove the limit. - Subagent lane context is two reads.
getConvoLaneContextreads the thread, then its root. Resolving both in one operation needs a tenant-safe approach, since the tenant plugin only filters the base collection of an aggregate$lookup. - Headerless secondary limit on a 429. The 429 branch is classified before the body-based detector, so it gets the 10 second cooldown, not 60. Fix: run the body check for 429 too.
- Check-run 404 reads as no checks.
getJsonmaps 404 to null, so a head that vanished between detail and checks reportsnone(or a partialpassing) and is cached. Fix: treat a check-run 404 as UPSTREAM_ERROR. - Unborn lane (
head: null) can match an old PR. With a branch and no commit, every candidate is accepted and closed history can show a previous incarnation. Fix: return null when the reported head is null. - Shared-token capacity. Two principals with the same token and different
cacheMaxEntriesshare one partition, and the smaller trims it. Fix: keep the largest capacity seen per token. - Open fork PRs vs closed base PRs. Fork candidates are searched after the closed base list, so a closed base PR can beat an open fork PR. Fix: search open fork candidates before closed ones.
- Identical lanes across concurrent batch requests. Conversations on one repository, branch and head share one slot within a request, but two concurrent requests each take their own slot before the lookup's shared in-flight promise joins them. With a low
maxConcurrentLookupsa second request for the same lane waits instead of joining. Fix: keep a handler-wide in-flight map keyed by the lookup input and take a slot only for the request that starts the upstream work. - 404 fallback concurrency. When the batch POST reaches a replica without the route, the client falls back to the single route four calls at a time. An old replica cannot tell the client its
maxConcurrentLookups, and the single route has no batch limiter, so the fallback ignores a lower configured limit for the length of a rolling upgrade. Fix: advertise the configured limit with the batch version in the startup config, or serialize the fallback.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity