Repository navigation
fix(server): keep newer forced workspace scan results - #19465
Open
Exotic209093 wants to merge 2 commits into
Open
Exotic209093 wants to merge 2 commits into
Exotic209093 wants to merge 2 commits into
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a localized server bug fix that uses per-scan ownership tokens to prevent stale workspace scans from overwriting newer forced-scan results. The production change is contained to existing scan coordination, and targeted regression tests cover the overlapping-scan scenarios. You can add or adjust custom eligibility rules. Learn more. |
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.
When an ordinary workspace scan finishes while a newer forced scan is running, its publication changes the snapshot baseline. The registry then discards the newer result, leaving newly installed skills absent. This fixes the overlapping-scan reproduction in #16866.
Give each in-flight instance/directory scan an ownership token. A forced scan takes ownership before refreshing the provider; the registry checks ownership within the atomic snapshot update. An older scan cannot publish or remove the newer claim. Ordinary request deduplication, instance identity checks, and the existing protection for intervening session snapshots remain in place.
Validation: a Deferred-gated regression fails against the original production source and passes with the fix. It covers both completion orders, ordinary request deduplication, separate directory scans, and instance rebuilding. The focused test passes independently. Scoped server typecheck, lint, formatting, and independent source review pass. The complete registry file passes 61 tests locally with one existing Windows EBUSY temporary-directory cleanup failure; CI runs the complete file. No client or provider was launched.
Refs #16866, reproduction 2 only. #18309 covers failed skill discovery; the client retry behavior in reproduction 3 is outside this fix.
Linux Test Server 4 on
d6d5eccpasses the completeProviderRegistry.test.tsfile (62 tests). All CI checks and CodeRabbit pass. The initial run hit an unrelated SSH zombie-process fixture failure; the retry commit has the same code tree.Implemented with GPT-6.1-Sol through the Codex harness in T3 Code.