Fix minimal default scope in extract-test-databases.sh for efficient running of client integration tests#228
Merged
data-douser merged 2 commits intomainfrom Apr 7, 2026
Conversation
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves integration-test efficiency and reliability by making CodeQL test database extraction more selective by default and by ensuring stale query interpretation outputs don’t interfere with output comparisons.
Changes:
- Added a
--scopeflag toserver/scripts/extract-test-databases.shto default to minimal extraction for client integration tests, with an option to extract all test databases. - Updated the JS integration test runner to delete any pre-existing
interpretedOutputpath before runningcodeql_query_run, avoiding stale-output comparisons. - Clarified CI workflow comments to reflect the new default extraction behavior.
Show a summary per file
| File | Description |
|---|---|
| server/scripts/extract-test-databases.sh | Adds --scope argument and changes default extraction behavior to a minimal integration-test-focused set. |
| client/src/lib/integration-test-runner.js | Removes stale interpretedOutput before codeql_query_run to make comparisons deterministic. |
| .github/workflows/client-integration-tests.yml | Comment-only clarification about extraction defaults and unit-test extraction behavior. |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 2
Contributor
There was a problem hiding this comment.
Pull request overview
This PR optimizes how CodeQL test databases are extracted for MCP integration/unit testing and improves integration-test output determinism in the client/** test runner.
Changes:
- Add a
--scopeoption toserver/scripts/extract-test-databases.sh, making “integration” (minimal) extraction the default while preserving “all” extraction. - Add pre-run cleanup of
interpretedOutputin the JSIntegrationTestRunnerto avoid stale directory/file comparisons. - Update the client integration tests GitHub Actions workflow comments to reflect the new default extraction behavior.
Show a summary per file
| File | Description |
|---|---|
server/scripts/extract-test-databases.sh |
Introduces --scope and switches the default extraction behavior to a minimal integration-focused set. |
client/src/lib/integration-test-runner.js |
Adds cleanup of stale interpretedOutput and adjusts .testproj path splitting to match fixture conventions. |
.github/workflows/client-integration-tests.yml |
Updates comments clarifying default extraction scope and unit test behavior. |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 2
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.
Closes #226.
Summary of Changes
This pull request introduces improvements to how test databases are extracted for integration and unit tests, making the process more efficient and configurable. The main change is the addition of a
--scopeoption to theextract-test-databases.shscript, allowing selective extraction of only the databases needed for integration tests by default, or all databases if desired. Additionally, the integration test runner now ensures stale output is cleaned up before running certain tests.Outline of Changes
Test database extraction improvements:
Added a
--scopeoption toserver/scripts/extract-test-databases.sh, allowing users to specify whether to extract only the databases needed for client integration tests (integration, now the default) or all test databases (all). The--languageoption now implies--scope allfor the specified language. The script's usage documentation and argument parsing were updated accordingly. [1] [2] [3] [4] [5] [6]Updated the GitHub Actions workflow (
.github/workflows/client-integration-tests.yml) to clarify in comments that only integration-scope databases are extracted by default, and that query unit tests handle their own extraction.Integration test runner reliability:
IntegrationTestRunner(client/src/lib/integration-test-runner.js) to clean up any staleinterpretedOutputdirectories before running a test, ensuring that directory comparisons only consider output from the current invocation.