Repository navigation
chore(test): migrate to stable Vitest 5 - #138264
Conversation
|
Codex review: blocked before merge. Reviewed September 5, 2026, 3:00 PM ET / 19:00 UTC. ClawSweeper reviewWhat this changesUpgrades the development test harness to Vitest 5 and adapts worker cleanup, caching, report aggregation, test selection, browser configuration, and contributor guidance. Merge readiness⛔ Blocked before merge - 4 items remain The migration remains necessary on the inspected main revision. Source changes address the prior findings, and no new blocking defect was established; final performance acceptance and independent upstream contract verification remain unresolved. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s test tooling turns contributor and CI commands into Vitest projects and workers. It collects their results into reports used to validate changes and QA scenarios. flowchart TD
A[Contributor or CI command] --> B[Test routing]
B --> C[Vitest projects and cache]
C --> D[Native test workers]
D --> E[Results and worker cleanup]
E --> F[Report identity validation]
F --> G[Aggregate report or explicit failure]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +7, Tests +477, Docs +87, Config +8, Other +272. Total +851 across 69 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one native Vitest execution and reporting flow, with the documented development upgrade boundary and verified final correctness/performance acceptance. Do we have a high-confidence way to reproduce the issue? Not applicable to the migration as a whole; the supplied evidence describes stock-Vitest failures and repaired native regressions, but this read-only review executed no tests. Is this the best way to solve the issue? Unclear as a final acceptance verdict: the owner-boundary approach is coherent and addresses prior findings, but direct published-dependency inspection and final performance acceptance remain unverified. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ac53dc9687ca. LabelsLabel 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 (12 earlier review cycles; latest 8 shown)
|
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
This is a much cleaner Vitest 5 migration shape than carrying v4/v5 compatibility code: direct API migration plus a small, explicit patch for OpenClaw-specific guarantees. The fork/vmFork join semantics and trailing task-update delivery are the parts I would treat as non-negotiable, not optional test fixes. Keep the PR draft until same-host V4/V5 benchmark results and exact-head hosted gates are recorded, as the body already requires.
ba2276f to
337c769
Compare
Maintainer patch approval and published-package proofAt exact PR head Published-package proof completed on September 4, 2026:
The three retained contracts are:
Focused runtime replay passed: CLI valid/unknown/missing-value cases, task updates The automated data-model classification is a false positive. The pressure-dependent |
c8d2b7c to
eec831d
Compare
eec831d to
32a0719
Compare
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin, a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
|
@clawsweeper re-review Please review exact head The prior review's evidence gates are complete:
Both prior Rank-up moves are complete. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Final exact-head evidence is complete for
The prior |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* build(test): migrate to stable Vitest 5 Co-authored-by: Peter Steinberger <steipete@gmail.com> * docs(test): document Vitest 5 contracts * test(test): prove Vitest cache invalidation * test(test): stabilize report config load proof * test(test): restore Vitest 5 compatibility Co-authored-by: Peter Steinberger <steipete@gmail.com> * test(test): isolate pnpm cache fixture registry * fix(test): keep pnpm 12 env lock portable * fix(test): preserve explicit Vitest project roots * fix(test): preserve nested Vitest project identity * test(test): expect captured Vitest name prefix --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
Related: #137201
What Problem This Solves
OpenClaw was pinned to Vitest 4.1.11. Stable Vitest 5 breaks worker shutdown,
task updates, fake-timer refresh ordering, persistent cache invalidation, native
report merging, and several project/config contracts used by this repository.
Why This Change Was Made
This migrates the workspace to Vitest 5.0.0 and keeps one native Vitest harness.
Dependency patches are limited to behavior with captured stock-Vitest-5
failures. OpenClaw-owned tooling now uses Vitest 5 project and cache contracts
directly.
Vitest 5 bundles its runner and does not publish
@vitest/runner@5.0.0, so theold standalone dependency and patch are removed.
tinybench@6.1.4is unchanged.User Impact
Contributors and CI can use stable Vitest 5 while retaining deterministic
reports, complete worker cleanup, valid cache reuse, and current test routing.
OpenClaw's packaged runtime still supports Node 25.9+. Source test/build support
follows Vitest's published Node 22.12+, 24+, and 26+ engine range.
Evidence
Exact candidate:
73dcc68983f24941c564505dee75b65b556398920e6b033d4bdb0ce6750f24fb9044bb524ddd344eordered-suite, browser, and TUI repairs from
chore(test): migrate validation workflows to Vitest 5 #137202.
APPROVE · READY, no findings; 95/95focused tests passed. The final one-line expectation repair passed its
focused test 1/1.
mainis4e217930a68a12586f0dd215a68f714958a02970;an exact-head merge-tree probe is clean.
Published dependency proof:
vitest@5.0.0, published September 3, 2026.sha512-gpsMNoRhMjMktVxPtstOH4/PJuPyovVaMDr4oDilXaGH1EcqM2OE96SoHT2VIQ6fTGtTjqmHDrEu2X9RQiXf8Q==76a69c6de8bc85bb68eebebddf7e1e798a4ebf46d36ad60e6447ebc62c49f702application against the published package all passed.
describe(name, { concurrent: false }, callback)and that browser context isprovided through the virtualized
vitest/browserentry.records top-level
pnpmonly; the committed lock now matches that contract.omitted and apply explicit descriptor roots to both Vitest and Vite config.
namePrefixafter config hooks. Two named containers can share one leafconfig without collapsing to duplicate project names.
Stock Vitest 5 failures captured before patching:
Exact-head validation:
shards: two qualified
alphaprojects collapsed during replay, duplicateidentity aborted merge, and no aggregate was published.
identities equal,
index.complete=true, aggregate output present, and exitcode zero. Name/root drift remains fail-closed.
projects now intentionally include
namePrefix: "". The expected projectcontract was updated by one test line; the focused test passes 1/1.
runtime/type hashes, and lockfile byte identity passed.
createVitestcontexts.Node 24.19.0 with pnpm 12.3.4.
fa3465f66d7f1af52b0a56cf9740a5ac09d40366e845d7dd0ab21ff1a20135acopenclaw --version, andopenclaw help: passedat
73dcc68. A transitivehosted-git-infoengine warning was advisory only.changed tooling tests; Gateway ordered suite; Chromium menu suite;
pnpm tsgo:test:root;pnpm tsgo:scripts; and Node 24.15.0pnpm check.https://github.com/openclaw/openclaw/actions/runs/33984746192
https://github.com/openclaw/openclaw/actions/runs/33984373313
commit repairs that exact assertion.
https://github.com/openclaw/openclaw/actions/runs/33980753997
01ea440c.+0/-0.Full-suite disposition:
32a07193exposed fourbranch-owned compatibility defects; all four are repaired here.
control
723731b5f7ad58e3bc0fd818b74d049563e3a2d0reproduced those baselinefailures.
explicit file-backed project roots.
shards could lose their parent-name context and fail aggregate publication.
The repair carries native prefix identity through every Vitest project
attachment path and keeps identity drift fail-closed.
Performance:
frozen base and current
main.https://github.com/openclaw/openclaw/actions/runs/33958680311
0.979512; core1.009059; gateway0.952045; UI jsdom0.801893; worker lifecycle0.992484.https://github.com/openclaw/openclaw/actions/runs/33977496985
e6ad4f42; baseline pinned to0e6b033d.0.972047; core1.008901; gateway0.931313; UI jsdom0.794350; worker lifecycle0.990713.https://github.com/openclaw/openclaw/actions/runs/33980754473
01ea440c; baseline pinned to0e6b033d.0.975833; core0.995018; gateway0.943878; UI jsdom0.805138; worker lifecycle0.989261.0.979260.verifier passed.
https://github.com/openclaw/openclaw/actions/runs/33984383323
https://github.com/openclaw/openclaw/actions/runs/33984747140
73dcc689; baseline pinned to0e6b033d.0.979512; core0.992968; gateway0.936441;UI jsdom
0.790620; worker lifecycle0.999673.0.981702.No persistent data model, migration, runtime config, or upgrade contract changes.
The files previously classified as data-model surfaces are test-toolchain
package/workspace configuration only.