Skip to content

ci: parallelise checks and speed up the slowest tests - #80

Merged
nixuuu merged 2 commits into
devfrom
ci/faster-checks
Nov 4, 2026
Merged

nixuuu merged 2 commits into
devfrom
ci/faster-checks

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 4, 2026

Copy link
Copy Markdown
Member

PR CI took ~6–7 min of runner time (tests alone 315–335 s), plus queueing. This splits it up and speeds up the test fixtures without weakening assertions.

Tests

  • check:tmp owns one PostgreSQL server per test process with a migrated read-only template; every fixture gets its own database (gateways clone the template; migration tests still run the real chain from an empty database). Previously every fixture started a container and replayed all migrations.
  • Three bot suites use a 10 ms queue timer in their fixtures (production default 250 ms unchanged). No assertion removed, no timeout raised, no retries added. New test checks isolation between cloned databases.

PR CI (ci.yml)

  • Parallel jobs: static (gen:check, typecheck, lint, format:check), 4 test shards balanced by recorded durations (each with its temp-dir check), builds (web + linux binaries).
  • Aggregate job keeps the name Typecheck, tests, builds (release.yml contract) and verifies that the shards covered every test file exactly once.
  • Docs-only changes skip tests and builds; the aggregate still reports.

Release (release.yml)

  • Pushes to dev share one concurrency group: the active run always finishes, and a newer push replaces an older pending run, so a burst of merges (e.g. a stack) yields one nightly instead of N full runs. Trade-off: a new nightly may wait for the active run's macOS build. Beta/stable/tags/dispatches keep independent runs.
  • Electron/electron-builder download caches restore before dependency installation.

Local: shards 48/56/64/57 s, 938 pass / 153 skip / 0 fail, all 174 files exactly once; install, gen:check, typecheck, lint, format:check, web build, actionlint/shellcheck. Hosted runners and macOS packaging are verified by this PR's own run and the next nightly.

@nixuuu
nixuuu merged commit 2dd95fb into dev Nov 4, 2026
1 check passed
@nixuuu
nixuuu deleted the ci/faster-checks branch November 4, 2026 18:11
nixuuu added a commit that referenced this pull request Nov 4, 2026
Two integration tests failed intermittently on the new parallel CI
shards (#80).

- **agent-skills** ("folder/ZIP boundaries reject … without writes"): a
second worker's delayed registration bumped the environment revision (3
→ 4) after the test took its baseline. Reproduced deterministically with
controlled ordering. Setup now awaits every worker's registration and
current report before the baseline.
- **interaction-reconnect** ("an answer lost at the send boundary …"):
the test's snapshot read could straddle the interaction transaction and
see the pending request before its timeline item. Reproduced under load.
The existing wait now requires the matching timeline item.

No production changes, no sleeps, retries or weakened assertions. Each
file passed 30 runs in a row (270 + 120 tests); full suite 943 pass /
152 skip / 0 fail.

Fixes: #63
Fixes: #67
nixuuu added a commit that referenced this pull request Nov 4, 2026
Two integration tests failed intermittently on the parallel CI shards;
each failure cancelled a nightly (the release's `checks` job failed →
`stop-builds`).

- **grpc-js interop over TLS** (`interop.test.ts:165`, missing
`"clientEnd"`): the test read the peer's stdout after the gRPC stream
had closed, so the last line could still be in flight. It now awaits the
peer's stdout event.
- **bot platform tools** (`bot-platform-tools.test.ts:196`, received
`[]`): the idle wait could finish before the initial turn had started.
It now follows the returned turn id until it completes.

Both reproduced under load; test-only changes, no sleeps, retries or
weaker assertions. Each file passed 30 loaded runs in a row (120 + 210
tests); full suite 1,070 pass / 153 skip / 0 fail.

Related: #80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant