Skip to content

Bound pre-lifecycle bootstrap attempts in server initialization #1315

Description

@DaleSeo

Follow-up from #1248.

After #1248, serve_server stays in its bootstrap loop until a request selects a lifecycle. Malformed or unsupported requests get an error response and the loop continues. Discover probes also keep the loop open. This lets clients recover, for example after a bare tools/list without _meta. But a client can also keep the connection in the pre-lifecycle state forever by sending requests that never select a lifecycle.

Open question: should rmcp cap the number of pre-lifecycle attempts (or apply a timeout)? Or should the transport that owns the connection handle this?

Options:

  • Count rejected/bootstrap-neutral requests and return ServerInitializeError after N attempts.
  • Add a configurable bootstrap timeout.
  • Leave this to transports and document that expectation.

Activity

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

Metadata

Metadata

Assignees

Labels

P2Medium: important but non-blocking improvementT-serviceService layer changesT-transportTransport layer changesenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions