Skip to content

fix(agents): bound autoreview scope - #93435

Merged
vincentkoc merged 1 commit into
mainfrom
codex/autoreview-bounds-release
Jun 15, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
codex/autoreview-bounds-release

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jun 15, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Prevent autoreview closeout from expanding a narrow landing task into a broader redesign without an explicit scope decision.
  • Freeze an original scope baseline, classify review findings, pause after two non-converging review cycles, and stop speculative review-fix commit stacking.
  • Apply tighter freeze discipline to release and release-process work, and embed the same bounded-review policy in the helper prompt.
  • Add a deterministic harness assertion so future prompt edits cannot silently remove the scope and release guardrails.

A local retrospective across Codex sessions repeatedly showed valid review findings turning narrow landing or CI work into larger architectural lanes. This matters now because #92969 reproduced the failure mode: the review findings were useful, but the operator loop lacked a hard scope-break condition.

Intended outcome: autoreview still blocks concrete defects introduced by the patch, while broader design work becomes an explicit follow-up instead of silently accumulating in the landing branch.

Intentionally out of scope: changing product runtime behavior, release implementation, protocols, config, storage, or the structured review schema.

Review focus: whether the stop conditions are strict enough without hiding a concrete defect that must block landing.

AI-assisted: yes.

Linked context

Related #92969

Requested by a maintainer as follow-up to a review-driven scope-drift incident.

Real behavior proof (required for external PRs)

  • Behavior or issue addressed: autoreview scope drift and release-work overreach.
  • Real environment tested: local OpenClaw worktree plus Blacksmith Testbox through Crabbox.
  • Exact steps or command run after this patch: live bundled autoreview against the 3-file local diff; deterministic prompt-policy assertion; remote pnpm check:changed.
  • Evidence after fix: autoreview returned patch is correct with zero findings; Testbox tbx_01kv6v778mqm9fqd0382ghbabm completed the changed gate with exit 0: https://github.com/openclaw/openclaw/actions/runs/27584183756
  • Observed result after fix: the generated reviewer prompt contains both narrow-closeout and conditional release-freeze policy, and the existing harness verifies those policy markers.
  • What was not tested: full live malicious/benign multi-engine harness fixtures; no engine-selection or structured-output behavior changed.
  • Proof limitations or environment constraints: the prompt-policy regression check is deterministic; model compliance remains advisory by design.

Tests and validation

  • python3 skills/skill-creator/scripts/quick_validate.py .agents/skills/autoreview
  • PYTHONPYCACHEPREFIX=/tmp/autoreview-pycache python3 -m py_compile .agents/skills/autoreview/scripts/autoreview .agents/skills/autoreview/scripts/test-review-harness.py
  • Deterministic validate_prompt_policy harness assertion
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --stream-engine-output --prompt '<scope baseline>' - clean, zero findings, 0.97 confidence
  • Testbox-through-Crabbox pnpm check:changed - tbx_01kv6v778mqm9fqd0382ghbabm, exit 0

Regression coverage added: the existing review harness now fails if the helper prompt loses the closeout-scope or release-freeze policy.

Risk checklist

Did user-visible behavior change? No

Did config, environment, or migration behavior change? No

Did security, auth, secrets, network, or tool execution behavior change? No

Highest-risk area: the tighter prompt could discourage a reviewer from reporting a broad but necessary blocker.

Mitigation: the policy still requires concrete defects introduced or exposed by the diff to block landing, and explicitly allows broad findings when the current patch cannot safely land without the larger contract change.

Current review state

Next action: land the rebased single-commit PR.

Exact head: 016b3e1c449b38ba68fe50228c305b77d6391018.

Addressed review state: bundled autoreview clean with zero findings; deterministic policy assertion green; Testbox-through-Crabbox changed gate green at tbx_01kv6v778mqm9fqd0382ghbabm; no unresolved review threads. Public exact-SHA CI started after the rebase, and branch protection reports no required checks.

@vincentkoc vincentkoc self-assigned this Jun 15, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Jun 15, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review June 15, 2026 23:21
@vincentkoc
vincentkoc force-pushed the codex/autoreview-bounds-release branch from b848dee to 016b3e1 Compare June 15, 2026 23:57
@vincentkoc

Copy link
Copy Markdown
Member Author

Land-ready proof for 016b3e1c449b38ba68fe50228c305b77d6391018:

  • python3 skills/skill-creator/scripts/quick_validate.py .agents/skills/autoreview — passed
  • python3 -m py_compile .agents/skills/autoreview/scripts/autoreview .agents/skills/autoreview/scripts/test-review-harness.py — passed
  • deterministic validate_prompt_policy assertion — passed
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --stream-engine-output --prompt '<scope baseline>' — clean, zero findings, 0.97 confidence
  • Testbox-through-Crabbox pnpm check:changed — passed, tbx_01kv6v778mqm9fqd0382ghbabm, run https://github.com/openclaw/openclaw/actions/runs/27584183756
  • unresolved review threads — none

