Skip to content

Commit 69e133e

Browse files
test(scenarios): give the built-consumer child-process cases a 120s timeout (#30996)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D6fapbH2zHLk3JPBFybbtnd)_ domain:devx#1 · os-elon-musk · session_016WV4cwgUKpQgCE3UWsA74d Refs #30915 Clause-②: no Metadata-protocol: none ## 维护者速读 - **改了什么**:`built-consumer.test.ts` 里两个起子进程的用例(ESM/CJS)给了显式超时 120 秒,和同文件 `beforeAll` 一致。 - **为什么改**:合并队列满载时该文件跑了 9.4 秒,CJS 用例撞上 vitest 默认 5 秒超时变红,已把 #30954 踢出队列一次;队列里每个 PR 都会撞上。 - **风险与回滚**:只改一个测试文件的超时参数,断言一处没动,不是重试;回滚即 revert。 - **先看**:`packages/qa/scenarios/test/build/built-consumer.test.ts` 的 `it.each` 结尾。 - **两分钟验证**:`pnpm --filter @objectstack/scenarios build && pnpm --filter @objectstack/scenarios exec vitest run test/build`,预期 5/5。 - **需要你做的**:无,席位落地。 ## What changes `packages/qa/scenarios/test/build/built-consumer.test.ts` (added by #30938): the `it.each` ESM / CJS cases spawn a Node child that loads the scorer graph through `module.registerHooks` resolve hooks. They ran on vitest's 5s default while only `beforeAll` had `120_000`. Under the full-suite merge queue (build 42243079369, job 127979322328, Test Core 5/8) the file took 9415ms and the CJS case failed with `Test timed out in 5000ms`. The cases now pass `120_000`, the budget `beforeAll` already uses. No assertion changed and nothing retries. ## Verification At `9ab662dda1` (on `origin/main` `000a4c0d36`): `pnpm --filter @objectstack/scenarios build` exit 0 (`check-dts-emitted` 10/10), `vitest run test/build` 5 passed (5), `typecheck` exit 0. `dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 47 commands for this one file; they were still running when this PR opened. Results go to the seat, and CI runs the full set. Test-only change in a private package: `skip-changeset`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016WV4cwgUKpQgCE3UWsA74d --- _Generated by [Claude Code](https://claude.ai/code/session_016WV4cwgUKpQgCE3UWsA74d)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent cd3a167 commit 69e133e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎packages/qa/scenarios/test/build/built-consumer.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,8 @@ describe('a tsup-built consumer of @objectstack/scenarios/score', () => {
127127
expect(resolved.filter((u) => /objectql|plugin-sharing/.test(u))).toEqual([]);
128128
// Control: the recorder sees the scorer's own runtime imports.
129129
expect(resolved.some((u) => u.includes('/packages/core/'))).toBe(true);
130-
});
130+
// Each case spawns a Node child that loads the scorer graph through the
131+
// resolve hooks: well past vitest's 5s default on a loaded merge-queue
132+
// runner (9.4s measured), so it gets beforeAll's budget, not a retry.
133+
}, 120_000);
131134
});

0 commit comments

Comments
 (0)