Skip to content

docs: respect configured Crabbox provider for agent tests - #104485

Closed
hxy91819 wants to merge 4 commits into
openclaw:mainfrom
hxy91819:feature/respect-crabbox-provider-preference
Closed

hxy91819 wants to merge 4 commits into
openclaw:mainfrom
hxy91819:feature/respect-crabbox-provider-preference

Conversation

@hxy91819

@hxy91819 hxy91819 commented Jul 11, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

OpenClaw's agent-testing guidance hardcoded Blacksmith Testbox for ordinary trusted validation. That caused agents to override an existing explicit Crabbox choice such as CRABBOX_PROVIDER=local-container, even though the wrapper already supports that environment override before the repository's Blacksmith default.

Why This Change Was Made

The testing and Crabbox skills now tell trusted agent workflows to omit --provider unless a specific proof or safety route requires one. This preserves the existing wrapper selection contract:

  1. an explicitly requested/command-line provider;
  2. platform routing such as automatic Azure selection for Windows/WSL2;
  3. CRABBOX_PROVIDER;
  4. the repository .crabbox.yaml default (blacksmith-testbox).

The skills distinguish the configured environment/repository provider reported by crabbox config show --json from the actual backend selected for a command. The wrapper's emitted [crabbox] ... provider=... diagnostic is authoritative for actual provider attribution, including explicit overrides and automatic platform routing.

The skills also distinguish a Crabbox-managed local-container run from direct host testing and avoid inferring AWS from the shared cbx_... lease prefix.

ClawSweeper correctly identified that crabbox config show --json does not create a user-config preference above repository config. The PR was narrowed accordingly: it does not change scripts/crabbox-wrapper.mjs, adds no merged-config precedence contract, and adds no new fail-closed startup behavior.

AI-assisted: this change was agent-tested with Claude through acpx, reviewed with Codex autoreview, and revised in response to ClawSweeper.

User Impact

Developers who explicitly set CRABBOX_PROVIDER can run ordinary trusted agent validation on that backend without agents forcing Blacksmith Testbox. Developers without an explicit override continue to use the repository's Blacksmith Testbox default.

A configured local container still executes tests inside a Crabbox-managed Docker lease; it does not silently downgrade to host-local execution. Remote, cross-platform, untrusted-source, and Testbox-specific proof requirements continue to select their required backend explicitly.

Evidence

  • Blind acpx claude validation independently resolved the inherited CRABBOX_PROVIDER=local-container; the prompt did not name the expected provider.
  • The first agent attempt exposed a guidance defect by running the focused test directly on the host. That result was rejected, and the skills were clarified to require wrapper-managed Docker execution for local-container.
  • Post-fix Claude runs correctly provisioned local-container Docker leases, ran the focused wrapper suite inside the containers, and cleaned up their leases.
  • Provider-attribution probe: configured provider local-container; wrapper invoked with explicit --provider aws emitted provider=aws, confirming why wrapper output must be authoritative.
  • Final post-rebase proof:
    • base: upstream/main at 161525d43c4c0157a8fd4feceb2bf96cb4db5900;
    • provider/runtime: provider=local-container, runtime=docker, Crabbox 0.37.1;
    • lease: cbx_29a3dd41d47d / brisk-crab-d2c5, explicitly deleted after the run;
    • command: node scripts/crabbox-wrapper.mjs run --id cbx_29a3dd41d47d --timing-json -- corepack pnpm test test/scripts/crabbox-wrapper.test.ts --reporter=default;
    • result: 1 test file passed; 192/192 tests passed.
  • Final diff relative to upstream/main: two skill files only; zero wrapper/test code diff.
  • git diff --check — passed.
  • .agents/skills/autoreview/scripts/autoreview --mode local --stream-engine-output on e0bb1c889ae changes — clean, no accepted/actionable findings.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Jul 11, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 11, 2026
@clawsweeper

clawsweeper Bot commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed July 13, 2026, 2:33 PM ET / 18:33 UTC.

Summary
The PR revises the Crabbox and testing skills to inherit configured provider selection, clarify selected-backend attribution, and require wrapper-managed execution for local containers.

PR surface: Docs +68. Total +68 across 2 files.

Reproducibility: yes. from source: set CRABBOX_PROVIDER=local-container and follow the proposed ordinary trusted-test instructions; the omitted --provider allows the environment value to win instead of the root-mandated Testbox default.

Review metrics: none identified.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦞 diamond lobster
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

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

