Skip to content

fix(review): stop scheduled review storms on unchanged issues - #1036

Merged
steipete merged 1 commit into
openclaw:mainfrom
goutamadwant:fix/scheduled-review-receipt-reuse
Aug 6, 2026
Merged

steipete merged 1 commit into
openclaw:mainfrom
goutamadwant:fix/scheduled-review-receipt-reuse

Conversation

@goutamadwant

@goutamadwant goutamadwant commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1032.

What Problem This Solves

Fixes an issue where unchanged issues could be reviewed repeatedly when scheduled hot or normal queue deliveries were handled as explicit reviews. Those duplicate runs generated repeated contributor notifications and consumed review capacity even when only ClawSweeper-owned labels or comments had changed.

Why This Change Was Made

The exact-review worker now forwards the claimed queue decision's source action as a typed internal review input. Review preparation owns the source-action classification beside the existing explicit-dispatch decision: only scheduled_hot_intake and scheduled_normal_backfill are automatic, while commands, webhook events, legacy dispatches, unknown actions, and missing actions remain explicit.

User Impact

Scheduled review lanes can reuse a verified structural receipt for unchanged items instead of starting another full review. Explicit reruns still force fresh work.

OpenClaw Bay is unaffected because this changes review invocation classification only; it does not alter observer schemas, status projections, or dashboard contracts.

Evidence

The regression failed on current main because exact queued reviews reached review preparation with an item number but no scheduled source input, making them explicit and ineligible for receipt reuse. The focused runtime regression now exercises both scheduled actions, representative explicit actions, missing and unknown actions, the legacy compatibility flag, and non-exact selection.

Validation:

pnpm run build:all
node --test test/review-preparation.test.ts test/sweep-workflow.test.ts test/review-structural-cache.test.ts test/review-semantic-cache.test.ts test/review-content-cache.test.ts test/repair/scheduled-review-enqueue.test.ts
pnpm run check
git diff --check origin/main...HEAD

Results: the focused runtime, workflow, scheduler, and cache suites passed on Node 24.16.0. The full check passed formatting, static policy checks, all TypeScript builds, lint, and the exercised test assertions, but its local test process retained an open handle after its last output and required termination; CI is the clean-environment confirmation for that full aggregate command.

Real Behavior Proof

Claim: the shipped workflow forwards claimed queue provenance into the real review-preparation boundary, where both scheduled actions are cache-eligible and sampled non-scheduled actions remain explicit.

Exercised surface: the built review-preparation module and the current event-review-apply workflow at head 4196b8bf29072d938f6b4330094ec42c1e455e51.

Observed runtime behavior:

scheduled_hot_intake => automatic
scheduled_normal_backfill => automatic
issues_opened => explicit
exact_review_command => explicit
legacy_dispatch => explicit
unknown action => explicit
missing action => explicit

A Docker-backed Crabbox local-container environment was also verified as available. A live claimed-delivery trace through the GitHub receipt-cache boundary remains pending because no least-privilege read-only GitHub credential was available for that container. No production review jobs were dispatched, no model capacity was consumed, and no contributor notifications were generated while validating this change.

Disclosure: AI was used to understand the codebase and review the fix.

@goutamadwant
goutamadwant requested a review from a team as a code owner August 5, 2026 14:56
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 Urgent regression or broken agent/channel workflow affecting real users now. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 6, 2026, 7:09 AM ET / 11:09 UTC.

ClawSweeper review

What this changes

The PR forwards a claimed queue action into review preparation so scheduled queue deliveries can reuse unchanged-item receipts while explicit reviews remain fresh.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 2 items remain

Keep open: the patch is a narrow, plausible fix for #1032, but it still needs controlled proof that a claimed scheduled delivery reaches the receipt-cache boundary and avoids a full review.

Priority: P1
Reviewed head: 4196b8bf29072d938f6b4330094ec42c1e455e51

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch and focused coverage are strong, but end-to-end proof of the automation behavior remains incomplete.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: Built-module terminal output proves classification, but the PR confirms that no claimed scheduled delivery has exercised the real receipt-cache boundary after the fix. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: Built-module terminal output proves classification, but the PR confirms that no claimed scheduled delivery has exercised the real receipt-cache boundary after the fix. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 6 items Scheduled queue provenance exists on current main: The scheduler records exactly the two source actions the PR recognizes, establishing a concrete producer contract for scheduled hot and normal lanes.
Current main still classifies exact selections as explicit: Review preparation currently treats any selected item as explicit unless the legacy planned-automatic flag is supplied, so queued scheduled provenance is not available to the cache decision.
Branch connects the workflow handoff to the cache gate: The branch passes the claimed decision's source action to the review command and recognizes only the two scheduled actions as automatic; all other or missing values remain explicit.
Findings None None.
Security None None.

How this fits together

The exact-review workflow claims queued work and invokes review preparation, which decides whether an unchanged item may reuse a prior receipt. That decision determines whether ClawSweeper performs a full review and sends downstream notifications.

flowchart LR
  Queue[Claimed review queue item] --> Workflow[Exact review workflow]
  Workflow --> Provenance[Queue source action]
  Provenance --> Preparation[Review preparation]
  Preparation --> Decision[Automatic or explicit]
  Decision --> Cache[Receipt cache]
  Cache --> Outcome[Reuse receipt or full review]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: Built-module terminal output proves classification, but the PR confirms that no claimed scheduled delivery has exercised the real receipt-cache boundary after the fix. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - Without a controlled claimed-delivery trace, the workflow serialization and receipt-cache gate could still fail to reuse a receipt even though the isolated classification result is correct.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Patch scope 4 files, +44/-3 The change is limited to queue-to-review provenance, classification, and focused assertions.
Production versus test delta production +18/-3, tests +26 Most added lines exercise the narrow behavior rather than expanding runtime surface.

Merge-risk options

Maintainer options:

  1. Capture the receipt-boundary proof (recommended)
    Run a controlled claimed scheduled delivery and record the post-fix cache-hit or full-review suppression trace before merge.

Technical review

Best possible solution:

Land only after a controlled, redacted claimed scheduled delivery proves that an unchanged eligible item reuses its structural receipt while an explicit action still forces fresh work.

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

Yes at source level: current main emits scheduled source actions but does not carry them into the exact review's explicit-dispatch decision, which prevents receipt reuse for those deliveries.

Is this the best way to solve the issue?

Yes: preserving provenance through the existing review-preparation cache gate is narrower and safer than adding another workflow-only cache path; the remaining need is boundary proof.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0588bda94865.

Labels

Label justifications:

  • P1: The reported recurrence sends repeated contributor notifications and consumes review capacity on unchanged items.
  • merge-risk: 🚨 automation: The patch changes workflow provenance used to decide whether scheduled reviews reuse cached receipts.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Built-module terminal output proves classification, but the PR confirms that no claimed scheduled delivery has exercised the real receipt-cache boundary after the fix. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Scheduled queue provenance exists on current main: The scheduler records exactly the two source actions the PR recognizes, establishing a concrete producer contract for scheduled hot and normal lanes. (src/repair/scheduled-review-enqueue.ts:107, 0588bda94865)
  • Current main still classifies exact selections as explicit: Review preparation currently treats any selected item as explicit unless the legacy planned-automatic flag is supplied, so queued scheduled provenance is not available to the cache decision. (src/clawsweeper-review-preparation.ts:162, 0588bda94865)
  • Branch connects the workflow handoff to the cache gate: The branch passes the claimed decision's source action to the review command and recognizes only the two scheduled actions as automatic; all other or missing values remain explicit. (src/clawsweeper-review-preparation.ts:20, 4196b8bf2907)
  • Focused coverage preserves explicit behavior: The added test covers both scheduled actions, representative explicit actions, missing provenance, the legacy flag, and non-exact selection. (test/review-preparation.test.ts:6, 4196b8bf2907)
  • Feature-history routing: Blame ties the original explicit-dispatch calculation to Peter Steinberger's review-workflow refactor; commit b83f298 introduced the earlier owned-activity suppression work relevant to this recurrence. (src/clawsweeper-review-preparation.ts:162, b83f2983da6b)
  • Proof remains incomplete: The PR body provides built-module classification output but expressly says no claimed scheduled delivery has traversed the GitHub receipt-cache boundary after the change. (4196b8bf2907)

Likely related people:

  • Peter Steinberger: Current-main blame attributes the explicit-dispatch decision to his review-command refactor, and recent main commits continue to maintain this workflow area. (role: original review-preparation contributor and recent adjacent contributor; confidence: high; commits: 6e7ed035183f, 480d56953f38; files: src/clawsweeper-review-preparation.ts, .github/workflows/sweep.yml)
  • PollyBot13: Commit b83f298 introduced the owned-activity churn suppression that the reported recurrence follows. (role: introduced adjacent receipt-suppression behavior; confidence: medium; commits: b83f2983da6b; files: src/clawsweeper-review-preparation.ts, src/review-structural-cache.ts)
  • Vincent Koc: Commit 2a61adc is recent queue maintenance adjacent to the claimed scheduled-delivery path. (role: recent queue-area contributor; confidence: medium; commits: 2a61adcc1f06; files: .github/workflows/sweep.yml, src/repair/scheduled-review-enqueue.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add a redacted controlled claimed-delivery trace showing receipt reuse for an unchanged scheduled item and fresh work for an explicit action.

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 (6 earlier review cycles)
  • reviewed 2026-08-05T15:03:32.021Z sha 62d8111 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-05T22:18:07.263Z sha 62d8111 :: needs real behavior proof before merge. :: [P2] Move scheduled-source classification out of the workflow shell
  • reviewed 2026-08-06T00:01:47.947Z sha 62d8111 :: needs real behavior proof before merge. :: [P2] Move scheduled-source classification out of workflow shell
  • reviewed 2026-08-06T02:02:59.192Z sha 4196b8b :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-06T06:16:51.231Z sha 4196b8b :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-06T08:11:44.303Z sha 4196b8b :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 6, 2026
@goutamadwant
goutamadwant force-pushed the fix/scheduled-review-receipt-reuse branch from 62d8111 to 4196b8b Compare August 6, 2026 01:43
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 6, 2026
@steipete
steipete merged commit 138ee2f into openclaw:main Aug 6, 2026
15 checks passed
@holgergruenhagen

Copy link
Copy Markdown
Contributor

Thank you @goutamadwant for tracking this down and implementing such a focused fix.
And thank you @steipete for the quick merge. Personal record for me today: Peter merged fixes for two of my reports in a single day 🙂 🚀

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. P1 Urgent regression or broken agent/channel workflow affecting real users now. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review storm persists for unchanged issues after #1007 (gogcli#956 reviewed 9 times)

3 participants