The runtime advertises resume support and sends a freshly minted resume token in session.welcome, but the token is never stored in the server's _resumeTokens map. ArcpServer.TryResume can only succeed when _resumeTokens contains the supplied token, so every reconnect with a valid-looking token misses the lookup and the new SessionState replays from its own empty EventLog. This contradicts the resume guide and conformance page, which both describe gap-free window-bounded replay.
The relevant locations are src/Arcp.Runtime/SessionState.Handshake.cs:22, src/Arcp.Runtime/SessionState.Handshake.cs:24, src/Arcp.Runtime/ArcpServer.cs:25, and src/Arcp.Runtime/ArcpServer.cs:100.
Fix prompt: Implement server-side resume token registration and rotation for SessionState. Add an internal method on ArcpServer that associates the active SessionId with the newly minted ResumeToken, removes the previous token for that session when rotating, and enforces ResumeWindowSec. Update TryResume so it restores the existing session state needed for replay rather than only copying the session id into a new empty session. Add integration tests that submit a job, capture ResumeToken and LastReceivedSeq, reconnect with SessionHelloPayload.ResumeToken and LastEventSeq, and verify missed events replay gap-free; also test expired or unknown tokens return RESUME_WINDOW_EXPIRED or an appropriate session error.
The runtime advertises resume support and sends a freshly minted resume token in
session.welcome, but the token is never stored in the server's_resumeTokensmap.ArcpServer.TryResumecan only succeed when_resumeTokenscontains the supplied token, so every reconnect with a valid-looking token misses the lookup and the newSessionStatereplays from its own emptyEventLog. This contradicts the resume guide and conformance page, which both describe gap-free window-bounded replay.The relevant locations are
src/Arcp.Runtime/SessionState.Handshake.cs:22,src/Arcp.Runtime/SessionState.Handshake.cs:24,src/Arcp.Runtime/ArcpServer.cs:25, andsrc/Arcp.Runtime/ArcpServer.cs:100.Fix prompt: Implement server-side resume token registration and rotation for
SessionState. Add an internal method onArcpServerthat associates the activeSessionIdwith the newly mintedResumeToken, removes the previous token for that session when rotating, and enforcesResumeWindowSec. UpdateTryResumeso it restores the existing session state needed for replay rather than only copying the session id into a new empty session. Add integration tests that submit a job, captureResumeTokenandLastReceivedSeq, reconnect withSessionHelloPayload.ResumeTokenandLastEventSeq, and verify missed events replay gap-free; also test expired or unknown tokens returnRESUME_WINDOW_EXPIREDor an appropriate session error.