Skip to content

fix: suppress semantic no-op hot review writes - #1088

Merged
brokemac79 merged 5 commits into
mainfrom
codex/csw-111-durable-noop
Aug 10, 2026
Merged

brokemac79 merged 5 commits into
mainfrom
codex/csw-111-durable-noop

Conversation

@brokemac79

@brokemac79 brokemac79 commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • complete proven scheduled hot-review self-only updates directly before target token creation, setup, checkout, artifact publication, or model execution
  • avoid comment PATCHes whose only differences are internal review/lease timestamps
  • preserve normal review admission for human or mixed activity, protected/manual labels, source drift, missing receipts, API/classifier failures, and changed PR heads

Problem

Scheduled hot reviews can observe GitHub updated_at changes caused by ClawSweeper's own comment/label lifecycle. Reprocessing an otherwise identical review can then publish another timestamp-only comment PATCH, advancing updated_at again and sustaining self-feedback and installation-quota pressure.

The 5-to-20-minute target-fanout containment in #1087 reduces demand temporarily. This change addresses the durable no-change path; it does not claim that cadence containment fixed the loop.

Implementation

  • At claim time, fetch the live item, all issue comments, and (for pull requests) the live head SHA.
  • Recompute the same semantic source revision used by the review runtime. A scheduled item is a no-op only when the queued timestamp still matches, the latest trusted durable marker covers that revision, the item timestamp is within the exact 30-second automation settling window, and a PR head exactly matches the reviewed SHA.
  • Fail open to normal review admission whenever evidence is incomplete or changed.
  • Use a distinct scheduled_semantic_noop disposition that skips target write-token acquisition, reaction, runtime setup, artifact publication, target checkout/hydration, and model execution, then completes the exact queue lease directly. Existing closed/missing/locked terminal paths retain their prior token-backed close-safety lifecycle.
  • Treat exact rendered comment text plus authoritative source/verdict/action/security markers as public identity. Ignore only reviewed_at, updated_at, lease_owner, and lease_comment_id marker attributes when deciding whether a PATCH is needed.

#1086 relationship

PR #1086 merged as 13f8ffdea32ad5d0940f490cf57e291414b9a26f. This branch was rebased onto that exact current main. #1086 changes dispatch/dashboard quota admission plus one unrelated sweep.yml fleet-capacity comment (600→300/hour), which is preserved. This PR changes the live claim route and review-comment identity; the rebase was conflict-free and final tests/reviews ran against the merged #1086 base.

Validation

  • corepack pnpm run build
  • node --test test/scheduled-review-noop.test.ts test/review-comment-noop.test.ts test/scheduler-policy.test.ts (32 passed)
  • corepack pnpm exec oxlint scripts/classify-scheduled-review-noop.ts src/clawsweeper-review-comment-state.ts test/review-comment-noop.test.ts test/scheduled-review-noop.test.ts test/sweep-workflow.test.ts
  • git diff --check
  • codex review --uncommitted: accepted and fixed exact PR-head validation, timestamp-only planner suppression, semantic-noop lifecycle, and legacy terminal-token findings; final pass clean
  • codex review --base origin/main: repeated after every commit; final head had no actionable correctness defects
  • corepack pnpm run review -- --local-range --target-repo openclaw/clawsweeper --base origin/main: decision=keep_open, confidence=high, no blocker surfaced

Native Windows workflow execution remains outside this Bash-hosted workflow surface (/bin/bash/WSL unavailable). The exact workflow route was executed in Linux Crabbox below.

Real Behavior Proof

Claim: An unchanged scheduled hot review with only trusted ClawSweeper activity completes as a distinct semantic no-op with zero target GitHub writes and before target token/setup/checkout/model work, while genuine source, label, comment, or PR-head changes remain admitted.

Exercised surface: Exact branch head e865e8f88a4738d9e2bcf0acfad3e6545463f308 on base 13f8ffdea32ad5d0940f490cf57e291414b9a26f; sweep.yml live-item claim route, semantic classifier, distinct semantic-noop completion, token/setup/bundle guards, legacy terminal preservation, and comment public-identity comparison.

Scenario/fixture: The workflow harness supplied a scheduled claim, unchanged live issue, trusted durable review marker, and fake gh request log. It asserted proceed=false, scheduled_semantic_noop=true, terminal_noop=false, direct successful queue-completion routing, ordering before token/reaction/setup/bundle/checkout, and no POST, PATCH, label, reaction, or other target -X write. Companion fixtures exercised exact timestamp boundary, outside-boundary rejection, mixed human activity, protected/manual label changes, stale/missing receipts, source drift, matching/mismatching PR heads, and legacy closed/missing/locked token preservation.

Command/environment: Configured Crabbox provider=aws, Ubuntu Linux, lease cbx_1b87e94db08e, run run_dbbde77177bf. The no-sync proof cloned the reviewed remote branch, verified SHA e865e8f88a4738d9e2bcf0acfad3e6545463f308, installed the frozen lockfile, built, and ran:

node --test test/scheduled-review-noop.test.ts test/review-comment-noop.test.ts test/scheduler-policy.test.ts
node --test --test-name-pattern='scheduled claim-time no-op|exact event review exposes|exact event branch guard|exact event review publishes directly' test/sweep-workflow.test.ts

Observed result: Build passed; 32 classifier/public-identity/scheduler tests passed; all 4 Linux workflow-route tests passed. The named no-op test observed zero GitHub writes.

Artifact/trace: Crabbox run run_dbbde77177bf, lease cbx_1b87e94db08e, exit 0, command 15.618s, total 16.025s. Earlier dirty-tree sync attempts run_c193c7313414 and run_de5e0174b74a failed before execution with rsync code 12; run_387fa305187a was a quoting-only harness failure; run_9bdbc9789cdc exposed and led to correction of a test binding error. None were product-runtime failures.

Limits: This is a controlled GitHub-API harness, not a live target mutation. It deliberately proves the zero-write contract without advancing a real issue's updated_at. GitHub Actions and repository permissions remain covered by CI and maintainer review.

Risks and rollout

  • A false no-op could delay a genuine review. The path is restricted to scheduled hot intake and requires exact queued timestamp, semantic revision, trusted marker, settling bound, and PR head; every missing/changed/error case falls back to normal review.
  • Marker normalization is narrowly limited to volatile internal clocks/lease identifiers. Any prose, finding, verdict, action, security marker, source revision, SHA, or authoritative public marker change still publishes.
  • OpenClaw Bay is not directly affected: this changes ClawSweeper's scheduled exact-review admission/completion workflow and does not change Bay code, deployment, or target data.
  • Rollback is a normal revert of this PR. fix(review): reduce hot target fanout cadence #1087's 20-minute containment remains independent until maintainers decide its restoration criterion has been met.

@clawsweeper

clawsweeper Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 9, 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 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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 9, 2026
@clawsweeper

clawsweeper Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 10, 2026, 2:53 AM ET / 06:53 UTC.

ClawSweeper review

What this changes

Adds a scheduled hot-review semantic no-op path that skips target writes and review setup when only trusted ClawSweeper activity changed an item.

Regression provenance

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

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 3 items remain

Keep this PR open pending real behavior proof. The focused implementation appears correct, but its supplied fake-GitHub harness does not prove the queue-completion boundary required for this workflow change.

Priority: P1
Reviewed head: e865e8f88a4738d9e2bcf0acfad3e6545463f308

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch is focused and has credible regression coverage, but real behavior proof remains a merge gate.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The current-head AWS Crabbox run proves fake-gh harness assertions, not the production queue-completion boundary; add a redacted Docker-backed local-container trace and update the PR body for re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The current-head AWS Crabbox run proves fake-gh harness assertions, not the production queue-completion boundary; add a redacted Docker-backed local-container trace and update the PR body for re-review.
Evidence reviewed 5 items Fail-open classifier: The classifier accepts a no-op only for scheduled-hot intake with an exact queued timestamp, matching semantic source revision, trusted durable marker, and matching PR head; all other states return normal admission.
Pre-token completion route: The workflow evaluates the classifier before the write token, setup, checkout, and review steps, and exports a successful direct completion outcome for a semantic no-op.
Current source-revision contract: Current main computes source revisions from title, body, non-ignored labels, and non-ClawSweeper comments; the PR mirrors that contract.
Findings None None.
Security None None.

How this fits together

The scheduled review workflow claims queued GitHub items, reads their current state, and either completes a safe no-op or proceeds to token creation, checkout, review, and publication. This change sits at that admission decision before expensive target work begins.

flowchart LR
A[Scheduled hot queue claim] --> B[Live item and comments]
B --> C[Semantic source comparison]
C -->|unchanged trusted activity| D[Complete queue lease]
C -->|changed or uncertain| E[Create review resources]
E --> F[Checkout and Codex review]
F --> G[Publish review result]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The current-head AWS Crabbox run proves fake-gh harness assertions, not the production queue-completion boundary; add a redacted Docker-backed local-container trace and update the PR body for re-review.
  • Resolve merge risk (P1) - A false semantic no-op could delay a genuine scheduled review; the code fails open, but the real queue-completion path has not yet been exercised in the required environment.
  • Complete next step (P2) - The remaining blocker is contributor-supplied real behavior proof, which a repair lane cannot establish on the contributor’s behalf.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta production +227/-12, tests +272/-2 The workflow admission change is accompanied by focused classifier, comment-identity, and workflow-route coverage.

