Skip to content

chore(e2e): follow-up fixes for PR #1920 review feedback#1959

Open
Stephen Belanger (Qard) wants to merge 3 commits intomainfrom
t3code/e2e-followup
Open

chore(e2e): follow-up fixes for PR #1920 review feedback#1959
Stephen Belanger (Qard) wants to merge 3 commits intomainfrom
t3code/e2e-followup

Conversation

@Qard
Copy link
Copy Markdown
Contributor

Summary

Follow-up to #1920 (feat(e2e): MSW cassette layer for hermetic e2e tests) addressing inline review feedback.

  • Remove dotenv from vitest.setup.ts — mise handles .env loading; the dotenv dev-dependency and its vitest.setup.ts usage are removed
  • Simplify test:e2e:record — replaced the record-cassettes.mjs wrapper script with an inline env-var prefix; deleted the now-empty script
  • Delete seinfeld/LICENSE — repo-level license applies; per-package copy was redundant
  • Delete seinfeld/scripts/migrate-from-legacy.mjs — one-time migration already run, file is unreferenced
  • Clarify format versioning comment in seinfeld/src/format/v1.ts
  • Sort JSON keys when writing cassettes (file-store.ts) — makes re-recordings produce deterministic diffs and prevents snapshot comparison failures from non-deterministic key insertion order
  • Default redact to 'paranoid' in seinfeld recorder — was opt-in; now on by default so cassette files never contain raw credentials by accident
  • Gate provider key placeholders on replay modegetProviderKeyPlaceholders() was previously injected in record mode too, which caused confusing "invalid key" errors instead of clear "missing key" errors
  • Move cassette filters per-scenario — replace global e2e/helpers/cassette-filters.mjs registry with per-scenario cassette-filter.mjs files; cassette-preload.mjs now dynamically imports them from the scenario directory, falling back to "default" if absent
  • Fix canary test timeouts — canary tests were activating cassette replay (shared variant keys + existing cassette files → body mismatches → retries → timeout); fixed by setting BRAINTRUST_E2E_CASSETTE_MODE=passthrough in the canary runner

Test plan

  • All hermetic e2e tests pass (pnpm run test:e2e:hermetic — 495 tests, 0 failures)
  • Canary runner sets BRAINTRUST_E2E_CASSETTE_MODE=passthrough so live API calls are not intercepted

🤖 Generated with Claude Code

Stephen Belanger and others added 3 commits May 6, 2026 16:38
- Remove dotenv loading from vitest.setup.ts — mise handles .env loading
- Drop the dotenv dev-dependency from e2e/package.json
- Simplify test:e2e:record to an inline env-var prefix; delete the
  record-cassettes.mjs wrapper script that did nothing beyond that
- Delete dev-packages/seinfeld/LICENSE (repo-level license applies)
- Delete dev-packages/seinfeld/scripts/migrate-from-legacy.mjs — the
  one-time migration it performed is complete and the file is unreferenced
- Clarify the format versioning rationale in seinfeld/src/format/v1.ts
- Sort JSON keys when writing cassette files (file-store.ts) so
  re-recordings produce deterministic diffs and snapshot comparisons
  are not confused by non-deterministic key insertion order

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…faults

- 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>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants