Cassette Modes
Canonical JSON & Fingerprinting
To guarantee identical fingerprints in TypeScript and Python:- Requests are scrubbed before hashing.
- Envelopes are serialized using JCS-aligned canonical JSON (UTF-16 code unit key order,
-0normalized to0,undefinedomitted in objects /nullin arrays,mcp.idexcluded). - Lowercase hex SHA-256 of the canonical UTF-8 envelope becomes
interaction.fingerprint.
7-Step Deterministic Scrubber
Executed identically in TypeScript (packages/core/src/scrub.ts) and Python (python/evalvcr/src/evalvcr/scrub.py):
- Sensitive Headers ->
[REDACTED:SECRET](authorization,proxy-authorization,x-api-key,api-key,anthropic-api-key,openai-api-key,cookie,set-cookie,x-auth-token) - PEM Private Keys ->
[REDACTED:SECRET] - Database Connection Strings -> preserves scheme/user/
@, replaces password with[REDACTED:SECRET] - Bearer & API Tokens (
Bearer,sk-ant-,sk-,ghp_,github_pat_,AKIA,AIza) ->[REDACTED:SECRET] - US SSNs ->
[REDACTED:PII] - Payment Cards (Luhn-validated) ->
[REDACTED:PII] - Email Addresses ->
[REDACTED:PII]