fix(exact-review): snapshot durable tuple before publication#846
Merged
Conversation
Contributor
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(exact-review): snapshot durable tuple before publication 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. |
This was referenced Jul 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the exact-review batch publisher so its tuple base snapshot comes from the durable isolated state checkout, not the empty worker directory. Also repair the CI fixture exposed by the current
mainadmission behavior.Problem
A re-review of openclaw/openclaw#93584 completed its exact worker successfully, produced a valid review artifact, and created the review-started placeholder, but never updated the durable review comment/status.
The first terminal loss was in batch run 30141831366 at 2026-07-25 03:16:37Z:
The batch workflow reported success even though it recorded that individual publication as permanent
tuple_protocol_invalid; queue completion then removed the active item and placed it in the DLQ. This PR deliberately does not replay, requeue, or otherwise mutate that live item.Timeline and cause
@clawsweeper re-reviewon #93584.item_updated_at(03:10:15Z) andreviewed_at(03:12:20.195Z).publish-event-resultcaptured the base tuple from the empty worker root. It later compared both the fresh artifact and the durable tuple against that empty base.Causal classification: #840 introduced the isolated artifact/root flow that exposed this missing durable-base capture. #829/#830/#832 are predecessor tuple-protocol work, not sufficient causes. #842/#843 concern dispatch validation and are unrelated to the production publication failure. The separate stale-publication revision conflict observed for #111368 is also unrelated.
Implementation
captureEventBaseSnapshotread a specified source root.publish-event-result, snapshot frompublishRoot()before applying artifacts to the isolated worker directory./pulls/842admission read and its head SHA. This is test-only; no production dispatch behavior changed.Validation
pnpm run build:allnode --test --test-name-pattern='event base snapshot uses durable state' test/repair/event-record-store.test.tspnpm run lint:repairpnpm run build:dashboardnode --test test/dashboard-worker.test.ts— 208 passed, 0 failedpnpm run lint:scriptspnpm exec oxfmt --check src/repair/event-record-store.ts src/repair/publish-event-result.ts test/repair/event-record-store.test.ts test/dashboard-worker.test.tsgit diff --checkThe lifecycle regression constructs the #93584 topology: an empty worker, an existing durable tuple, and a fresh exact-review tuple. It proves the old base capture throws the production error and the durable-state capture resolves the fresh tuple as
open.The initial CI failure was deterministic but separate: #843 changed verified PR admission to read
/pulls/<number>, while its test only mocked/issues/<number>. The dispatcher therefore never ran and the test observed an empty payload. The added fixture proves the real verified-head flow.The full affected event-record test file has two pre-existing Windows fixture failures in unchanged cases: their remote tuple helpers write absolute
decision_packet_pathvalues, while tuple validation correctly requiresrecords/...paths. They are outside this lifecycle patch.Risk and rollback
The lifecycle change only selects the correct source for the existing baseline snapshot; tuple ordering, stale-event handling, retry/DLQ accounting, and routing semantics are unchanged. The CI follow-up is test-only. Roll back commits
0ea41f918ab280e44b909be56a7ad4fe049eeddcand0b4839236ato restore prior behavior.Review closeout
codex review --uncommitted— clean; no accepted/actionable findings.codex review --base origin/main— clean; no accepted/actionable findings.codex review --uncommitted— clean; no accepted/actionable findings.codex review --base origin/main— clean; no accepted/actionable findings.No live queue, state, review command, label, comment, or merge operation was performed by this PR preparation.