


















@@ -27,6 +27,10 @@ Options:
2727 --dry-run Print selected commands, do not run.
2828 -h, --help Show help.
292930+Environment:
31+ OPENCLAW_TESTBOX=1 or AUTOREVIEW_OPENCLAW_MAINTAINER_VALIDATION=1
32+ Enable maintainer-only OpenClaw Crabbox/Testbox validation policy.
33+3034Modes:
3135 local codex review --uncommitted
3236 branch codex review --base <base>
@@ -52,6 +56,7 @@ output=${AUTOREVIEW_OUTPUT:-${CODEX_REVIEW_OUTPUT:-}}
5256parallel_tests=
5357dry_run=false
5458codex_review_prompt=
59+openclaw_maintainer_validation=${AUTOREVIEW_OPENCLAW_MAINTAINER_VALIDATION:-${OPENCLAW_TESTBOX:-0}}
55605661while [[ $# -gt 0 ]]; do
5762case "$1" in
@@ -203,12 +208,16 @@ else
203208fi
204209205210repo_url=$(git -C "$repo_root" config --get remote.origin.url 2>/dev/null || true)
206-if [[ "$repo_url" == *"openclaw/openclaw"* ]]; then
211+case "$openclaw_maintainer_validation" in
212+ 1|true|True|TRUE|yes|Yes|YES|on|On|ON) openclaw_maintainer_validation=1 ;;
213+*) openclaw_maintainer_validation=0 ;;
214+esac
215+if [[ "$repo_url" == *"openclaw/openclaw"* && "$openclaw_maintainer_validation" == 1 ]]; then
207216 codex_review_prompt=$(cat <<'EOF'
208-OpenClaw autoreview validation policy:
217+OpenClaw maintainer autoreview validation policy:
209218- Review the diff by reading code, tests, and dependency contracts.
210219- Do not run local memory-heavy Node validation from review mode. This includes local pnpm checks/tests, Vitest, tsgo, npm test, and node scripts/run-vitest.mjs.
211-- If runtime proof is needed, use existing proof or route validation through OPENCLAW_TESTBOX=1 / Crabbox / Blacksmith Testbox and report the exact provider and id.
220+- If runtime proof is needed, use existing proof or route validation through Crabbox / Blacksmith Testbox and report the exact provider and id.
212221- If remote validation is not necessary for the finding, state the targeted proof that should be run instead of starting local tests.
213222EOF
214223)
@@ -236,7 +245,7 @@ if [[ "$reviewer" == auto || "$reviewer" == codex ]]; then
236245printf ' %q' "${review_cmd[@]}"
237246printf '\n'
238247if [[ -n "$codex_review_prompt" ]]; then
239-printf 'review policy: OpenClaw Crabbox/Testbox-aware validation prompt injected\n'
248+printf 'review policy: OpenClaw maintainer Crabbox/Testbox-aware validation prompt injected\n'
240249fi
241250else
242251printf 'review: %s prompt review\n' "$reviewer"
@@ -327,7 +336,7 @@ Rules:
327336- Review the proposed code change as a closeout reviewer.
328337- Focus on the diff below. If your CLI exposes read-only repository tools, inspect surrounding code and tests to verify findings; never modify files.
329338- Do not modify files.
330-- In OpenClaw, do not run local memory-heavy Node validation from review mode. Avoid local pnpm checks/tests, Vitest, tsgo, npm test, and node scripts/run-vitest.mjs. If runtime proof is needed, use existing proof or route validation through OPENCLAW_TESTBOX=1 / Crabbox / Blacksmith Testbox and report the exact provider and id.
339+${codex_review_prompt}
331340- Report only discrete, actionable issues introduced by this change.
332341- Prioritize correctness, regressions, security, data loss, performance cliffs, and missing tests that would catch a real bug.
333342- Do not report pre-existing issues, speculative risks, broad rewrites, style nits, changelog gaps, or findings that depend on unstated assumptions.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。