Repository navigation
fix(runners): make CI reliable and faster - #109
Merged
Merged
Conversation
# Conflicts: # packages/github/src/app-client.ts
# Conflicts: # apps/desktop/src/renderer/lib/result-code.test.ts # apps/desktop/src/renderer/lib/result-code.ts # skills/vectis/SKILL.md
# Conflicts: # apps/desktop/src/renderer/components/activity-row.tsx # apps/mcp/src/server.test.ts # apps/server/src/http.test.ts
This was referenced Oct 16, 2026
# Conflicts: # apps/docs/docs/guides/limits.md # apps/server/src/runner-capacity.ts # apps/server/src/runner-task.ts # apps/server/src/service.ts # skills/vectis/SKILL.md
# Conflicts: # apps/cli/src/main.test.ts # apps/server/src/runner-task.test.ts # apps/server/src/runner-task.ts # apps/server/src/service.ts
# Conflicts: # apps/cli/src/main.test.ts # apps/cli/src/main.ts # apps/desktop/src/renderer/lib/operations.ts # apps/mcp/src/server.test.ts # apps/server/src/http.ts # apps/server/src/runner-task.test.ts # apps/server/src/service.ts # convex/githubRunners.ts # packages/client/src/cloud-relay.test.ts # packages/protocol/src/index.ts # skills/vectis/SKILL.md
# Conflicts: # apps/cli/src/main.test.ts # apps/server/src/runner-task.test.ts # apps/server/src/runner-task.ts # apps/server/src/service.ts # packages/client/src/remote.test.ts # packages/protocol/src/index.ts # packages/runner/src/runner-release.ts # packages/runner/src/runtime.ts
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vectis CI was unstable and slow in several compounding ways. Runners were booked per job while GitHub assigns jobs by label, so runners serving other jobs burned a job's three attempts. Lost webhooks were never repaired.
action_requiredrunners never healed and held capacity, one transient GitHub error failed a runner, and offline listeners kept VMs for hours. The cloud ignored the macOS two-VM limit, and every machine lost its cloud connection every five minutes because the token refresh was never scheduled. Status responses were unbounded (1.5 million characters through MCP). Every job also downloaded the runner, and Windows jobs were several times slower than Linux, mostly because of Defender and bsdtar.This PR combines the night's work (replacing #103-#108) in logical commits.
Reliability
retry-after/x-ratelimit-reset. Side-effecting POSTs are never repeated. Installation tokens are cached in memory. A "GitHub degraded" state replaces local failures.runner_recovery_pending->runner_interrupted) with backoff;runner_offlinewhen GitHub reports the runner offline;jti, so the Convex client schedules its refresh (already deployed to production, compatible with released apps). New environments are reported beforerepository connect.Speed and capacity
environment.provisionbuilds derived environments from a ready one (optional per-repository setup script) with the runner preinstalled. Fresh images get the same. Provisioning guests shut down through the hypervisor (macOS falls back to sync plus a forced stop, recorded in the result).C:\(AMSI blocks Defender cmdlets nondeterministically and Tamper Protection ignores them; the policy applies at next boot), and quieter background services.Proof (dev deployment, real VMs, private sandbox repository, unless noted):
Three parallel macOS jobs ran two at a time with no failed attempt.
A simulated webhook outage was redelivered.
kill -9mid-run recovered the runner with no runner left on GitHub, and an idle runner was released after 5 minutes.The relay stayed connected across token expiry; it dropped every five minutes before, on main as well.
Windows (679 MB pnpm store), base vs provisioned: pnpm install 105 s -> 28 s, cache save 25 s -> 16 s (GNU tar + zstd), whole job about 3 min -> 67 s, runner download removed.
Linux, Windows and macOS derived environments each ran a real job with the preinstalled runner. A fresh Linux image prepared in 2 min 44 s.
Warm pool takeover took 0.0 s instead of a 9.6 s cold start.
The cache volume hit on the second run (setup-node from the tool cache), and a non-default branch could not write it back.
Scale sets: Linux and macOS jobs ran unchanged workflows, macOS respected the two-VM limit, and pause, restart, crash and switching back to demand all recovered.
pnpm check: 1612 tests pass.Scale set jobs ran end to end on Linux, macOS and Windows.
Not included: VZ memory snapshots. Measured with a Developer ID signed helper (restore reaches SSH in 1.8 s vs 5.5 s cold on Linux, 3.4 s vs 13 s on macOS), but per-slot identity, RNG reseeding and compatibility fallback make it a separate change.