Repository navigation
fix(review): unchanged issues are fully re-reviewed and re-labeled on every target-branch commit - #2039
Conversation
… every target-branch commit Issue content digests include the target branch head, so on busy target repositories every new commit on main turned the hourly activity pass of an untouched issue into a full Codex review with fresh labels. When only the target branch moved since the last full review, reuse the keep-open verdict for up to one day; any change to the issue, its relations or the latest release still misses.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesReuse unchanged keep-open issue verdicts across target-branch changes for one day after their last full review. Example: An unchanged issue was fully reviewed one hour ago against target commit 6a58bbfafae4, and target main advances to 24f4d4218b22.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR remains useful and has no actionable findings; the maintainer-approved 24-hour bound resolves the previous review’s product-policy blocker. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe review workflow compares current GitHub context and target state with a prior canonical report, then emits either a carried keep-open report or a fresh model decision for publication. flowchart TD
A[Scheduled issue review] --> B[Load canonical report]
B --> C[Collect current context]
C --> D[Compare content and target drift]
D --> E[Carry bounded verdict]
D --> F[Run model review]
E --> G[Publish report]
F --> G
Technical reviewBest possible solution: Land the approved bounded reuse through the existing cache owner while preserving original review provenance and all existing invalidation safeguards. Do we have a high-confidence way to reproduce the issue? Current-main source shows that target-main movement changes issue digests and defeats reuse; supplied before/after CLI output exercises that path, while this read-only review ran no target code. Is this the best way to solve the issue? The patch is a focused implementation of the approved tradeoff using existing digest and cache owners, with no parallel cache or configuration surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 385ed215fa2c. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 18, 2026, 12:15 PM ET / 16:15 UTC (Revision 2). |
|
@clawsweeper re-review The main PR body now records maintainer approval of the 24-hour target-only drift policy and fresh qualification of unchanged head |
|
🦞👀 Re-review progress:
|
…mment (#2086) * fix(review): keep background re-review start status in the durable comment Since #2039, unchanged items are re-reviewed on every target-branch commit. Each run posted a new temporary "ClawSweeper status: review started" comment, and GitHub notifies every subscriber of a new comment, so busy target repositories sent a notification per commit even when the review did not change (openclaw/Peekaboo#1114). Queue-owned background re-reviews of an already-reviewed item now carry the started lease by editing the durable review comment, preserving the prior review text and restoring it byte-for-byte on owned cleanup. First reviews, explicit requests, commands and uncoordinated callers keep the separate placeholder, legacy placeholders stay recoverable, and sweep failure cleanup also expires in-place leases discovered by owner. * fix(review): keep in-place background leases safe for apply and contenders Address ClawSweeper review findings on the in-place background lease: - keep the adopted apply mutation lock through completed-review publication and the following mutation guards; - let separate POST leases outrank in-place leases and fence the loser, so an older durable comment id cannot retroactively win the election; - read the durable comment losslessly before acquisition, cleanup and CLI release so escapes and controls survive the round trip; - fall back to the separate placeholder when the review plus status and lease would exceed the 61,440-byte durable review limit. Adds an integrated loopback proof covering both contender orders, publication through the close guard, lossless cleanup and a legacy-state upgrade.
Related: #1753
What Problem This Solves
Fixes: an issue with no new activity is fully re-reviewed by Codex, and its rating and reproduction labels change again, on the first scheduled pass after each new commit on the target repository's main branch.
User Impact
User impact: on busy target repositories, an untouched issue gets at most one full review per day from target-branch movement alone, instead of one per commit. Followers see fewer label changes without new evidence. Any change to the issue itself, its relations, comments or the latest release still triggers a full review. The hourly cadence and the per-pass review lease comment are unchanged.
Why This Change Was Made
Issue content digests include the target branch head (
targetMainShainitemContentDigest,src/clawsweeper-source-revision.ts:222). Since #1753 the hosted exact review finds its prior record, so scheduled passes on an unchanged issue reuse the verdict, but only while main has not moved. Every issue whose own comment edits keep it in the hourly activity bucket (src/scheduler-policy.ts:128) therefore gets a full model review on the first pass after each commit on main. ClawHub main moves several times a day.When the content digest misses, this change digests the current issue content again against the target SHA recorded by the prior full review (
main_sha). If that matches, only the target branch moved, and the keep-open verdict is reused for up to one day after the last full review (ISSUE_TARGET_DRIFT_REUSE_MS,src/scheduler-policy.ts:166). The carried report keeps the reviewed SHA, digest,last_full_review_atand the prior structural anchor. The window therefore does not slide, and the 14-day structural stage cannot extend it. The published review still names the commit it was reviewed against. PRs, explicit reviews and maintainer requests are unchanged.Maintainer decision (2026-10-18 UTC): @vincentkoc approved the existing one-day target-only drift reuse bound, including the possible delay in detecting an unlinked main-only fix. Keep all existing invalidation rules, the original full-review timestamp and reviewed-target provenance. This resolves the owner-policy decision in the current ClawSweeper review.
Not in this PR: each pass still posts a fresh lease comment before the cache decision (
src/clawsweeper-review-comment-leases.ts:259, needed for the lowest-comment-id election), which sends followers an email per pass even on a cache hit.Documentation Impact
docs/review-cache.md(active): "Content Stage" now describes the target-drift reuse, its one-day bound and that the carried report keeps the reviewed SHA and structural anchor.docs/scheduler.md: unchanged; cadence is not affected.changelog.d/issue-target-drift-review-reuse.md: one-line fragment.Evidence
Live problem, openclaw/clawhub#3921 (no human activity on the issue since 2026-10-06; durable comment openclaw/clawhub#3921 (comment) , 88 revisions 2026-10-06 to 10-15). Hosted runs on 2026-10-15 (UTC), counters from the public job logs:
6a58bbfafae4(new)content_cache_hits=0needs-live-repro, 🦞 → 🐚, −source-reprocontent_cache_hits=1314a46360c68(new)content_cache_hits=0needs-live-repro, 🐚 → 🦪4c78f5b0058f(new)content_cache_hits=0not-repro-on-main24f4d4218b22(new)content_cache_hits=0not-repro-on-maincontent_cache_hits=1Every miss is the first pass on a new main commit; every pass on an unchanged commit hits. Replaying all 29 revisions since #1753 was merged (2026-10-11 23:46) with the one-day rule: 7 full reviews become 3; on 2026-10-15, 4 become 1 (06:53). This replay assumes a changed "reviewed against" SHA means a full review, which the counters above confirm for 2026-10-15.
Tests (Node 24,
node --test --test-concurrency=1 <file>afterpnpm run build; wall time):test/review-command-workflow.test.tsdrives the realreviewCommandwith the existing scheduled-cache harness. Newcontent-target-driftuses the realitemContentDigest, a prior record reviewed against another target SHA and a 1-minute-old full review: content cache hit, no generation, the carried report keepsmain_shaandreview_structural_target_head_shaof the reviewed commit. Newcontent-target-drift-expired(25 h old): full review. Without the fix,content-target-driftfails ("compatible unchanged input must use the cache"). Without the structural-anchor part, it fails onreview_structural_target_head_sha. File: 61/62 pass, 72 s; the one failure,changed-pr-exact-fetch-failure, times out after 60 s the same way on unchangedmainhere (git 2.43.0).test/review-content-cache.test.ts: new case with real digests (hit 1 ms before one day, miss at one day, miss when the issue also changed, miss without a drift digest, miss on explicit dispatch); 43/43, 0.9 s. Fails without the fix.scheduler-policy24/24 (0.3 s),apply-live-state38/38 (36 s),oversized-pr-admission15/15,pr-proof-automation34/34,primary-body20/20,review-output-policy30/30,review-preparation11/11.pnpm run check:static,build:all,lint: pass.node scripts/run-node-tests.mjs unit(17 min, concurrency 4, under load): 4,908 tests, 4,889 pass, 9 fail, 10 skipped. All 9 are Git fetch/acquisition or process-supervision cases that time out after 30–60 s here (review-blob-hydration×3,review-git-acquisition×3,command"selects PATH Codex",pr-review-history"history prefetch",review-command-workflowchanged-pr-exact-fetch-failure); none touches the changed code, and all 9 fail the same way on unchangedmainin this environment (git 2.43.0).node scripts/run-node-tests.mjs repair(89 s): 896 tests, 888 pass, 2 fail (command-runnerTERM-resistant reaping,target-fanoutstorage unavailable), both also failing on unchangedmainhere.codex review --base origin/main: the first pass found that a drift carry could seed a structural record with the new target and let the 14-day structural stage outlive the one-day window; fixed (prior structural anchor kept) and covered by the harness test above. Second pass on the final commit: no actionable findings.Maintainer Qualification
d4ba87441c365582c8ca1856e2aaf9d6aa156098; no contributor code was changed. The two touched production modules have no intervening changes on current main385ed215fa2cfd04e53ab11d6cf814b8a3226b85beyond this patch.pnpm checkgate.pnpm run check:fastpassed;node --test --test-concurrency=1 test/review-content-cache.test.ts test/review-command-workflow.test.ts test/scheduler-policy.test.tspassed 129/129 with no failures or skips. Leasecbx_e08cb2ce135e, runrun_b88d80b277b60bb0ac7ebfad6b825285. This reruns regression tests; the original executed review-CLI proof below remains the real-behavior evidence for the unchanged patch.Real Behavior Proof
reviewcommand reuses the verdict without a model run within one day and runs the model after one day or when the issue changed.clawsweeper reviewcommand with the hosted scheduled step's arguments (minus lease and sandbox flags), prior record atrecords/openclaw-clawhub/items/3921.md(where the pre-generation hydration from fix(review): unchanged items are re-reviewed and re-rated every scheduled pass #1753 places it).steipete/peekabooskill teaches Peekaboo 3 commands removed in 4.0 and shadows the newer bundled skill when installed clawhub#3921 ; prior record from a review against clawhub6a58bbfafae4; target main then set to24f4d4218b22(current clawhub main).originis a local bare repository (objects via alternates, tags mirrored) so the target head can be set per run; GitHub reads through a shim that blocks every non-read call (0 blocked calls); Codex model and secret scanner are stubs (thecodex sandboxcheckout preflight runs for real); publication-owned record fields reconstructed from the live durable comment.ced5921da1ced5921da1cache-hit content-unchanged skip-model, 0 model calls; report keepsmain_sha: 6a58bbfa…andlast_full_review_atlast_full_review_atunchanged, so the window does not slidecoordination_disabledand the prior record has no structural anchor, so keeping the anchor is covered by the harness test only. The live effect on 3921 can only be observed after merge.