test(cli): stabilize flaky unit test CI

- Lower default runner concurrency from `os.cpus().length` to `min(4, cpus)`.
  The bottleneck in CI is shared resources (OAuth callback ports, global
  filesystem like `~/.local/share/kilo`), not CPU, so eight parallel Bun
  processes were triggering port/FS races instead of going faster.
- Raise per-test timeout from 30s to 60s. Slow `spawn` on Windows was
  tripping the 30s limit on tests that were just slow, not broken
  (e.g. `session/prompt.test.ts` at ~86s, `provider/provider.test.ts` at ~54s).
- Retry failing files once and surface them as FLAKY in the summary plus a
  dedicated section. Bugs still fail on every attempt; contention recovers.
- Drop CI runners from 8vcpu to 4vcpu to match upstream OpenCode — with
  concurrency capped at 4, the extra cores bought us nothing.
This commit is contained in:
Catriel Müller
2026-05-05 12:53:03 -03:00
parent 54b2c4dbd3
commit 3d063eb47f
2 changed files with 44 additions and 10 deletions
+2 -2
View File
@@ -28,9 +28,9 @@ jobs:
matrix:
settings:
- name: linux
host: blacksmith-8vcpu-ubuntu-2404
host: blacksmith-4vcpu-ubuntu-2404
- name: windows
host: blacksmith-8vcpu-windows-2025
host: blacksmith-4vcpu-windows-2025
runs-on: ${{ matrix.settings.host }}
defaults:
run: