Manual-test harness¶
Use the harness for a manual batch that needs isolated daemons, persistent stdio proxy executions, direct control frames, or recording and stream sockets. It keeps connection and evidence visible when testing ownership refusals, broker session confinement, cancellation, and observer liveness.
Use scripts/mcp-drive.ts for a one-shot MCP plan. Use
Live device acceptance for its signed, disposable
exact-device acceptance matrix and the broker lifecycle lane below; the harness
retains connection evidence, acceptance adds signed evidence assertions.
Hard rules¶
- Never touch the resident daemon: its default socket, port 3000, or
~/.auto-mobile. Run every client throughin-daemon-env.shor a harness CLI with the initialized private environment. - Never use
pkillorkillall. Stop only daemons you started, usingprivate-daemon.ts stopfor that batch and daemon number. - Broker batches never make sessionless device calls. A ready grant and live driver
are required; pending or failed acquisition never falls back to generic acquisition.
Broker clients refuse
startDevice,provisionDevice,getAndroid,getApple,killDevice, device inventory resources, and--allow-selector. - Release broker devices through
proxyN release --client NAMEorbroker1 down. Zero pooling destroys the native device through the product journal; verify the terminal receipt and native absence before the next scenario. Never delete an AVD, simulator, directory, or batch evidence yourself, signal device processes, passforce, or useadb emu kill(it can hang under load). - Record protected devices with repeatable
init --protect NAME_OR_ID. Protection wins over ledger ownership; a broker-looking name alone never authorizes access or cleanup. - Keep one actor per granted device and one broker daemon per batch.
startrefuses an already-live recorded PID; the broker owns its host lock in the private coordination namespace. Report unaccounted-inventory startup refusals; do not remove other devices to make startup pass. Private paths do not isolate the host’s AVD/simulator set. - For separate plain-proxy tests, device acquisition requires explicit
avdName(Android) ordeviceId(UDID/serial);namealone is a matcher and is refused.--allow-selectoris only a deliberate selection-test override in plain mode. - Never pass daemon flags to a stdio proxy (a startup-option mismatch can restart
the daemon). Record daemon flags with
init --daemon-arg, or one-off viaprivate-daemon.ts start --. - Never rebuild
dist/while a batch’s daemons run. Build first, then start the batch from one explicit entry script.
The harness is described across these pages:
- Private daemons, path policy and staggered boots
- Devices, teardown, stdio-proxy sessions and raw frames
- Broker scenarios, auxiliary sockets, Python SDK clients and evidence