Repository navigation
chore(test): pin Vitest 5 config semantics - #138208
Conversation
Co-authored-by: Peter Steinberger <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 8:03 AM ET / 12:03 UTC. ClawSweeper reviewWhat this changesThe branch explicitly keeps Vitest 4 mock-history behavior and prevents complete inline Control UI test projects from inheriting their declaring root configuration under Vitest 5. Merge readiness✅ Ready for maintainer review The patch is a correct, narrowly scoped Vitest 5 compatibility preparation with no actionable defect found. It remains open for normal maintainer handling because it is maintainer-owned and labeled for maintainer review; the supplied member decision accepts landing this isolated preparation while the broader migration remains separately tracked. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s Vitest configuration feeds root and Control UI test projects used by local development and CI. These settings determine mock cleanup, project inheritance, and which configuration each validation project receives. flowchart LR
A[Shared test settings] --> B[Root and Control UI configs]
C[Inline UI projects] --> D[Independent project setting]
B --> E[Vitest project resolution]
D --> E
E --> F[Local and CI validation]
F --> G[Deterministic test ownership]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +5, Tests +28. Total +33 across 6 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Land this as the focused parity pin, while retaining full exact-Vitest-5 correctness and performance acceptance in #137201 and its migration PR. Do we have a high-confidence way to reproduce the issue? Not applicable: this is preventative test-configuration work, and the changed configuration contracts are directly asserted by the focused suites. Is this the best way to solve the issue? Yes. The shared configuration owns mock cleanup, and the two inline project arrays own independence; path-based root projects are unaffected, so this is the narrowest maintainable location. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6df6ea5c693a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
ClawSweeper rank-up move satisfied with installed stable
This directly verifies both semantic pins against the installed stable release; the branch remains unchanged at @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
The refreshed exact-head review lease started at 2026-09-04T11:20:29Z and expired at 2026-09-04T11:23:32Z without publishing its completed verdict. Head remains @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer decision: accept ClawSweeper's recommended option to land this isolated compatibility preparation now. This PR does not claim the Vitest 5 dependency migration complete. Exact-Vitest-5 correctness and performance/benchmark acceptance remain mandatory on the canonical issue #137201 and migration PR #137202. No broader migration acceptance is being bypassed. @clawsweeper re-review |
|
🦞👀 |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
Related: #137201
Follows the sequential API preparation landed in #138175.
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Vitest 5 changes two test configuration defaults: mock call history is cleared before each test, and inline projects inherit their declaring root configuration. Without explicit parity settings, OpenClaw's shared setup history can disappear and independently composed UI projects can inherit duplicate plugins, aliases, setup files, and inventory.
Why This Change Was Made
This preserves the current Vitest 4 behavior before the dependency upgrade by explicitly retaining mock history and marking complete inline UI projects as independent. A small shared helper bridges Vitest 4's narrower type definition while emitting the
extends: falsevalue required by Vitest 5.The focused extraction derives from Peter Steinberger's migration work in #137202. Peter remains credited in the commit trailer.
User Impact
There is no product runtime change. Developers keep deterministic test selection, resource ownership, and mock-history behavior when the Vitest 5 upgrade lands.
Evidence
22f6c810da9a59186d7add366fe59c7f125aa8a2OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs test/vitest-projects-config.test.ts test/vitest-ui-package-config.test.ts test/vitest-ui-e2e-config.test.tsnode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.root.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-root.tsbuildinfonode scripts/run-tsgo.mjs -p tsconfig.ui.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/ui.tsbuildinfogit diff --checkpassedorigin/main: scoped clean, no P0/P1 findings, confidence 0.98