fix(server): serve draft-version requests statelessly per SEP-2567 (#999)

* fix(server): serve draft-version requests statelessly per SEP-2567

* refactor: address PR feedback

* refactor!: rename stateful_mode to legacy_session_mode

* fix: address PR feedback
This commit is contained in:
Alex Hancock 2026-07-20 14:51:50 -04:00 • committed by GitHub
commit a5bb51c9d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,7 +14,7 @@ use common::calculator::Calculator;
async fn test_priming_on_stream_start() -> anyhow::Result<()> {
let ct = CancellationToken::new();
// stateful_mode: true automatically enables priming with DEFAULT_RETRY_INTERVAL (3 seconds)
// legacy_session_mode: true automatically enables priming with DEFAULT_RETRY_INTERVAL (3 seconds)
let service: StreamableHttpService<Calculator, LocalSessionManager> =
StreamableHttpService::new(
|| Ok(Calculator::new()),
@ -416,7 +416,7 @@ async fn test_priming_on_stream_close() -> anyhow::Result<()> {
let ct = CancellationToken::new();
let session_manager = Arc::new(LocalSessionManager::default());
// stateful_mode: true automatically enables priming with DEFAULT_RETRY_INTERVAL (3 seconds)
// legacy_session_mode: true automatically enables priming with DEFAULT_RETRY_INTERVAL (3 seconds)
let service = StreamableHttpService::new(
|| Ok(Calculator::new()),
session_manager.clone(),