Skip to content

videre-status-body: version-tag the IntentStatusUpdate envelope #548

Description

@mfw78

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working.component/sdknexum-sdk / shepherd-sdk, proc macros, cargo-nexumcomponent/wit-abiWIT packages, worlds, wit-bindgen, host/guest contracteffort/hoursFew hours. Single PR.p2-annoyingNot broken, but annoying enough to matter.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions