Repository navigation
fix(review): suppress owned activity churn - #1007
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 3:08 PM ET / 19:08 UTC. ClawSweeper reviewWhat this changesThe branch records a complete activity identity after ClawSweeper writes comments or labels, then uses it to avoid redundant scheduled reviews while failing open for changed or incomplete GitHub activity. Merge readinessThis PR remains necessary because current Priority: P2 Review scores
Verification
How this fits togetherClawSweeper selects GitHub issues and pull requests for review from their activity, may reuse a structural cache result, and later synchronizes review comments and labels. The changed receipt follows that lifecycle so a delayed GitHub flowchart LR
A[GitHub issue or PR activity] --> B[Scheduled hot intake]
B --> C[Complete activity receipt]
C --> D[Structural cache decision]
D --> E[Full review or cache reuse]
E --> F[Review comment and label sync]
F --> G[Apply freshness recheck]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the structural-receipt approach only with its complete source, timeline, pull-head, and review-cursor bindings intact, then confirm operational telemetry shows cache reuse for owned mutations and fresh review admission for subsequent target activity. Do we have a high-confidence way to reproduce the issue? Yes, source and supplied current-head live proof provide a high-confidence path: an automation-owned label mutation preserves the structural receipt and hits the cache, while a later body edit changes the source revision and fails open. This review did not rerun the suite because the checkout is read-only and must remain byte-for-byte clean. Is this the best way to solve the issue? Yes. A complete structural receipt is a narrower and safer solution than timestamp-only suppression because it binds source and timeline state, and for pull requests also binds the reviewed head and review-activity cursor. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4f67ca516da0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (15 earlier review cycles; latest 8 shown)
|
Historical RCA: why the earlier fixes did not stop the review stormShort version: no single recent PR introduced the whole failure. A latent timestamp-provenance ambiguity dates to the April scheduler work; later throughput changes amplified it from an occasional redundant review into a visible storm. Timeline
Why #970 and #992 were insufficient
Why the revised PR closes the gapThe original PR head used exact timestamp equality as ownership evidence. Review identified that as unsafe because independent target activity can share GitHub's second-level timestamp. Current head So the attribution is:
This also explains why the system appeared healthy before the July scaling work: the false-positive edge existed, but the older scheduler did not have the cadence and throughput to hammer it repeatedly. |
ca43c93 to
84160ed
Compare
|
@codex review |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
To use Codex here, create a Codex account and connect to github. |
|
@clawsweeper re-review |
84160ed to
614b404
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Thank you, @PollyBot13, for the careful semantic rebase and the current-head proof. The receipt-based fix is clear, conservative, and well-tested—much appreciated. |
|
Merged successfully as squash commit |
…llyBot13 Fixes openclaw#1006.\n\nThank you to @PollyBot13 for the report, semantic rebase, focused regressions, and current-head proof.\n\nCo-authored-by: PollyBot13 <[email protected]>
What Problem This Solves
Scheduled hot intake can repeatedly run a full review on an unchanged issue or PR after ClawSweeper updates its own durable review comment or labels. GitHub may publish the item
updated_atafter the local sync timestamp, so bot-owned activity can be mistaken for fresh target activity.Fixes #1006.
Why This Change Was Made
Production run https://github.com/openclaw/clawsweeper/actions/runs/30704608131 reviewed
openclaw/clickclack#117at unchanged headd26c11abba773132c51defb6e647db3a69610003. The review completed at14:52:41Z, the durable comment synced at14:53:28Z, and GitHub advanced the PRupdated_atto14:53:29Z. Scheduled hot intake then treated that server-side timestamp as uncaptured activity and ran another full review with zero cache hits.The original version of this PR persisted the post-mutation timestamp and treated exact equality as ownership. Review correctly identified that as unsafe: an independent target-side update can share GitHub's second-level timestamp.
The revised design keeps the timestamp only as an observation and requires a complete structural ownership receipt before suppressing work:
updated_atalone;Fresh and cache-hit reports now persist
review_timeline_revision, allowing exact same-second discrimination without weakening fail-open behavior.User Impact
Evidence
Exact reviewed head:
614b40460164b02fe8082fbaa29923d9e9dac9c9Base:
4f67ca516da0fc29fed5ae2b8e17fce14d49354dpnpm run checkpassed locally: static checks, production and repair builds, dashboard build, lint, changed coverage, and the full 218-file test/coverage suite.git diff --check origin/main...HEADpassed.pnpm checkgates passed on this exact head.Real Behavior Proof
Claim: an automation-owned metadata mutation is structurally covered, while later target-side activity remains review-eligible and invalidates cache reuse.
Exercised surface: the exact-head build loaded
shouldReviewItem,reviewStructuralRecordFromGraphql, andreviewStructuralCacheDecisionfrom the compiled PR head.Scenario and environment: Node 26.5.1 ran the exact head against live GraphQL records from a disposable public fork PR whose base and head were the literal SHAs above. The controlled mutation used the fork-only
proof: owned activitylabel; the target-side mutation edited the disposable PR body.Observed result:
updatedAtfrom2026-08-03T18:43:44Zto2026-08-03T18:44:31Zwhile the filtered structural source revision remained identical. The scheduler admitted structural verification and the cache returnedhit.updatedAtto2026-08-03T18:44:33Z, changed the structural source revision, and the same exact-head decision failed open withsource_changed.Artifact: the full JSON transcript is inspectable at PollyBot13#3 (comment).
Limits: this controlled proof validates GitHub timestamp ordering plus the scheduler/structural-cache decision boundary. It does not enqueue production reviews, mutate production records, or exercise the full production apply workflow.
Original production-ordering proof
The earlier disposable run remains inspectable at PollyBot13#1 (comment). It demonstrates the original delayed GitHub timestamp ordering on the first implementation head. The current-head proof above supersedes it for the rebased structural-receipt behavior.
AI-assisted
Implemented and reviewed with Codex. Production GitHub state, repository history, both disposable proofs, the full local gate, hosted CI, and independent pre-commit and committed-range reviews were used as evidence.