Logs need enough evidence to diagnose a failure without becoming another copy of the sensitive input. Secrets can appear in nested records, lists or differently capitalized keys. Apply a recursive policy and preserve safe identifiers and counters so the resulting trace remains useful.
Return a copy of case.trace with any key named token, secret or customer_email replaced by [redacted], at every nested dictionary depth and inside lists. Preserve identifiers, counters and other values. Key matching is case-insensitive.
The notebook executes your Python against an original local mock. Use the supplied case rather than copying visible values. The hidden checks change identities, revisions and boundary inputs; no provider endpoint or external tool is contacted.
An example implementation of the function contract.