Repository navigation
fix(test): include all runners for package directories - #160653
Conversation
|
Codex review: blocked before merge. Reviewed September 28, 2026, 5:29 PM ET / 21:29 UTC (Revision 6). ClawSweeper reviewWhat this changesThe branch makes package-directory test selections discover regular test files and assign each to its existing runner, with regression coverage and a testing-doc update. Merge readiness⛔ Blocked before merge - 2 items remain Current main still has the package-directory test selection gap, and the branch provides a focused repair with credible command-level proof. The PR explicitly requests a READY-TO-LAND hold, so merging requires a human to release that hold. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's test command turns file and directory arguments into Vitest runner plans. Those plans determine which tests local commands and CI execute. flowchart LR
A[Package directory argument] --> B[Test command]
B --> C[Discover regular tests]
C --> D[Apply shared exclusions]
D --> E[Choose each test runner]
E --> F[Scoped Vitest runs]
Decision needed
Why: Green checks and a clean review cannot override the PR body's explicit instruction to remain unmerged with auto-merge off. Before merge
Agent review detailsSecurityNone. PR surfaceTests +188, Docs +1. Total +189 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep package-directory discovery in the shared planner so each regular test reaches its existing runner once while exclusions, watch mode, and inherited include limits remain intact. Do we have a high-confidence way to reproduce the issue? Yes, current-main source shows the package directory being routed as one target while individual files have specialized runner owners. The PR reports a pre-fix regression failure, but this read-only review did not execute it. Is this the best way to solve the issue? Yes, expanding only literal non-watch package directories in the existing planner is a narrow repair that reuses established runner classification and include filtering. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a46cde88785d. 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 (5 earlier review cycles)
|
|
🦞👀 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. |
6c96ed4 to
8b996b9
Compare
* fix(test): run package directory tests in their owning projects * ci: refresh package directory checks after planner repair
What Problem This Solves
pnpm test packagesand package-directory selections omit tests that belong to specialized runners, including fast, Gateway, and database-worker tests.User Impact
Non-watch commands selecting a literal package directory run its regular tests through their existing owners. Watch mode, globs, explicit E2E/live selection, empty-path diagnostics, and inherited CI include limits retain their existing behavior.
Why This Change Was Made
The shared planner previously classified a directory as one runner even when its files had different owners. Discover existing
*.test.tsleaves only within the requested package subtree, prune through the shared exclusions, then use the existing classification and deduplication logic. Only original explicit files own an include selection; discovered files remain narrowed by inherited includes.This is the focused follow-up discovered during #159279. It adds no public exports, dependencies, flags, or runner policy.
Evidence
The frozen candidate tree
e374c8d16fed7c3dd4edef1d5708415500c3f780passed on Blacksmith Testboxtbx_01m3mj70p0pezbt76892sh8yz4, then was committed exactly ase711a37ed11dcffe39ad6819f81826428c02215f. Tested head4f2a22a2eefbac5d10c22537ec282d8a62fa7fd2is a patch-identical rebase onto fresh main5117d94bdf94b2848a3f28b22ce1e3bc28b63e65; duplicate searches found no existing repair.packages/**/*.test.tsselection instead of the specialized leaves (3.17s).pnpm test test/scripts/test-projects-package-directories.test.ts --maxWorkers=1: 2.22s wall, 1.89s Vitest shard.node scripts/run-vitest.mjs run packages src/infra/fs-safe-import-boundary.test.tsexecuted the four inherited package files plus the explicit boundary exactly once: 86 tests passed, 8.23s.pnpm test packagesexecuted exactly the four package files: 63 passed, 4.77s. Both native JSON inventories were checked without deduplicating them.pnpm buildpassed (403.43s); planner siblings 2,280 passed across two shards (130.08s); all import-boundary files passed across ten shards (91.42s).node scripts/check-changed.mjs --base 20021ebe9b7a96539c98b8dd3a578fb46534ee05 -- scripts/test-projects.test-support.mts test/scripts/test-projects-package-directories.test.ts docs/help/testing/suites.mdpassed (438.25s).The rebase changes two unrelated routing inventories and the canonical runtime preparation command. Current-head refresh passed on ARM Blacksmith Testbox
tbx_01m3mnmzgqz0r9425pnjcaaws2: all 12 regressions (6.18s command), both public commands with the same exact 5-file/86-test and 4-file/63-test inventories (21.64s/11.26s), and 727 planner sibling cases across two shards (199.22s; upstream #160480 removed redundant planner cases). Aggregate exit 0, 8m4.583s. ARM hosting run. This lease is stopped; the initial x64 refresh lease was stopped after over 15 minutes queued without running a payload. The complete x64 build, import-boundary, and changed-check proof retains its original tree attribution. In the prior green hosted run, the 12-case new regression file took 0.387s test execution (jobchecks-node-compact-small-13-3, childcore-tooling-8-hosted-2).READY-TO-LAND. Prior published head
6c96ed400f6f771cb0320f94650b59204b4fc701added only an empty CI refresh to the tested tree. That exact-head CI passed, including the compact planner job and aggregate gate. The previous merge-ref run exposed an inherited hourly-planner row-cap overflow; canonical main fixdf582a4010d5d244ff100b2c8d363ebee43a0fcfrestores packing without changing caps, timings, ownership, or assertions. The directory expansion was not invoked by that failing hourly constructor. No duplicate repair was included here.Final head
8b996b97a9699ebe3e102f2f87f8a62bdd6a1bf0rebases both commits patch-identically onto audited mainc8a045a4f35e063f951130619e5e1cf4bb0de349. The changed files, routing owners/adapters, inventories, shared exclusions, and toolchain/dependency inputs are unchanged upstream. Main still lacks this repair; a fresh duplicate search found only this PR. Completed Testbox and review evidence remains valid. Final-head hosted CI is green, including the aggregate gate.This PR must stop at READY-TO-LAND, unmerged and with auto-merge off.