Category: spec-conformance Severity: major
Location: arcp-runtime/src/main/java/dev/arcp/runtime/session/SessionLoop.java:850-854
Spec: ARCP v1.1 §8.3 (also §7.6)
What
Forwarded events are sent on the subscriber's session using the producing session's event_seq (seq), not a value allocated from the subscriber session's own eventSeq counter. §7.6 requires subscribed events appear "using the session's normal event_seq space" and §8.3 requires event_seq be session-scoped, strictly monotonic, and gap-free; a subscriber interleaving its own jobs with subscribed jobs will see non-monotonic, colliding sequence numbers.
Evidence
for (JobRecord.Subscriber sub : record.subscribers()) {
if (sub.session() != this) {
sub.session().sendJobMessage(record, Message.Type.JOB_EVENT, event, seq);
}
}
Proposed fix
When forwarding to a subscriber session, allocate the envelope's event_seq from that subscriber session's own counter (e.g., have the subscriber session call its own nextSeq()) rather than reusing the producer's seq.
Acceptance criteria
Category: spec-conformance Severity: major
Location:
arcp-runtime/src/main/java/dev/arcp/runtime/session/SessionLoop.java:850-854Spec: ARCP v1.1 §8.3 (also §7.6)
What
Forwarded events are sent on the subscriber's session using the producing session's
event_seq(seq), not a value allocated from the subscriber session's owneventSeqcounter. §7.6 requires subscribed events appear "using the session's normal event_seq space" and §8.3 requiresevent_seqbe session-scoped, strictly monotonic, and gap-free; a subscriber interleaving its own jobs with subscribed jobs will see non-monotonic, colliding sequence numbers.Evidence
Proposed fix
When forwarding to a subscriber session, allocate the envelope's
event_seqfrom that subscriber session's own counter (e.g., have the subscriber session call its ownnextSeq()) rather than reusing the producer'sseq.Acceptance criteria
event_seqvalues drawn from that session's own sequence space, interleaving correctly with the subscriber's other job events.