Skip to content

test(dev): add bun and chaos coverage for the dev server#778

Open
ctgowrie wants to merge 1 commit into
feat/dev-latest-turn-workflowfrom
feat/dev-bun-chaos
Open

test(dev): add bun and chaos coverage for the dev server#778
ctgowrie wants to merge 1 commit into
feat/dev-latest-turn-workflowfrom
feat/dev-bun-chaos

Conversation

@ctgowrie

Copy link
Copy Markdown
Collaborator

Why

The dev-server lifecycle stack (#759#773) is covered per-promise, but two surfaces had no coverage at all: apps installed with bun, and adversarial sequences that try to break a running dev server.

What changed

  • Shared harness: the spawned eve dev --no-ui helpers (process lifecycle, URL wait, failure signatures, probes) move from dev-server.scenario.test.ts into test/scenarios/dev-server-harness.ts so every dev-server suite reuses one RunningEveDev lifecycle. The existing 10 scenarios are unchanged in behavior.
  • Bun install: the scenario-app harness gains packageManager: "bun", and a new suite serves a bun-installed weather app under the Node runtime through a full streamed turn.
  • Bun runtime: bun eve dev cannot boot today — Nitro wires crossws's Node adapter into every dev worker and that adapter throws [crossws] Using Node.js adapter in an incompatible environment whenever the Bun global exists. The suite pins the eve-owned contract until upstream support exists: startup fails fast with the worker readiness error and a nonzero exit, rather than hanging or serving a half-broken server. Both bun tests self-skip when bun is absent; the scenario CI job installs a pinned bun (setup-bun v2.2.0, SHA-pinned).
  • Chaos: two adversarial scenarios against real eve dev subprocesses:
    • an authored edit storm — rapid consecutive edits, invalid TypeScript, file deletion and re-add, concurrent forced rebuilds, and a structural env change — under a continuous health probe that tolerates zero failed requests (50ms cadence, >50 probes), ending with a committed final revision and a completed streamed turn;
    • a crash/abort sequence — an aborted streaming channel response, an authored process.exit worker crash followed by a 10-request burst that must be all-200 on the replacement worker, and a second crash racing a forced rebuild — ending with a completed streamed turn and no reset-socket signatures in the output.

Validation

  • All three dev-server scenario suites pass together locally (14 tests), including both bun tests against bun 1.3.14.
  • Full unit (452 files) and integration (65 files) tiers, lint, typecheck, and invariant guard pass.

Stack

Stacked on #773 (Stage 5). Test-and-CI only; no runtime changes.

🤖 Generated with Claude Code

- Extract the spawned dev-server helpers into a shared scenario harness
  so new suites reuse one RunningEveDev lifecycle.
- Serve a bun-installed app under the Node runtime, and pin the current
  bun-runtime contract: `bun eve dev` fails fast with the worker
  readiness error (crossws's Node adapter refuses to initialize when the
  Bun global exists) instead of hanging. Both tests skip when bun is not
  installed; the scenario CI job now installs a pinned bun.
- Chaos-test the dev server: an authored edit storm (rapid edits, broken
  TypeScript, deletes, concurrent forced rebuilds, a structural env
  change) with a continuous health probe that tolerates zero failed
  requests, and a crash/abort sequence (worker process.exit, aborted
  streaming response, crash racing a rebuild) that must recover to a
  completed streamed turn.

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 2:32pm
eve-docs-1644 Ready Ready Preview, Comment, Open in v0 Jul 14, 2026 2:32pm
eve-docs-4759 Ready Ready Preview, Comment, Open in v0 Jul 14, 2026 2:32pm

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedgithub/​oven-sh/​setup-bun@​0c5077e51419868618aeaa5fe8019c62421857d699100100100100

View full report

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