Skip to content

docs: default agent validation to remote runners - #100220

Merged
steipete merged 4 commits into
mainfrom
codex/testbox-first-agent-validation
Jul 5, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/testbox-first-agent-validation

Conversation

@steipete

@steipete steipete commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Agent sessions could run tests and broad validation locally because the repository guidance did not make remote execution or early Testbox warmup the default. Reused-box examples could also skip source sync, while contributor code lacked a safe remote routing boundary.

Why This Change Was Made

Make Crabbox remote execution the agent default for tests and compute-heavy work, with early Blacksmith Testbox warmup and lease reuse for trusted maintainer code. Add a fail-closed direct-AWS path for untrusted PRs: trusted launcher/config, public networking without Tailscale, no instance role or hydrated credentials, immutable reviewed SHA, isolated home, and a checksum-verified pinned Node/pnpm bootstrap.

User Impact

Maintainer agents should stop bogging down local Macs with test and validation workloads. Trusted work gets fast pre-warmed Testboxes; untrusted contributor code cannot inherit maintainer credentials, IAM roles, tailnet access, stale source, or a moving PR head.

Evidence

  • git diff --check
  • node scripts/docs-list.js
  • YAML frontmatter parsed for all three changed skills
  • bash -n scripts/crabbox-untrusted-bootstrap.sh
  • shellcheck scripts/crabbox-untrusted-bootstrap.sh
  • Bootstrap pnpm pin verified against package.json
  • Crabbox CLI flags verified for warmup, --fresh-pr, --no-hydrate, provider routing, shell execution, and timing JSON
  • Fresh autoreview completed with no accepted/actionable findings after security and network hardening
  • Exact-head direct AWS Crabbox proof: lease cbx_e99a39d99a98, run run_ea7b74f23edf, PR head d2c61915b9f4d2cee98ee1e58cd18af363d54078
  • crabbox inspect verified network=public with no Tailscale state before execution; the trusted script then passed IMDS no-role proof, Node archive checksum verification, Node v24.15.0, pnpm 11.2.2, full frozen-lockfile install, and bootstrap-script syntax validation
  • Proof lease released after the run

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: M maintainer Maintainer-authored PR labels Jul 5, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cab6daa5e5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

done

/usr/local/bin/node --version
/usr/local/bin/pnpm --version

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Verify the pinned Corepack cache

In the untrusted Crabbox path, later commands run pnpm with COREPACK_HOME=/opt/openclaw-untrusted-corepack, but this smoke check invokes /usr/local/bin/pnpm without that env. On a fresh lease this can download/use the crabbox user's default Corepack cache instead, so the bootstrap can fail on an avoidable registry fetch or pass without proving the prepared pinned cache that the untrusted test command actually depends on. Set COREPACK_HOME="$corepack_home" (and the bootstrapped PATH) for this verification.

Useful? React with 👍 / 👎.

@clawsweeper

clawsweeper Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 5, 2026, 4:56 AM ET / 08:56 UTC.

Summary
This PR makes OpenClaw agent validation remote-first through Crabbox/Testbox docs and skills, and adds scripts/crabbox-untrusted-bootstrap.sh for sanitized direct-AWS validation of untrusted PR code.

PR surface: Docs +308, Other +109. Total +417 across 9 files.

Reproducibility: yes. for the review finding from source: the PR head script invokes Corepack's env-node pnpm shim without exporting a pinned PATH. I did not run a live AWS repro in this read-only review.

Review metrics: 1 noteworthy metric.

  • Untrusted execution bootstrap: 1 added script invoked by docs/skill snippets. The new script becomes the reviewed boundary for running untrusted PR code without maintainer credentials.

Stored data model
Persistent data-model change detected: persistent cache schema: .agents/skills/crabbox/SKILL.md, persistent cache schema: scripts/crabbox-untrusted-bootstrap.sh, vector/embedding metadata: scripts/crabbox-untrusted-bootstrap.sh. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🦐 gold shrimp
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Export the pinned PATH before pnpm and the requested command.
  • Post refreshed exact-head direct-AWS proof with redacted runtime, PATH, node, pnpm, install, and command output.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR body includes direct AWS live-output proof for an older head, but not current-head proof that the remaining bootstrap path uses the pinned runtime; refreshed redacted logs or live output are needed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] The untrusted validation script can fail or run pnpm under an ambient/system Node if PATH omits /usr/local/bin or resolves another Node before the pinned install.
  • [P1] The PR body's direct AWS proof is for d2c61915b9f4d2cee98ee1e58cd18af363d54078, not the current head f764afe54baa52bc42c16e47234bd506ebbbaa6b.
  • [P1] This PR changes a security-sensitive maintainer validation boundary, so green CI does not settle the isolation and runtime-selection proof.

