Repository navigation
improve: speed up cold Node test planning - #156234
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 23, 2026, 2:04 AM ET / 06:04 UTC (Revision 2). ClawSweeper reviewWhat this changesBatch test-file pattern matching to shorten cold planning while preserving selected files, ordering, duplicates, and shard ownership. Merge readiness✅ Ready for maintainer review This remains a useful optimization: current main still performs file-by-file filtering. The corrected patch preserves native matcher semantics, and the reported planner measurements and inventory comparisons support the improvement. No actionable defect was found. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s test planner turns repository file inventories and inclusion rules into test shards and coverage targets. This change optimizes file selection before those plans are emitted. flowchart TD
A[Repository test files] --> C[Batch pattern selection]
B[Include and exclude rules] --> C
D[Caller native matcher] --> C
C --> E[Ordered selected files]
E --> F[Test shards]
E --> G[Coverage targets]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +132, Other +2. Total +134 across 8 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep batch selection in the existing pattern owner and preserve each caller’s native matching contract without adding a persistent cache. Do we have a high-confidence way to reproduce the issue? Yes, the file-major selection path and Node’s bounded pattern cache establish the mechanism, supported by reported before/after planner measurements; this review did not execute it. Is this the best way to solve the issue? Yes, batching through the existing pattern owner preserves native semantics and avoids a competing matcher or cache. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8f531df7080d. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash auto-merge.
|
* commit '3ab93b4ea59804b34d02a696382db16dc95189bb': (80 commits) fix(gateway): keep session refreshes moving during unrelated writes (openclaw#156286) chore(deps): update fs-safe to 0.18.2 (openclaw#156262) refactor(plugins): extract ClawHub plugin archives once (openclaw#156246) improve(llm-core): avoid unnecessary tool validation sets (openclaw#152066) fix(backup): verification accepts archives missing captured databases (openclaw#156211) fix: cancel Guest work when its original access is revoked (openclaw#156106) fix(test): classify drained legacy migration refusals fix(anthropic): finish Opus 5.5 defaults and thinking display (openclaw#156093) refactor(agents): share native harness tool execution (openclaw#154217) fix(ui): carry typed ownership through short-route resolution test(worktrees): accept additive gc result fields (openclaw#156127) test(tasks): close sqlite borrowers before registry reload (openclaw#156131) chore(autoreview): sync Astra high defaults (openclaw#156175) refactor(node-host): await prepared workspace storage (openclaw#149519) improve: speed up cold Node test planning (openclaw#156234) fix(doctor): avoid slow legacy ownership repair in source checkouts (openclaw#156238) improve: speed up native build artifact validation (openclaw#156219) fix(ui): preserve short-route resolution ownership fix(doctor): name retained session metadata conflicts (openclaw#156162) perf(tasks): bound creation selection to matching runs (openclaw#156183) ...
* perf(test): avoid glob cache churn during cold planning * fix(test): retain native matcher semantics in batched selectors
What Problem This Solves
Cold Node test planning repeatedly recompiles globs when canonical test inventories exceed the runtime's 250-entry compiled-pattern cache. File-major matching cycles through the exclusion patterns for every candidate, evicting patterns before the next file reuses them.
User Impact
This is an internal tooling performance improvement. Selected tests, their ordering and duplicates, and shard ownership remain unchanged.
Why This Change Was Made
Batch inventories through the existing
vitest.include-patternsowner, finishing each pattern across candidate files before advancing. Callers supply their original native matcher; the helper adds no matcher, dependency, or persistent cache. Bulk unit discovery, coverage discovery, and canonical shard inventories use the operation, while single-file CLI routing retains its contract and planning remains dependency-free before installation.An additional Bun probe caught a hidden-file difference in the first candidate: Bun's native matcher accepts a path that the normalized Vitest matcher excludes. The corrected implementation retains each caller's native semantics. A regression fails on that first candidate and passes on the final head.
Evidence
c22db9fc94f4e365937acfa1683427e06babaf2373c42742ddf55915e518636e. These are bounded local measurements, not a whole-suite or hosted-CI speedup claim.