Skip to content

fix(review): stop demanding proof for speculative races and in-flight revocation - #2202

Merged
obviyus merged 3 commits into
mainfrom
fix/authority-chain-no-inflight-race
Nov 12, 2026
Merged

obviyus merged 3 commits into
mainfrom
fix/authority-chain-no-inflight-race

Conversation

@obviyus

@obviyus obviyus commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

PR reviews block merges by demanding proof that a revoked credential, removed selection or reloaded plugin stops a request that is already in flight. They make the same demand when the reviewer found no violation, and they bind maintainer PRs too. On openclaw/openclaw#197501, this produced a 46-line race test that the maintainer reverted.

User Impact

PR authors stop getting "Authority-chain proof required" blockers for plugins that only use the credential the host gave them, or for speculative races. Concrete authorization violations still block. These include a new request that reaches an effect it should not, queued, retried or replayed work that starts after revocation, and a fallback to another account.

Why This Change Was Made

prompts/review-item-pr.md:

  • Authority chain:
    • Triggers only when the diff adds or changes an authorization decision.
    • The check belongs where work starts, and revocation applies to the next request.
    • No concrete violation means no finding, risk, proof request or tier cap. At most, the reviewer asks for one non-blocking sentence stating the failure mode and its likelihood.
    • The "judged only on authority evidence" gate for maintainer, collaborator and bot PRs is gone.
  • Ask only for work a real input needs: extended to proofs and tests. It also gains the reviewer form of OpenCode's rule: "Before adding complexity for a speculative or vanishingly unlikely race or security edge case, explain the concrete failure mode, likelihood, and complexity cost…".
  • Smallest complete fix:
    • A preemptively extracted single-use helper is a P3.
    • Speculative race machinery added without recorded buy-in is a P2.
  • Other changes:
    • P3 findings are advice and never block.
    • Changes with no user-visible behavior need no shipped-entry-point proof.
    • The stored-data gate requires naming the changed field, file or table.
    • A new instruction rule without a cited incident is a P2.

prompts/review-commit.md:

  • reliability no longer lists "race".
  • concurrency requires two named real events. A change arriving while one request is in progress is not a finding.

AGENTS.md: a new Design section with the two OpenCode principles and the rule-regrowth guard.

The matching OpenClaw instruction change is openclaw/openclaw#197557.

Documentation Impact

Prompt and AGENTS.md only. A changelog fragment is added.

Proof

Field Value
Claim The new prompt drops speculative authority-proof blockers and keeps concrete ones.
Surface The real pnpm run review -- --local-only pipeline: built CLI, real GitHub context, Codex model.
Scenario Replay of three live openclaw PRs that were previously reviewed with the old prompt.
Command CODEX_HOME=<temp config: API-key provider via secret-store command> pnpm run review -- --local-only --target-repo openclaw/openclaw --item-number <n> --output-retention summary on b3c025c7f.

Results:

PR Old review New review
#197469 (contributor, new device route) "Authority-chain proof required", plus security attention ("No concrete bypass was found…"), plus a "revoked requester authority" merge risk. Label merge-risk: security-boundary. No findings. Security cleared ("reaches existing Gateway authorization… without a concrete new bypass"). No merge-risk labels, tier B. Only ordinary external-contributor proof remains.
#197507 (selected account falls back to native Claude login) "Authority-chain proof required" plus the P1 "Preserve the selected account after OAuth credential rejection" The P1 is kept, with a security concern that names the concrete credential-substitution path ("not an in-flight revocation race"). The security-boundary and auth-provider labels are kept. No "Authority-chain proof required".
#197529 (temp-artifact cleanup) Concrete findings Still a concrete P2 (persisted custody state outside SQLite). The new prompt does not drop real defects.

Other checks:

  • node --test passes for review-prompt-context, review-prompt-sections, pr-proof-automation and local-package: 0 failures.
  • pnpm run check:changelog passes.

