agentleFS
opentabs-devopentabs-dev/opentabs/e2e/CLAUDE.md

opentabs / e2e

CLAUDE.md967 starsChanged 8 months agoMITView on GitHub

Playwright E2E tests that exercise the full stack: MCP server + Chrome extension + test web server + test plugin. Tests run under Playwright's Node.js test runner, so Node.js APIs are correct here. E2E tests spawn Chromium browsers, MCP server processes, and test servers. You MUST clean up processes you create without killing processes created by other agents running in parallel. Rules: E2E tests run under Playwright's Node.js test runner using Node.js APIs (node:fs, node:child_process, etc.). The MCP server test…

The file

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

2 rules. About 0 are common, 0 are distinctive, and 2 are 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.

  • 2

    Very specific

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

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

    Port conflicts are already handled: All test fixtures use PORT=0 (ephemeral ports) and Playwright runs with fullyParallel: true.

    line 29
  2. Very specific:

    Test servers (test-server.ts, strict-csp-test-server.ts, analyze-site-test-server.ts) are TypeScript files run via node --import tsx/esm.

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.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
CLAUDE.md

E2E Test Instructions

Overview

Playwright E2E tests that exercise the full stack: MCP server + Chrome extension + test web server + test plugin. Tests run under Playwright's Node.js test runner, so Node.js APIs are correct here.

Key Files

e2e/
├── fixtures.ts        # Test fixtures (MCP server, extension, test server)
├── helpers.ts         # Shared test helpers
├── test-server.ts     # Controllable test web server
└── *.e2e.ts           # Test files

Running Tests

npm run test:e2e       # Run all E2E tests

Process Cleanup

E2E tests spawn Chromium browsers, MCP server processes, and test servers. You MUST clean up processes you create without killing processes created by other agents running in parallel. Rules:

  • Track PIDs you create. Before running npm run test:e2e, note your own PID ($$ in bash). After the test run completes (pass or fail), kill only the process tree rooted at the PID you spawned — never pkill or killall by process name, which would kill other agents' processes too.
  • Playwright handles its own cleanup in the normal case. The concern is abnormal exits (timeout, crash, kill -9). If your test run is interrupted, orphaned Chromium and server processes may survive.
  • Port conflicts are already handled. All test fixtures use PORT=0 (ephemeral ports) and Playwright runs with fullyParallel: true. Multiple agents running E2E tests simultaneously will not collide on ports.
  • In ralph workers, process isolation is automatic — ralph runs each worker in its own process group (set -m) and kills the entire group (kill -- -PID) when the worker finishes, catching any orphaned Chromium/server processes without affecting other workers.

Node.js APIs

E2E tests run under Playwright's Node.js test runner using Node.js APIs (node:fs, node:child_process, etc.).

MCP Server Subprocess

The MCP server test fixture spawns the server using the dev proxy (dist/dev-proxy.js) for hot-reload mode, or dist/index.js --dev directly for non-hot mode. Hot reload is triggered by sending SIGUSR1 to the proxy process, which restarts the worker and logs 'Hot reload complete' when the new worker is ready.

Test servers (test-server.ts, strict-csp-test-server.ts, analyze-site-test-server.ts) are TypeScript files run via node --import tsx/esm.

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.