Skip to content

fix: align LS diagnostics test with org-specific config requirements#6550

Draft
acke wants to merge 1 commit intomainfrom
fix/ls-diagnostics-test-init-options
Draft

fix: align LS diagnostics test with org-specific config requirements#6550
acke wants to merge 1 commit intomainfrom
fix/ls-diagnostics-test-init-options

Conversation

@acke
Copy link
Contributor

@acke acke commented Feb 17, 2026

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Commit messages are release-note ready
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Links to automated tests covering new functionality
  • Updates relevant GitBook documentation (PR link: N/A)
  • Includes product update to be announced in the next stable release notes (N/A - test-only change)

What does this PR do?

Fixes the language-server-extension.spec.ts acceptance test that fails with Expected: > 0, Received: 0 diagnostics after the snyk-ls org-specific config changes (commit 26b18c68).

Changes:

  • Adds organization, automaticAuthentication, and authenticationMethod to the LSP initializationOptions, aligning with what the LS smoke tests provide
  • Increases the diagnostic wait from 45s to 90s to account for additional initialization steps (folder config, feature flags, MCP workflow)

Root cause: The LS now runs org resolution, folder config setup, feature flag population, and MCP config workflow during initialization. Without organization in 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.ts acceptance test shard.

Risk assessment (Low | Medium | High)?

Low — Only modifies a test file. No production code changes.

Made with Cursor

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>
@acke acke force-pushed the fix/ls-diagnostics-test-init-options branch from 3f94387 to d23aaee Compare February 17, 2026 18:32
await connection.sendRequest('initialized', {});

for (let i = 0; i < 45; i++) {
for (let i = 0; i < 90; i++) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this change, if the 90 sec timeout is not needed after setting org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant