Repository navigation
fix: prevent stale PR review labels from persisting - #388
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 3, 2026, 7:58 AM ET / 11:58 UTC. Summary Reproducibility: yes. at source level: current main records pull_head_sha and live PR head data, but the apply path syncs PR readiness labels before comparing those values. The PR body also includes staged after-fix apply output for the stale-head scenario. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the apply-layer stale-head guard with the focused test and staged proof so stale PR reports remove old review-derived labels, preserve generic triage labels, and replace the old verdict with a stale-review notice. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main records pull_head_sha and live PR head data, but the apply path syncs PR readiness labels before comparing those values. The PR body also includes staged after-fix apply output for the stale-head scenario. Is this the best way to solve the issue? Yes. Guarding apply-decisions is the narrow mutation-boundary fix because that is where stored review reports become live labels and durable comments. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f2fc64e0bc74. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
Added staged apply proof to the PR body showing the stale-head path removes only old review-derived labels, preserves P2, records the live head, and replaces the stale durable comment without an old verdict marker. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper automerge |
|
🦞✅ Approver: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
|
@clawsweeper approve |
Summary: - Merged fix: prevent stale PR review labels from persisting after ClawSweeper review. Automerge notes: - No ClawSweeper repair was needed after automerge opt-in. Validation: - ClawSweeper review passed for head 98dcca7. - Required merge gates passed before the squash merge. Prepared head SHA: 98dcca7 Review: openclaw#388 (comment) Co-authored-by: momothemage <[email protected]> Approved-by: momothemage
Summary
pull_head_shano longer matches the live PR head.Problem
Refs openclaw/openclaw#99335. That PR had a durable ClawSweeper review for an older head while the PR branch had moved, but the apply path could still leave review-derived labels from the old verdict on the live PR.
Why this layer
apply-decisionsis the path that mutates GitHub labels and durable comments from stored reports. Guarding stale heads there prevents old review state from being published or retained while the fresh review catches up.Validation
PATH=/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:/Users/mauriceniu/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin:$PATH node --test test/apply-label-sync.test.tsPATH=/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:/Users/mauriceniu/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin:$PATH pnpm run checkgit diff --checkStaged Apply Proof
This is a staged apply run using the real
apply-decisionspath with a mockghshim, so no live GitHub labels or comments were mutated. The scenario models a durable report reviewed atreviewed-old-headwhile the live PR head has moved tolive-new-head.Command:
Output:
The staged run confirms the stale-head path removes only review-derived PR labels, preserves the generic
P2label, records the current live head, replaces the durable comment with the stale-review notice, and does not keep publishing the oldclawsweeper-verdictmarker.