OCM Testing
Use this skill when deciding what to test, debugging failing checks, or
validating changes before commit, push, or PR review.
Read First
AGENT.md for repo-wide testing expectations.
Makefile for supported commands.
docs/local-firecracker-e2e.md for local KVM/Firecracker proof.
docs/kvm-integration-ci.md for maintainer-gated KVM runners.
- Relevant package docs near the changed code.
Default Rule
Prove the touched surface first. Do not reflexively run every expensive lane.
- Inspect the diff and classify touched surfaces.
- Reproduce narrowly before fixing when a bug is reported.
- Patch the implicated owner module.
- Rerun the narrow proof.
- Broaden only when a shared contract, integration boundary, or user workflow
requires it.
Surface Map
- Backend control plane, store, runtime, routing:
cd backend && go test ./internal/<pkg>.
- Shared backend behavior or broad API changes:
make test-go.
- Worker routing/auth/CORS/KV behavior:
make test-worker.
- Frontend UI or auth/client behavior:
make test-frontend and make typecheck.
- Cross-cutting code changes:
make check, make test, make typecheck.
- Docs-only: inspect rendered links/commands when practical and run
git diff --check.
- Scripts/shell automation:
make check-scripts if available through make check;
otherwise run the script's dry-run/help path when it has one.
- Firecracker, rootfs init, agent networking, TAP/bridge/NAT, VM persistence, or
KVM placement: run the narrowest KVM integration lane available, or state the
exact blocker such as missing
/dev/kvm, root privileges, artifacts, network,
or Cloudflare credentials.
- Cloudflare Worker deployment shape: test Worker logic locally and review
worker/wrangler.toml plus docs/self-hosted.env.example for routing loops.
Guardrails
- Prefer
make targets over direct tool invocations when a target exists.
- Do not run privileged KVM, Docker, Cloudflare, GCP, or deploy commands unless
the user asked or the change genuinely needs that proof.
- Do not kill unrelated processes. Treat running services as user-owned unless
they were started in the current task.
- Do not print secrets from env files, logs, cookies, JWTs, database URLs, or
Cloudflare/Firebase/GCP credentials.
- If dependency install or network access is required and blocked, report the
blocker and use the closest local proof.
Output Habit
Report:
- touched surface
- exact command run
- pass/fail result
- any skipped broader proof and the concrete blocker
- remaining risk if only narrow proof was possible
1---2name: ocm-testing3description: Choose and run the smallest safe OpenClaw Machines verification path for backend, frontend, Worker, host enrollment, Firecracker, rootfs, and self-hosted changes.4---56# OCM Testing78Use this skill when deciding what to test, debugging failing checks, or9validating changes before commit, push, or PR review.1011## Read First1213- `AGENT.md` for repo-wide testing expectations.14- `Makefile` for supported commands.15- `docs/local-firecracker-e2e.md` for local KVM/Firecracker proof.16- `docs/kvm-integration-ci.md` for maintainer-gated KVM runners.17- Relevant package docs near the changed code.1819## Default Rule2021Prove the touched surface first. Do not reflexively run every expensive lane.22231. Inspect the diff and classify touched surfaces.242. Reproduce narrowly before fixing when a bug is reported.253. Patch the implicated owner module.264. Rerun the narrow proof.275. Broaden only when a shared contract, integration boundary, or user workflow28 requires it.2930## Surface Map3132- Backend control plane, store, runtime, routing: `cd backend && go test ./internal/<pkg>`.33- Shared backend behavior or broad API changes: `make test-go`.34- Worker routing/auth/CORS/KV behavior: `make test-worker`.35- Frontend UI or auth/client behavior: `make test-frontend` and `make typecheck`.36- Cross-cutting code changes: `make check`, `make test`, `make typecheck`.37- Docs-only: inspect rendered links/commands when practical and run `git diff --check`.38- Scripts/shell automation: `make check-scripts` if available through `make check`;39 otherwise run the script's dry-run/help path when it has one.40- Firecracker, rootfs init, agent networking, TAP/bridge/NAT, VM persistence, or41 KVM placement: run the narrowest KVM integration lane available, or state the42 exact blocker such as missing `/dev/kvm`, root privileges, artifacts, network,43 or Cloudflare credentials.44- Cloudflare Worker deployment shape: test Worker logic locally and review45 `worker/wrangler.toml` plus `docs/self-hosted.env.example` for routing loops.4647## Guardrails4849- Prefer `make` targets over direct tool invocations when a target exists.50- Do not run privileged KVM, Docker, Cloudflare, GCP, or deploy commands unless51 the user asked or the change genuinely needs that proof.52- Do not kill unrelated processes. Treat running services as user-owned unless53 they were started in the current task.54- Do not print secrets from env files, logs, cookies, JWTs, database URLs, or55 Cloudflare/Firebase/GCP credentials.56- If dependency install or network access is required and blocked, report the57 blocker and use the closest local proof.5859## Output Habit6061Report:6263- touched surface64- exact command run65- pass/fail result66- any skipped broader proof and the concrete blocker67- remaining risk if only narrow proof was possible