Merge-risk options

Maintainer options:

  1. Add production-boundary proof (recommended)
    Exercise the current head in Docker-backed Crabbox local-container with a real queue-completion client and a redacted zero-write trace before merge.

Technical review

Best possible solution:

Record an exact-head Docker-backed Crabbox local-container trace that injects an unchanged scheduled claim through the queue boundary, observes fenced successful completion, and confirms zero target GitHub writes.

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

Yes. Current source and focused fixtures define the unchanged scheduled-claim scenario; the missing evidence is production-boundary validation, not a reproduction path.

Is this the best way to solve the issue?

Yes. Exact timestamp, source-revision, trusted-marker, and PR-head checks are a narrow fail-open solution; it needs the required lifecycle proof before merge.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: A missed no-op can sustain repeated scheduled review work and GitHub quota pressure across the automation fleet.
  • merge-risk: 🚨 automation: The patch changes workflow admission, setup bypass, and durable queue-completion behavior.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The current-head AWS Crabbox run proves fake-gh harness assertions, not the production queue-completion boundary; add a redacted Docker-backed local-container trace and update the PR body for re-review.

Evidence

What I checked:

  • Fail-open classifier: The classifier accepts a no-op only for scheduled-hot intake with an exact queued timestamp, matching semantic source revision, trusted durable marker, and matching PR head; all other states return normal admission. (scripts/classify-scheduled-review-noop.ts:91, e865e8f88a47)
  • Pre-token completion route: The workflow evaluates the classifier before the write token, setup, checkout, and review steps, and exports a successful direct completion outcome for a semantic no-op. (.github/workflows/sweep.yml:813, e865e8f88a47)
  • Current source-revision contract: Current main computes source revisions from title, body, non-ignored labels, and non-ClawSweeper comments; the PR mirrors that contract. (src/clawsweeper-source-revision.ts:56, e699e83d2707)
  • Area provenance: Recent workflow history includes the merged scheduled-queue receipt work and the PR base's quota-admission change, establishing the adjacent owners and lifecycle context. (.github/workflows/sweep.yml:721, 13f8ffdea32a)
  • Proof gap: The PR body records an exact-head AWS Crabbox run against a fake gh harness; it verifies mock request logging but not the real queue-completion client or the repository-required Docker-backed local-container boundary. (e865e8f88a47)

Likely related people:

  • Martin Cleary: Merged recent quota-admission and review-cadence changes in the same event-review workflow area. (role: recent workflow contributor; confidence: high; commits: 13f8ffdea32a, 95f9dab14c45; files: .github/workflows/sweep.yml)
  • Goutam Adwant: Authored the scheduled queue receipt work that established the surrounding scheduled-review behavior. (role: scheduled review feature contributor; confidence: medium; commits: 138ee2f96ea7; files: .github/workflows/sweep.yml, src/clawsweeper-review-planning-hot-intake.ts)
  • Peter Steinberger: Recent main history includes review-token and workflow maintenance around the changed route. (role: recent adjacent workflow contributor; confidence: medium; commits: 5d279ea784c6, e699e83d2707; files: .github/workflows/sweep.yml)

Rank-up moves

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

  • Run Docker-backed Crabbox local-container proof against the exact current head with a real queue-completion client and redacted trace.
  • Update the PR body with that proof so a fresh review applies to the current body and head.

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 (5 earlier review cycles)
  • reviewed 2026-08-09T22:54:53.373Z sha 43fb388 :: needs real behavior proof before merge. :: [P1] Skip target-token creation for terminal no-ops
  • reviewed 2026-08-09T22:58:54.555Z sha 43fb388 :: needs real behavior proof before merge. :: [P1] Complete terminal no-ops before target setup
  • reviewed 2026-08-09T23:17:50.355Z sha 28f3f74 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-09T23:21:27.081Z sha 28f3f74 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-09T23:38:18.768Z sha e865e8f :: needs real behavior proof before merge. :: [P1] Revalidate PR state beyond its head SHA

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 9, 2026
@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 9, 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:

@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 9, 2026
@brokemac79
brokemac79 force-pushed the codex/csw-111-durable-noop branch from 28f3f74 to e865e8f Compare August 9, 2026 23:30
@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 9, 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:

@brokemac79

Copy link
Copy Markdown
Contributor Author

@codex review

@brokemac79
brokemac79 marked this pull request as ready for review August 10, 2026 06:51
@brokemac79
brokemac79 requested a review from a team as a code owner August 10, 2026 06:51
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: e865e8f88a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@brokemac79
brokemac79 merged commit 2cc2c0d into main Aug 10, 2026
13 checks passed
@brokemac79
brokemac79 deleted the codex/csw-111-durable-noop branch August 10, 2026 07:32
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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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.

1 participant