Skip to content

5 Validation and Wire Compatibility

Wiki Keeper (Grok Bot) edited this page Oct 15, 2026 · 2 revisions

Validation and Wire Compatibility

Ingress is fail-closed: payloads must pass wire-version classification and Validate / ProtocolLimits before use. Modules: src/validation/, src/compatibility.rs, src/canonical_ser.rs.

Child pages

Ingress overview

flowchart TB
  Raw["Raw JSON bytes"] --> Decode["decode_ipc_message_json"]
  Decode --> Classify["classify / accept wire_version"]
  Classify -->|TooOld / TooNew| Reject1["EnvelopeError / CompatibilityError"]
  Classify -->|Supported or legacy unversioned as v1| Payload["Deserialize IpcMessage"]
  Payload --> Val["Validate::validate ProtocolLimits::DEFAULT"]
  Val -->|ValidationError| Reject2["Fail-closed"]
  Val -->|Ok| Ready["Ready for consumers"]
  Ready --> Canon["encode_canonical_ipc_message optional"]
Loading

WireCompatibility::CURRENT and MIN_SUPPORTED are both 1. Unversioned pre-envelope JSON is accepted as LEGACY_UNVERSIONED (1). Unknown struct fields are ignored; unknown IpcMessage variants never default.

Clone this wiki locally