Public exact-SHA CI is running at https://github.com/openclaw/openclaw/actions/runs/27584381647. Branch protection reports no required checks; the exact changed content already passed the full fail-safe changed gate on Testbox.

@vincentkoc
vincentkoc merged commit fd806ad into main Jun 15, 2026
143 of 144 checks passed
@vincentkoc
vincentkoc deleted the codex/autoreview-bounds-release branch June 15, 2026 23:58
@vincentkoc

Copy link
Copy Markdown
Member Author

Landed on main.

  • Source head: 016b3e1
  • Squash commit: fd806ad
  • Gate: deterministic skill validation, clean bundled autoreview, and Testbox-through-Crabbox pnpm check:changed at tbx_01kv6v778mqm9fqd0382ghbabm
  • Final state: PR merged; squash commit verified on origin/main

vincentkoc added a commit to openclaw/agent-skills that referenced this pull request Jun 16, 2026
Mirror openclaw/openclaw#93435 into the canonical shared autoreview skill. Adds closeout-scope guidance, reviewer prompt policy, and deterministic harness coverage.

Verification:
- scripts/validate-skills
- python3 -m py_compile skills/autoreview/scripts/autoreview skills/autoreview/scripts/test-review-harness.py
- prompt policy assertion
- git diff --check
- ruby/bash syntax checks
- skills/autoreview/scripts/autoreview --mode local --prompt '<scope baseline>'
vincentkoc added a commit to openclaw/crawlkit that referenced this pull request Jun 16, 2026
Sync the vendored autoreview skill from openclaw/agent-skills#32, including the closeout scope guard from openclaw/openclaw#93435.\n\nVerification: diff whitespace check, shell syntax, Python compile, prompt-policy assertion, and canonical snapshot equality.
vincentkoc added a commit to openclaw/docs that referenced this pull request Jun 16, 2026
Sync the vendored autoreview skill from openclaw/agent-skills#32, including the closeout scope guard from openclaw/openclaw#93435.\n\nVerification: diff whitespace check, shell syntax, Python compile, prompt-policy assertion, and canonical snapshot equality.
vincentkoc added a commit to openclaw/gitcrawl that referenced this pull request Jun 16, 2026
Sync the vendored autoreview skill from openclaw/agent-skills#32, including the closeout scope guard from openclaw/openclaw#93435.\n\nVerification: diff whitespace check, shell syntax, Python compile, prompt-policy assertion, and canonical snapshot equality.
vincentkoc added a commit to openclaw/discrawl that referenced this pull request Jun 16, 2026
Sync the vendored autoreview skill from openclaw/agent-skills#32, including the closeout scope guard from openclaw/openclaw#93435.\n\nVerification: diff whitespace check, shell syntax, Python compile, prompt-policy assertion, and canonical snapshot equality.
vincentkoc added a commit to openclaw/clawrouter that referenced this pull request Jun 16, 2026
Sync the vendored autoreview skill from openclaw/agent-skills#32, including the closeout scope guard from openclaw/openclaw#93435.\n\nVerification: diff whitespace check, shell syntax, Python compile, prompt-policy assertion, and canonical snapshot equality.
vincentkoc added a commit to openclaw/clawhub that referenced this pull request Jun 16, 2026
Sync the vendored autoreview skill from openclaw/agent-skills#32, including the closeout scope guard from openclaw/openclaw#93435.\n\nVerification: diff whitespace check, shell syntax, Python compile, prompt-policy assertion, and repo oxfmt check for SKILL.md.
vincentkoc added a commit to openclaw/acpx that referenced this pull request Jun 16, 2026
Sync the vendored autoreview skill from openclaw/agent-skills#32, including the closeout scope guard from openclaw/openclaw#93435.\n\nVerification: diff whitespace check, shell syntax, Python compile, prompt-policy assertion, and repo oxfmt check for SKILL.md.
vincentkoc added a commit to openclaw/crabbox that referenced this pull request Jun 16, 2026
Sync the vendored autoreview skill from openclaw/agent-skills#32, including the closeout scope guard from openclaw/openclaw#93435.\n\nVerification: diff whitespace check, shell syntax, Python compile, prompt-policy assertion, and canonical snapshot equality.
vincentkoc added a commit to openclaw/openclaw-windows-node that referenced this pull request Jun 16, 2026
Sync the vendored autoreview skill from openclaw/agent-skills#32, including the closeout scope guard from openclaw/openclaw#93435.\n\nVerification: diff whitespace check, shell syntax, Python compile, prompt-policy assertion, and canonical snapshot equality.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 16, 2026
joshp123 pushed a commit to opentrawl/opentrawl that referenced this pull request Jul 8, 2026
Sync the vendored autoreview skill from openclaw/agent-skills#32, including the closeout scope guard from openclaw/openclaw#93435.\n\nVerification: diff whitespace check, shell syntax, Python compile, prompt-policy assertion, and canonical snapshot equality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant