ci: run each OS's packed runtime proofs in one job and lift the Windows cohort cap

Merged
UN
1d ago
+253-145

Every pm-cli pull-request push started 33 hosted-runner jobs: 25 in CI plus 8 in CodeQL, Docs, Security and CodSpeed. The account allows 20 concurrent jobs, 5 on macOS, and every ecosystem repository shares that pool. pm-cli alone always queued, and #1629 waited 94 minutes before its first job started. Even on an idle account a run took 28 minutes, because max-parallel: 2 queued the 10-minute native Windows cohort behind a script shard. Tracked in pm-m6ig79.

Changes

BeforeAfter
Packed first run (<os>, Node <v>) × 6, Runtime smoke (…) × 3, Telemetry regression (Node 22)Packed runtime (<os>) × 3
Gates (typecheck), Gates (static), Gates (compat), Gates (smokes)Gates (static), Gates (smokes)
Windows cohorts, max-parallel: 2Windows cohorts, all concurrent
  • Packed runtime (ubuntu/macos/windows): each job runs the packed first run on Node 22.18.0, then on Node 24, each in a fresh prefix, cache and home. Both first runs happen before any dependency install. A dist version smoke follows. Ubuntu adds the Node 22 telemetry and linked-snapshot regressions. macOS keeps its native shell, merge-settlement and portability checks. Windows keeps the full npm npx + Bun bunx acceptance.
  • Gates: typecheck moves into static and both compatibility gates move into smokes. The static step no longer calls pnpm contracts:check and pnpm sdk:surface:check directly, because pnpm lint (quality:static) already builds and runs the same snapshot checks.
  • Every proof that ran before still runs. Jobs per push drop from 25 to 15 in CI, and from 33 to 23 across all PR workflows. macOS jobs drop from 3 to 1, Windows from 5 to 4.

Supporting changes

  • The gate registry drops ci.yml#first-run and ci.yml#node22-telemetry; both gates already list ci.yml#build-test.
  • The defect-recurrence policy names CI / Packed runtime (macos-latest).
  • The contract tests (ci-workflow-contract, packed-first-run, node22-telemetry-workflow) now pin the new layout, including a fresh install root per Node version, installs after both first runs, and no Windows cap.
  • docs/TESTING.md documents the job layout and the shared runner budget.

Branch protection: before merging, the required checks change from the ten removed names to Packed runtime (ubuntu-latest), Packed runtime (macos-latest) and Packed runtime (windows-latest). Gates (typecheck) and Gates (compat) are also dropped.

Validation

  • actionlint passes on ci.yml. All 70 workflow-contract tests pass across 7 files, and gate-registry.mjs, the docs-skills gate, workflow-permissions, lint:duplicates, eslint, pnpm typecheck, security:scan, changelog:pm:check and the tracker assurance gates pass.
  • Negative control: run against main's ci.yml, the updated contract tests fail 4 cases.

Related

The larger account-wide cause is filed as pm-gzr4j6. Ecosystem Daily Release jobs hold a runner for up to 360 minutes while waiting on their own release PR's CI, and ecosystem CI never cancels superseded runs. The fix belongs in the ecosystem release and CI templates.

Summary by Sourcery

Streamline pull-request CI by consolidating platform runtime proofs and gates while running Windows cohorts without a concurrency cap.

Enhancements:

  • Consolidate each operating system’s packed-runtime validation into a single CI job while preserving the existing platform and runtime proofs.
  • Reduce CI gate jobs by combining typecheck with static checks and compatibility checks with smoke checks.
  • Run Windows regression cohorts concurrently to remove the workflow’s parallelism bottleneck.

CI:

  • Reduce pull-request CI workload from 25 to 15 jobs by consolidating runtime and gate workflows.

Documentation:

  • Document the revised CI job layout and shared hosted-runner budget.

Tests:

  • Update workflow contract tests to enforce the consolidated jobs, isolated Node-version installations, and uncapped Windows cohorts.

Chores:

  • Update gate registry and defect-recurrence configuration for the revised required checks.

Summary by cubic

Cuts pull-request CI from 25 jobs to 15 (33 to 23 across all PR workflows) so a pm-cli push no longer asks the account-wide hosted-runner pool for half its concurrent slots.

  • Packed runtime (<os>) runs each OS's packed first run on Node 22.18.0 and 24 in isolated prefixes, the dist version smoke, and its platform-specific proofs; the first-run and node22-telemetry jobs are gone.
  • Gates collapse to static and smokes: typecheck joins static, both compatibility gates join smokes, and static drops the duplicated contracts:check/sdk:surface:check runs since pnpm lint already performs them.
  • Windows regression cohorts run concurrently instead of behind max-parallel: 2, removing the native cohort from the critical path.
  • Contract tests now also pin that each Node-version first run exports its own prefix, cache, and home roots, and that the Node 22 snapshot proof follows the Node 22 setup directly.

Migration

  • Branch protection required checks change to Packed runtime (ubuntu-latest), Packed runtime (macos-latest), and Packed runtime (windows-latest), dropping Gates (typecheck) and Gates (compat).