Skip to content

T11 - client automatic era detection #249

Description

@kubinio123

Target branch: 2026-07-28-protocol-support

Requires:

A chimp client with no pinned protocol version works against 2026-07-28 servers and 2025-xx servers without configuration. Users who upgrade chimp and talk to a legacy server see no change.

Policy

  • The client has a version policy, automatic detection is the default. A fixed version, as today, is still available and skips detection.
  • With a fixed stateless version the client behaves as in T10. With a fixed legacy version it behaves as today.

Detection

  • Over HTTP the first request is server/discover. A discover result, or a recognised 2026-07-28 error such as -32022, means the server is modern. Any other outcome, including a 400, 404 or 405 whose body is not a recognised modern error, means the server is legacy.
  • Over stdio the first request is server/discover as well. A timeout also means legacy.
  • The decision never depends on one specific error code.
  • After a modern decision the client uses the stateless wire and negotiates the version on -32022 as in T10. After a legacy decision the client sends initialize with the highest legacy version chimp supports.
  • The decision is made once per client and reused for its lifetime.

Errors

  • A modern server that shares no version with chimp fails the client with an error that names both version lists.
  • A legacy server that rejects initialize fails the client as it does today.

Coverage

  • The rules above hold for the sync and streaming clients, over HTTP and stdio, on ZIO, Ox and Pekko.
  • The existing integration tests against the legacy everything server pass with the default policy and no other change.
  • Unit tests cover every row of the spec compatibility matrix that involves a chimp client: modern, legacy and dual-era client against modern and legacy servers.

Spec:

Conformance scenarios that must pass after this task: none new.

Docs: yes.

  • docs/client/protocol.md: the detection rules, what the client sends first, and how to pin a version.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions