agentleFS
CloudflareKnown publishercloudflare/workerd/src/tests/streams/scaling/AGENTS.md

workerd / scaling

AGENTS.md8.8k starsChanged 9 months agoApache-2.0View on GitHub

Dequeue cost stays linear in every internal queue of both streams implementations: buffered chunks, pending reads, pending pull-intos, write requests, the writable controller's chunk queue, and the identity stream's write snapshots. Each test drives one queue to 80k-160k entries (identity: 80k, over a 16x range) and asserts, through helpers.js, that the time grows by at most 4x the linear multiple of a run at 1/8 (identity: 1/16) the size. The ratio is machine-independent; the sizes sit well past the ~20k…

Trending

Quiet since August.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 2 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the cloudflare/workerd repository that our weekly crawl found: only 12 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about cloudflare/workerd

The biggest 5 of 12 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 12

Talked about on GitHub, Bluesky and Hacker News (12 times).

On GitHub · 6

1 more on GitHub

On Hacker News · 2

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every chunk or byte is index-checked, so the buffers cannot lose or reorder data as they grow and wrap.

    line 13
  2. Distinctive:

    No divergences: both implementations are linear on every shape.

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Queue scaling

Dequeue cost stays linear in every internal queue of both streams implementations: buffered chunks, pending reads, pending pull-intos, write requests, the writable controller's chunk queue, and the identity stream's write snapshots. Each test drives one queue to 80k-160k entries (identity: 80k, over a 16x range) and asserts, through helpers.js, that the time grows by at most 4x the linear multiple of a run at 1/8 (identity: 1/16) the size. The ratio is machine-independent; the sizes sit well past the ~20k entries at which V8 stops left-trimming a shifted array, where the array-backed queues grew 40-500x.

Every chunk or byte is index-checked, so the buffers cannot lose or reorder data as they grow and wrap.

Cells

scaling-cpp.wd-test and scaling-ts.wd-test share scaling-modules.capnp. Both run with timeout = "eternal", are tagged no-asan, and have no @gc-stress variant: a GC per continuation would drown the timing. The assertion is a ratio and holds on slow machines, but the runs are long: on CI the TS cell takes up to ~30 s and the C++ cell 35-60 s per variant (an identity write costs ~375 µs there; locally 4 s and 16 s).

The C++ cell is off-by-default: it is the control, not the subject (the suite guards the TypeScript queues), so it does not run in CI. Run it with bazel test //src/tests/streams/scaling:scaling-cpp@ --test_tag_filters=. There is no legacy cell; nothing here depends on a flag's unflagged side.

Module map

ModuleShapes
readable.jspre-buffered backlog read back (20k → 160k); the same through both tee branches (10k → 80k); unawaited reads satisfied by enqueues (20k → 160k)
readable-byte.js64-byte BYOB fills over a backlog of one-byte chunks (16k → 128k); unawaited one-byte BYOB reads filled by one enqueue (10k → 80k)
writable.jsunawaited writes drained by a synchronous sink (20k → 160k)
identity.jsunawaited one-byte writes into an IdentityTransformStream, read back (5k → 80k)

No divergences: both implementations are linear on every shape.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.