SubscribeAsync exposes history and fromEventSeq, and the README describes optional history replay for subscriptions, but SessionState.HandleSubscribeAsync only acknowledges the subscription. The method sets Replayed = sub.History in the response without actually replaying prior events, and the inline comment states that history replay is not implemented. A subscriber that requests history can therefore believe replay happened while receiving only future live events.
The relevant locations are src/Arcp.Client/ArcpClient.Subscriptions.cs:12, src/Arcp.Client/ArcpClient.Subscriptions.cs:22, src/Arcp.Runtime/SessionState.Jobs.cs:90, src/Arcp.Runtime/SessionState.Jobs.cs:98, and README.md:216.
Fix prompt: Implement subscription history replay or change the public contract so it does not claim support. The implementation should retain per-job event history or index session event logs by job id, honor JobSubscribePayload.History and FromEventSeq, send matching buffered job.event envelopes before live events, and set JobSubscribedPayload.Replayed only when replay was actually attempted. Add an integration test where a job emits events before a second session subscribes with history: true, then assert the subscriber receives the buffered events in sequence before live events.
SubscribeAsyncexposeshistoryandfromEventSeq, and the README describes optional history replay for subscriptions, butSessionState.HandleSubscribeAsynconly acknowledges the subscription. The method setsReplayed = sub.Historyin the response without actually replaying prior events, and the inline comment states that history replay is not implemented. A subscriber that requests history can therefore believe replay happened while receiving only future live events.The relevant locations are
src/Arcp.Client/ArcpClient.Subscriptions.cs:12,src/Arcp.Client/ArcpClient.Subscriptions.cs:22,src/Arcp.Runtime/SessionState.Jobs.cs:90,src/Arcp.Runtime/SessionState.Jobs.cs:98, andREADME.md:216.Fix prompt: Implement subscription history replay or change the public contract so it does not claim support. The implementation should retain per-job event history or index session event logs by job id, honor
JobSubscribePayload.HistoryandFromEventSeq, send matching bufferedjob.eventenvelopes before live events, and setJobSubscribedPayload.Replayedonly when replay was actually attempted. Add an integration test where a job emits events before a second session subscribes withhistory: true, then assert the subscriber receives the buffered events in sequence before live events.