Fail-closed sanitization of untrusted BEAM terms into bounded Event-compatible values.
The policy must come from trusted runtime configuration. The returned outcome is created only after traversal, manifest construction, and output validation all succeed; errors never contain source values or data-derived paths.
Summary
Functions
Redacts within an optional caller-owned absolute monotonic deadline.
Functions
@spec redact(term(), atom(), Insider.Redaction.Policy.t()) :: {:ok, Insider.Redaction.Outcome.t()} | {:error, Insider.Protocol.Error.t()}
@spec redact(term(), atom(), Insider.Redaction.Policy.t(), keyword()) :: {:ok, Insider.Redaction.Outcome.t()} | {:error, Insider.Protocol.Error.t()}
Redacts within an optional caller-owned absolute monotonic deadline.
The effective deadline is the earlier of the policy duration and
:deadline_monotonic_us. The option is intended for a bounded outer
operation such as capsule assembly; it cannot extend the policy budget.