Skip to content

test(nightly): a seeded reset fuzz on the fault Worker - #3410

Merged
mattzcarey merged 6 commits into
mainfrom
slim/nightly-fuzz
Nov 27, 2026
Merged

mattzcarey merged 6 commits into
mainfrom
slim/nightly-fuzz

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

The nightly workspace gets a reset fuzz (cd nightly && pnpm run fuzz) on the fault Worker. It runs four rooms at once (Think and AIChatAgent, each with queue and latest message concurrency), each with four tabs, for six minutes:

  • each tab sends requests carrying a fault tag the scripted model acts on (client and server tools, approvals, a tool mid-reply, slow replies, stalls, errors, 429s, overflow);
  • it cancels its own requests or whatever is streaming, clears the chat now and then, and reconnects;
  • the tabs answer client tools (some twice, some never) and approve or deny approvals;
  • the object is reset every 30 to 90 seconds.

Then the room settles, and the fault suite's invariants must hold, plus four of the fuzz's own:

  • a request ends once on each connection that saw it, and on a connection still open at the end, it ends;
  • no tool call is left open behind a later message;
  • every reply follows its own user message;
  • no user message is stored twice.

The choices come from one seed, printed at the start. Each tab and the resetter draw from their own stream, so FUZZ_SEED replays their choices. The server's timing still varies, and tool answers are drawn per call id, which the server makes up. A run must reset the object at least once. A red run prints the seed, the violations and the last of the driver's trace, and writes every request's frames and the full trace to faults/results/.

The driver is verify's fuzz-trace.mjs, cut down to what it checks. A tab that reconnected is not yet told how the requests it sent before it went away ended, so on those connections only double ends are checked. #3330 adds that, and the check can then cover them. The waits between a tab's actions are the fuzz's own seeded think time; everything after the stop waits on the room's recorded state.

Validated: 4 of 4 rooms passed twice against a deployment (about 600 requests and 5 resets per room, 9 to 10 minutes). Before the replaced-connection change, every failure was a request whose tab reconnected before its end arrived.

@changeset-bot

changeset-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 198dd68

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@3410

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@3410

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@3410

hono-agents

npm i https://pkg.pr.new/hono-agents@3410

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@3410

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@3410

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@3410

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@3410

commit: 198dd68

@agent-think

agent-think Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ agents import sizes: no significant changes (a89cacf3 → 198dd688, workflow run)

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

…a request still streaming, the object must restart, the seed in each test's name, every connection's frames and the transcript in results/
devin-ai-integration[bot]

This comment was marked as resolved.

@mattzcarey
mattzcarey merged commit b34ff82 into main Nov 27, 2026
16 checks passed
@mattzcarey
mattzcarey deleted the slim/nightly-fuzz branch November 27, 2026 07:39
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