Skip to content

Un-quarantine pre-existing failing tests (CI stabilization) #10

Open

Description

@SWSAmor

Summary

When the dead test-file imports were repaired (PR #9 / #8), ~25 previously-dead test
files began running again. Most pass, but a set of pre-existing, import-unrelated
failures became visible. To restore a green CI baseline (so future regressions are
detectable), these tests are temporarily quarantined with it.skip / describe.skip
and a // TODO(#<this issue>) marker. This issue tracks un-quarantining them.

None of these are caused by the import repair — they are pre-existing test↔code drift,
tests that call live external APIs, timing/concurrency flakiness, and timeouts.

Quarantined tests by file and root cause

tests/cli/wizard.test.ts (28) — test↔code drift

The wizard was refactored (new config defaults e.g. proxyPort 3333 vs expected 3000,
changed prompt structure — to have property "validate", reworked language-selection
flow — Language selection cancelled by user) but the tests were not updated.
Fix: rewrite expectations/mocks against current wizard behavior.

tests/sampling-executor-integration.test.ts (8) — live external API

Tests issue real provider calls with a fake key → 401 Incorrect API key. Need provider
mocking (or a documented live-credential gate), not real network calls in CI.

tests/cli/mcp-discovery.test.ts (up to 9) — fs-mock / timeout

scanToolConfig / discoverMCPServers tests hang to 30s timeout under mocked fs.

tests/security/sampling-attacks.test.ts (8) — CI-flaky (concurrency/timing)

Passes locally, fails in CI — concurrency/timing-sensitive. Stabilize before un-skipping.

tests/cli/wrapper-generator.test.ts (1)

should_returnFailureResult_when_templateFileMissing — assertion drift (true vs false).

tests/sampling-bridge-server.test.ts (1)

should_return503_when_streamingWithoutProvider — expects 503, gets 400 (behavior drift).

Acceptance criteria

  • Each quarantined test fixed or deliberately removed, .skip markers gone.
  • CI green without skips for these files.

Activity

  1. SWSAmor commented on Jun 23, 2026

    @SWSAmor
    OwnerAuthor

    Root cause for the security/sampling-attacks.test.ts entry: it imports src/index, whose top-level entry IIFE (command dispatch → server.start()) runs at import time and calls process.exit(1) on a startup error. In CI (no config) this fires asynchronously and vitest reports it as an unhandled error, aborting the whole run regardless of test outcomes. it.skip/describe.skip do not help because the import still executes.

    Quarantine for this file is therefore a vitest.config exclude (the file never loads), not an in-file skip.

    Proper fix (to un-quarantine): guard the entry IIFE in src/index.ts so it only runs when executed as the binary entry point (e.g. import.meta.main), not when imported as a module. Then re-enable the file.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions