fix(qa): isolate candidate release auth serialization and commit patches atomically - #71
Open
petercheng wants to merge 1 commit into
Open
petercheng wants to merge 1 commit into
petercheng wants to merge 1 commit into
Conversation
…hes atomically Seeding agents that target candidate release auth runtimes previously swapped OPENCLAW_STATE_DIR on the shared process env across an await boundary, letting concurrent Promise.all seeding observe or clobber each other's state root. The candidate serializer now runs in a one-shot child process whose env carries exactly the seeding agent's state dir; the parent never mutates its own env. Multi-file patch writes now stage sibling .tmp- files and move them into place with fs.rename, restoring already-moved files (best effort) when a later rename fails and reporting paths that still need manual recovery. Patched-store assertions and worker merge/replace semantics are covered by overlapping two-agent seeding, fail-closed runtime contract, and fault-injected staging/rename rollback tests. refs openclaw/openclaw#119679
This branch has not been deployed
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.
Fixes openclaw/openclaw#119679
Summary
Seeding agents that target candidate release auth runtimes previously swapped
OPENCLAW_STATE_DIRon the shared process env across an await boundary, letting concurrentPromise.allseeding observe or clobber each other's state root. The candidate serializer now runs in a one-shot child process whose env carries exactly the seeding agent's state dir; the parent never mutates its own env.Multi-file patch writes now stage sibling
.tmp-files and move them into place withfs.rename, restoring already-moved files (best effort) when a later rename fails and reporting paths that still need manual recovery.Scope is limited to
scripts/patch-openclaw-release-qa-harness.mjsand its test file.Note on the issue reference
The issue references a Telegram patcher file that is no longer present in this repository (retired; no add/delete history, and
scripts/telegram-rtt-workflow-contract.test.mjsasserts the retired helper paths are absent). This change addresses the still-relevant part of the contract: isolated candidate-release auth serialization plus atomic patch commit/rollback.Testing
node --test scripts/*.test.mjs: 204 tests / 201 pass / 0 fail / 3 cancelled (pre-existing wait-for-ready cancellations, unchanged from baseline).node --test scripts/patch-openclaw-release-qa-harness.test.mjs→ 6/6 pass.npm run checkpasses..tmp-*residue, rollback guidance in the error); idempotency (second run reports already patched, artifacts byte-identical).