Rank-up moves:

  • Restore explicit Blacksmith Testbox selection for ordinary trusted maintainer tests in both skill documents.

Risk before merge

  • [P1] An ambient CRABBOX_PROVIDER value can silently redirect ordinary trusted maintainer tests from the credential-hydrated Testbox workflow to local-container, changing the repository’s expected validation environment.
  • [P1] The documentation would leave two competing sources of truth: root policy mandates the Testbox default while the skills instruct agents to honor an inherited provider first.

Maintainer options:

  1. Restore the trusted Testbox route (recommended)
    Keep the explicit Blacksmith Testbox provider in ordinary trusted-agent test instructions and limit provider inheritance to an explicit task-specific backend choice.
  2. Pause for a policy change
    If configured provider inheritance should replace the trusted Testbox default, pause automerge and obtain an explicit root-policy decision before changing both policy and skills together.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Preserve explicit Blacksmith Testbox selection for ordinary trusted maintainer tests in both skills, while retaining configured-versus-selected provider attribution and wrapper-managed local-container guidance for explicitly requested local proof.

Next step before merge

  • The automerge-enabled PR has one narrow mechanical blocker: align both skills with the explicit trusted-Testbox contract without discarding the validated attribution and local-container improvements.

Security
Cleared: The diff changes skill documentation only and preserves the prohibition against running untrusted source on credential-hydrated Testbox; no concrete security or supply-chain regression was found.

Review findings

  • [P1] Preserve the explicit trusted Testbox route — .agents/skills/openclaw-testing/SKILL.md:21-23
Review details

Best possible solution:

Keep explicit Blacksmith Testbox selection for ordinary trusted maintainer agent validation, while retaining the PR’s useful configured-versus-selected attribution and wrapper-managed local-container guidance for tasks that explicitly request that backend.

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

Yes, from source: set CRABBOX_PROVIDER=local-container and follow the proposed ordinary trusted-test instructions; the omitted --provider allows the environment value to win instead of the root-mandated Testbox default.

Is this the best way to solve the issue?

No. The provider-attribution and managed-local-container clarifications are sound, but changing the ordinary trusted backend default is not the narrowest policy-compatible fix.

Full review comments:

  • [P1] Preserve the explicit trusted Testbox route — .agents/skills/openclaw-testing/SKILL.md:21-23
    The root policy requires trusted maintainer agent tests to default explicitly to Blacksmith Testbox, but this wording lets an ambient CRABBOX_PROVIDER such as local-container win first. That silently changes the expected validation and credential environment; keep the explicit Testbox route for ordinary trusted work and reserve inherited local providers for an explicitly requested proof path.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5f3d56a2f022.

Label changes

Label justifications:

  • P2: This is a bounded developer-workflow documentation defect with limited blast radius but a concrete effect on trusted validation routing.
  • merge-risk: 🚨 compatibility: Merging the PR as written can change the backend used by existing trusted-agent workflows whenever CRABBOX_PROVIDER is present.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: 🚀 automerge armed: This PR is in ClawSweeper's automerge lane. Sufficient (terminal): The PR provides credible after-change terminal evidence of a wrapper-managed local-container Docker run, selected-provider attribution, lease cleanup, and 192 passing focused tests.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR provides credible after-change terminal evidence of a wrapper-managed local-container Docker run, selected-provider attribution, lease cleanup, and 192 passing focused tests.
Evidence reviewed

PR surface:

Docs +68. Total +68 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 2 121 53 +68
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 121 53 +68

Acceptance criteria:

  • [P1] git diff --check.
  • [P1] pnpm check-docs.

What I checked:

  • Repository policy: The fully read root policy explicitly requires trusted maintainer code to default to Blacksmith Testbox and says likely test work should pre-warm that safe backend immediately. (AGENTS.md, 5f3d56a2f022)
  • Changed trusted-test routing: The PR instead says trusted maintainer work uses an explicit provider, then CRABBOX_PROVIDER, then the repository Testbox default; an inherited local-container value therefore bypasses the required ordinary trusted-Testbox route. (.agents/skills/openclaw-testing/SKILL.md:21, e0bb1c889aeb)
  • Current Crabbox contract: Current main describes Testbox as the default OpenClaw agent backend for trusted maintainer code and heavy pnpm gates, while direct AWS is reserved for specifically named proof capabilities. (.agents/skills/crabbox/SKILL.md:256, 5f3d56a2f022)
  • Re-review continuity: The reviewed head remains e0bb1c8, the same SHA reviewed in the prior cycles; their explicit trusted-Testbox finding has not been changed or removed. (.agents/skills/openclaw-testing/SKILL.md:21, e0bb1c889aeb)
  • Real behavior proof: The PR body reports a wrapper-managed local-container Docker lease, authoritative provider diagnostics, cleanup, and 192 passing focused wrapper tests; this validates that route but does not resolve the repository-policy conflict. (e0bb1c889aeb)

