Repository navigation
fix(kap-server): search all workspace source folders - #4511
Conversation
|
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
Requirement or Bug
Fix workspace file search and completion so they include every registered source folder in multi-folder projects.
Related review discussion: #4336 (comment)
Bug Reproduction Steps
POST /api/v1/workspace/fs:suggestorPOST /api/v1/workspace/fs:search.Root Cause
resolveWorkspaceFsresolved the workspace metadata but constructed the filesystem scope with onlyws.root. The downstreamWorkspaceFsServicealready supports merging multiple roots, but never receivedws.additionalDirs.This is a fundamental fix: the resolver now passes the current registered
root + additionalDirssnapshot through the existing acquire, runtime mapping, and lease-release path. No request or response schema changes are introduced.Code Changes
WorkspaceFsService.Behavior Changes and Affected Users
fs:suggestandfs:searchfs:searchresolved by workspace referencefs:listPOST /fs:suggestTest coverage:
pnpm --filter @moonshot-ai/kap-server exec vitest run test/fs.test.ts: 65 passed, including the four new regression tests. All four failed before the production fix and passed afterward.pnpm --filter @moonshot-ai/kap-server run typecheck: passed.pnpm --filter @moonshot-ai/kap-server run build: passed.pnpm lint: passed with 0 errors.pnpm test: 17,915 tests passed and 3 unrelated tests failed. Two failures passed when rerun in isolation.agent-core-v2/test/tool/tool.test.ts>returns the spawned agent id when a foreground subagent times outstill timed out independently; this PR does not modify that module.Checklist
gen-changesetsskill; no changeset was added at the author's explicit request.