Skip to content

fix(review): scope Codex proof policy - #1093

Merged
brokemac79 merged 3 commits into
mainfrom
codex/csw-113-codex-policy-applicability
Aug 10, 2026
Merged

brokemac79 merged 3 commits into
mainfrom
codex/csw-113-codex-policy-applicability

Conversation

@brokemac79

@brokemac79 brokemac79 commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • scope dependency-specific review policy to changes that carry a citeable affirmative dependency signal
  • distinguish OpenClaw Code Mode from the separate Codex Code Mode implementation
  • keep reviewer-side checkout, network, credential, and inspection limitations out of contributor proof status
  • validate the boundary with one negative and two positive exact-item behavior controls

Problem

openclaw/openclaw#119874 was reviewed twice at the same head. One review correctly found sufficient proof and routed it to maintainer review; a later review treated OpenClaw Code Mode as Codex-related, could not inspect sibling ../codex, and downgraded the PR to status: needs proof.

The target's own Code Mode documentation says the OpenClaw and Codex implementations are separate. The missing sibling checkout was a reviewer-environment limitation, not missing contributor proof. Because proof status drives the public status and rating labels, the classification error became a misleading contributor-facing gate.

Implementation

The exact-item review prompt now applies a dependency-specific gate only when the reviewed material supplies at least one affirmative signal:

  1. the patch directly imports, executes, generates from, or tests against dependency code, schema, harness, runtime, or protocol;
  2. the PR's behavior or proof claims require compatibility with that dependency contract; or
  3. current target source or docs identify the dependency as the authoritative implementation or test oracle.

The reviewer must cite the exact file, symbol, document, or PR claim in structured evidence. Without a citeable signal, the dependency gate does not apply. Shared names, similar tools, nearby implementations, optional integrations, and an unavailable sibling checkout are explicit negative controls.

OpenClaw Code Mode remains separate from Codex Code Mode unless one of those positive signals establishes a real Codex harness/runtime/protocol dependency.

The proof contract also says reviewer-side environment limitations must not:

  • turn otherwise sufficient evidence into insufficient
  • set needsContributorAction: true
  • lower proof or overall rating

Applicable reviewer limitations remain maintainer-facing risks or decisions. Inapplicable limitations are omitted.

This does not change lifecycle leasing, durable comment rendering, label derivation, workflow routing, queues, or OpenClaw Bay. The deterministic path remains: review JSON supplies realBehaviorProof.status and needsContributorAction; label policy and comment rendering expose that classification without reclassifying dependency applicability.

No pinned-text test is added. VISION.md says to prefer a review gate over literal prompt assertions, so the final branch is prompt-only and uses the exact-item control runs below as behavior evidence.

Validation

  • pnpm run build:all
  • node --test test/review-prompt-policy.test.ts — 35/35 existing tests passed
  • pnpm exec oxfmt --check prompts/review-item.md test/review-prompt-policy.test.ts
  • git diff --check origin/main...HEAD
  • final branch diff: one file, prompts/review-item.md, +30 lines
  • dirty patch: codex review --uncommitted — no actionable findings
  • committed branch: codex review --base origin/main — no actionable findings
  • pnpm run review -- --local-only --item-number 119874 — negative control completed without GitHub mutation
  • pnpm run review -- --local-only --item-number 120360 — positive Codex-contract control completed without GitHub mutation
  • pnpm run review -- --local-only --item-number 121009 — positive Codex-contract control completed without GitHub mutation

Docker-backed Crabbox validation used:

  • provider: local-container
  • image: mcr.microsoft.com/playwright:v1.60.0-noble
  • lease: cbx_aa253be16e16
  • committed head: 7b1c74b1a7923710eb38053b87ac17b50657e70b
  • verified Git tree: dfcd2b1a0b44d504b8308b4ce6eeebb9537d3a84
  • result: install, all TypeScript builds, 35/35 existing policy tests, and focused formatting passed; PROOF_COMPLETE; lease auto-stopped

The no-sync run cloned the prior public PR head, applied only commit 7b1c74b1 as a binary patch, and verified its resulting Git tree exactly before executing tests. This avoids the known Windows rsync transport failure without changing provider.

Real Behavior Proof

Claim: dependency policy is deny-by-default without a citeable source/claim signal, while genuinely Codex-dependent changes remain gated.

Exercised surface: the built ClawSweeper exact-item review runner with the changed prompt.

Negative scenario: current openclaw/openclaw PR #119874 at e072b5ff8630e02a7d85a945b7537f2a4b754c41.

