























@@ -493,16 +493,93 @@ The sanity check fails fast when required root files such as `pnpm-lock.yaml` di
493493494494`pnpm testbox:run` also terminates a local Blacksmith CLI invocation that stays in the sync phase for more than five minutes without post-sync output. Set `OPENCLAW_TESTBOX_SYNC_TIMEOUT_MS=0` to disable that guard, or use a larger millisecond value for unusually large local diffs.
495495496-Crabbox is the repo-owned second remote-box path for Linux proof when Blacksmith is unavailable or when owned cloud capacity is preferable. Warm a box, hydrate it through the project workflow, then run commands through the Crabbox CLI:
496+Crabbox is the repo-owned remote-box wrapper for maintainer Linux proof. Use it when a check is too broad for a local edit loop, when CI parity matters, or when the proof needs secrets, Docker, package lanes, reusable boxes, or remote logs. The normal OpenClaw backend is `blacksmith-testbox`; owned AWS/Hetzner capacity is a fallback for Blacksmith outages, quota issues, or explicit owned-capacity testing.
497+498+Before a first run, check the wrapper from the repo root:
499+500+```bash
501+pnpm crabbox:run -- --help | sed -n '1,120p'
502+```
503+504+The repo wrapper refuses a stale Crabbox binary that does not advertise `blacksmith-testbox`. Pass the provider explicitly even though `.crabbox.yaml` has owned-cloud defaults.
505+506+Changed gate:
507+508+```bash
509+pnpm crabbox:run -- --provider blacksmith-testbox \
510+ --blacksmith-org openclaw \
511+ --blacksmith-workflow .github/workflows/ci-check-testbox.yml \
512+ --blacksmith-job check \
513+ --blacksmith-ref main \
514+ --idle-timeout 90m \
515+ --ttl 240m \
516+ --timing-json \
517+ --shell -- \
518+"env 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 pnpm check:changed"
519+```
520+521+Focused test rerun:
522+523+```bash
524+pnpm crabbox:run -- --provider blacksmith-testbox \
525+ --blacksmith-org openclaw \
526+ --blacksmith-workflow .github/workflows/ci-check-testbox.yml \
527+ --blacksmith-job check \
528+ --blacksmith-ref main \
529+ --idle-timeout 90m \
530+ --ttl 240m \
531+ --timing-json \
532+ --shell -- \
533+"env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test <path-or-filter>"
534+```
535+536+Full suite:
537+538+```bash
539+pnpm crabbox:run -- --provider blacksmith-testbox \
540+ --blacksmith-org openclaw \
541+ --blacksmith-workflow .github/workflows/ci-check-testbox.yml \
542+ --blacksmith-job check \
543+ --blacksmith-ref main \
544+ --idle-timeout 90m \
545+ --ttl 240m \
546+ --timing-json \
547+ --shell -- \
548+"env 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 pnpm test"
549+```
550+551+Read the final JSON summary. The useful fields are `provider`, `leaseId`, `syncDelegated`, `exitCode`, `commandMs`, and `totalMs`. One-shot Blacksmith-backed Crabbox runs should stop the Testbox automatically; if a run is interrupted or cleanup is unclear, inspect live boxes and stop only the boxes you created:
552+553+```bash
554+blacksmith testbox list
555+blacksmith testbox stop --id <tbx_id>
556+```
557+558+Use reuse only when you intentionally need multiple commands on the same hydrated box:
559+560+```bash
561+pnpm crabbox:run -- --provider blacksmith-testbox --id <tbx_id> --no-sync --timing-json --shell -- "pnpm test <path-or-filter>"
562+pnpm crabbox:stop -- <tbx_id>
563+```
564+565+If Crabbox is the broken layer but Blacksmith itself works, use direct Blacksmith as a narrow fallback:
566+567+```bash
568+blacksmith testbox warmup ci-check-testbox.yml --ref main --idle-timeout 90
569+blacksmith testbox run --id <tbx_id> "env 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 pnpm check:changed"
570+blacksmith testbox stop --id <tbx_id>
571+```
572+573+Escalate to owned Crabbox capacity only when Blacksmith is down, quota-limited, missing the needed environment, or owned capacity is explicitly the goal:
497574498575```bash
499-pnpm crabbox:warmup -- --idle-timeout 90m
500-pnpm crabbox:hydrate -- --id <cbx_id>
501-pnpm crabbox:run -- --id <cbx_id> --shell "OPENCLAW_TESTBOX=1 pnpm check:changed"
502-pnpm crabbox:stop -- <cbx_id>
576+pnpm crabbox:warmup -- --provider aws --class beast --market on-demand --idle-timeout 90m
577+pnpm crabbox:hydrate -- --id <cbx_id-or-slug>
578+pnpm crabbox:run -- --id <cbx_id-or-slug> --timing-json --shell -- "env NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm check:changed"
579+pnpm crabbox:stop -- <cbx_id-or-slug>
503580```
504581505-`.crabbox.yaml` owns provider, sync, and GitHub Actions hydration defaults. It excludes local `.git` so the hydrated Actions checkout keeps its own remote Git metadata instead of syncing maintainer-local remotes and object stores, and it excludes local runtime/build artifacts that should never be transferred. `.github/workflows/crabbox-hydrate.yml` owns checkout, Node/pnpm setup, `origin/main` fetch, and the non-secret environment handoff that later `crabbox run --id <cbx_id>` commands source.
582+`.crabbox.yaml` owns provider, sync, and GitHub Actions hydration defaults for owned-cloud lanes. It excludes local `.git` so the hydrated Actions checkout keeps its own remote Git metadata instead of syncing maintainer-local remotes and object stores, and it excludes local runtime/build artifacts that should never be transferred. `.github/workflows/crabbox-hydrate.yml` owns checkout, Node/pnpm setup, `origin/main` fetch, and the non-secret environment handoff for owned-cloud `crabbox run --id <cbx_id>` commands.
506583507584## Related
508585此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。