Fix stale existing exact-review publication revisions#851
Conversation
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: Fix stale existing exact-review publication revisions This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Summary
Rebase an existing exact-review item above its target's durable publication head whenever a newer source event updates that item.
Problem
An existing review item can retain a local revision below the permanent publication head for the same target. A normal re-review then incremented only the stale local value (for example, 7 to 8 to 9 while the durable head was 12), so its artifact was rejected as superseded before publisher, state writer, router, or final comment delivery.
Implementation
max(current + 1, publication head + 1).Validation
pnpm run build:dashboardpnpm exec node --test --test-name-pattern "a later exact-review cycle still publishes after an earlier cycle raised the publication head|an existing exact-review item rebases above the publication head on a newer source event" test/dashboard-worker.test.tspnpm exec oxfmt --check dashboard/exact-review-queue.ts test/dashboard-worker.test.tsgit diff --checkReview closeout
codex review --uncommitted: clean after focused proof.codex review --base origin/main: clean; reviewer also ran all 209test/dashboard-worker.test.tstests successfully.Risk and rollout
This affects only an incoming newer source event updating an existing review item. It does not replay, mutate, or change already completed publications. It closes the pre-existing-item gap left after #836 seeded only new items above the durable head.
Related: #836, #849, and CSW-059 / openclaw/openclaw#111368.