Observed result:

  • review_status: complete, high-confidence keep_open
  • reviewed OpenClaw main: 560d172ae7e396cf51924fb88af860e92afa0e62
  • real behavior proof: sufficient; needsContributorAction: false
  • overall/proof/patch tiers: B/A/B
  • evidence cites OpenClaw's independent QuickJS implementation and confirms the patch does not import, execute, test, or claim compatibility with a Codex runtime/schema/harness/protocol
  • the earlier sibling-Codex blocker is explicitly classified as inapplicable

Positive controls:

  • #120360 at be371072739368b3f9876c3fe3fe99897ee6fba3: the PR body cites exact Codex commits and contract files; the review applies the Codex gate and records the unavailable historical objects as a maintainer dependency-proof decision.
  • #121009 at a089fa04534eed4f786313ed8bb0f2df47c09e27: the PR body explicitly claims compatibility with Codex JSONL item.completed behavior; the review applies the Codex gate and cites direct Codex event/processor source. Its separate live-channel proof gap remains mock_only with contributor action required.

Artifacts:

  • artifacts/local-review-119874/119874.md
  • artifacts/local-review-120360/120360.md
  • artifacts/local-review-121009/121009.md

All three commands used review --local-only; no GitHub comments, labels, queues, workflows, or apply actions were mutated. Their managed target checkouts remained clean. The later test-only commit removed literal prompt assertions and did not alter the exercised prompt.

Limits: model output remains probabilistic. The prompt makes applicability evidence-auditable, but it does not replace model judgment with a static source parser.

Maintainer Policy Decision

This is an irreducible maintainer product/policy decision, not missing contributor proof.

Decision: Should exact-item review globally require a citeable affirmative dependency signal before applying dependency-specific repository policy?

Recommendation: Accept the scoped boundary. It preserves hard dependency gates for direct code/schema/harness use, explicit compatibility claims, and source-declared authoritative contracts while preventing shared naming or reviewer sandbox limitations from creating contributor proof failures.

Objective acceptance criteria:

  1. #119874 remains sufficient with no contributor action because no affirmative Codex dependency signal exists.
  2. #120360 remains Codex-gated because its proof explicitly depends on cited Codex commits and source contracts.
  3. #121009 remains Codex-gated because it explicitly claims compatibility with Codex JSONL event behavior.
  4. An unavailable reviewer checkout affects proof status only after an affirmative signal establishes that the dependency gate applies.

Rollback: before merge, decline or close this PR. After landing, revert the landed PR commit and re-review affected items. There is no schema, stored-data, queue, or migration rollback; public labels/comments change only when a subsequent review republishes them.

Risks / Rollout

This is prompt-level policy, so unusual dependency-backed PRs still require reviewer judgment. The positive boundary is explicit and evidence-bearing: actual dependency use or a claimed contract still requires repository-mandated sibling-source inspection.

No changelog change: normal ClawSweeper fixes are release-note context only.

@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 10, 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: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 5:25 AM ET / 09:25 UTC.

ClawSweeper review

What this changes

The PR adds a citeable affirmative-signal rule for dependency-specific review policy and prevents reviewer-environment limitations from being classified as missing contributor proof.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for a maintainer policy decision: the narrow, prompt-only change is coherent and its prior pinned-text-test finding is resolved, but it deliberately changes the global boundary for dependency-specific review gates.

Priority: P2
Reviewed head: 7b1c74b1a7923710eb38053b87ac17b50657e70b
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The branch is narrowly scoped, has direct runner-based behavior evidence, and has no actionable patch defect; merge remains a maintainer policy choice.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body provides current-head after-fix exact-item runner outputs for one negative and two positive controls, with a Docker-backed Crabbox environment, observed classifications, and stated limits.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body provides current-head after-fix exact-item runner outputs for one negative and two positive controls, with a Docker-backed Crabbox environment, observed classifications, and stated limits.
Evidence reviewed 5 items Current-main gap: The proposed affirmative-signal and reviewer-environment rules are 30 new prompt lines and are not ancestors of current main, so this active PR remains necessary rather than being implemented on main.
Focused implementation: The diff changes only the review prompt: it requires an exact evidence citation before applying a dependency-specific gate and preserves otherwise sufficient proof when only the reviewer environment is unavailable.
Repository policy fit: The branch removed the earlier literal prompt assertions; the remaining prompt-only approach and exact-item controls align with the repository vision’s instruction not to add pinned-text tests where a review gate suffices.
Findings None None.
Security None None.

How this fits together

Exact-item review consumes a pull request’s context, source, and proof, then produces a proof classification that drives the public review report, labels, and routing. This change adjusts how the review decides whether a dependency-specific policy applies before classifying proof.

flowchart LR
  A[Issue or PR context] --> B[Exact-item review]
  B --> C[Dependency applicability]
  C --> D[Proof classification]
  D --> E[Review report]
  E --> F[Labels and routing]
Loading

Decision needed

