pub fn extract_payload(
comment_body: &str,
) -> Result<RecordPayload, PayloadError>Expand description
Extract the structured lifecycle payload carried inside comment_body.
- Returns
Ok(payload)on a single well-formed hidden carrier or olderplan-issue-record-payloadfence whose envelopeschemamatchesPAYLOAD_SCHEMA_V2. The older fence support is carrier-level support for current v2 records; it is not a future old-schema reader contract. - Returns
Err(NoFence)when the comment does not contain either payload carrier. - Returns
Err(MultipleFences)when multiple payload carriers are present; each comment carries at most one payload. - Returns
Err(SchemaMismatch)when the payload parses but itsschemadoes not match the v2 wire identity. - Returns
Err(InvalidJson)when the payload body is not valid JSON or does not deserialize into the envelope.