Limits:

  • #197529 gained a commit after its last hosted review, so its comparison is across heads.
  • The host code that reads the Authority-chain proof required: marker is unchanged. The model no longer emits the marker, so that path goes unused; remove it in a follow-up.
  • The whole-branch AutoReview step was not run. The maintainer's standing instruction forbids running $autoreview.

… revocation

Authority-chain review now triggers only on changed authorization
decisions; revocation applies to the next request; unproven authority is
no longer a merge gate. P3 findings are advisory, speculative race
machinery without recorded buy-in and preemptive single-use helpers become
findings, and AGENTS.md adopts the matching design rules.

Co-authored-by: obviyus <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. proof: sufficient Contributor real behavior proof is sufficient. 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. labels Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR narrows speculative authority-proof demands and keeps advisory P3 findings from blocking merge readiness.

Example: A completed review contains one P3 finding and selects queue_fix_pr.

  • Before: Readiness reports needs-changes because the queued repair independently blocks it.
  • After: The finding stays visible while an otherwise passing review reports ready.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The recorded CLI replay supports the prompt change, and source inspection confirms the previous readiness finding is fixed; local tests were not run during this read-only review.
Proof confidence 🐚 platinum hermit (4/6) The supplied maintainer-author exemption applies; the body additionally records real CLI/model replays of the changed prompt, while the later readiness amendments have focused regression coverage rather than separate shipped-path output.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Contributors receive speculative authority-proof demands and merge blockers for advisory findings.
Reason: The supplied maintainer-authored direction authorizes the policy change, and the recorded replay retains concrete defects while removing speculative blockers.

Merge readiness

✅ Ready for maintainer review

This PR resolves the prior P3-only readiness blocker; no new actionable defect was found, and the change is not implemented on main.

Priority: P2
Reviewed head: 80cc848e2cba059c5c49e5f94e9d6bdc44623267

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied CLI replay predates the readiness amendments, and the added readiness test is not accompanied by a recorded base-fail/head-pass run.
Agent review details

How this fits together

Review prompts guide model decisions, and the shared readiness reader converts saved decisions into public blockers, status labels, and automation eligibility.

flowchart LR
A[PR context] --> B[Review prompts]
B --> C[Model decision]
C --> D[Saved review record]
D --> E[Readiness reader]
E --> F[Public review and labels]
E --> G[Automation eligibility]
Loading

Technical review

Best possible solution:

Keep the narrower review policy and implement advisory readiness through the existing shared reader.

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

Current main unconditionally turns findings and queued repairs into readiness blockers; the supplied CLI replays also demonstrate the speculative authority-proof behavior.

Is this the best way to solve the issue?

The change uses the existing prompt and readiness owners, preserves substantive blockers, and fixes the previously identified advisory-repair fallback without adding another decision path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8ba1ab445ed0.

