Repository navigation
fix(ci): restore Vitest cache reuse - #154121
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 20, 2026, 8:05 PM ET / September 21, 2026, 00:05 UTC (Revision 4). ClawSweeper reviewWhat this changesRestores test cache reuse by excluding generated CI harness files from cache fingerprints, preserving Node cache settings, and aligning UI test dependency loading with Vitest 5. Merge readiness✅ Ready for maintainer review This remains a useful, focused repair: current main retains the cache blockers, and related cache work does not supersede it. No actionable correctness or security defects were found. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s test launchers and CI setup prepare dependencies and caches before Vitest runs. These changes affect repeated test startup work and UI test module identity, without changing the shipped application. flowchart LR
A[Source and dependency inputs] --> B[Cache fingerprint]
C[Generated CI harness] --> D[Exclude generated copies]
D --> B
B --> E[Restore protected caches]
E --> F[Vitest test launchers]
F --> G[Coverage safeguards and shared dependencies]
G --> H[Test results]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +1, Tests +57, Docs +2, Config +1, Other -17. Total +44 across 10 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep cache policy with the existing CI owner and coverage safeguards with Vitest, using one shared UI dependency policy. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main includes copied harness manifests in its fingerprint and unconditionally disables inherited bytecode caches in test launchers. No local runtime reproduction was executed. Is this the best way to solve the issue? Yes. The patch repairs the existing owners, removes redundant wrapper policy, and applies the supported Vitest optimizer configuration consistently. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7974d9cf48d7. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
1dabe2b to
4b9f03d
Compare
|
Merged via squash.
|
* fix(ci): restore Vitest cache reuse * test(ci): keep cache fingerprint fixtures strictly typed * fix(test): preserve UI dependency identities with optimization
What Problem This Solves
Fixes repeated cold Vitest work when CI cannot restore the protected warmer's transform cache and the test wrappers disable Node bytecode caching for ordinary runs.
User Impact
No product behavior changes. Developer and CI tests can reuse their intended caches; V8/custom coverage workers retain Vitest 5's native safeguard. This is maintainer-requested test and CI maintenance.
Why This Change Was Made
Exclude the generated
.ci-harnesscheckout from transform fingerprints so its copied action manifests cannot separate consumers from the warmer. Remove both obsolete wrapper-level bytecode guards and use Vitest 5'sclientoptimizer setting.Optimize Lit's exported entry points together to keep browser/development internals consistent. Keep CodeMirror and Lezer within Vite's module graph: versioned direct imports and query-free native transitive imports otherwise create duplicate class and parser-property identities. The root and package UI entry points share this dependency policy.
Protected cache publication, runner allocation, isolation, and coverage settings retain their existing owners. Hosted transform warming remains a separate follow-up.
Evidence
optimizer.webassertion plus split Lit/CodeMirror/Lezer identities. The original 415-file two-worker UI shard reproduced its eight highlighting failures. After the complete dependency cutover it passes 6,547 tests with three intentional skips; all 44 affected highlighting/editor tests pass through both root and package UI entry points. The 332 config-contract tests pass.CI reported case-time sums were 127.608s for workflow guards, 1.049s for runner tests, and 42.661s for config contracts (excluding imports/setup, not file wall time). The changed cases cost 29ms for fingerprint parity, 0ms each for bytecode forwarding at reporter resolution, and 5ms for the UI owner assertion.