Repository navigation
[codex] Prevent stale review comment sync overwrites - #389
Conversation
|
Codex review: passed. Reviewed July 3, 2026, 8:58 AM ET / 12:58 UTC. Summary Reproducibility: yes. from source inspection: current main can reach upsertReviewComment from an older report when the rendered body differs from a newer durable PR review comment. I did not run the new tests because this review is read-only. 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 guarded apply/comment-sync path after CI and maintainer acceptance, preserving the marker-tail trust constraints and regression coverage. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main can reach upsertReviewComment from an older report when the rendered body differs from a newer durable PR review comment. I did not run the new tests because this review is read-only. Is this the best way to solve the issue? Yes; the guard sits immediately before the durable comment write and uses PR review marker freshness rather than mutable comment updated_at, which matches the reported race boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b1e238da6eed. Label changesLabel 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
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@clawsweeper automerge |
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
Summary: - The PR adds a pull-request-only live-review freshness guard to apply/comment-sync and regression tests for stale overwrite and forged marker cases. - Reproducibility: yes. from source inspection: current main can reach upsertReviewComment from an older repor ... ffers from a newer durable PR review comment. I did not run the new tests because this review is read-only. Automerge notes: - No ClawSweeper repair was needed after automerge opt-in. Validation: - ClawSweeper review passed for head b01772a. - Required merge gates passed before the squash merge. Prepared head SHA: b01772a Review: openclaw#389 (comment) Co-authored-by: masonxhuang <[email protected]> Approved-by: hxy91819
Summary
reviewed_at.Root cause
A long-running apply/comment-sync job could load older state and later PATCH the durable review comment after a newer exact-review run had already updated it. Because the sync path compared desired body/hash metadata but did not check live review freshness, it could roll the public comment from a newer review back to an older one.
Validation
pnpm run buildpnpm exec node --test test/clawsweeper.test.tspnpm run format:checkautoreview --mode local --codex-bin /root/.nvm/versions/node/v22.21.1/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex ...Autoreview
Codex autoreview initially found trust-boundary issues in the freshness parser. Accepted and fixed:
clawsweeper-reviewmarker to be the final footer before trusting the preceding verdict marker.Final autoreview result:
autoreview clean: no accepted/actionable findings reported.