IDE companion discovery: switch to ~/.qwen/ide lock files#1257
Merged
tanzhenxin merged 5 commits intomainfrom Dec 19, 2025
Merged
IDE companion discovery: switch to ~/.qwen/ide lock files#1257tanzhenxin merged 5 commits intomainfrom
tanzhenxin merged 5 commits intomainfrom
Conversation
Contributor
📋 Review SummaryThis PR introduces significant improvements to IDE companion discovery and security by migrating from temporary port files to lock files in 🔍 General Feedback
🎯 Specific Feedback🟡 High
🟢 Medium
🔵 Low
✅ Highlights
|
Contributor
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
dletterio1
pushed a commit
to dletterio1/qwen-code
that referenced
this pull request
Jan 12, 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.
Summary
This PR updates IDE integration discovery and security:
~/.qwen/ide/.QWEN_CODE_IDE_SERVER_PORT(when present) and otherwise select the best matching lock file for the current workspace.Authorization: Bearer <token>on every request, matching the IDE companion spec.What changed
Docs
${PID}-${PORT}.lock) and the selection/tie-break rules.Core (
packages/core)Storage.getGlobalIdeDir()to centralize the global IDE dir (~/.qwen/ide).IdeClientto:~/.qwen/ide/<pid>-<envPort>.lockwhenQWEN_CODE_IDE_SERVER_PORTis set.~/.qwen/ide/<pid>-*.lock, parse JSON, sort by mtime, and select a config whoseworkspacePathmatches the CLI cwd.os.tmpdir()/qwen-code-ide-server-<pid>.json).VS Code companion (
packages/vscode-ide-companion)~/.qwen/ide/${process.ppid}-${port}.lockwith{ port, workspacePath, ppid, authToken }.Authorizationheader on all/mcprequests; rejects missing/malformed/invalid tokens with 401.Tests / formatting
Why
~/.qwen/ideare stable and workspace-aware, improving correctness when multiple IDE windows/servers exist.How to test
~/.qwen/ide/<ppid>-<port>.lock.Notes
Authorizationwill now be rejected as intended by the spec.