Skip to content

fix(test): stop overriding host-aware vitest scheduling in prepare gates#67213

Merged
hxy91819 merged 1 commit into
openclaw:mainfrom
hxy91819:fix/gates-vitest-worker-override
Apr 15, 2026
Merged

fix(test): stop overriding host-aware vitest scheduling in prepare gates#67213
hxy91819 merged 1 commit into
openclaw:mainfrom
hxy91819:fix/gates-vitest-worker-override

Conversation

@hxy91819
Copy link
Copy Markdown
Member

Summary

  • The hardcoded OPENCLAW_VITEST_MAX_WORKERS=${OPENCLAW_VITEST_MAX_WORKERS:-4} default in gates.sh short-circuits the host-aware scheduling system introduced in c247e36
  • resolveLocalVitestScheduling sees the explicit 4 and returns maxWorkers=4, which falls below the >= 5 threshold in shouldUseLargeLocalFullSuiteProfile, so every machine gets the DEFAULT profile (4 shard parallelism) instead of LARGE (10)
  • Now only forwards OPENCLAW_VITEST_MAX_WORKERS when explicitly set by the user; otherwise lets test-projects.mjs detect host resources and pick the appropriate profile automatically

Test plan

  • Verify on a machine with >= 12 cores / >= 48GB RAM that scripts/pr-prepare gates <PR> now prints parallelism 10 instead of parallelism 4
  • Verify that setting OPENCLAW_VITEST_MAX_WORKERS=2 still correctly forwards the override
  • Verify that CI behavior is unchanged (CI uses OPENCLAW_LOCAL_CHECK=0 and does not set OPENCLAW_VITEST_MAX_WORKERS)

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.
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Apr 15, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 15, 2026

Greptile Summary

This PR removes the hardcoded OPENCLAW_VITEST_MAX_WORKERS=4 default in scripts/pr-lib/gates.sh, which was suppressing the host-aware vitest scheduling introduced in c247e36. The fix correctly conditionally forwards the env var only when explicitly set by the user, allowing test-projects.mjs to auto-detect host resources and apply the appropriate scheduling profile (LARGE for high-core/RAM machines, DEFAULT otherwise).

Confidence Score: 5/5

Safe 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 previous_full_gates_head assignment sits correctly outside the if/else, so gate state is preserved in both branches. No P0/P1 findings.

No files require special attention.

Reviews (1): Last reviewed commit: "fix(test): stop overriding host-aware vi..." | Re-trigger Greptile

@hxy91819 hxy91819 merged commit dc86349 into openclaw:main Apr 15, 2026
45 of 46 checks passed
xudaiyanzi pushed a commit to xudaiyanzi/openclaw that referenced this pull request Apr 17, 2026
…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.
kvnkho pushed a commit to kvnkho/openclaw that referenced this pull request Apr 17, 2026
…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.
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
…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.
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
…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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
…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.
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
…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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR scripts Repository scripts size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant