fix(server): merged PRs update and auto-settle threads again - #13476
Merged
juliusmarminge merged 1 commit intoSep 24, 2026
Merged
juliusmarminge merged 1 commit into
juliusmarminge merged 1 commit into
Conversation
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused server bug fix that restores repository identity resolution for existing pull-request operations, with bounded concurrency and regression coverage. It introduces no schema, deployment, security, billing, authentication, default, or static-analysis changes. You can add or adjust custom eligibility rules. Learn more. |
juliusmarminge
merged commit Sep 24, 2026
52c336a
into
pingdotgg:t3code/codex-turn-mapping
24 checks passed
juliusmarminge
pushed a commit
that referenced
this pull request
Sep 24, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
juliusmarminge
pushed a commit
that referenced
this pull request
Sep 24, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
juliusmarminge
pushed a commit
that referenced
this pull request
Sep 25, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
On the new orchestrator, a thread's linked PR can stay "open" in the sidebar after it is merged or closed. Because of this, auto-settle never settles the thread.
The branch reads project shells through
ProjectEnrichmentService.getAvailable. That call only checks a cache: on a miss, it returnsrepositoryIdentity: nulland fills the cache in the background. The cache keeps a result for 1 minute, andPullRequestSyncReactoralso runs every minute. So the sweep often reads a project with no identity. ThenPullRequestService.requireProjectfinds no supported host and fails withPullRequestUnavailableError: Change requests cannot be browsed for this project's host yet.The link snapshot staysopen, andresolveAutoSettlementAtdoes not settle a thread while any of its links is open.On a live install, the traces show 143 failed and 11 successful
canonicalRefcalls across 3 log files. The "pull request sync skipped" warning does not log the cause, so the failure was hard to see.maindoes not have this bug, because its project shell reads resolve the identity withRepositoryIdentityResolverand wait for the answer.Fix
In
PullRequestService.listWorkspaceProjects, if a project shell has no cached identity, resolve it withRepositoryIdentityResolverbefore routing. A shell that already has an identity costs nothing extra. For a missing one, the resolver's own cache (1 minute) is used, so this is the same lookup thatmaindoes on every read. Only the PR service changes. The sidebar and other callers that read enrichment still get the non-blocking cached path.Verification
repositoryIdentity: nullstill routes a summary read. It fails before the fix with the error above, and passes after it.vp test run src/pullRequest/ src/git/ src/orchestration/PullRequestSyncReactor* src/orchestration-v2/RunFinalizationService.test.ts: 28 files, 967 tests pass.tsc --noEmitforapps/server, plusvp lintandvp fmt --checkon the touched files: clean.Risk
A PR read for a project that is not a git repository now runs one resolver lookup. This lookup is cached. For a path with no git root, the root is not cached and
gitruns again on the next read, the same asmain.Made by Claude Opus 5.5 in Claude Code.