Skip to content

feat(http): add HTTP interception packages#80

Draft
dcramer wants to merge 1 commit into
mainfrom
codex/http-interceptors
Draft

feat(http): add HTTP interception packages#80
dcramer wants to merge 1 commit into
mainfrom
codex/http-interceptors

Conversation

@dcramer
Copy link
Copy Markdown
Member

@dcramer dcramer commented Jun 5, 2026

Add HTTP interception packages for eval traffic that leaves the process through HTTP rather than local tool wrappers. The base package provides direct fixtures and record/replay cassettes on top of the existing replay primitive, and the Vercel Sandbox package adapts forwarded egress requests into that generic interceptor flow.

Current State

This PR introduces @vitest-evals/http with route-style fixtures (httpFixture.get/post/...), fixture chaining, live fetch fallback, replay fallback on top of executeWithReplay, sensitive header redaction, serialized request/response recordings, and replay metadata attached to returned responses.

It also introduces @vitest-evals/http-vercel-sandbox for Vercel forwarded-header parsing, upstream request reconstruction, proxy-only/hop-by-hop header stripping, direct fixture routing, interceptor/replay fallback, provider metadata, and optional live fetch routing. Docs and README references are in place.

Goals

Provide a higher-level HTTP interception path for eval traffic that leaves the process through sandbox/proxy/fetch behavior, so this can become the replacement direction for local tool replay where HTTP is the real integration boundary.

Keep the generic HTTP layer engine-neutral while isolating Vercel-specific forwarding in packages/http-vercel-sandbox, leaving room for Docker, Playwright/MSW, or other adapters.

Remaining Work

This is not yet a full Junior drop-in. The Vercel adapter does not own Junior-shaped OIDC verification, requester authorization, credential lease issuance, lease invalidation after 401/403, or egress policy decisions.

We should add structured proxy failure responses, lifecycle hooks for logging/audit/credential cleanup, fixture ergonomics for larger mock catalogs, and reporter integration so HTTP replay status shows up alongside tool replay metadata.

Add engine-neutral HTTP fixture and replay helpers that share the core replay cassette behavior. Add a Vercel Sandbox adapter for forwarded egress requests with direct fixtures, replay fallback, and live fetch routing.

Co-Authored-By: OpenAI Codex <codex@openai.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vitest-evals-docs Ready Ready Preview, Comment Jun 5, 2026 3:19am

Request Review

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.

1 participant