OpenClaw / ClawSweeper
Merged upstreamCorrectnessMerged Sep 1, 2026

Reconcile labels from completed review receipts

Reworked ClawSweeper's publication freshness gate so a completed exact review with matching source, timeline, head, and activity receipts can reconcile managed labels safely.

openclaw/clawsweeper · #1236

Review-state correctness fix

Exact re-reviews can now replace stale status, rating, proof, and merge-risk labels while preserving subsequent human activity.

Problem

A current re-review verdict could publish while stale managed labels remained because freshness was compared against an older item snapshot, even when the completed review had already captured the intervening discussion.

Approach

Admits label reconciliation only when all complete receipts match and a complete activity read shows no substantive human action in or after the review-completion second. Legacy and close-proposal paths remain unchanged, and same-second or later human activity blocks mutation.

Impact and scope

  • Keeps visible review status aligned with the latest completed exact-review verdict.
  • Protects maintainer ownership by refusing to overwrite human label activity at or after the completion boundary.
  • Uses durable receipts rather than a stale snapshot heuristic, preserving fail-closed behavior when evidence changes.

Validation

  • Added focused positive and negative controls for changed receipts, changed heads, later activity, same-second activity, and close proposals.
  • Validated the production label owner against a disposable GitHub PR with real reads, writes, events, readback, and cleanup; full CI, Windows, sparse builds, and CodeQL passed.
  • The GitHub-verified merge credits Goutam Adwant and preserves contributor attribution while closing GH-1226; branch-sync files are not presented as original contribution scope.