Category: spec-conformance Severity: blocker
Location: src/Envelope/Envelope.php:30-66
Spec: ARCP v1.1 §8.1
What
§8.1 mandates each event envelope carry type, session_id, job_id, event_seq, and payload. The Envelope DTO never defines an event_seq property, EnvelopeSerializer/EnvelopeMetadataCodec never reads or writes it.
Evidence
public function __construct(
public MessageId $id,
public MessageType $payload,
public \DateTimeImmutable $timestamp,
public Priority $priority = Priority::Normal,
public ?SessionId $sessionId = null,
public ?JobId $jobId = null,
public ?StreamId $streamId = null,
public ?SubscriptionId $subscriptionId = null,
public ?TraceId $traceId = null,
...
Proposed fix
Add an eventSeq property to Envelope, allocate it from a session-scoped monotonic counter when runtime.emit() builds the envelope, and serialize as event_seq in EnvelopeMetadataCodec.
Acceptance criteria
Category: spec-conformance Severity: blocker
Location:
src/Envelope/Envelope.php:30-66Spec: ARCP v1.1 §8.1
What
§8.1 mandates each event envelope carry
type,session_id,job_id,event_seq, andpayload. The Envelope DTO never defines an event_seq property, EnvelopeSerializer/EnvelopeMetadataCodec never reads or writes it.Evidence
Proposed fix
Add an
eventSeqproperty to Envelope, allocate it from a session-scoped monotonic counter when runtime.emit() builds the envelope, and serialize asevent_seqin EnvelopeMetadataCodec.Acceptance criteria
event_seq; per-session counters are strictly monotonic.