Repository navigation
fix(core): never build fff index for workspace locations - #44563
Merged
Merged
Conversation
kitlangton
enabled auto-merge (squash)
August 24, 2026 00:50
This was referenced Aug 31, 2026
jinhuang712
pushed a commit
to jinhuang712/opencode
that referenced
this pull request
Sep 26, 2026
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.
What
FileSystemSearchchose its implementation from process-local facts only (platform,location.vcs,Protected.isHome), ignoring workspace placement. For a Location withworkspaceIDset, the fff layer built an in-process native index oflocation.directoryon the server (packages/core/src/filesystem/search.ts:122-127) — an empty or foreign local directory — and served silently wrong search results while the real files live in the remote sandbox.How
layerin packages/core/src/filesystem/search.ts:184-196 now resolvesLocation.Servicefirst and forcesripgrepLayerwheneverlocation.workspaceIDis set, before the platform/option/vcs checks. Ripgrep routes through the Location environment spawner (packages/core/src/ripgrep.ts:117-118), so it is the placement-correct seam.Scope
This is the mechanical guard half of #44553 only. Until #44552 (executable identity) lands, remote ripgrep spawns can fail — this PR converts silently wrong results into an honest spawn failure, which is a strict improvement. Explicitly deferred:
Refs #44553
Testing
From
packages/core:All pass; the new test was verified to fail with the guard reverted.