Skip to content

Fix stale exact-review publication retry loop#849

Merged
brokemac79 merged 1 commit into
mainfrom
codex/fix-stale-publication-retry-loop
Jul 25, 2026
Merged

Fix stale exact-review publication retry loop#849
brokemac79 merged 1 commit into
mainfrom
codex/fix-stale-publication-retry-loop

Conversation

@brokemac79

Copy link
Copy Markdown
Contributor

Summary

Treat an exact-review publication queue response marked superseded: true as a successful handoff rather than a failed workflow step.

Problem

During the CSW-059 monitor, openclaw/openclaw#111368 repeatedly completed review generation but its publication enqueue returned ok: true, deduped: true, and superseded: true (publication revision 9 superseded by revision 12). The workflow then exited non-zero, so the review queue retried the same stale handoff instead of allowing the queue's newer durable publication to own delivery.

Implementation

  • Accept the queue's documented superseded acknowledgement as terminal success and emit a notice with both revisions.
  • Preserve retries for transport failures, malformed responses, and all non-superseded unsuccessful enqueue responses.
  • Update the workflow contract test accordingly.

Validation

  • pnpm run build:all
  • pnpm exec node --test --test-name-pattern "exact event review hands immutable artifacts to the queue-bounded publisher lane|exact review publication enqueue accepts a superseded acknowledgement" test/sweep-workflow.test.ts
  • pnpm exec oxfmt --check .github/workflows/sweep.yml test/sweep-workflow.test.ts
  • git diff --check

The broader workflow test file has pre-existing Windows-host failures because Bash-dependent tests invoke the docker-desktop WSL distribution, which has no /bin/bash; the focused affected tests pass.

Review closeout

  • Dirty patch: codex review --uncommitted found two workflow/test issues; both were fixed, then focused proof was rerun and the dirty review completed cleanly.
  • Committed branch: codex review --base origin/main completed with no actionable findings.

Risk and rollout

This only changes handling of an explicit stale-publication acknowledgement. It does not publish stale output or suppress actual enqueue failures. Delivery still depends on the newer durable publication referenced by the queue response.

Related: CSW-059 monitoring; distinct from the #846 durable-tuple repair and CSW-058 stale-head/422 monitoring.

@brokemac79
brokemac79 requested a review from a team as a code owner July 25, 2026 06:53
@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 exact-review publication retry loop 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 a0143cc into main Jul 25, 2026
8 checks passed
@brokemac79
brokemac79 deleted the codex/fix-stale-publication-retry-loop branch July 25, 2026 07:01
@brokemac79

Copy link
Copy Markdown
Contributor Author

this PR is fixing a problem caused by #836

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