fix(test): stop overriding host-aware vitest scheduling in prepare gates#67213
Conversation
The hardcoded `OPENCLAW_VITEST_MAX_WORKERS=4` default in gates.sh short-circuits the host-aware scheduling introduced in c247e36. `resolveLocalVitestScheduling` sees the explicit override and returns maxWorkers=4, which falls below the >= 5 threshold required by `shouldUseLargeLocalFullSuiteProfile`, so every machine—regardless of resources—gets the DEFAULT profile (4 shard parallelism) instead of the LARGE profile (10 shard parallelism). Drop the hardcoded default so `test-projects.mjs` can detect actual host resources and pick the appropriate profile automatically. When the user explicitly sets OPENCLAW_VITEST_MAX_WORKERS, forward it as before.
Greptile SummaryThis PR removes the hardcoded Confidence Score: 5/5Safe to merge — single-file, targeted fix with no behavioral regression for CI or explicit-override users. The change is a one-block conditional that only removes an unintended hardcoded default. The No files require special attention. Reviews (1): Last reviewed commit: "fix(test): stop overriding host-aware vi..." | Re-trigger Greptile |
…tes (openclaw#67213) The hardcoded `OPENCLAW_VITEST_MAX_WORKERS=4` default in gates.sh short-circuits the host-aware scheduling introduced in c247e36. `resolveLocalVitestScheduling` sees the explicit override and returns maxWorkers=4, which falls below the >= 5 threshold required by `shouldUseLargeLocalFullSuiteProfile`, so every machine—regardless of resources—gets the DEFAULT profile (4 shard parallelism) instead of the LARGE profile (10 shard parallelism). Drop the hardcoded default so `test-projects.mjs` can detect actual host resources and pick the appropriate profile automatically. When the user explicitly sets OPENCLAW_VITEST_MAX_WORKERS, forward it as before.
…tes (openclaw#67213) The hardcoded `OPENCLAW_VITEST_MAX_WORKERS=4` default in gates.sh short-circuits the host-aware scheduling introduced in c247e36. `resolveLocalVitestScheduling` sees the explicit override and returns maxWorkers=4, which falls below the >= 5 threshold required by `shouldUseLargeLocalFullSuiteProfile`, so every machine—regardless of resources—gets the DEFAULT profile (4 shard parallelism) instead of the LARGE profile (10 shard parallelism). Drop the hardcoded default so `test-projects.mjs` can detect actual host resources and pick the appropriate profile automatically. When the user explicitly sets OPENCLAW_VITEST_MAX_WORKERS, forward it as before.
…tes (openclaw#67213) The hardcoded `OPENCLAW_VITEST_MAX_WORKERS=4` default in gates.sh short-circuits the host-aware scheduling introduced in f443568. `resolveLocalVitestScheduling` sees the explicit override and returns maxWorkers=4, which falls below the >= 5 threshold required by `shouldUseLargeLocalFullSuiteProfile`, so every machine—regardless of resources—gets the DEFAULT profile (4 shard parallelism) instead of the LARGE profile (10 shard parallelism). Drop the hardcoded default so `test-projects.mjs` can detect actual host resources and pick the appropriate profile automatically. When the user explicitly sets OPENCLAW_VITEST_MAX_WORKERS, forward it as before.
…tes (openclaw#67213) The hardcoded `OPENCLAW_VITEST_MAX_WORKERS=4` default in gates.sh short-circuits the host-aware scheduling introduced in a81daa2. `resolveLocalVitestScheduling` sees the explicit override and returns maxWorkers=4, which falls below the >= 5 threshold required by `shouldUseLargeLocalFullSuiteProfile`, so every machine—regardless of resources—gets the DEFAULT profile (4 shard parallelism) instead of the LARGE profile (10 shard parallelism). Drop the hardcoded default so `test-projects.mjs` can detect actual host resources and pick the appropriate profile automatically. When the user explicitly sets OPENCLAW_VITEST_MAX_WORKERS, forward it as before.
…tes (openclaw#67213) The hardcoded `OPENCLAW_VITEST_MAX_WORKERS=4` default in gates.sh short-circuits the host-aware scheduling introduced in 5a232b9. `resolveLocalVitestScheduling` sees the explicit override and returns maxWorkers=4, which falls below the >= 5 threshold required by `shouldUseLargeLocalFullSuiteProfile`, so every machine—regardless of resources—gets the DEFAULT profile (4 shard parallelism) instead of the LARGE profile (10 shard parallelism). Drop the hardcoded default so `test-projects.mjs` can detect actual host resources and pick the appropriate profile automatically. When the user explicitly sets OPENCLAW_VITEST_MAX_WORKERS, forward it as before.
…tes (openclaw#67213) The hardcoded `OPENCLAW_VITEST_MAX_WORKERS=4` default in gates.sh short-circuits the host-aware scheduling introduced in fba6c84. `resolveLocalVitestScheduling` sees the explicit override and returns maxWorkers=4, which falls below the >= 5 threshold required by `shouldUseLargeLocalFullSuiteProfile`, so every machine—regardless of resources—gets the DEFAULT profile (4 shard parallelism) instead of the LARGE profile (10 shard parallelism). Drop the hardcoded default so `test-projects.mjs` can detect actual host resources and pick the appropriate profile automatically. When the user explicitly sets OPENCLAW_VITEST_MAX_WORKERS, forward it as before.
…tes (openclaw#67213) The hardcoded `OPENCLAW_VITEST_MAX_WORKERS=4` default in gates.sh short-circuits the host-aware scheduling introduced in 41d5134. `resolveLocalVitestScheduling` sees the explicit override and returns maxWorkers=4, which falls below the >= 5 threshold required by `shouldUseLargeLocalFullSuiteProfile`, so every machine—regardless of resources—gets the DEFAULT profile (4 shard parallelism) instead of the LARGE profile (10 shard parallelism). Drop the hardcoded default so `test-projects.mjs` can detect actual host resources and pick the appropriate profile automatically. When the user explicitly sets OPENCLAW_VITEST_MAX_WORKERS, forward it as before.
Summary
OPENCLAW_VITEST_MAX_WORKERS=${OPENCLAW_VITEST_MAX_WORKERS:-4}default ingates.shshort-circuits the host-aware scheduling system introduced in c247e36resolveLocalVitestSchedulingsees the explicit4and returnsmaxWorkers=4, which falls below the>= 5threshold inshouldUseLargeLocalFullSuiteProfile, so every machine gets the DEFAULT profile (4 shard parallelism) instead of LARGE (10)OPENCLAW_VITEST_MAX_WORKERSwhen explicitly set by the user; otherwise letstest-projects.mjsdetect host resources and pick the appropriate profile automaticallyTest plan
scripts/pr-prepare gates <PR>now printsparallelism 10instead ofparallelism 4OPENCLAW_VITEST_MAX_WORKERS=2still correctly forwards the overrideOPENCLAW_LOCAL_CHECK=0and does not setOPENCLAW_VITEST_MAX_WORKERS)