agentleFS
CloudflareKnown publishercloudflare/workerd/src/tests/events/AGENTS.md

workerd / events

AGENTS.md9.1k starsChanged 8 months agoApache-2.0View on GitHub

Test suites for EventTarget subclasses that are moving from C++ to the per-isolate bootstrap (src/per_isolate/), one subdirectory per API (messagechannel/, eventsource/). Every test here runs against both implementations of its API, the C++ one and the TypeScript one, to prove parity. The suite rules are those of src/tests/streams/AGENTS.md, applied verbatim: one file per behavior; main.js with explicit named re-exports; the module list defined once in <name>-modules.capnp and shared by the <name>-cpp.wd-test and <name>-ts.wd-test cells; compatibility flags pinned by name, never…

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 3 mentionsFeb 2026: 0 mentionsMar 2026: 2 mentionsApr 2026: 3 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 6 mentionsSep 2026: 4 mentionsOct 2026: 4 mentionsNov 2026: 1 mention
Dec 2025Jun 2026Nov 2026
Mentions a month of the cloudflare/workerd repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about cloudflare/workerd

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

See all 39

Talked about on GitHub, Bluesky, Hacker News and Stack Overflow (39 times).

On GitHub · 32

27 more on GitHub

On Hacker News · 2

On Stack Overflow · 1

The file

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

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Test suites for EventTarget subclasses that are moving from C++ to the per-isolate bootstrap (src/per_isolate/), one subdirectory per API …

    line 3

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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

src/tests/events/

Test suites for EventTarget subclasses that are moving from C++ to the per-isolate bootstrap (src/per_isolate/), one subdirectory per API (messagechannel/, eventsource/). Every test here runs against both implementations of its API, the C++ one and the TypeScript one, to prove parity.

The suite rules are those of src/tests/streams/AGENTS.md, applied verbatim: one file per behavior; main.js with explicit named re-exports; the module list defined once in <name>-modules.capnp and shared by the <name>-cpp.wd-test and <name>-ts.wd-test cells; compatibility flags pinned by name, never a compatibilityDate; divergences branched on usingTsImpl from which-impl.js and asserted exactly on each side; each suite's AGENTS.md is the index of behaviors to tests plus the divergence ledger. Read that file first.

What is specific to this tree

  • The implementation is chosen by an autogate, not a compat flag. The TypeScript cells name the API's autogate in the config's autogates list, and a USING_TS_IMPL JSON binding tells which-impl.js which implementation the cell is meant to run, since user code cannot read autogates. The C++ cells set generate_all_autogates_variant = False: enabling every autogate would swap in the TypeScript implementation while which-impl.js still reports C++. The TypeScript cells keep the variant, so "every autogate on" is still covered.
  • Legacy cells run on both implementations. Unlike the streams, these TypeScript implementations honor the same compat flags the C++ ones do (they consult them through compatFlags in the bootstrap), so the unflagged behaviors are asserted for each, in <name>-cpp-legacy and <name>-ts-legacy.
  • The seam the TypeScript subclasses share is src/per_isolate/events/event-target-internals.ts; its C++ half is unit tested in src/workerd/api/event-target-bootstrap-test.c++.

Tests that live elsewhere (by design)

  • src/workerd/api/tests/messageport-postmessage-uaf-test.js: a security regression single, deliberately not merged into the suite.
  • messagePortLegacyRedispatch and eventSourceLegacyError in src/workerd/api/tests/legacy-dispatch-exceptions-test.js, which pins the legacy dispatch policy across several APIs at once.
  • src/workerd/api/eventsource-test.c++: a unit test of the C++ EventSource's native pump.

Running

bazel test //src/tests/events/...

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.