RUNTIME / BENCH

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.

LANE::RUNTIMESURFACE::CANONICAL-WEBSTATUS::PRIMARY
SCOPE
The bench tests the real injector and bridge against a deterministic fake environment.

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.

RUN MODES
The bench now has one canonical runner for local, watch, and Docker modes.

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.

Bench runner commands
ModeCommandWhy 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.
COVERAGE
The bench should prove both healthy and degraded paths.

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.

RELATED ROUTES
Keep reading the current canonical graph

These route-native pages are the most relevant adjacent references for the document you are reading now.

CONTINUE
Keep moving through the web docs graph

Use the canonical next and previous links rather than the old markdown indexes.

DEDICATED APP
This is the fastest reproducible way to test injector and bridge changes before touching a real Mac.

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.

Document metadata
Audience
maintainers, runtime integrators, operators