

























@@ -10,9 +10,8 @@ description: Run Blacksmith Testbox for CI-parity checks, secrets, hosted servic
1010Use Testbox when you need remote CI parity, injected secrets, hosted services,
1111or an OS/runtime image that your local machine cannot provide cheaply.
121213-Do not default to Testbox for every local test/build loop unless the repo or
14-the user's personal maintainer rules explicitly say Testbox-first. If the repo
15-has documented local commands for normal iteration, use those first so you keep
13+Do not default to Testbox for every local test/build loop. If the repo has
14+documented local commands for normal iteration, use those first so you keep
1615warm caches, local build state, and fast feedback.
17161817Testbox is the expensive path. Reach for it deliberately.
@@ -82,20 +81,17 @@ Prefer Testbox when:
8281- you are reproducing CI-only failures
8382- you need the exact workflow image/job environment from GitHub Actions
848385-For OpenClaw specifically, contributor and routine local iteration should stay
86-local:
84+For OpenClaw specifically, normal local iteration should stay local:
87858886- `pnpm check:changed`
8987- `pnpm test:changed`
9088- `pnpm test <path-or-filter>`
9189- `pnpm test:serial`
9290- `pnpm build`
939194-OpenClaw maintainer mode is different. If the user has Blacksmith access and
95-sets `OPENCLAW_TESTBOX=1`, or their personal agent rules say Testbox-first,
96-route broad, slow, Docker, live, E2E, full-suite, and CI-parity validation
97-through Testbox by default. `OPENCLAW_LOCAL_CHECK_MODE=throttled` remains the
98-escape hatch for laptop-friendly local proof.
92+Only use Testbox in OpenClaw when the user explicitly wants CI-parity or the
93+check truly depends on remote secrets/services that the local repo loop cannot
94+provide.
999510096For installable-package product proof, prefer the GitHub `Package Acceptance`
10197workflow over an ad hoc Testbox command. It resolves one package candidate
@@ -115,35 +111,13 @@ an ID instantly and boots the CI environment in the background while you work:
115111116112Save this ID. You need it for every `run` command.
117113118-For long-ish OpenClaw maintainer tasks in Testbox mode, pre-warm at the start
119-with a longer idle timeout:
120-121-blacksmith testbox warmup ci-check-testbox.yml --idle-timeout 90
122-# → tbx_01jkz5b3t9...
123-124-The CLI and current docs expose `--idle-timeout <minutes>` and document the
125-default as 30 minutes, but do not publish a universal maximum. OpenClaw policy:
126-use `90` for normal long-ish tasks, `240` for multi-hour work, `720` for
127-all-day work, and `1440` for overnight work. Anything above `1440` minutes
128-requires explicit user intent and an end-of-task cleanup check.
129-130-Observed on 2026-04-27: Blacksmith accepted `90`, `240`, `720`, `1440`,
131-`4320`, `10080`, `43200`, and even `525600` minutes, with every probe box
132-stopped immediately. Treat that as "no sane visible cap", not permission to
133-leave giant-idle boxes around.
134-135-Choose the warmup ref deliberately. `--ref <branch|tag|sha>` can point at a
136-branch, tag, or SHA. For cache seeding, prefer exact current branch/SHA for
137-correctness; use the latest `beta` or `latest` release SHA only as a warm cache
138-seed, then still run the build/check that proves local synced changes.
139-140114Warmup dispatches a GitHub Actions workflow that provisions a VM with the
141115full CI environment: dependencies installed, services started, secrets
142116injected, and a clean checkout of the repo at the default branch.
143117144118Options:
145119146---ref <branch|tag|sha> Git ref to dispatch against (default: repo's default branch)
120+--ref <branch> Git ref to dispatch against (default: repo's default branch)
147121--job <name> Specific job within the workflow (if it has multiple)
148122--idle-timeout <min> Idle timeout in minutes (default: 30)
149123@@ -276,27 +250,18 @@ checks that need parity or remote state.
276250277251## Workflow
278252279-1. Decide whether the repo's local loop or maintainer Testbox mode is the right
280- default.
253+1. Decide whether the repo's local loop is the right default.
2812542. Only if Testbox is warranted, warm up early:
282-`blacksmith testbox warmup ci-check-testbox.yml --idle-timeout 90` → save the ID.
283- Use `--idle-timeout 240`, `720`, or `1440` only when the task duration
284- justifies it.
255+`blacksmith testbox warmup ci-check-testbox.yml` → save the ID
2852563. Write code while the testbox boots in the background.
2862574. Run the remote command when needed:
287258`blacksmith testbox run --id <ID> "npm test"`
288-5. If tests fail, fix code and re-run against the same warm box. Reuse this
289- same `tbx_...` for every run/download in the task unless it expires, the
290- workflow/ref/env must change, or the user asks for a fresh box.
259+5. If tests fail, fix code and re-run against the same warm box.
2912606. If you changed dependency manifests (package.json, etc.), prepend
292261 the install command: `blacksmith testbox run --id <ID> "npm install && npm test"`
2932627. If you need artifacts (coverage reports, build outputs, etc.), download them:
294263`blacksmith testbox download --id <ID> coverage/ ./coverage/`
2952648. Once green, commit and push.
296-9. If you used a long timeout or created probe boxes, clean up with
297-`blacksmith testbox list` and `blacksmith testbox stop --id <ID>`. Stop only
298- boxes from the current task unless the user asks you to clean up other active
299- boxes.
300265301266## OpenClaw full test suite
302267@@ -369,24 +334,10 @@ timeout is reached). Default timeout is 5m; use `--wait-timeout` for longer
369334Testboxes automatically shut down after being idle (default: 30 minutes).
370335If you need a longer session, increase the timeout at warmup time:
371336372-blacksmith testbox warmup ci-check-testbox.yml --idle-timeout 90
373-374-For OpenClaw maintainer work, use coarse timeout bins instead of probing many
375-small values:
376-377-- `90` minutes: default long-ish task
378-- `240` minutes: multi-hour task
379-- `720` minutes: all-day task
380-- `1440` minutes: overnight task; max without explicit user intent
381-382-Because the service currently accepts much larger values, cleanup is part of
383-the workflow, not a nice-to-have:
384-385-blacksmith testbox list
386-blacksmith testbox stop --id <ID>
337+blacksmith testbox warmup ci-check-testbox.yml --idle-timeout 60
387338388339## With options
389340390341blacksmith testbox warmup ci-check-testbox.yml --ref main
391-blacksmith testbox warmup ci-check-testbox.yml --idle-timeout 240
342+blacksmith testbox warmup ci-check-testbox.yml --idle-timeout 60
392343blacksmith testbox run --id <ID> "go test ./..."
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。