Version: latest
agrag.history.retention.redact_stored_result
redact_stored_result(operation:str, result_json:str, marker:str, redacted_at:str | None) -> str
Remove redacted text from a serialized write result.
Event payloads become the marker and keep the redaction time. Decision text and explanations become empty, while identities and hashes stay as they were. An operation without removable text is returned unchanged.
Parameters:
- operation (
str) – The storedRequest.operationof the result. - result_json (
str) – The stored serialized result. - marker (
str) – The replacement text for a redacted event payload. - redacted_at (
str | None) – The event's redaction time, or None when no event is redacted.
Returns:
str– Serialized result safe to replay after redaction.