You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Replace global cassette-filters.mjs registry with per-scenario cassette-filter.mjs
files; cassette-preload.mjs now dynamically imports them from the scenario dir
- Default redact to 'paranoid' in seinfeld recorder (was opt-in)
- Gate provider key placeholder injection on replay mode only (not record/passthrough)
- Delete obsolete cassette-filters.mjs and record-cassettes.mjs helper scripts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: dev-packages/seinfeld/README.md
+2-10Lines changed: 2 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,24 +5,16 @@ Generic VCR/cassette library for Node.js, built on [MSW](https://mswjs.io). Reco
5
5
## Features
6
6
7
7
-**Normalizers** (always-on, lossy) transform requests before matching. They strip volatile fields like `Authorization` headers, dynamic IDs (`experimental_generateMessageId`), or query nonces so two structurally-identical requests still match across runs. Their output is internal — never serialized.
8
-
-**Redactors**(opt-in) transform what gets persisted to disk. They mask credentials before the cassette hits version control. Disabled by default; cassettes contain the real on-the-wire bytes unless you opt in.
8
+
-**Redactors** transform what gets persisted to disk. They mask credentials before the cassette hits version control. The `'paranoid'` preset is applied by default; pass `redact: []` to disable.
9
9
10
10
## Security note
11
11
12
-
> **Cassettes contain real request and response bytes by default, including `Authorization` headers.** This is the safer default for fidelity (downstream consumers see real responses) but it means you must either (a) enable redaction, (b) write a custom `RedactionConfig`, or (c) add cassette files to `.gitignore` if they may contain credentials.
13
-
14
-
Three body-redaction gaps are worth knowing:
12
+
Three body-redaction gaps are worth knowing even with the default `'paranoid'` preset:
15
13
16
14
1.**Non-canonical content-type** — some servers return JSON with `Content-Type: text/plain`. `redactBodyFields` covers this because seinfeld attempts to parse `text` bodies as JSON before masking.
`'paranoid'` redacts credential headers, common credential field names at any JSON depth (`apiKey`, `token`, `secret`, `password`, `authorization`), and Bearer / `sk-` style tokens in text bodies.
27
19
28
20
To detect misconfigurations at record time, add `strict: true`:
pnpm --filter=@braintrust/js-e2e-tests run test:e2e:hermetic
179
179
```
180
180
181
-
If a scenario records but later replay fails because of volatile fields in the request body (e.g. AI-SDK's generated message ids), add or update the filter for that scenario in `e2e/helpers/cassette-filters.mjs`, then re-record.
181
+
If a scenario records but later replay fails because of volatile fields in the request body (e.g. AI-SDK's generated message ids), add or update `<scenario-dir>/cassette-filter.mjs` for that scenario, then re-record.
0 commit comments