Provenance checked

  • Authority-chain review changes intended behavior with a stated reason (feat(review): evaluate authority delivery chains #1223: Require final-effect evidence when a material plausible authority violation remains unresolved, including for otherwise exempt authors.)
  • Finding severity and readiness changes intended behavior with a stated reason (43e96c4: The consolidated review contract treated findings at every priority as required work; the PR explicitly changes P3 findings to advice.)
  • Shared readiness machinery keeps the original intent (refactor(review): read PR readiness and comments from typed records #1891: Readiness, public comments, labels, and automation use the same saved typed decision; this PR keeps that ownership.)
  • Commit-review concurrency guidance changes intended behavior with a stated reason (4ee2e33: Commit reviews included broad concurrency and race categories; the PR explains its narrower concrete-event criterion.)
  • Proof scope and stored-data identification changes intended behavior with a stated reason (43e96c4: The consolidated prompt required shipped-path evidence and independent persisted-data compatibility; this PR explains the narrower proof scope and retains the stored-data gate.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Prior finding resolved: The current head excludes P3-only decisions from both the incorrect-verdict fallback and the queued-repair fallback, resolving the finding retained in the previous review. (src/clawsweeper-report-comment-helpers.ts:307, 80cc848e2cba)
  • Focused regression coverage: The added regression checks an incorrect verdict with queued repair and a P3 finding, preserves finding visibility, and verifies that changing its priority to P2 still blocks readiness; these tests were inspected, not executed. (test/review-record-labels.test.ts:272, 80cc848e2cba)
  • Intentional authority-policy change: The body explains why the authority-proof policy introduced by feat(review): evaluate authority delivery chains #1223 is being narrowed; the new prompt retains concrete unauthorized-request, replay, and credential-fallback findings. (prompts/review-item-pr.md:67, 80cc848e2cba)
  • Supplied production-path evidence: The PR body records real local-review CLI replays: a speculative device-route blocker disappeared, while the concrete credential-substitution P1 and a separate persisted-state P2 remained; that replay predates the readiness amendments. (b3c025c7fb98)
  • History and inspection limits: History identifies substantial prompt and readiness work by obviyus, the original authority-policy contribution by joshavant, and commit-review ownership by steipete; some older blob searches stopped because lazy fetching is disabled, so no unsupported introduction claims are made. (prompts/review-item-pr.md:67, 8ba1ab445ed0)

Likely related people:

  • Peter Steinberger: Raw commit 4ee2e33 adds prompts/review-commit.md:61 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4ee2e33e7e83; files: prompts/review-commit.md)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: The change addresses unnecessary contributor blockers and advisory findings incorrectly holding merge readiness.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-11-12T06:33:23.577Z sha b3c025c :: needs changes before merge. :: [P2] Exclude advisory P3 findings from the host readiness gate
  • reviewed 2026-11-12T06:51:01.796Z sha 8cc30a4 :: needs changes before merge. :: [P2] Keep P3-only repair routing out of required readiness work

Reviewed November 12, 2026, 1:56 AM ET / 06:56 UTC (Revision 3).

@obviyus

obviyus commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed the proof: sufficient Contributor real behavior proof is sufficient. label Nov 12, 2026
@obviyus

obviyus commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

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 merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Nov 12, 2026
@obviyus
obviyus merged commit e7fd669 into main Nov 12, 2026
30 checks passed
@obviyus
obviyus deleted the fix/authority-chain-no-inflight-race branch November 12, 2026 07:01
obviyus added a commit that referenced this pull request Nov 14, 2026
* fix(review): qualify exact push relay rejection fixture

* fix: report the real checkout inspection failure reason

- Lead the read-only checkout inspection failure message with the runner error when present.
- Keep a redacted 2000-character stdout/stderr tail as context; keep stderr || stdout when no error.
- OpenClaw prints a plugin trust warning to stderr on every run, which hid every inspection reason.
- Add runner tests for OpenClaw and Codex inspection failures.

* fix: qualify the historical OCE harness origin fixture (#2197)

* test: clear dashboard token watchdog after completion (#2196)

Co-authored-by: Ryan Saari <[email protected]>

* fix: qualify exact OCE 5398 JDBC fixture revisions (#2198)

* fix(dashboard): normalize dashboard strict paths to POSIX slashes (#2177)

* fix: use server-issued census observation windows (#2174)

* fix: bound census observations with server-issued query windows

Replace cross-host completion-clock comparisons for negotiated census producers with stored metadata and per-assignment observation windows. Preserve strict legacy fallback, lease/checkpoint/identity fences, stable witnesses, and capacity bounds. Include signed native temporal red/green and rolling-compatibility proof.

Co-authored-by: brokemac79 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>

* fix: use server-issued census observation windows

Worked on by:
- @brokemac79

Co-authored-by: brokemac79 <[email protected]>
OpenClaw-Publication: 9c3c62ec-951b-43b0-98f9-511dba1829cf

* fix: preserve negotiated census authority across legacy upgrades

Add real workerd cold-restart proof that persisted deployed legacy-v2 checkpoints, cursors, identities and receipts load unchanged and safely continue through negotiated windows. Require the atomic lease mode before accepting any page, including legacy-shaped in-flight data before next issues a witness. Resolves the accepted data-model compatibility proof blocker without state reset or weakened legacy guards.

Co-authored-by: brokemac79 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>

* Publish openclaw/coverage-observation-window-fix

Worked on by:
- @brokemac79

Co-authored-by: brokemac79 <[email protected]>
OpenClaw-Publication: 281f1b7a-6346-42af-b919-9fd25dd6b736

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: brokemac79 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>

* fix(test): normalize test runner paths to POSIX slashes (#2176)

* fix: terminal acknowledgement test passes on a timeout instead of the real retry failure (#2199)

* test: exercise terminal acknowledgement retries without delay

* test: use the real retry helper with Retry-After: 0

The retry helper honors Retry-After, so the fixture no longer needs a
patched copy of the helper and request builder. The unchanged workflow
step and helper now run all six attempts without waiting.

Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: obviyus <[email protected]>

---------

Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: obviyus <[email protected]>

* improve: shorten reservation workflow test runtime (#2200)

* test: avoid reservation fixture retry waits

* test: record reservation retry waits with a PATH sleep shim

Replace the BASH_ENV sleep function and the hand-maintained per-scenario
attempt table with a sleep shim on the step's PATH. Every recorded delay
is still checked against the workflow's 2n + 0..3 backoff, and the
service-unavailable scenario must record all four waits.

Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: obviyus <[email protected]>

---------

Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: obviyus <[email protected]>

* fix(review): stop demanding proof for speculative races and in-flight revocation (#2202)

* fix(review): stop demanding proof for speculative races and in-flight revocation

Authority-chain review now triggers only on changed authorization
decisions; revocation applies to the next request; unproven authority is
no longer a merge gate. P3 findings are advisory, speculative race
machinery without recorded buy-in and preemptive single-use helpers become
findings, and AGENTS.md adopts the matching design rules.

Co-authored-by: obviyus <[email protected]>

* fix(review): keep advisory P3 findings out of the merge readiness gate

Co-authored-by: obviyus <[email protected]>

* fix(review): keep P3-only incorrect verdicts and queued repairs advisory

Co-authored-by: obviyus <[email protected]>

---------

Co-authored-by: obviyus <[email protected]>

* fix: reuse reviewed test credentials after surrounding edits (#2201)

Approve exact previously reviewed synthetic Raw/RawV2 value pairs while retaining detector, decoder, native metadata, verification, and completion checks. Remove hostname-based exemptions and keep normalized Postgres findings blocking.

Validation: full pnpm check, 32 focused tests, 28 native proof cases in an isolated UTM guest, and a clean final committed whole-branch Codex review. The maintainer explicitly waived the hosted ClawSweeper review and approved this merge in the task conversation.

* feat(review): read durable Gitcrawl cluster service context

* fix(review): validate service tokens without control regex

* fix: allow service-backed review-start reservations

* style: format service review-start reservation proof

* fix: allow service-backed review artifact publication

* feat: prepare service context before applying decisions

* fix: preserve parent identity during apply preparation

* fix: wire apply preparation to the shared relation policy

* test: cover service-backed apply and authority drift

* test: hold paired closes without prepared service context

* test: align service apply fixtures with live revision guards

* docs: explain apply preparation failure ownership

* fix: enforce apply retry guards without mutation receipts

* style: format service freshness assertion

* test: exercise service retries with a current review lease

* fix: refresh apply authority after ambiguous writes

* style: format service lease regression fixture

* test: reject exact-event retries after lease revocation

* style: format exact-event retry assertion

---------

Co-authored-by: Mitchell Etzel <[email protected]>
Co-authored-by: Free Wortley <[email protected]>
Co-authored-by: Ryan S <[email protected]>
Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: Saiyam Jain <[email protected]>
Co-authored-by: RoboClaw <[email protected]>
Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: brokemac79 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: obviyus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. 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