Skip to main content

Module validate

Module validate 

Source
Expand description

Envelope validation. Runs before every other export so no later stage has to re-check field shape.

Constants§

BLOB_REF_PREFIX
Prefix of an offloaded payload reference.
RANDOM_HEX_LEN
random is 32 lowercase hex chars of journaled entropy.

Functions§

is_random_hex
Whether value is exactly RANDOM_HEX_LEN lowercase hex chars.
optional_payload_value
Like payload_value but distinguishes “absent” from “present and null”.
payload_value
The payload as a value. payload_ref must be resolved by the host before the kernel sees it, because a reducer event carries the value, not the pointer.
validate_event
Field/enum checks plus the inline payload limit. Returns the normalized event; the kernel keeps payloads byte-exact, so normalization is currently a no-op clone that exists so the host has one place to adopt future coercions.