Skip to content

Make fast-time-server --strict serve exactly the configured protocol revisions - #10

Merged
jonpspri merged 2 commits into
mainfrom
fast-time-server-strict-mode
Jul 21, 2026
Merged

jonpspri merged 2 commits into
mainfrom
fast-time-server-strict-mode

Conversation

@jonpspri

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #9. A conformance test flagged that a server started with --protocol 2026-07-28 --strict would still accept an initialize handshake for 2025-11-25. Strict mode is now exact-set: the server serves only the revisions named with --protocol and rejects every non-conformant interaction.

Behavior change

Invocation Before After
--protocol 2026-07-28 --strict initialize for 2025-11-25 accepted (legacy still implicitly available) Pure 2026-07-28 server: all initialize calls rejected with -32602, data.supported: ["2026-07-28"]
--strict (no --protocol) 2025-11-25 only, other versions rejected Unchanged
--protocol 2025-11-25 --protocol 2026-07-28 --strict (both supported, but legacy implicit anyway) Strict dual-era: legacy handshake still accepted because 2025-11-25 was explicitly enabled
non-strict (any) 2025-11-25 implicitly available for fallback Unchanged

This also matches the draft spec's guidance that a modern-only server SHOULD name its supported versions in any error returned to an initialize request — and server/discover plus all error payloads now advertise the exact strict set rather than claiming 2025-11-25 is served when it isn't.

Verification

  • cargo test: 35/35 passing (3 new tests: strict exact-set parsing, strict dual-era parsing, reject-all-initialize in modern-only strict mode)
  • cargo clippy --all-targets: clean
  • Live smoke test: --protocol 2026-07-28 --strict rejects initialize for both 2025-11-25 and 2024-11-05 with -32602 + supported: ["2026-07-28"], while server/discover works and advertises only 2026-07-28

Commits

  • b73767b Make --strict serve exactly the configured protocol revisions
  • 2edc269 Document exact-set --strict semantics for fast-time-server

jonpspri and others added 2 commits July 21, 2026 21:29
Previously --strict only rejected initialize requests for unsupported versions, so a server started with --protocol 2026-07-28 --strict would still accept an initialize handshake for 2025-11-25. Strict mode now serves exactly the revisions named with --protocol (defaulting to 2025-11-25 when none are given): the legacy revision is no longer implicitly available, every non-conformant interaction is rejected, and initialize is refused unless 2025-11-25 was explicitly enabled. Rejections name the exact supported set, per the draft spec's guidance for modern-only servers. Non-strict behavior is unchanged: 2025-11-25 remains implicitly available for fallback.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: Jonathan Springer <jps@s390x.com>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: Jonathan Springer <jps@s390x.com>
@jonpspri
jonpspri merged commit bfb9b4d into main Jul 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant