fix: align LS diagnostics test with org-specific config requirements#6550
Draft
fix: align LS diagnostics test with org-specific config requirements#6550
Conversation
The language server now requires `organization`, `authenticationMethod`, and `automaticAuthentication` in initializationOptions for proper initialization (introduced by snyk-ls org-specific config changes). Without these, the LS attempts org resolution via API calls that timeout in CI, preventing scans from starting within the wait window. Also increases the diagnostic wait from 45s to 90s to account for additional initialization steps (folder config, feature flags, MCP workflow) that now run before the scan starts. Co-authored-by: Cursor <cursoragent@cursor.com>
3f94387 to
d23aaee
Compare
acke
commented
Feb 17, 2026
| await connection.sendRequest('initialized', {}); | ||
|
|
||
| for (let i = 0; i < 45; i++) { | ||
| for (let i = 0; i < 90; i++) { |
Contributor
Author
There was a problem hiding this comment.
Revert this change, if the 90 sec timeout is not needed after setting org.
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.
Pull Request Submission Checklist
What does this PR do?
Fixes the
language-server-extension.spec.tsacceptance test that fails withExpected: > 0, Received: 0diagnostics after the snyk-ls org-specific config changes (commit26b18c68).Changes:
organization,automaticAuthentication, andauthenticationMethodto the LSPinitializationOptions, aligning with what the LS smoke tests provideRoot cause: The LS now runs org resolution, folder config setup, feature flag population, and MCP config workflow during initialization. Without
organizationin the init options, the LS attempts API-based org resolution that times out in CI, preventing scans from starting within the 45s window.Where should the reviewer start?
test/jest/acceptance/language-server-extension.spec.ts— the only changed file.How should this be manually tested?
This is a test-only change. CI should validate it by running the
language-server-extension.spec.tsacceptance test shard.Risk assessment (Low | Medium | High)?
Low — Only modifies a test file. No production code changes.
Made with Cursor