From review of #520. Target: videre-status-body (L2). Confirmed still valid.
IntentStatusUpdate::encode / decode carry no version tag, unlike the StatusBody codec they wrap, which leads with a version byte and fails closed on an unknown tag.
Before #520 this envelope was a native nexum:host WIT record, so a host/guest skew was caught by the component model's ABI schema check at instantiation. #520 replaces it with a borsh struct crossing the custom event as opaque bytes. That is the right layering move, but it trades a fail-closed check for a silent one: a host and guest disagreeing on the envelope shape now misdecodes into plausible-looking values instead of refusing.
Proposal
Give the envelope the same leading version tag its inner StatusBody already uses, and reject unknown tags on decode. Keep the two versions independent: the envelope tag describes the venue/receipt/status framing, the inner tag describes the status payload.
Acceptance criteria
IntentStatusUpdate::encode writes a version tag; decode refuses an unknown one rather than misparsing.
- A skew test proves an envelope written with a future tag fails closed.
- The inner
StatusBody codec is unchanged.
IntentStatusUpdate::encode/decodecarry no version tag, unlike theStatusBodycodec they wrap, which leads with a version byte and fails closed on an unknown tag.Before #520 this envelope was a native
nexum:hostWIT record, so a host/guest skew was caught by the component model's ABI schema check at instantiation. #520 replaces it with a borsh struct crossing thecustomevent as opaque bytes. That is the right layering move, but it trades a fail-closed check for a silent one: a host and guest disagreeing on the envelope shape now misdecodes into plausible-looking values instead of refusing.Proposal
Give the envelope the same leading version tag its inner
StatusBodyalready uses, and reject unknown tags on decode. Keep the two versions independent: the envelope tag describes thevenue/receipt/statusframing, the inner tag describes the status payload.Acceptance criteria
IntentStatusUpdate::encodewrites a version tag;decoderefuses an unknown one rather than misparsing.StatusBodycodec is unchanged.