Skip to content

Fix stale existing exact-review publication revisions#851

Merged
brokemac79 merged 1 commit into
mainfrom
codex/rebase-existing-publication-revision
Jul 25, 2026
Merged

Fix stale existing exact-review publication revisions#851
brokemac79 merged 1 commit into
mainfrom
codex/rebase-existing-publication-revision

Conversation

@brokemac79

Copy link
Copy Markdown
Contributor

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

  • Compute the next existing-item revision as max(current + 1, publication head + 1).
  • Keep the supersession audit's recorded next revision aligned with the rebased value.
  • Add a lifecycle regression test for persisted revision 7, publication head 12, and a newer source event producing revision 13 that queues normally.

Validation

  • pnpm run build:dashboard
  • pnpm 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.ts
  • pnpm exec oxfmt --check dashboard/exact-review-queue.ts test/dashboard-worker.test.ts
  • git diff --check

Review closeout

  • codex review --uncommitted: clean after focused proof.
  • codex review --base origin/main: clean; reviewer also ran all 209 test/dashboard-worker.test.ts tests 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.

@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

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.

@brokemac79
brokemac79 merged commit 01e6976 into main Jul 25, 2026
8 checks passed
@brokemac79
brokemac79 deleted the codex/rebase-existing-publication-revision branch July 25, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant