[Fix] API requests hang indefinitely on VS Code 1.122.0+#383
Open
roomote[bot] wants to merge 4 commits into
Open
[Fix] API requests hang indefinitely on VS Code 1.122.0+#383roomote[bot] wants to merge 4 commits into
roomote[bot] wants to merge 4 commits into
Conversation
…TH (#248) * fix: resolve ripgrep from @vscode/ripgrep-universal and the system PATH search_files and list_files threw "Could not find ripgrep binary" on VS Code Insiders, whose staged-install builds ship ripgrep as @vscode/ripgrep-universal with the binary nested under bin/<platform>-<arch>/ — a layout getBinPath did not recognize. getBinPath now also checks that layout, and falls back to ripgrep on the system PATH when no copy is found in the VS Code install (covering VS Code forks and headless/CLI hosts). * fix: drop the PATH fallback per review feedback Per #248 review (edelauna): rely only on VS Code's bundled ripgrep — the fix keeps the @vscode/ripgrep-universal/bin/<platform>-<arch>/ resolution that VS Code Insiders' staged-install builds use (the original bug) but drops the system-PATH probe. This also addresses the Copilot trust-model note at the old line 111 (a PATH-resolved rg could be user-controlled) and clears the codecov gap — the uncovered lines were the PATH helper. * fix: resolve ripgrep via @vscode/ripgrep import per review feedback Per #248 review (edelauna): replace the appRoot path-probing with an @vscode/ripgrep import. VS Code's extension host aliases @vscode/ripgrep to its own @vscode/ripgrep-universal (extHostRequireInterceptor.ts L97-101), so ripgrep resolution stays in sync with whatever VS Code ships with — including the Insiders staged-install layout — without maintaining a hardcoded path list across VS Code repackagings. getBinPath shrinks to a try/catch around await import + the .asar → .asar.unpacked substitution from VS Code's own resolver (src/vs/base/node/ripgrep.ts). - @vscode/ripgrep added as a src devDep (types only; the binary is not shipped in the VSIX). - @vscode/ripgrep added to external in src/esbuild.mjs so the require is preserved at runtime for VS Code's interceptor. - Tests cover all four branches: rgPath returned, .asar substitution applies, rgPath undefined, rgPath access throws. * revert: drop @vscode/ripgrep require attempt for now Diagnostic from a Windows VS Code stable 1.121.0 install (see #248 review thread) showed that require("@vscode/ripgrep") throws — VS Code's extHost interceptor aliases the require to @vscode/ripgrep-universal, but that package isn't installed on builds that haven't completed the package-rename migration (which includes current stable). The path-probe fallback in the diagnostic test build was what actually resolved ripgrep on that install. Reverts to the prior shape: hardcoded paths covering both the @vscode/ripgrep and @vscode/ripgrep-universal layouts under vscode.env.appRoot. Also drops the @vscode/ripgrep devDep, the esbuild external entry, the loadRipgrep wrapper file, and the tests that mocked it — all dead with the revert. VS Code's package-rename migration will be tracked in a separate issue; once it lands across stable + Insiders the require approach can be revisited with empirical evidence of which mechanism VS Code expects 3rd-party extensions to use. * docs: drop stale PATH reference from getBinPath header Per CodeRabbit's review of the revert commit: the module-level comment still listed "or on the system PATH" as a resolution source, but the PATH probe was removed two commits back. Updated to match the actual behavior (probe paths under vscode.env.appRoot only). * test: cover the asar.unpacked universal layout CodeRabbit nit on the latest commit: add explicit coverage for the node_modules.asar.unpacked/@vscode/ripgrep-universal/<plat>-<arch>/<rg> candidate path. Mirrors the existing universal-layout test but targets the .asar.unpacked variant — the exact staged-install shape that motivated the universal-layout entries in the first place. --------- Co-authored-by: 0xMink <260166390+0xMink@users.noreply.github.com>
Contributor
Author
|
No actionable issues found. See task
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Author
|
Fixed in ea7f921: restored the README |
edelauna
reviewed
May 28, 2026
Contributor
edelauna
left a comment
There was a problem hiding this comment.
Looks good, reviewed - not approving since don’t want to merge into main
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.
Related GitHub Issue
Closes: #381
Closes: #382
Description
This branch cuts
v3.55.1fromv3.55.0and ships the already-merged ripgrep fix from PR #248 so Zoo Code no longer hangs on VS Code 1.122.0+ after the@vscode/ripgrep-universalrename.It also updates the Marketplace-facing release notes for the hotfix across the localized
README.mdfiles, fixes the malformed</details>closing tag in the README language sections, and removes the unused release-image step from.roo/commands/release.mdso future release prep matches the current process.Test Procedure
mise exec -- pnpm --dir src exec vitest run services/ripgrep/__tests__/index.spec.tsrelease/v3.55.1and let the repo pre-push typecheck suite passapps/web-roo-codeis no longer present in this repository, so the task wrapper's web-app check is stale and was not runnable herePre-Submission Checklist
Screenshots / Videos
Not applicable for this extension runtime hotfix and Marketplace README/i18n follow-up.
Documentation Updates
Updated the Marketplace-facing
README.md, refreshed the localizedlocales/*/README.mdrelease notes forv3.55.1, and removed the unused release-image step from.roo/commands/release.md.Additional Notes
The branch contains the existing ripgrep fix commit from PR #248 plus the generated
v3.55.1version and changelog updates.Get in Touch
Opened via Roomote on behalf of Elliott de Launay.