




















@@ -123,17 +123,22 @@ instantly and boots the CI environment in the background while you work:
123123blacksmith testbox warmup ci-check-testbox.yml
124124# → tbx_01jkz5b3t9...
125125126-Save this ID. You need it for every `run` command.
126+Save this ID in the current session. You need it for every `run` command.
127+Treat `blacksmith testbox list` as diagnostics, not a reusable work queue.
128+Listed boxes can be visible at the org/repo level while still being unusable or
129+stale for the current local agent lane.
127130128131For OpenClaw maintainer Testbox mode, pre-warm at the start of longer or wider
129132tasks:
130133131134blacksmith testbox warmup ci-check-testbox.yml --ref main --idle-timeout 90
135+pnpm testbox:claim --id <ID>
132136133137Use the build-artifact warmup when e2e/package/build proof benefits from seeded
134138`dist/`, `dist-runtime/`, and build-all caches:
135139136140blacksmith testbox warmup ci-build-artifacts-testbox.yml --ref main --idle-timeout 90
141+pnpm testbox:claim --id <ID>
137142138143Warmup dispatches a GitHub Actions workflow that provisions a VM with the
139144full CI environment: dependencies installed, services started, secrets
@@ -178,6 +183,26 @@ The `run` command automatically waits for the testbox to become ready if
178183it is still booting, so you can call `run` immediately after warmup without
179184needing to check status first.
180185186+In OpenClaw, prefer the guarded runner wrapper so stale/reused ids fail before
187+the Blacksmith CLI spends time syncing or emits a confusing missing-key error:
188+189+pnpm testbox:run --id <ID> -- "OPENCLAW_TESTBOX=1 pnpm check:changed"
190+191+The wrapper refuses to run when the local per-Testbox key is missing or when the
192+id was not claimed by this OpenClaw checkout with `pnpm testbox:claim --id
193+<ID>`. Treat that as the expected remediation, not as a GitHub account or
194+normal SSH-key problem. A local key alone is not enough; a ready box may still
195+carry stale rsync state from another lane.
196+197+If the agent crashes, the remote box relies on Blacksmith's idle timeout. The
198+local OpenClaw claim marker is not deleted automatically, so the wrapper treats
199+claims older than 12 hours as stale. Override only for intentional long-running
200+work with `OPENCLAW_TESTBOX_CLAIM_TTL_MINUTES=<minutes>`.
201+202+Before spending a broad gate on a manually assembled command, you can also run:
203+204+pnpm testbox:sanity -- --id <ID>
205+181206## Downloading files from a testbox
182207183208Use the `download` command to retrieve files or directories from a running
@@ -286,16 +311,17 @@ checks that need parity or remote state.
2863111. Decide whether the repo's local loop is the right default. For OpenClaw,
287312`OPENCLAW_TESTBOX=1` makes Testbox the maintainer default.
2883132. If Testbox is warranted, warm up early:
289-`blacksmith testbox warmup ci-check-testbox.yml --ref main --idle-timeout 90` → save the ID
314+`blacksmith testbox warmup ci-check-testbox.yml --ref main --idle-timeout 90` → save the ID,
315+ then `pnpm testbox:claim --id <ID>`
2903163. Write code while the testbox boots in the background.
2913174. Run the remote command when needed:
292-`blacksmith testbox run --id <ID> "pnpm check:changed"`
318+`pnpm testbox:run --id <ID> -- "OPENCLAW_TESTBOX=1 pnpm check:changed"`
2933195. If tests fail, fix code and re-run against the same warm box.
2943206. If you changed dependency manifests (package.json, etc.), prepend
295321 the install command: `blacksmith testbox run --id <ID> "npm install && npm test"`
2963227. If a narrow PR reports a full sync or the box was reused/expired, sanity
297323 check the remote copy before a slow gate:
298-`blacksmith testbox run --id <ID> "pnpm testbox:sanity"`.
324+`pnpm testbox:run --id <ID> -- "pnpm testbox:sanity"`.
299325 If it reports missing root files or mass tracked deletions, stop the box and
300326 warm a fresh one. Use `OPENCLAW_TESTBOX_ALLOW_MASS_DELETIONS=1` only for an
301327 intentional large deletion PR.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。