Maintainer options:

  1. Pin runtime path before merge (recommended)
    Export the bootstrapped PATH before pnpm and the requested command, then refresh exact-head untrusted Crabbox proof.
  2. Accept current runner behavior
    A maintainer can choose to rely on the raw image PATH despite the weaker pinned-runtime proof.
  3. Hold for a smaller validation PR
    If the security boundary is not ready, pause this PR or replace it with a narrower branch focused only on the validated pieces.

Next step before merge

  • [P1] The PR has a protected maintainer label, a security-boundary defect, and an exact-head proof gap that require contributor/maintainer action rather than an automated repair lane.

Maintainer decision needed

  • Question: Should this PR land after fixing and proving the pinned runtime path for untrusted direct-AWS validation?
  • Rationale: The PR changes how untrusted contributor code is executed for validation, and the remaining PATH issue affects the security proof rather than ordinary docs wording.
  • Likely owner: steipete — The same handle owns the current area history and is assigned to this PR.
  • Options:
    • Fix PATH and prove exact head (recommended): Export the pinned Node/Corepack PATH before pnpm and the requested command, then refresh redacted direct-AWS proof for f764afe54baa52bc42c16e47234bd506ebbbaa6b.
    • Accept ambient PATH risk: Maintainers may intentionally accept reliance on the raw image PATH, but that weakens the stated pinned-runtime proof.
    • Pause or replace: If the validation policy needs more design review, pause this PR or extract the safe subset into a smaller follow-up.

Security
Needs attention: The diff changes untrusted execution infrastructure, and the bootstrap still does not deterministically select the pinned Node runtime for pnpm.

Review findings

  • [P2] Export the pinned runtime PATH before pnpm — scripts/crabbox-untrusted-bootstrap.sh:105-108
Review details

Best possible solution:

Export a deterministic PATH including the pinned Node install before pnpm and the requested command, rerun exact-head direct AWS proof, then have the area owner decide whether the remote-first validation policy should land.

Do we have a high-confidence way to reproduce the issue?

Yes for the review finding from source: the PR head script invokes Corepack's env-node pnpm shim without exporting a pinned PATH. I did not run a live AWS repro in this read-only review.

Is this the best way to solve the issue?

No. The remote-first validation direction is plausible and now focused, but the bootstrap should set PATH deterministically and be proved at the current head before merge.

Full review comments:

  • [P2] Export the pinned runtime PATH before pnpm — scripts/crabbox-untrusted-bootstrap.sh:105-108
    The script installs Node 24 and pnpm, but then invokes /usr/local/bin/pnpm and the requested command without exporting a PATH that prefers that pinned install. Corepack's pnpm shim uses #!/usr/bin/env node, so a raw AWS image whose PATH omits /usr/local/bin or resolves another node first can fail or run under the wrong Node, meaning the untrusted validation proof no longer proves the pinned runtime. This prior blocker remains on the current head.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.86

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7e0d530e07d6.

Label changes

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.

Label justifications:

  • P2: This is a normal-priority maintainer validation improvement with a bounded but merge-blocking untrusted-bootstrap defect.
  • merge-risk: 🚨 security-boundary: The PR changes how untrusted contributor code is isolated and bootstrapped for validation.
  • merge-risk: 🚨 automation: The PR changes validation automation and can make remote proof fail or pass without exercising the intended pinned runtime.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body includes direct AWS live-output proof for an older head, but not current-head proof that the remaining bootstrap path uses the pinned runtime; refreshed redacted logs or live output are needed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Docs +308, Other +109. Total +417 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 8 401 93 +308
Config 0 0 0 0
Generated 0 0 0 0
Other 1 109 0 +109
Total 9 510 93 +417

Security concerns:

  • [medium] Untrusted bootstrap may use ambient Node — scripts/crabbox-untrusted-bootstrap.sh:105
    Because Corepack's pnpm shim resolves node through PATH, invoking pnpm without exporting the pinned install path can bypass the Node runtime the security boundary is intended to prove.
    Confidence: 0.88

