Skip to content

fix(e2e): keep shared artifacts stable across parallel tests [AI] - #120628

Merged
steipete merged 1 commit into
mainfrom
codex/autoqa-e2e-artifact-isolation-20260808
Aug 8, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/autoqa-e2e-artifact-isolation-20260808

Conversation

@steipete

@steipete steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Closes #120624

What Problem This Solves

Fixes an issue where parallel E2E workers could rebuild shared dist and packages/ai/dist artifacts after other workers had already started long-lived Gateway processes. Those Gateways then failed later lazy imports with missing root chunks, a missing dist/index.js, or a missing @openclaw/ai transport 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/ai build 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:

Focused exact-candidate stress:

Additional proof:

  • AutoReview: clean, no accepted/actionable findings
  • Production LOC: +0/-0; test infrastructure: +32/-5
  • Public model identifier gate: PASS; no model-bearing code or artifacts changed

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.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 8, 2026
@steipete steipete self-assigned this Aug 8, 2026
@steipete
steipete marked this pull request as ready for review August 8, 2026 16:08
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof

Exact head: 4f81b8c227402f54408d9223403e0e451ff5ab98

The failure was shared artifact ownership, not Gateway logic: E2E file workers could rebuild root dist or packages/ai/dist after other workers had started long-lived processes that import those artifacts lazily. The candidate moves both builds into global setup before worker admission and removes the per-test AI rebuild.

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.

@steipete
steipete merged commit 40385bb into main Aug 8, 2026
149 checks passed
@steipete
steipete deleted the codex/autoqa-e2e-artifact-isolation-20260808 branch August 8, 2026 16:21
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parallel E2E workers can invalidate shared build artifacts

1 participant