Category: spec-conformance Severity: minor
Location: src/Arcp.Client/ArcpClient.Dispatch.cs:19-23
Spec: ARCP v1.1 §8.3
What
The client overwrites _lastReceivedSeq with each received event_seq but never checks that the new seq is the expected successor. Spec §8.3 says a client that receives an unexpected gap SHOULD treat the session as broken and attempt resume; this client silently accepts gaps.
Evidence
await foreach (var env in _transport.ReceiveAsync(cancellationToken).ConfigureAwait(false))
{
if (env.EventSeq is { } seq) Interlocked.Exchange(ref _lastReceivedSeq, seq);
await DispatchAsync(env, cancellationToken).ConfigureAwait(false);
}
Proposed fix
Compare each incoming event_seq to the last seen value; on an unexpected gap, surface the condition (and, once resume is wired, attempt resume) rather than continuing as if the stream were intact.
Acceptance criteria
Category: spec-conformance Severity: minor
Location:
src/Arcp.Client/ArcpClient.Dispatch.cs:19-23Spec: ARCP v1.1 §8.3
What
The client overwrites _lastReceivedSeq with each received event_seq but never checks that the new seq is the expected successor. Spec §8.3 says a client that receives an unexpected gap SHOULD treat the session as broken and attempt resume; this client silently accepts gaps.
Evidence
Proposed fix
Compare each incoming event_seq to the last seen value; on an unexpected gap, surface the condition (and, once resume is wired, attempt resume) rather than continuing as if the stream were intact.
Acceptance criteria