What I checked:

  • Root and scoped policy read: Read root AGENTS.md plus docs/AGENTS.md and scripts/AGENTS.md; the review applied docs, script, proof, security-boundary, protected-label, and merge-risk guidance. (AGENTS.md:1, 7e0d530e07d6)
  • Current PR state: Live GitHub metadata shows current head f764afe54baa52bc42c16e47234bd506ebbbaa6b, maintainer label present, mergeable but unstable checks, and the PR body proof still names older head d2c61915b9f4d2cee98ee1e58cd18af363d54078. (f764afe54baa)
  • Bootstrap PATH defect: The PR head script installs pinned Node/Corepack, symlinks tools into /usr/local/bin, then invokes /usr/local/bin/pnpm and the requested command without exporting a deterministic PATH that prefers the pinned install. (scripts/crabbox-untrusted-bootstrap.sh:73, f764afe54baa)
  • Corepack shim contract: The local Corepack-generated pnpm shim starts with #!/usr/bin/env node, so the script's pnpm calls depend on the runtime PATH to select the intended Node binary.
  • Changed call surface: The PR head OpenClaw testing skill documents the untrusted run path as --script scripts/crabbox-untrusted-bootstrap.sh -- <expected_head_sha> /usr/local/bin/pnpm test <path-or-filter>, making the bootstrap script the entry point for the new untrusted execution boundary. (.agents/skills/openclaw-testing/SKILL.md:78, f764afe54baa)
  • Current main Crabbox default: Current main already defaults .crabbox.yaml to Blacksmith Testbox and allows CI, NODE_OPTIONS, and OPENCLAW_*; the PR's untrusted path intentionally overrides that wider allowlist with CRABBOX_ENV_ALLOW=CI. (.crabbox.yaml:1, 7e0d530e07d6)

Likely related people:

  • steipete: Current main history attributes the Crabbox/Testbox defaults and validation docs to Peter Steinberger, and this PR is assigned to the same handle. (role: recent area contributor and likely decision owner; confidence: high; commits: bafdec98680f, f7d7148cf047, f764afe54baa; files: .crabbox.yaml, docs/ci.md, .agents/skills/crabbox/SKILL.md)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (2 earlier review cycles)
  • reviewed 2026-07-05T08:13:25.591Z sha cab6daa5e519bd6b8697f9601e09353f4f91d52f :: needs changes before merge. :: [P2] Verify pnpm with the prepared Corepack cache | [P2] Regenerate the docs map
  • reviewed 2026-07-05T08:38:53.491Z sha 0c7f2cfc9a535ff6f026bda7d8edaf628637e165 :: needs real behavior proof before merge. :: [P2] Export the bootstrapped PATH before invoking pnpm

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Jul 5, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2c61915b9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

export HOME="$run_home"
export COREPACK_HOME="$corepack_home"
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
/usr/local/bin/pnpm --version

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Export the pinned Node path before pnpm

Fresh evidence after the prior comment: this version now exports COREPACK_HOME, but it still never updates PATH before the Corepack shim runs. The pnpm shim installed by Corepack starts with #!/usr/bin/env node, so on raw AWS images whose PATH resolves an older system Node (or omits /usr/local/bin), this smoke check and the install can run pnpm under the image Node instead of the Node 24 installed/proved above, causing untrusted validation to fail or not prove the pinned runtime. Export the bootstrapped path, e.g. $install_root/bin:/usr/local/bin:/usr/bin:/bin, before invoking pnpm and the requested command.

Useful? React with 👍 / 👎.

@steipete steipete self-assigned this Jul 5, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling extensions: codex size: XL and removed size: M labels Jul 5, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 5, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Jul 5, 2026
@steipete
steipete force-pushed the codex/testbox-first-agent-validation branch from 151c275 to f764afe Compare July 5, 2026 08:42
@openclaw-barnacle openclaw-barnacle Bot added size: M and removed app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling extensions: codex size: XL labels Jul 5, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jul 5, 2026
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready verification for f764afe54baa52bc42c16e47234bd506ebbbaa6b:

  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 100220 passed with exact-head hosted gates.
  • Hosted CI is green for the prepared head. QA Smoke CI run 28735121642 passed on attempt 2 after retrying one isolated 60-second native-command-session-target timeout; the retry passed unchanged.
  • Crabbox AWS proof: provider aws, lease cbx_e99a39d99a98, run run_ea7b74f23edf. It verified public networking, no Tailscale, no IMDS role, checksum-pinned Node/pnpm bootstrap, frozen install, and trusted-script execution.
  • Local proof: git diff --check, node scripts/docs-list.js, skill YAML parsing, bash -n scripts/crabbox-untrusted-bootstrap.sh, shellcheck scripts/crabbox-untrusted-bootstrap.sh, and generated docs-map verification.
  • Fresh autoreview: no accepted/actionable findings; final generated-map review rated correct at 0.99.
  • Before: agent validation guidance allowed local-first execution and did not require early Testbox warmup. After: agent tests and compute-heavy work default to pre-warmed, reused, source-synced Testbox leases, with a fail-closed credential-free AWS path for untrusted contributor code.

Known proof gaps: none.

@steipete
steipete merged commit b6f4cf5 into main Jul 5, 2026
153 of 159 checks passed
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the codex/testbox-first-agent-validation branch July 5, 2026 09:01
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 6, 2026
* docs: default agent validation to remote runners

* docs: isolate untrusted validation networking

* fix: harden untrusted Crabbox validation

* docs: refresh generated docs map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant