

























@@ -1,23 +1,32 @@
11---
22name: crabbox
3-description: Use Crabbox for OpenClaw remote validation across Linux, macOS, Windows, and WSL2. Default to the repo Crabbox config, use brokered AWS for normal broad proof, and keep Blacksmith Testbox as an explicit opt-in or outage diagnostic path.
3+description: Use the Crabbox wrapper for OpenClaw remote validation across Linux, macOS, Windows, and WSL2, including delegated Blacksmith Testbox proof. Report the actual provider and id.
44---
5566# Crabbox
778-Use Crabbox when OpenClaw needs remote Linux proof for broad tests, CI-parity
9-checks, secrets, hosted services, Docker/E2E/package lanes, warmed reusable
10-boxes, sync timing, logs/results, cache inspection, or lease cleanup.
8+Use the Crabbox wrapper when OpenClaw needs remote Linux proof for broad tests,
9+CI-parity checks, secrets, hosted services, Docker/E2E/package lanes, warmed
10+reusable boxes, sync timing, logs/results, cache inspection, or lease cleanup.
111112-Default backend: the repo `.crabbox.yaml`, currently brokered AWS. Do not
13-override it to Blacksmith unless the user explicitly asks for Blacksmith proof,
14-the task is specifically about Testbox behavior, or AWS/brokered Crabbox is the
15-broken layer.
12+Crabbox is the transport/orchestration surface. The actual backend can be:
161317-Blacksmith Testbox is a delegated fallback, not the default router. If a
18-Blacksmith run queues, fails capacity, fails auth, or cannot allocate, stop
19-after one real attempt and switch to the repo default or report the blocker.
20-Do not retry Blacksmith in a loop.
14+- brokered AWS Crabbox: direct provider, `provider=aws`, lease ids like
15+`cbx_...`, `syncDelegated=false`
16+- Blacksmith Testbox through Crabbox: delegated provider,
17+`provider=blacksmith-testbox`, ids like `tbx_...`, `syncDelegated=true`
18+19+For OpenClaw maintainer broad `pnpm` gates, Blacksmith Testbox through the
20+Crabbox wrapper is acceptable and often preferred when the standing Testbox
21+rules apply. Do not describe those runs as "AWS Crabbox"; report them as
22+Testbox-through-Crabbox with the `tbx_...` id and Actions run.
23+24+Use the repo `.crabbox.yaml` brokered AWS path when the task specifically needs
25+direct AWS Crabbox behavior, persistent direct-provider leases, `--fresh-pr`,
26+`--full-resync`, environment forwarding, capture/download support, or provider
27+comparison. Use `--provider blacksmith-testbox` when the task needs OpenClaw
28+maintainer Testbox proof, prepared CI environment, broad/heavy pnpm gates, or
29+the user asks for Testbox/Blacksmith.
21302231## First Checks
2332@@ -34,10 +43,15 @@ pnpm crabbox:run -- --help | sed -n '1,120p'
34433544- OpenClaw scripts prefer `../crabbox/bin/crabbox` when present. The user PATH
3645 shim can be stale.
37-- Check `.crabbox.yaml` for repo defaults and honor them. For normal Linux
38- validation, omit `--provider` so the wrapper uses brokered AWS.
39-- Pass `--provider blacksmith-testbox` only for explicit Blacksmith/Testbox
40- work or a deliberate comparison.
46+- Check `.crabbox.yaml` for direct-provider defaults. Omitting `--provider`
47+ means brokered AWS today.
48+- For broad OpenClaw maintainer `pnpm` gates, prefer the repo wrapper with
49+`--provider blacksmith-testbox` or the repo Testbox helpers when the standing
50+ Testbox policy applies.
51+- Always report the actual provider and id. `cbx_...` means AWS Crabbox;
52+`tbx_...` means Blacksmith Testbox through Crabbox. If the output only says
53+`blacksmith testbox list`, use `blacksmith testbox list --all` before
54+ concluding no box exists.
4155- If a warm direct-provider lease smells stale, retry with `--full-resync`
4256 (alias `--fresh-sync`) before replacing the lease. This resets the remote
4357 workdir, skips the fingerprint fast path, reseeds Git when possible, and
@@ -83,11 +97,10 @@ Crabbox supports static SSH targets:
8397 with `../crabbox/bin/crabbox run --help`, config/flag tests, and the Crabbox
8498 Go test suite.
859986-## Default Brokered AWS Backend
100+## Direct Brokered AWS Backend
8710188-Use this for `pnpm check`, `pnpm check:changed`, `pnpm test`,
89-`pnpm test:changed`, Docker/E2E/live/package gates, or anything likely to fan
90-out across many Vitest projects.
102+Use this when the task needs direct AWS Crabbox semantics rather than the
103+prepared Blacksmith Testbox CI environment.
9110492105Changed gate:
93106@@ -124,9 +137,9 @@ pnpm crabbox:run -- \
124137125138Read the JSON summary. Useful fields:
126139127-- `provider`: should normally be `aws`
140+- `provider`: `aws`
128141- `leaseId`: `cbx_...`
129-- `syncDelegated`: should normally be `false`
142+- `syncDelegated`: `false`
130143- `commandPhases`: populated when the command prints `CRABBOX_PHASE:<name>`
131144- `commandMs` / `totalMs`
132145- `exitCode`
@@ -138,6 +151,41 @@ cleanup when a run fails, is interrupted, or the command output is unclear:
138151../crabbox/bin/crabbox list --provider aws
139152```
140153154+## Blacksmith Testbox Through Crabbox
155+156+Use this for OpenClaw maintainer broad/heavy `pnpm` gates when the prepared CI
157+environment is the right proof surface:
158+159+```sh
160+node scripts/crabbox-wrapper.mjs run \
161+ --provider blacksmith-testbox \
162+ --blacksmith-org openclaw \
163+ --blacksmith-workflow .github/workflows/ci-check-testbox.yml \
164+ --blacksmith-job check \
165+ --blacksmith-ref main \
166+ --idle-timeout 90m \
167+ --ttl 240m \
168+ --timing-json \
169+ -- \
170+ CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 OPENCLAW_TESTBOX=1 OPENCLAW_TESTBOX_REMOTE_RUN=1 pnpm check:changed
171+```
172+173+Read the JSON summary and the Testbox line. Useful fields:
174+175+- `provider`: `blacksmith-testbox`
176+- `leaseId`: `tbx_...`
177+- `syncDelegated`: `true`
178+- `syncPhases`: delegated/skipped because Blacksmith owns checkout/sync
179+- Actions run URL/id from the Testbox output
180+- `exitCode`
181+182+`blacksmith testbox list` may hide hydrating or ready boxes. Use:
183+184+```sh
185+blacksmith testbox list --all
186+blacksmith testbox status <tbx_id>
187+```
188+141189## Observability Flags
142190143191Use these on debugging runs before inventing ad hoc logging:
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。