Skip to content

Isolate Slack bot offline test startup from unrelated discovery #2871

Closed

Description

@jbeda

Problem

The Slack bot example's offline bridge test can time out while waiting for mecated --mock to become ready. Its fixture leaves unrelated default-on discovery enabled, consuming startup budget and making the test dependent on the runner environment.

Observed during #2841:

  • Failed attempt: bridge.test.ts > answers a prompt with the mock provider's canned reply failed with timed out waiting for mecated readiness.
  • Rerun passed; the test step took approximately four seconds.
  • The failure log shows ToolHive discovery spending five seconds before reporting that no container runtime was available—half the harness's 10-second readiness budget.

A sample of 100 recent CI runs, spanning approximately 25 hours and including earlier job attempts, contained 86 completed, non-cancelled Slack-job attempts: 84 passed, one readiness timeout, and one unrelated Docker/package-manager failure after the tests passed. This is a short observational sample, not a long-term flake-rate estimate.

Proposed change

In sdk/typescript/examples/slack-bot/test/harness.ts, explicitly disable unrelated capabilities when spawning the offline daemon:

  • --toolhive=false
  • --websearch=off

Keep the real daemon and existing bridge/session/approval assertions. These tests do not exercise ToolHive discovery or outbound search.

Initially retain the 10-second readiness deadline (waitForReady); increasing Vitest's 60-second test timeout or the CI job's 15-minute timeout would not address this failure. If readiness still flakes after isolation, collect startup-phase timings before deciding whether a modest readiness-timeout increase is warranted.

Investigation caveat

The exact stall after discovery is not established. The final captured startup message enabled anonymous Exa WebSearch, but constructing that provider makes no network request; that message is not evidence that Exa caused the timeout. Disabling search makes the offline boundary explicit, rather than claiming to fix a proven Exa startup delay.

Acceptance

  • The offline fixture disables unrelated discovery/search without weakening the bridge and approval behavior under test.
  • Focused repeated runs of the Slack bot bridge suite pass, with startup diagnostics confirming the intended disabled capabilities.
  • The readiness deadline remains bounded; any increase is supported by measured legitimate startup latency rather than applied as a blanket test-timeout bump.

This concerns spawned-daemon startup in the test fixture, not the Slack Socket Mode readiness/health feature tracked in #1191.

Activity

  1. self-assigned this
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions