Repository navigation
fix(e2e): keep shared artifacts stable across parallel tests [AI] - #120628
Merged
Merged
Conversation
Contributor
Author
Land-ready proofExact head: The failure was shared artifact ownership, not Gateway logic: E2E file workers could rebuild root Proof:
Known gap: ClawSweeper has not posted a review comment, so no bot approval is claimed. The six-worker broad rerun removed all 13 original artifact failures; four separate load-sensitive cases remained and each passed immediately in isolation. This PR does not weaken, retry, or otherwise mask those cases. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 9, 2026
tomorrowflow
pushed a commit
to tomorrowflow/openclaw
that referenced
this pull request
Aug 16, 2026
(cherry picked from commit 40385bb)
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.
Closes #120624
What Problem This Solves
Fixes an issue where parallel E2E workers could rebuild shared
distandpackages/ai/distartifacts after other workers had already started long-lived Gateway processes. Those Gateways then failed later lazy imports with missing root chunks, a missingdist/index.js, or a missing@openclaw/aitransport module.Why This Change Was Made
The existing build lock serializes writers but cannot protect a running reader after the lock is released. The E2E config now owns one exact-head private-QA build and one
@openclaw/aibuild in global setup, before file workers start. The packed AI-package test consumes that prepared artifact instead of cleaning and rebuilding it beneath concurrent Gateways.This is the narrow owner boundary: artifact production happens once before worker admission, while individual tests remain consumers. No production code or operator state changes.
User Impact
Maintainers and CI can run parallel Gateway/package E2E stress without unrelated tests failing because another worker replaced their build tree. This makes real Gateway regressions easier to distinguish from test-infrastructure corruption.
Evidence
Pre-fix reproduction on
1e004151c618d876881740ff1fd35353a547e7c6:CI=1 OPENCLAW_E2E_WORKERS=6 pnpm test:e2e:gatewaytbx_01kzgxj59ax71gw0tydvbz2drhdist/index.js, and@openclaw/ai/dist/transports.mjsFocused exact-candidate stress:
CI=1 OPENCLAW_E2E_WORKERS=4 node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts packages/ai/src/package.e2e.test.ts test/gateway-steer-fifo.e2e.test.ts test/clawrouter-managed-gateway.e2e.test.ts extensions/diagnostics-prometheus/src/install-runtime.e2e.test.tstbx_01kzh1qrs7mdsdtja2znyrptxhAdditional proof:
The six-worker broad rerun eliminated all 13 original failures. Four separate load-sensitive cases remained; each passed immediately in isolation and is not masked or modified by this PR.
AI Assistance
AI-assisted. The implementation, failure classification, exact commands, and resulting diff were reviewed directly before publication.