Question Recommendation
Should exact-item review require a citeable affirmative dependency signal before a dependency-specific policy can alter contributor proof status? Adopt the scoped gate: Merge the prompt change so direct contracts and explicit compatibility claims remain gated while unrelated naming and reviewer limitations do not downgrade contributor proof.

Why: This is a global trust and contributor-facing classification policy; source review can confirm the patch mechanics but cannot determine the intended permanent review boundary.

Before merge

  • Resolve merge risk (P1) - Merging changes the automated proof and rating boundary for every reviewed repository; maintainers should explicitly accept that only citeable dependency signals trigger dependency-specific policy rather than retaining the broader interpretation.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Review-policy surface 1 file changed; +30, -0 lines A small prompt change directly affects proof labels and routing across exact-item reviews.

Merge-risk options

Maintainer options:

  1. Confirm the affirmative-signal policy (recommended)
    Merge after a maintainer confirms that evidence-cited dependency applicability is the intended global boundary for automated proof classification.
  2. Retain the existing interpretation
    Close or revise the PR if maintainers want dependency-specific review policy to remain applicable without an affirmative source, contract, or claim signal.

Technical review

Best possible solution:

Adopt the evidence-cited boundary only if maintainers want reviewer-environment limitations to remain maintainer-facing while direct dependency contracts retain their existing proof gates.

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

Yes, a concrete control path is documented: run the exact-item reviewer against the cited negative and positive PR revisions and inspect the resulting dependency applicability and proof fields. I did not rerun those external-item controls in this read-only review.

Is this the best way to solve the issue?

Unclear: the implementation is narrow and resolves the prior pinned-test concern, but the global affirmative-signal boundary requires explicit maintainer policy acceptance.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2cc2c0df8d53.

Labels

Label justifications:

  • P2: This changes automated review and contributor-facing proof classification with a bounded but repository-wide blast radius.
  • merge-risk: 🚨 automation: The prompt controls how the review automation assigns proof status, ratings, and follow-up routing.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides current-head after-fix exact-item runner outputs for one negative and two positive controls, with a Docker-backed Crabbox environment, observed classifications, and stated limits.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides current-head after-fix exact-item runner outputs for one negative and two positive controls, with a Docker-backed Crabbox environment, observed classifications, and stated limits.

Evidence

What I checked:

  • Current-main gap: The proposed affirmative-signal and reviewer-environment rules are 30 new prompt lines and are not ancestors of current main, so this active PR remains necessary rather than being implemented on main. (prompts/review-item.md:33, 7b1c74b1a792)
  • Focused implementation: The diff changes only the review prompt: it requires an exact evidence citation before applying a dependency-specific gate and preserves otherwise sufficient proof when only the reviewer environment is unavailable. (prompts/review-item.md:415, 7b1c74b1a792)
  • Repository policy fit: The branch removed the earlier literal prompt assertions; the remaining prompt-only approach and exact-item controls align with the repository VISION.md’s instruction not to add pinned-text tests where a review gate suffices. (VISION.md:33, 2cc2c0df8d53)
  • Real behavior controls: The PR body records one negative and two positive exact-item local-review runs at the proposed head, including observed proof classifications and a Docker-backed Crabbox environment; they directly exercise the changed review surface. (7b1c74b1a792)
  • Feature history: Prompt-policy history is shared: Peter Steinberger has the largest observed contribution history for this file, while Dallin Romney and Martin Cleary authored recent review-policy changes. (prompts/review-item.md, 4dc8d1d8c533)

Likely related people:

  • Peter Steinberger: The observed history shows 40 contributions to the central prompt file, including a recent proof/recovery simplification. (role: long-running prompt-policy contributor; confidence: high; commits: 4dc8d1d8c533, 0036015e1dd0; files: prompts/review-item.md)
  • Dallin Romney: Authored the latest current-main review-label narrowing change in the same prompt surface. (role: recent review-policy contributor; confidence: high; commits: 22c7ddcc3051; files: prompts/review-item.md)
  • Martin Cleary: Authored recent current-main review provenance work and the current main tip, making this a closely related review-policy surface. (role: recent adjacent contributor; confidence: medium; commits: bb69d1fc582d, 2cc2c0df8d53; files: prompts/review-item.md)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-10T08:37:58.720Z sha e350f97 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-10T08:40:53.370Z sha e350f97 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-10T09:16:23.641Z sha 88854a6 :: needs changes before merge. :: [P2] Replace pinned prompt-text tests with behavior coverage

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 10, 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: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. 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. and removed P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 10, 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: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 10, 2026
@brokemac79
brokemac79 marked this pull request as ready for review August 10, 2026 09:55
@brokemac79
brokemac79 merged commit 463edfe into main Aug 10, 2026
23 checks passed
@brokemac79
brokemac79 deleted the codex/csw-113-codex-policy-applicability branch August 10, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant