Files
qwen-code/scripts
9f79669a9d test(core,cli): stop flat 30s budgets shadowing the raised ECS timeout ceiling (#15801)
* test(core,cli): stop flat 30s budgets shadowing the raised ECS timeout ceiling

Both vitest configs raise testTimeout/hookTimeout to 60s on the shared
ecs-qwen-* pool and fall back to 15s elsewhere. Three suites instead set a
flat per-file or per-describe `vi.setConfig({ testTimeout: 30000, ... })`,
which overrides the config unconditionally, so on the pool the raised 60s
ceiling never applies and a slow-but-healthy run is killed at 30s.

Reshape each clamp to the repo's existing `isSlowTestHost() ? slow : fast`
idiom instead of deleting it. Deleting a flat 30s clamp would drop the
off-pool budget to the config's 15s floor, a regression for fork PRs and the
macOS/Windows runners, so the fast arm stays at a non-trivial 30s everywhere:
off-pool is unchanged at 30s and the ECS pool rises from 30s to 60s.

In server-default-bridge-wiring.test.ts the file-level clamp already used the
idiom but with a 15s fast arm, and a describe-scoped 30s clamp shadowed it.
Raise the fast arm to 30s and drop the shadowing clamp plus its now-orphaned
comment, leaving the file-level setConfig as the single source of truth.

Refs #10922

Co-authored-by: Qwen-Coder <[email protected]>
Patrol-Run: qwen-issue-patrol/jmvs4muntns

* test(managed-agent): qualify the api-contract fixture's JdbcTemplate

Same latent wiring as #15809 fixes on main: after the managed template became
defaultCandidate=false (#15718), this unqualified autowire resolves to the
plain template in the full CI context, and H2 refuses String-vs-VARBINARY
comparisons on the identity columns. Pin the fixture to the managed template
as in #15809; identical hunk, keeps both trees agreeing when this branch next
merges main.

* test(core): sync the slow-test-host threshold with its cli mirror

packages/core/src/test-utils/slow-test-host.ts documents that it mirrors
packages/cli/src/test-utils/slow-test-host.ts and that both must stay in
sync, but its fallback required the full available parallelism while the
cli copy splits at half. The cli side explains why 0.5 is load-bearing:
the review-address verification gate re-runs package tests through an
`env -i` child that drops RUNNER_NAME and clamps vitest to
--maxWorkers=25%, so the gate's own workers never lift the load average
to the full core count.

The two packages/core call sites this PR adds therefore resolved the
weaker predicate, and in exactly the gate the docstring is about the
raised budget this PR exists to grant never fires. Add the two
assertions the cli copy already carries so the sync claim is pinned.

Verified discriminating rather than decorative: with the threshold left
unchanged the two new rows fail (40>=64 false, 32>=64 false) while the
three existing rows stay green; after the change all five pass.

Co-authored-by: Qwen-Coder <[email protected]>
Patrol-Run: qwen-pr-closeout/jmvsi7j9czz

* test(core,cli): pin the slow-test-host threshold and its mirrored copy

R3-1: port the cli copy's contention rationale into the core docstring, which
still called the predicate "measured saturation" while shipping a `* 0.5`
multiplier that fires at half the core count.

R3-2: add a parity guard beside the existing permission-bit probe guard. The
two slow-test-host copies are not byte-identical (only the cli copy also
exports slowHostBudgetMs), so it compares the shared isSlowTestHost body.

R3-3: add an 8-core case to both mirrored test files. Every existing case
mocks availableParallelism to 64, so the multiplier was indistinguishable
from a hardcoded 32.

Mutation witnesses, each mutant applied and run separately then restored:
- threshold hardcoded to 32 in both copies -> the new 8-core case fails in
  core (1 failed | 5 passed) and in cli (1 failed | 9 passed) while the five
  pre-existing cases stay green; the parity guard stays green because both
  copies moved together.
- `* 0.5` dropped from the core copy only -> the parity guard fails.

Co-authored-by: Qwen-Coder <[email protected]>
Patrol-Run: qwen-pr-closeout/jmvsv2hwh0e

---------

Co-authored-by: yiliang114 <[email protected]>
Co-authored-by: Qwen-Coder <[email protected]>
2026-10-29 10:43:53 +08:00
..
2025-08-27 15:23:21 +08:00