Likely related people:

  • steipete: The current root policy and repository Testbox workflow history make this the strongest available routing candidate for the intended trusted-agent backend contract. (role: trusted validation workflow owner; confidence: medium; files: AGENTS.md, .agents/skills/crabbox/SKILL.md, .agents/skills/openclaw-testing/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 (14 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-13T10:54:20.822Z sha e0bb1c8 :: needs changes before merge. :: [P1] Align the skills with the root Testbox default
  • reviewed 2026-07-13T12:33:34.075Z sha e0bb1c8 :: needs changes before merge. :: [P1] Preserve the repository Testbox default
  • reviewed 2026-07-13T12:50:28.334Z sha e0bb1c8 :: needs changes before merge. :: [P1] Preserve the repository Testbox default
  • reviewed 2026-07-13T14:20:54.449Z sha e0bb1c8 :: needs changes before merge. :: [P1] Preserve the repository Testbox default
  • reviewed 2026-07-13T15:22:41.653Z sha e0bb1c8 :: needs changes before merge. :: [P1] Preserve the explicit trusted Testbox route
  • reviewed 2026-07-13T15:38:14.942Z sha e0bb1c8 :: needs changes before merge. :: [P1] Preserve the trusted Testbox default
  • reviewed 2026-07-13T15:58:58.928Z sha e0bb1c8 :: needs changes before merge. :: [P1] Preserve the explicit trusted Testbox route
  • reviewed 2026-07-13T18:15:29.100Z sha e0bb1c8 :: needs changes before merge. :: [P1] Preserve the explicit trusted Testbox route

@hxy91819
hxy91819 marked this pull request as ready for review July 12, 2026 13:25
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jul 12, 2026
@hxy91819
hxy91819 force-pushed the feature/respect-crabbox-provider-preference branch from 45457f9 to f6e14d2 Compare July 12, 2026 13:39
@hxy91819 hxy91819 changed the title fix: respect local Crabbox provider preferences docs: respect configured Crabbox provider for agent tests Jul 12, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: S and removed scripts Repository scripts size: M labels Jul 12, 2026
@hxy91819

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jul 12, 2026
@hxy91819

Copy link
Copy Markdown
Member Author

@clawsweeper automerge

@clawsweeper

clawsweeper Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

ClawSweeper 🐠 automerge status

No new branch changes from this pass. ClawSweeper left the branch untouched instead of making a noisy edit.

Executor outcome: validation command failed (pnpm lint): $ node scripts/run-oxlint-shards.mjs [oxlint:core] starting [oxlint:core] finished [oxlint:extensions] starting [oxlint:extensions] finished [oxlint:scripts] starting [oxlint:scripts] finished [WARN] Unsupported engine:....
Worker summary: Make this PR merge-ready for ClawSweeper automerge. Rebase onto latest main, address PR comments and review findings, fix CI/check failures, preserve release-note context, and validate before returning.

Worker actions:

  • build_fix_artifact on this PR: planned - Maintainer opted this PR into ClawSweeper automerge/autofix repair; run the direct Codex edit loop after live hydration instead of a separate read-only planning pass.

No push, rebase, replacement PR, merge, or ClawSweeper re-review happened on this pass.

fish notes: reasoning high.

Automerge progress:

@clawsweeper clawsweeper Bot added the clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge label Jul 12, 2026
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jul 13, 2026
@clawsweeper clawsweeper Bot added status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 13, 2026
@clawsweeper

clawsweeper Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper 🐠 reef update

Thanks for the work on this. ClawSweeper opened a replacement PR only because the source branch was not writable from the available bot permissions. branch tides, not contributor blame.

Why replacement: ClawSweeper could not update the source PR branch directly; GitHub did not grant sufficient push rights to the bot for that branch.
Replacement PR: #106789
Why close: this run explicitly closes the superseded source PR after the credited replacement PR is open, so review continues in one place.
Closing this one because the run was configured to close superseded source PRs after opening the replacement.
The replacement PR keeps the contributor trail visible for review and release notes.
Co-author credit kept:

fish notes: reasoning high; reviewed against fc9925f.

@clawsweeper clawsweeper Bot closed this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant