




















@@ -24,7 +24,7 @@ Options:
2424 --no-yolo Run nested Codex review with normal sandbox/approval prompts.
2525 --output FILE Also save output to file.
2626 --parallel-tests CMD Run review and test command concurrently.
27- Default: pnpm --config.offline=true run check when available.
27+ Default: PNPM_CONFIG_OFFLINE=true pnpm run check when available.
2828 --dry-run Print selected commands, do not run.
2929 -h, --help Show help.
3030@@ -58,6 +58,7 @@ parallel_tests=
5858parallel_tests_auto=false
5959dry_run=false
6060codex_review_prompt=
61+codex_review_stdin_prompt=false
6162openclaw_maintainer_validation=${AUTOREVIEW_OPENCLAW_MAINTAINER_VALIDATION:-${OPENCLAW_TESTBOX:-0}}
62636364while [[ $# -gt 0 ]]; do
@@ -174,6 +175,13 @@ has_package_check_script() {
174175>/dev/null 2>&1
175176}
176177178+auto_tests_disabled() {
179+case "${AUTOREVIEW_AUTO_TESTS:-${CODEX_REVIEW_AUTO_TESTS:-1}}" in
180+ 0|false|False|FALSE|no|No|NO|off|Off|OFF) return 0 ;;
181+*) return 1 ;;
182+esac
183+}
184+177185current_branch=$(git branch --show-current 2>/dev/null || true)
178186dirty=false
179187if [[ -n "$(git status --porcelain)" ]]; then
@@ -221,11 +229,11 @@ case "$openclaw_maintainer_validation" in
221229*) openclaw_maintainer_validation=0 ;;
222230esac
223231if [[ -z "$parallel_tests" && "$openclaw_maintainer_validation" != 1 ]] &&
224-[[ "${AUTOREVIEW_AUTO_TESTS:-${CODEX_REVIEW_AUTO_TESTS:-1}}" != 0 ]]; then
232+! auto_tests_disabled; then
225233if [[ -f package.json && -f pnpm-lock.yaml && -d node_modules ]] &&
226234command -v pnpm >/dev/null 2>&1 &&
227235 has_package_check_script; then
228- parallel_tests="pnpm --config.offline=true run check"
236+ parallel_tests="PNPM_CONFIG_OFFLINE=true pnpm run check"
229237 parallel_tests_auto=true
230238fi
231239fi
@@ -238,7 +246,10 @@ OpenClaw maintainer autoreview validation policy:
238246- If remote validation is not necessary for the finding, state the targeted proof that should be run instead of starting local tests.
239247EOF
240248)
241- review_cmd+=(-)
249+if [[ "$review_kind" == local ]]; then
250+ review_cmd+=(-)
251+ codex_review_stdin_prompt=true
252+fi
242253fi
243254244255printf 'autoreview target: %s\n' "$review_kind"
@@ -261,7 +272,7 @@ if [[ "$reviewer" == auto || "$reviewer" == codex ]]; then
261272printf 'review:'
262273printf ' %q' "${review_cmd[@]}"
263274printf '\n'
264-if [[ -n "$codex_review_prompt" ]]; then
275+if [[ "$codex_review_stdin_prompt" == true ]]; then
265276printf 'review policy: OpenClaw maintainer Crabbox/Testbox-aware validation prompt injected\n'
266277fi
267278else
@@ -312,7 +323,7 @@ trap cleanup EXIT
312323313324run_review() {
314325 mkdir -p "$(dirname "$review_output")"
315-if [[ -n "$codex_review_prompt" ]]; then
326+if [[ "$codex_review_stdin_prompt" == true ]]; then
316327printf '%s\n' "$codex_review_prompt" | "${review_cmd[@]}" 2>&1 | tee "$review_output"
317328else
318329"${review_cmd[@]}" 2>&1 | tee "$review_output"
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。