Skip to content

Commit d914e37

Browse files
committed
fix(ci): preserve compact whole-job timeout
1 parent 70aea2e commit d914e37

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

docs/ci.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ The slowest Node test families are split or balanced so each job stays small wit
9797
- Auto-reply runs as balanced workers, with the reply subtree split into agent-runner, commands, dispatch, session, and state-routing shards.
9898
- Agentic gateway/server (control-plane) configs split across chat, auth, model, HTTP/plugin, runtime, and startup lanes instead of waiting on built artifacts.
9999
- Normal CI packs only isolated infra include-pattern shards into deterministic bundles of at most 64 test files, reducing the Node matrix without merging non-isolated command/cron, stateful agents-core, or gateway/server suites. Heavy fixed suites stay on 8 vCPU while the bundled and lower-weight lanes use 4 vCPU.
100-
- Pull requests on the canonical repository use a compact admission plan: the same per-config groups run in isolated subprocesses, currently 19 Node test jobs instead of the 74-job full matrix. A single whole-config batch is spread across existing same-runner compact jobs, and the serial tooling config is striped across three PR-only groups; `main` pushes, manual dispatches, and release gates retain the full matrix.
100+
- Pull requests on the canonical repository use a compact admission plan: the same per-config groups run in isolated subprocesses, currently 19 Node test jobs instead of the 74-job full matrix. A single whole-config batch is spread across existing same-runner compact jobs while retaining its 120-minute timeout, and the serial tooling config is striped across three PR-only groups; `main` pushes, manual dispatches, and release gates retain the full matrix.
101101
- Broad browser, QA, media, and miscellaneous plugin tests use their dedicated Vitest configs instead of the shared plugin catch-all. Include-pattern shards record timing entries using the CI shard name, so `.artifacts/vitest-shard-timings.json` can distinguish a whole config from a filtered shard.
102102
- `check-additional-*` stripes the supplemental boundary guard list (`scripts/run-additional-boundary-checks.mjs`) into one prompt-heavy shard (`check-additional-boundaries-a`, which includes the Codex prompt snapshot drift check) and one combined shard for the remaining stripes (`check-additional-boundaries-bcd`), each running independent guards concurrently and printing per-check timings. Package-boundary compile/canary work stays together, and runtime topology architecture runs separately from the gateway watch coverage embedded in `build-artifacts`.
103103
- Gateway watch, channel tests, and the core support-boundary shard run concurrently inside `build-artifacts` after `dist/` and `dist-runtime/` are already built.

scripts/lib/ci-node-test-plan.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ function createCompactNodeTestShardBundles(options = {}) {
11911191
const wholeGroups = sortedGroups.filter((candidate) => !candidate.includePatterns);
11921192
const wholeJobCount = Math.ceil(wholeGroups.length / COMPACT_WHOLE_NODE_TEST_JOB_GROUPS);
11931193
// A lone whole-config job serializes every fixed suite and owns PR wall time.
1194-
// Fold it into already-admitted same-runner jobs when their group caps allow it.
1194+
// Fold it into same-runner jobs when caps allow, retaining the whole-config timeout.
11951195
const canSpreadWholeGroups =
11961196
wholeJobCount === 1 &&
11971197
bins.length > 1 &&
@@ -1205,7 +1205,9 @@ function createCompactNodeTestShardBundles(options = {}) {
12051205
: createStripedBatches(wholeGroups, wholeJobCount);
12061206
if (canSpreadWholeGroups) {
12071207
for (const [index, group] of wholeGroups.entries()) {
1208-
bins[index % bins.length].groups.push(group);
1208+
const bin = bins[index % bins.length];
1209+
bin.groups.push(group);
1210+
bin.timeoutMinutes = COMPACT_WHOLE_NODE_TEST_TIMEOUT_MINUTES;
12091211
}
12101212
}
12111213
for (const [index, groupBatch] of wholeGroupBatches.entries()) {
@@ -1230,6 +1232,7 @@ function createCompactNodeTestShardBundles(options = {}) {
12301232
requiresDist: bin.groups[0].requiresDist,
12311233
runner: bin.groups[0].runner,
12321234
shardName: `compact-${runnerClass}-${index + 1}`,
1235+
...(bin.timeoutMinutes ? { timeoutMinutes: bin.timeoutMinutes } : {}),
12331236
});
12341237
}
12351238
}

test/scripts/ci-node-test-plan.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ describe("scripts/lib/ci-node-test-plan.mjs", () => {
225225
).toEqual({ OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS: "60000" });
226226
expect(
227227
compact
228-
.filter((shard) => shard.checkName.includes("-whole-"))
228+
.filter((shard) => shard.groups.some((group) => !group.includePatterns))
229229
.every((shard) => shard.timeoutMinutes === 120),
230230
).toBe(true);
231231
const largeJobs = compact.filter((shard) =>

0 commit comments

Comments
 (0)