Skip to content

perf(ci): speed up station-host unit tests and shard live E2E suites - #10463

Merged
zanwei merged 1 commit into
mainfrom
perf/station-host-ci-headroom
Dec 6, 2026
Merged

zanwei merged 1 commit into
mainfrom
perf/station-host-ci-headroom

Conversation

@CommaBot

@CommaBot CommaBot commented Dec 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Gives the Linux station-host job in .github/workflows/pion-station-main.yml comfortable headroom under its unchanged timeout-minutes: 3 budget (zero coverage or assertion loss):

  1. Batch unbatched disk-SQLite DDL and seed loops in pion/station-host unit tests (sql_db::Db::tx):

    • Profiling all 1,306 unit tests found that 27 of the top 30 slowest tests spent 1–7 s each issuing auto-committed fsync()s for core_schema_ddl() (~50 statements) and 33–300 row seed loops on disk-backed SQLite databases.
    • Wrapped schema DDL / test seed loops in db.tx(...) across 9 test files (waiting_timers_test.pion, active_awake_autoarchive_parity_test.pion, runner_runtime_station_parity_test.pion, connects_releases_test.pion, warm_handover_test.pion, profiles_residual_test.pion, logins_parity_test.pion, mesh_dir_test.pion, passwords_test.pion) without changing any test assertion, coverage, or data size.
    • Measured local warm-CAS test suite time (pionc test --json):
      • Full pion/station-host workspace (1,306 tests, 0 failures): 86.59 s → 46.16 s (-40.43 s, -46.7%)
      • host_sessions (723 tests): 44.43 s → 12.15 s (-32.28 s, -72.7%)
      • host_mesh (193 tests): 7.60 s → 1.35 s (-6.25 s, -82.2%)
      • host_passwords (4 tests): 2.91 s → 1.05 s (-1.86 s, -63.9%)
      • Selected individual tests: runtime-sessions-page-bounded 4,915 ms → 117 ms (-97.6%), autoarchive parity 7,345 ms → 2,064 ms (-71.9%), active-jobs-upgrade 3,849 ms → 912 ms (-76.3%), mesh directory (forged) 3,494 ms → 287 ms (-91.8%), prepare_session_chat_scope 2,467 ms → 317 ms (-87.1%).
  2. Shard the 3 live E2E suites out of station-host into station-host-e2e (live) and overlap setup/CLI tests:

    • Verified station-host and station-host-e2e live in the same workflow (pion-station-main.yml) with identical on.push.paths, needs: [wait-shell], and if: conditions, so every push/PR that runs station-host also runs station-host-e2e (live).
    • Moved live-accounts-handover.test.ts, live-p5-3.test.ts, and r2-regressions.test.ts (~50 s) into a new live shard in station-host-e2e while keeping exact TAP assertions (# fail 0, # pass 25, # skipped 1).
    • Combined station-host's native acquisition (acquire-shell-station.sh, acquire-pipeline-natives.sh) and pnpm --dir station install --frozen-lockfile --prefer-offline into one parallel step (matching station-host-e2e), and overlapped peers.mjs + rig_tunnel.mjs with the host.tap CLI/lifecycle suite.
    • Updated pion/station-host/AGENTS.md to reflect four station-host-e2e shards.

Verification

  • pionc fmt --check pion/station-host — pass
  • pionc check --json pion/station-host — pass
  • pionc test --json pion/station-host — 1,306/1,306 passed, 0 failed (46.16 s)
  • python3 scripts/ci-timeouts.py — pass (timeout-minutes: 3 unchanged)
  • node --test test/g3-gate-plan.test.ts — 4/4 passed
  • sh scripts/undone.sh origin/main HEAD — pass
  • sh scripts/check.sh push origin/main..HEAD — all checks passed

Model: Gemini 4 Neon. Test frameworks: pionc test, node --test, scripts/check.sh, scripts/ci-timeouts.py.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@CommaBot
CommaBot force-pushed the perf/station-host-ci-headroom branch from 75520ac to eab6750 Compare December 6, 2026 01:07
…uites

Wrap unbatched disk-SQLite schema DDL and seed loops in sql_db::Db::tx
across 9 pion/station-host unit test files (no assertions or test sizes
changed), move the 3 live E2E suites and rig_tunnel.mjs/peers.mjs from
station-host into parallel station-host-e2e shards (live and peers) with
identical trigger conditions and pass/skip/fail checks, overlap native
acquisition with pnpm install, and overlap host.tap CLI tests with Phase 3
ELF smoke tests in station-host.

Co-authored-by: zuozijian <26162189+zuozijian@users.noreply.github.com>
@CommaBot
CommaBot force-pushed the perf/station-host-ci-headroom branch from eab6750 to c616754 Compare December 6, 2026 01:16
@zanwei
zanwei merged commit 86a0bdf into main Dec 6, 2026
81 checks passed
@zanwei
zanwei deleted the perf/station-host-ci-headroom branch December 6, 2026 01:27
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.

3 participants