Repository navigation
fix: preserve apply reconciliation tuple baselines - #931
Merged
Merged
Conversation
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
Root cause
Apply run https://github.com/openclaw/clawsweeper/actions/runs/30422286379 hydrated Worker-owned records into the ClawSweeper worktree, while
CLAWSWEEPER_STATE_DIRcorrectly remained a sparse checkout with norecords/tree.publish-mainnevertheless used that sparse checkout as the compare-and-swap baseline.For an open record such as
openclaw-openclaw/100078, the preselect lane therefore sentexpectedDigest: nullfor the liveitems/100078.mdanddecision-packets/100078.jsonrows. The Durable Object correctly rejected theitemsoperation withcanonical_record_tuple_conflict. #928's CURRENT recovery could not prove the move because its local baseline location was also null, so the legitimate items-to-closed transition was treated as obsolete rather than published.The endpoint fences are unchanged. Reconciliation now snapshots only the four-section tuples it actually mutates, passes that exact snapshot through a step-scoped temporary directory, and deletes it after publication. A genuinely concurrent canonical writer still trips the digest fence and goes through the existing CURRENT-based single retry.
Proof
test/dashboard-worker.test.ts: before the fix the lane received 409 instead of 202; after the fix the canonical row moves from items to closedtest/reconcile.test.tstest/repair/publish-main.test.tstest/sweep-workflow.test.ts~/.claude/skills/autoreview/scripts/autoreview --mode local: clean, no accepted/actionable findingspnpm run checkreaches the full coverage suite but has six unrelated macOS baseline failures: five Linux Landlock fixtures cannot resolvecapsetfrom macOS libc, and one temporary-path assertion compares/var/...with macOS's/private/var/...resolution.Deployment
No Worker redeploy is required. The Durable Object endpoint is unchanged; merging updates the apply workflow's checked-out lane code for the next run.