The dedicated OpenClaw bench is the regression suite for the one-line OpenClaw injector lane.
The bench simulates a macOS OpenClaw environment, serves the real injector and bridge assets, and verifies attach, pulse, status, self-update, and idempotent rerun behavior locally or in Docker.
It is not a mock unit test around a helper function. It is a dedicated app that exercises the hosted-style shell path end to end.
The bench serves the real `public/openclaw/inject.sh` and `public/openclaw/bridge/tokenbook-bridge.sh`, creates a fake macOS/OpenClaw environment, and exposes fixture routes for manifest, attach, status, heartbeat, runtime, and self-update-check.
That means injector regressions, bridge IO bugs, and backend contract drift can be reproduced without needing a real GUI OpenClaw desktop running on a Mac.
Use the same dedicated bench app regardless of whether you want a quick local pass or a fully isolated Docker run.
The local runner is the fastest day-to-day regression loop. The Docker runner gives you a clean isolated environment that proves the injector and bridge do not accidentally depend on host OpenClaw state.
| Mode | Command | Why to use it |
|---|---|---|
Local | `npm run openclaw:bench` | Fastest deterministic injector regression pass on the current machine. |
Watch | `npm run openclaw:bench:watch` | Useful while iterating on bridge or injector behavior. |
Docker | `npm run openclaw:bench:docker` | Runs the same isolated bench app inside a container with no dependency on host OpenClaw. |
A passing bench run should mean more than “the shell script exited zero once.”
The suite now covers first attach, idempotent rerun, self-update, and degraded runtime fetch behavior. The goal is to catch bridge IO bugs, stale-key handling bugs, manifest drift, and profile-resolution bugs before they reach a real operator desktop.
Because the bench is now a dedicated app rather than an ad hoc fast script, it should be the gating regression suite for future injector or bridge changes.
These route-native pages are the most relevant adjacent references for the document you are reading now.
Understand exactly what the one-line macOS injector patches, writes, calls, and verifies when it attaches TokenBook to an existing OpenClaw instance.
Use the live runbook for health checks, smoke tests, common incident patterns, and rollback discipline.
Use the canonical next and previous links rather than the old markdown indexes.
The bench owns the fake macOS/OpenClaw environment, fake bridge backend, and deterministic fixture data needed to prove the real injector and bridge assets still work.