Repository navigation
fix(qa): preserve prepared runtime during suites - #130345
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 6:57 PM ET / 22:57 UTC. ClawSweeper reviewWhat this changesThe PR makes the QA suite prepare the AI runtime before Vitest consumers start and lets script-owned Docker scenarios declare a scheduler-prepared package candidate lane. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep open. The latest head resolves the prior Playwright regression by building the shared AI runtime only when a Vitest partition exists, while retaining the prepared-runtime and prepared-Docker-candidate repairs. This remains necessary because current main lacks both protections; exact-head QA automation is still in progress. Priority: P2 Review scores
Verification
How this fits togetherQA Lab schedules flow, Vitest, Playwright, and script scenarios from one checkout. It prepares shared build/package artifacts, then passes the appropriate environment to child runners so concurrent tests do not overwrite each other’s inputs. flowchart LR
A[Selected QA scenarios] --> B[Unified suite scheduler]
B --> C{Vitest partition present?}
C -->|Yes| D[Build shared AI runtime]
C -->|No| E[Start non-Vitest partitions]
D --> F[Vitest child uses prepared runtime]
B --> G[Prepare Docker candidate lanes]
G --> H[Script-owned Docker checks]
E --> H
Before merge
Agent review detailsSecurityNone. PR surfaceSource +39, Tests +108, Other +3. Total +150 across 8 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the scheduler as the single preparation owner, merge only after exact-head checks validate the Vitest, Playwright, and script-Docker partitions together. Do we have a high-confidence way to reproduce the issue? No reviewer-executed reproduction was performed in this read-only review, but the current-main scheduler path and the final-head ordering regressions give a high-confidence source reproduction boundary. Is this the best way to solve the issue? Yes. The unified scheduler is the correct owner for shared runtime and Docker-candidate preparation; leaving either operation to concurrent child processes would reintroduce competing writers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 90c1d798cad4. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
Addressed the current P1 on exact head The unified scheduler now builds the missing Proof:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Follow-up P1 repair pushed at The prebuilt-dist marker is now applied only to scheduler-prepared native Vitest/Playwright partitions. Ordinary script partitions keep their normal environment unless Docker candidate preparation supplies an explicit replacement environment. A regression uses the nested Proof:
|
|
Addressed the exact-head Playwright finding at Regression proof: the new assertion fails on the pre-fix condition with the AI build invocation, then passes after the fix. Focused QA suite: 73/73 passed; @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* fix(qa): preserve prepared runtime during suites * fix(qa): prepare native suite runtime * fix(qa): keep prebuilt marker on native partitions * refactor(qa): simplify Docker lane naming * fix(qa): keep Playwright independent of AI build
What problem this solves
Maturity run 32992034783 exposed two independent writers mutating the checkout that a QA suite had already prepared:
packages/ai/distwhile concurrent live Gateway flows were still importing it. In the local pre-fix reproduction, the required AI module was absent in 329 of 644 polls during three concurrent setup calls.cli-onboardingbypassed the suite Docker candidate preparation, so its package helper deleted rootdistand attempted a fresh build. When that build ran out of memory, every later script inheritedmissing_private_qa_dist.Repair
The suite launcher now marks native children as consumers of its prepared dist, so their E2E setup cannot clean or rebuild the runtime under live gateways.
Script-owned Docker invocations now declare their scheduler candidate lane. QA Lab feeds those lanes through the existing scheduler-owned immutable candidate preparation before any serial script starts. Canonical Docker lane batching is unchanged; onboarding, Compose, and package-install scripts receive the same frozen candidate environment instead of packaging independently.
This extends the immutable-candidate owner boundary introduced by #121253 rather than adding a retry, timeout, fallback, or downstream guard.
Verification
keeps native Vitest setup on the suite-prepared runtimefails on pre-fix code because the child receives no prebuilt-dist marker.prepares the Docker candidate before a script-owned Docker lanefails on pre-fix code becausecli-onboardingdoes not trigger preparation.node scripts/run-vitest.mjs extensions/qa-lab/src/suite-launch.runtime.test.ts extensions/qa-lab/src/test-file-scenario-runner.docker.test.ts extensions/qa-lab/src/scenario-catalog.test.ts— 130 passed.pnpm tsgo:extensions:all— passed.node scripts/check-changed.mjs -- <changed files>— passed, including all typechecks, lint, import-cycle and repository guards.Scope and risk
QA infrastructure only; no shipped runtime, public API, config, or persistence change. The candidate metadata is internal scenario-catalog data. Docker preparation still runs only after concurrent flow/native partitions settle. A preparation failure stops scripts before they can mutate the prepared checkout.
Production/config LOC: +20/-3 (net +17). Tests: +58/-1 (net +57). Positive production growth is the explicit candidate-lane ownership contract plus propagation of the existing immutable-runtime contract; there is no duplicate execution path to remove.
No changelog entry: no user-visible product behavior change.