Fix getExtensionVersion() and getBundledQlRoot() per review comments#82
Merged
data-douser merged 2 commits intodd/release-prep/3from Feb 24, 2026
Merged
Fix getExtensionVersion() and getBundledQlRoot() per review comments#82data-douser merged 2 commits intodd/release-prep/3from
getExtensionVersion() and getBundledQlRoot() per review comments#82data-douser merged 2 commits intodd/release-prep/3from
Conversation
Merged
Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Prep for v2.24.2 release
Fix Feb 23, 2026
getExtensionVersion() and getBundledQlRoot() per review comments
data-douser
added a commit
that referenced
this pull request
Feb 24, 2026
* Enforce release version and tag consistency * fix(release-tag): detect and replace stale tags Add a lightweight version check in the check-tag step that inspects server/package.json at the tagged commit. If the version doesn't match the release name, the stale tag is deleted and recreated with correct versions through the normal update/build/test/tag flow. Also suppress stderr on git restore --staged for paths that may not exist (.codeql, *.qlx). * Release v2.24.2-rc1: update versions to 2.24.2-rc1 * Allow codeql pack prerelease * Release v2.24.2-rc2: update versions to 2.24.2-rc2 * fix VSIX-bundled server install & version artifacts VSIX install fixes: - Skip npm install entirely when the VSIX bundle is present; the bundle already ships server/dist/, server/ql/, and server/package.json - PackInstaller now prefers bundled qlpacks from the VSIX over the npm-installed copy in globalStorage, fixing version skew between the packs being installed and the server code being run - In the unbundled fallback path (Extension Development Host), compare the npm-installed version against the extension's own version instead of short-circuiting on targetVersion === 'latest' Versioned release artifact filenames: - VSIX: codeql-development-mcp-server-vX.Y.Z.vsix (was unversioned) - CodeQL pack bundles: ql-mcp-<lang>-tools-src-vX.Y.Z.tar.gz (was unversioned) - Update release, build-and-test, and package scripts accordingly - Add *.vsix to .gitignore - Normalize docs to use vX.Y.Z placeholders consistently * Add `.md` docs for all `.ql` tools queries (#78) (#79) * Add .md docs for all tools queries (#78) Add query documentation (.md) for every `server/ql/*/tools/src/*/*.ql` query across all 9 supported languages: PrintAST, PrintCFG, CallGraphFrom, and CallGraphTo. - Add `query-documentation.test.ts` to enforce that every tools query has a matching .md file - Update `server_ql_languages_tools.instructions.md` to require query docs, clarify `@kind graph` vs detection-query guidance, and scope COMPLIANT/NON_COMPLIANT annotations to detection queries only - Remove COMPLIANT/NON_COMPLIANT annotations from existing PrintCFG docs (structural queries, not detection queries) * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nathan Randall <70299490+data-douser@users.noreply.github.com> * [UPDATE PRIMITIVE] Consistent `CallGraphFrom`/`CallGraphTo` naming in all language docs (#80) * Initial plan * Use CallGraphFrom and CallGraphTo naming consistently in all docs (no spaces) Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com> * Update server/ql/cpp/tools/src/CallGraphFrom/CallGraphFrom.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nathan Randall <70299490+data-douser@users.noreply.github.com> --------- Signed-off-by: Nathan Randall <70299490+data-douser@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> * Release v2.24.2-rc3: update versions to 2.24.2-rc3 * Fix `getExtensionVersion()` and `getBundledQlRoot()` per review comments (#82) * Initial plan * Fix getExtensionVersion() and getBundledQlRoot() per review comments Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com> * [UPDATE PRIMITIVE] Fix CallGraph docs: remove IDE integration claim, fix output format, fix NON_COMPLIANT typo (#83) --------- Signed-off-by: Nathan Randall <70299490+data-douser@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
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.
Two issues flagged in review on
extensions/vscode/src/server/server-manager.ts:getExtensionVersion()usedcontext.extension.packageJSON.version(opaque runtime API), andgetBundledQlRoot()had a docstring and log message claiming "VSIX-bundled" even when returning the monorepo dev path.📝 Update Information
Primitive Details
ServerManager(extensions/vscode/src/server/server-manager.ts)✅ ALLOWED FILES:
extensions/vscode/src/**/*.ts)extensions/vscode/test/**/*.ts)🚫 FORBIDDEN FILES: None included.
🛑 MANDATORY PR VALIDATION CHECKLIST
Update Metadata
🎯 Changes Description
Current Behavior
getExtensionVersion()readscontext.extension.packageJSON.version— depends on the VS Code extension registry being populated, fragile in test contexts.getBundledQlRoot()docstring says "VSIX-bundled" andensureInstalled()logs"Using VSIX-bundled server"even when the function returns the monorepo../../serverpath (e.g. Extension Development Host without prepublish).Updated Behavior
getExtensionVersion()readspackage.jsondirectly fromcontext.extensionUri.fsPathviareadFileSync, explicit and context-independent.getBundledQlRoot()docstring documents both resolution paths (VSIX layout and monorepo dev layout). Log message changed to"Using bundled server"to avoid misleading output in both cases.Motivation
Review feedback: runtime
context.extensionaccess was opaque and hard to test; "VSIX-bundled" label in logs/docs was actively misleading when the monorepo path was resolved.🔄 Before vs. After Comparison
Functionality Changes
API Changes
No schema changes. Internal method signatures preserved.
Output Format Changes
No output format changes.
🧪 Testing & Validation
Test Coverage Updates
readFileSyncmock added forgetExtensionVersion()and relevantensureInstalled()scenariosgetExtensionVersion()returns'unknown'on read/parse failureValidation Scenarios
getExtensionVersion()returns the correct semver string whenpackage.jsonis present; returns'unknown'gracefully on failure.try/catchingetExtensionVersion()handles missing or malformedpackage.json.Test Results
📋 Implementation Details
Files Modified
extensions/vscode/src/server/server-manager.tsextensions/vscode/test/server/server-manager.test.tsCode Changes Summary
getExtensionVersion()now catches I/O/parse failures and returns'unknown'getBundledQlRoot()docstring now accurately describes both resolution pathsDependencies
readFileSyncfrom the already-importedfsmodule🔍 Quality Improvements
Bug Fixes (if applicable)
ensureInstalled()logged"Using VSIX-bundled server"even in monorepo dev layout.getBundledQlRoot()resolved two distinct paths but was labelled/documented as if VSIX-only.Code Quality Enhancements
getBundledQlRoot()docstring documents both VSIX and monorepo resolution stepsgetExtensionVersion()no longer depends on VS Code runtime extension registryreadFileSyncis directly mockable; removed implicit dependency oncontext.extension🔗 References
Related Issues/PRs
v2.24.2release #81 review thread🚀 Compatibility & Migration
Backward Compatibility
API Evolution
👥 Review Guidelines
For Reviewers
Please verify:
getExtensionVersion()andgetBundledQlRoot()semantics unchangedreadFileSyncproperly mockedTesting Instructions
📊 Impact Assessment
Server Impact
readFileSyncat version check timeAI Assistant Impact
🔄 Deployment Strategy
Rollout Considerations
Update Methodology: This update follows best practices:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.