Commit Graph
8 Commits
Author SHA1 Message Date
ework-agent b8cad881be ci: shard the test suite across the matrix to cut wall time ~3x (#3143)
The suite outgrew one runner: ~656 top-level files (~190k LOC) serialized
through --test-concurrency=4 on a single 4-core leg took ~17-20 min (windows
slowest; measured 1225s on the last full green run). Add a `shard` matrix
dimension to the test job so each leg runs a balanced slice; run-ci-tests.mjs
now partitions deterministically + totally (LPT bin-packing over file size)
so the union of all shards == allFiles and no test is skipped. Same tests,
assertions, env, OS and node versions — zero coverage loss. Wall drops ~3x
(~20 -> ~7 min).
2026-10-14 14:57:38 +08:00
ework-agent e6ba45cd85 fix(ci): single-phase c=4 + parallel static-gates — serial live phase cost more than it saved (#2816)
Baseline-log arithmetic (sum of per-test durations vs step wall) proves the
old runner default was already concurrent, so the two-phase split's serial
live phase only idled 3+ cores for 3-4 min without buying stability. Run the
whole suite at explicit concurrency=4 (keeps the LIVE_FILES tripwire), and
move typecheck/kernel/pi-subagents/build into a parallel static-gates job off
the test critical path.
2026-10-12 11:15:35 +08:00
ework-agent e0e3759f25 docs(ci): correct the stale 2-vCPU/serial premise in the schedule rationale (#2816)
Baseline logs from the pre-PR flow show interleaved output from multiple
test files in the same seconds on ubuntu-latest: current hosted runners are
4-vCPU, so availableParallelism()-1 == 3 and the old flat glob was NOT
serial. The two-phase split isolates spawning suites from pool contention;
it does not turn serial into parallel. Comment-only.
2026-10-12 11:00:52 +08:00
ework-agent c2914c34ab test(ci): two-phase schedule for the main CI test job (#2816)
The node built-in runner defaults file concurrency to availableParallelism()-1 == 1 on 2-vCPU runners, so the flat tests/*.test.ts glob ran all 600+ suites strictly serially, each paying a node+tsx spawn in turn. scripts/run-ci-tests.mjs splits the same suites into: live (process-spawning, concurrency=1 — #1248 requires quiet-machine conditions) and pool (everything else, concurrency=4 — no spawners by construction, listen(0) ports, XDG-isolated homes), with a self-check that fails the job when a new spawning suite lands unregistered. Same tests/assertions/env; local npm test untouched. Plus two targeted suite speedups: image-request-budget hoists the shared ~100MB body (5 builds -> 3) and claude-native pre-warms the Windows CA (existing #1807 pattern) in the three remaining fresh-home hook e2e tests.
2026-10-12 10:14:26 +08:00
ework-agent 23d67bef33 fix(#2611): retry npm registry fetches in e2e CI setup to ride out transient blips
A transient runner-to-registry ECONNRESET during setup-phase `npm i -g` /
`npm ci` reds an otherwise-green PR with no test code ever running (#2541 run
38032380794; rerun-failed-jobs green on the same head). Root cause: npm's
built-in fetch retry defaults to only 2 tries. Raise it to 5 via a job-level
env block on every job that touches the registry, so a ~10s jitter rides out
instead of aborting setup. Job-level placement covers the global CLI install
AND `npm ci` AND any build-time fetch in that job. Bounded: worst case ~+2 min
of backoff before a genuine sustained outage still fails fast (jobs carry their
own timeout-minutes).

Applied to the 9 e2e/setup workflows with executable registry installs (12
jobs total). Deliberately NOT applied around `npm publish` (artifact/release
lanes): a publish is non-idempotent, so a fetch-retry re-POST can trip E409 /
double-publish, which is worse than the original failure mode. Documents the
required pattern in reference/testing.md so new lanes inherit it.
2026-10-10 15:22:49 +08:00
ranxianglei 4f42990828 test(e2e): drive the #1628 failure class end-to-end — unwritable target, real-baseline hop, cache-lane doctor
Closes the three verification gaps left after the #1628 triage: the
unwritable-target wall had no real-chain e2e (only mock-logger unit
tests), the no-op protocol had no local form (a self-built fake baseline
cannot validate the LIVE old updater), and cache-lane doctor ran only
by hand.

- unwritable install dir (posix): chmod 0o555 on the real extracted
  install, assert the loud failure + one-per-process location
  diagnostic + zero disk flip + no leaked update lock
- real published baseline (BILI_E2E_REAL_BASELINE): download one real
  published tarball, prove the live old updater hops onto this dist;
  CI resolves the baseline via npm view before the run
- cache-lane doctor: opencode lane layout, doctor --json must resolve
  the update target to the running copy
2026-10-04 14:15:10 +08:00
ework-agent 0be2a7a016 docs: align typecheck script references with the src+tests gate (#1970) 2026-10-03 20:20:44 +08:00
ework-agent c9a9842e2f docs(agents): slim AGENTS.md, move procedures to reference/ 2026-10-03 00:18:03 +08:00