Skip to content

server-stateless: 500 ms whole-request deadline in no-log-without-loglevel reports slow servers as failures #530

Description

@birbprophet

sep-2575-server-no-log-without-loglevel gives listenToStream a 500 ms budget for the whole request (stateless.ts#L947-L952). The AbortController covers connecting, the server's handler, and reading the frames. When the deadline passes, the helper swallows the abort and returns []. The check then reports the FAILURE Logging target endpoint context dropped or failed to yield frame structures, so a slow but correct server looks broken.

Other listenToStream calls in this scenario allow 800 to 1500 ms, and the helper defaults to 1000 ms. The CLI has no option to raise the budget.

What we see. We run conformance server --scenario server-stateless in our local test gate. The target is a Cloudflare Workers dev server reached through a loopback proxy. At a load average of about 60, the proxy timed 58 scenario requests to response headers: median 137 ms, p90 278 ms, max 512 ms. The test_logging_tool call took 105 ms that run. With more CPU contention (several test runs sharing a laptop), that call sometimes takes over 500 ms. The check then fails, and the same server passes on a rerun.

Suggested fix (any of these):

  • Use the helper's 1000 ms default here, as the neighboring checks do, or
  • report an aborted request as inconclusive, e.g. untestable, and not as a server failure, or
  • expose a CLI option such as --timeout <ms> for stream waits.

Version: @modelcontextprotocol/conformance@0.2.0-alpha.11. The same code is on main at 7169291.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions