Repository navigation
fix(codelldb): read raw VSIX version metadata - #1092
Conversation
Signed-off-by: gezerui0124 <gezerui1997@gmail.com>
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. |
…n root, never another install's (debugmcp#1066) Builds on d9e5136 (the raw VSIX package.json candidate). getCodeLLDBVersion still walked every install's metadata — the four vendor candidates (cwd fallback included) and the platform package — before the compiled default, so a CODELLDB_PATH binary with no metadata of its own was reported with some other copy's version, and the new package.json candidate accepted any manifest two levels above the binary (a project's own under a hand-placed or symlinked binary) and let a version.json without a `version` short-circuit to the constant. Now: realpath the resolved binary, read <root>/version.json, then <root>/package.json only when its name is vscode-lldb (the upstream manifest), and stop. A vendored copy with no readable metadata keeps the pin the vendor script fetched; any other source reports no version (null) instead of a guess. `codelldbVersion` is only rendered by the three doctor rows, so null drops the cell. Unit cases cover the vendored, CODELLDB_PATH (symlink included) and platform-package sources, each asserting no read outside the resolved root. docs/diagnostics.md says where the version is read from; the fragment credits the contributor. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… proves the bare-binary case (debugmcp#1066) doctor is invoked with --timeout 60000, the CLI kill is 90 s and each case has 120 s: the rust probe runs `cargo -vV`, which the canary has seen take over 30 s on a cold Windows runner, and the doctor's default 10 s probe budget would have timed the row out and lost the backend cell. The bundle is copied once per file (each case gets its own extraction dir), the empty-stderr assertion goes (a Node warning from the bundle is not a resolver fault), and a fourth case proves a binary whose only neighbour is someone else's package.json reports no version key at all. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…leases after 0.26.0 (debugmcp#1066) The omit-optional leg provisions the VSIX at the checkout's pin and doctor now reads that extraction's package.json, so backend.version must equal the pin — the assertion debugmcp#1066 asked for. Releases up to 0.26.0 reported the CLI's compiled default, so the check is gated on the published CLI's version being greater than 0.26.0 (dotted core compared numerically, prerelease suffix ignored) and skipped with a notice otherwise. Dry-run locally against 0.26.0, 0.26.1 and 0.27.0-beta.1 with matching and mismatching engine versions. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
debugmcpdev
left a comment
There was a problem hiding this comment.
Reviewed line by line and hardened on the branch (the attribution rule, the manifest guard, CI-sized doctor budgets, the canary assertion); the pre-push hook and all fifteen CI checks are green on the final head.
|
Thank you, @gezerui888 — a correct fix with real regression tests on both layers, and the first PR here from you. Merged. Rather than a review round-trip I took the branch over and built on your commit (it stays yours in the squash). What I added, and why:
Thanks again — the next release carries it, with the changelog line crediting you. |
📋 Description
doctor rustreports the compiled CodeLLDB version whenCODELLDB_PATHpoints to an extracted VSIX. That layout stores its version inextension/package.json.I read the selected engine's manifest after its
version.jsonand before metadata from other installations. I added resolver and built-CLI regressions for this order and the existing fallback behavior.Fixes #1066
🔄 Type of Change
✅ Checklist
🧪 Testing
I ran these checks with Node 22.23.4, Python 3.12 and JDK 21 on macOS arm64.
The unit suite passed 8,094 tests. The existing
DartAdapterFactory default ioSDK-discovery test timed out on both this branch and clean main. Both runs skipped the same three tests. Main passed 8,086 tests.Integration passed 121 tests, compared with 118 on main. Both runs skipped the same nine tests. The raw-VSIX CLI regression failed on main and passed after the fix. Lint, type checks, clean build, documentation, path and changelog checks passed.
cc @debugmcpdev