pub fn parse_lifecycle_request(
raw: &Value,
) -> Result<(LifecycleEvent, Value), AcdpError>Expand description
Validate a raw lifecycle request body against the closed
{"event": {…}} envelope (RFC-ACDP-0013 §6 step 2) and parse the
event through the closed §4 schema.
Returns the parsed event together with the RAW event JSON — signature
verification must hash the event exactly as received
(LifecycleEvent::preimage_hash_of_value), never a re-serialization.
Errors:
AcdpError::ImmutableField— the envelope carries abodymember or a member named after a body field (fixturelc-002scenarios A/B). Checked before the generic closed-shape rejection so the category error wins.AcdpError::SchemaViolation— any other unknown envelope member, a missing/non-objectevent, or an event violating the closed §4 schema (including an unsigned producer event’s later checks — see the server’s endpoint pipeline).