Skip to content

test(dev): pin the public dev-server contract for the stock-Nitro migration#780

Closed
ctgowrie wants to merge 1 commit into
feat/dev-bun-chaosfrom
feat/dev-stock-nitro-contract
Closed

test(dev): pin the public dev-server contract for the stock-Nitro migration#780
ctgowrie wants to merge 1 commit into
feat/dev-bun-chaosfrom
feat/dev-stock-nitro-contract

Conversation

@ctgowrie

Copy link
Copy Markdown
Collaborator

Why

We want to stop owning a bespoke dev listener/worker transport and align eve dev onto the stock Nitro dev server, without giving up authored HMR or in-flight Workflow turns finishing on the code that started them. research/dev-stock-nitro-alignment.md (added here) lays out the architecture, the two deliberately relaxed invariants, and the five-stage delivery plan.

This is stage A: no runtime changes. It re-expresses every transport-level assertion the migration will delete as a public-surface contract test, so later stages can remove dev-worker-server and friends while provably preserving behavior.

New contract tests (all pass against the current stack)

  • Chaos: a worker crash settles an open channel stream within a bounded deadline, and the server recovers to a completed streamed turn.
  • Chaos: shutdown stays bounded and graceful (beats the harness SIGKILL fallback) while a stream is open.
  • Chaos: authored routes observe the socket peer as requestIp even when the request carries forged worker metadata and x-forwarded-for.
  • Lifecycle: a kept-alive connection serves a second request on the same socket across a structural worker replacement.

Parity rules for the rest of the stack

  • test/scenarios/dev-server*.ts stay green and unchanged through every stage — with one deliberate exception in stage C (instrumentation pinning across structural edits), flagged in the plan.
  • Implementation-level suites (dev-worker-server.scenario, metadata tests) are deleted only in the stage that deletes their subject.

Stack

Stacked on #778. Next stages: B (server-side generation selection), C (active-worker turns), D (parent-private World RPC), E (stock Nitro dev server + drained replacement, with the env-runner drain offered upstream).

🤖 Generated with Claude Code

…ration

Adds the research plan for replacing eve's bespoke dev transport with
the stock Nitro dev server, and re-expresses the transport-level
assertions that plan will delete as public-surface contract tests:

- a worker crash settles an open channel stream within a bounded
  deadline and the server recovers,
- shutdown stays bounded and graceful while a stream is open,
- a kept-alive connection serves a second request across a structural
  worker replacement,
- authored routes observe the socket peer address despite forged
  metadata and forwarding headers.

Every migration stage must keep these suites green unchanged; suites
that assert against the bespoke transport are deleted only with their
subject.

Signed-off-by: Casey Gowrie <[email protected]>
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
eve-docs Ready Ready Preview, Comment, Open in v0 Jul 14, 2026 3:34pm
eve-docs-1644 Ready Ready Preview, Comment, Open in v0 Jul 14, 2026 3:34pm
eve-docs-4759 Ready Ready Preview, Comment, Open in v0 Jul 14, 2026 3:34pm

@ctgowrie

Copy link
Copy Markdown
Collaborator Author

Superseded: the stock-Nitro route will be a parallel stack off latest main, not stacked on the current dev-lifecycle stack. The contract tests and research doc here get ported into that stack phase by phase.

@ctgowrie ctgowrie closed this Jul 14, 2026
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