You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a project folder held more than one .code-workspace file, the scan used only the first in name order. A malformed one, or one with no folders list, hid the folders listed by a valid workspace file after it from the import suggestions in Settings → Projects. The scan now tries each workspace file in order and uses the first that lists folders. It reads only regular files, so a named pipe with that extension cannot hang the scan.
Commit 5fba3ea40a (main). The valid workspace file's folder never appears among the import suggestions. Expected: The sibling folder listed by the valid workspace file is available to add.
Create a local project with a valid b-team.code-workspace file that lists an existing sibling folder.
Add a malformed a-old.code-workspace file in the same project folder.
Open Settings → Projects → Repositories for the project.
The cause is at apps/server/src/workspace/WorkspaceFolders.ts:251. Ran pnpm scenarios:prove scripts/scenarios/workspace-import-skips-unreadable-workspace.e2e.ts --target web with the repro scenario added: it failed in 2 of 2 runs on a clean boat.dev VM, with expect.toBeVisible failed in the output.
Evidence
Environment: The web app in Chromium on Linux x64, a fresh checkout on a boat.dev VM reset before each run.
772ea07254 adds the failing test, alone, before the fix.
pnpm exec vp run check:changed 17a92a4adf41484342d488ae6c1d0e6c3927fb03 passed on head.
Not in this change
When several workspace files are valid, only the first in name order is still used; merging their folders is a separate product choice.
The regular-file check runs before the read, so a file swapped for a pipe between the two could still block; closing that gap needs a nonblocking open in the shared file system service.
The web client's Repositories list was not changed; it already shows whichever workspace file the server reports.
Who did the work
Repro written by GPT 6.2 Sol, in Codex
Duplicate check judged by Claude Opus 5.5, in Claude Code
Written by Claude Opus 5.5, in Claude Code
Reviewed by Claude Opus 5.5, in Claude Code, and by GPT 6.2 Sol, in Codex
Reproduction, checks and proof run by a program on base and head, not by an agent
Made in T3 Code by Claude Opus 5.5 and GPT 6.2 Sol
Macroscope's review found this PR approvable — Workspace scanning now skips unreadable or malformed workspace files and uses the first valid candidate, while avoiding reads from non-regular files. Existing discovery boundaries and folder filtering remain unchanged.
You can add or adjust custom eligibility rules. Learn more.
Reviewing files that changed from the base of the PR and between d5afdf2 and 68053a0.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
Workspace scanning now requires a folders array and tries sorted .code-workspace candidates until it finds one that can be read and decoded. Unit and end-to-end tests cover malformed files, settings-only files, and a FIFO candidate.
Changes: Workspace scan
Layer / File(s)
Summary
Validate and select workspace files apps/server/src/workspace/WorkspaceFolders.ts, apps/server/src/workspace/WorkspaceFolders.test.ts, scripts/scenarios/workspace-import-skips-unreadable-workspace.e2e.ts
The workspace schema requires a folders array. The scan skips candidates that cannot be read or decoded and reports the first successfully decoded file. Tests cover malformed, settings-only, and FIFO candidates before a valid workspace file. The end-to-end scenario checks that the shared-docs option is visible.
Issue 43374: This change addresses a scan hang caused by a named pipe with a .code-workspace extension. It does not address blocking directory reads or the home-directory root case.
Suggested reviewers:saphid
Merge Risk: Minimal · previous review d5afd
This change lets workspace import suggestions skip a broken workspace file and use a later valid one. No merge-blocking risk is evident.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: a broken workspace file no longer hides imports from a valid one. It follows conventional commit form and matches the changeset, which makes the scan try each .code-wo…
Description check
The description covers the problem, the change, the scope (a bug fix, linked to related issue #48738), and detailed verification with reproduction steps, before/after results, and test notes. It also …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a broken workspace file no longer hides imports from a valid one. It follows conventional commit form and matches the changeset, which makes the scan try each .code-workspace file in order and use the first that lists folders.
Full details: Description check
Explanation
The description covers the problem, the change, the scope (a bug fix, linked to related issue #48738), and detailed verification with reproduction steps, before/after results, and test notes. It also lists out-of-scope items and authorship. The Scope section links only a related issue, not a clear bug issue, so it is slightly weaker there, but the template is mostly complete.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Create four fresh projects, each with b-team.code-workspace listing the existing sibling ../shared as "Shared docs". Leave the control with only that workspace file; add an earlier a-old.code-workspace containing malformed JSON to the second, {"settings":{}} to the third, and a real mkfifo named pipe to the fourth. Open Settings → Projects, select each project, scroll to Repositories, and check for "Add Shared docs to the project". Capture each result. Release the base FIFO only after capturing, for teardown.
Real Linux web app, 1280×800, light theme; identical scenario and fresh server databases on both commits. Fixture path prefixes are redacted in the DOM for public captures; import labels, controls, and scan behavior are unchanged.
The valid-only control works on both commits. Base omits Shared docs in all three bad cases; head offers it in all three. Base's FIFO scan also produces a “Some requests are slow” notice.
The scenario comparison exited 0: failsOnBase=true, passesOnHead=true.
Not shown:
The four-reload libuv threadpool exhaustion and cross-project “Unavailable project” cascade were not exercised; this comparison used one FIFO project scan and captured its missing suggestion and slow-request notice on base.
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
size:M30-99 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
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 a project folder held more than one
.code-workspacefile, the scan used only the first in name order. A malformed one, or one with nofolderslist, hid the folders listed by a valid workspace file after it from the import suggestions in Settings → Projects. The scan now tries each workspace file in order and uses the first that lists folders. It reads only regular files, so a named pipe with that extension cannot hang the scan.Related: #48738
Reproduction on main
Commit 5fba3ea40a (main). The valid workspace file's folder never appears among the import suggestions. Expected: The sibling folder listed by the valid workspace file is available to add.
The cause is at
apps/server/src/workspace/WorkspaceFolders.ts:251. Ranpnpm scenarios:prove scripts/scenarios/workspace-import-skips-unreadable-workspace.e2e.ts --target webwith the repro scenario added: it failed in 2 of 2 runs on a clean boat.dev VM, withexpect.toBeVisible failedin the output.Evidence
Environment: The web app in Chromium on Linux x64, a fresh checkout on a boat.dev VM reset before each run.
Proven: the repro fails at the test commit 772ea07254 and passes on the head d5afdf2b67, both on main 17a92a4adf.
The valid workspace file's folder never appears among the import suggestions.
The sibling folder listed by the valid workspace file is available to add.
Tests
pnpm exec vp run check:changed 17a92a4adf41484342d488ae6c1d0e6c3927fb03passed on head.Not in this change
Who did the work
Made in T3 Code by Claude Opus 5.5 and GPT 6.2 Sol