Skip to content

ci: reduce test shards and redundant jobs - #750

Open
mldangelo-oai wants to merge 1 commit into
mainfrom
mdangelo/codex/ci-fewer-jobs
Open

ci: reduce test shards and redundant jobs#750
mldangelo-oai wants to merge 1 commit into
mainfrom
mdangelo/codex/ci-fewer-jobs

Conversation

@mldangelo-oai

Copy link
Copy Markdown
Collaborator

Summary

node-ci expands to 29 jobs, with repeated setup across 13 SDK test shards. This change reduces it to 25 jobs while retaining every shared test file on Linux, macOS, and Windows, the supported Node runtime checks, and all three required status names.

Changes

  • Reduce Linux/macOS/Windows shards from 3/3/7 to 2/2/6. Keep the existing scheduler, test inventory, timeouts, and report uploads.
  • Run typechecking and formatting once in Linux shard 1, before its tests, using dependencies already installed there. This removes those checks from the shared package dependency without adding another job.
  • Remove the duplicate windows-latest / node-24 result aggregator. The actual Windows Node 24 installed-package check remains, as do all three required result aggregators and the dedicated Windows machine-policy test.
  • Update the testing guide and existing workflow contract tests for the new layout.

CI tradeoff analysis

The baseline is the mean of four successful, first-attempt main runs with the same workflow layout: 33292937659, 33292854751, 33266575958, and 33257840080. Their observed waiting times range from 5m26s to 5m57s. The intervening failed run is excluded; this is not a retry-cost or flake-rate analysis.

Runner minutes sum each job's start-to-completion time. Waiting runs from workflow creation to the final job's completion, including dependency and queue waits. These are resource minutes, not rounded billing minutes.

The following table changes only sharding. The baseline is measured; every alternative is an estimate using 52 JUnit reports and the checked-in file scheduler and duration weights.

Linux/macOS/Windows shards Jobs Runner minutes Waiting
3/3/7 — observed baseline 29 55.4 5m42s
2/2/7 — estimate 27 53.9 5m53s
2/2/6 — estimate 26 52.8 5m59s
2/2/5 — estimate 25 51.8 6m28s
2/2/4 — estimate 24 50.7 6m53s
1/1/1 — illustrative estimate 19 46.0 18m31s

Each removed shard saves approximately 42 seconds of repeated overhead on Linux, 49 seconds on macOS, or 63 seconds on Windows. Test work remains: fewer shards primarily trade repeated setup for a longer slowest shard. The 1/1/1 case would exceed the existing Windows test timeout and would require moving the separate policy check; it is not proposed here.

The replay assigns each run's observed per-file test durations to the scheduler's new groups, holds average overhead constant within each OS, and applies the change to that run's observed completion path. Other jobs and observed queue/gate delays remain. It assumes serial Bun execution within each shard. Grouping effects, cache variation, future source changes, and reduced queue contention are not modeled. Test case counts vary slightly across the four commits; each run uses its own durations and the same 111-file inventory.

This PR combines 2/2/6 sharding with moving static checks and removing one aggregator, yielding 25 jobs. Static checks occupied 17–25 seconds of the shared package job in the samples. The combined model estimates 52.8 runner minutes and 5m36s waiting, or roughly 5% less runner time with broadly unchanged waiting. The projected waiting-time difference is smaller than observed run-to-run variation; this is not a measured speedup or a controlled benchmark.

Duplicate amd64 container validation, standalone title validation, and any migration to one required status are outside this PR. Supported runtime coverage and branch rules are unchanged.

Testing

  • Fresh SDK and MCP dependency installs passed with frozen lockfiles and pinned pnpm 11.9.0.
  • SDK/MCP typechecking and the full SDK formatting check passed. Prettier also passed on all four changed files, including the workflow YAML.
  • The actual scheduler includes all 111 shared test files exactly once per OS. The configuration expands to 25 jobs, preserves the installed-package matrices and required status names, and retains the Windows policy test on shard 3.
  • git diff --check passed.
  • The full local Bun 1.3.14 suite with seed 12345 is running at publication. Hosted Linux, macOS, and Windows validation and the first observed timing will be reported in a follow-up comment.

Risk and rollout

Fewer shards increase work repeated when a shard must be rerun. Static-only failures are reported later than with a separate early static-check job, although the package build still compiles production TypeScript. The first Linux shard must pass static checks for the existing required result checks to succeed.

No production code, dependency versions, test selection, required check names, branch rules, or release authorization boundaries change. Compare the first hosted run with the historical baseline before treating the estimates as observed savings. The shard counts and static-check placement can be reverted without a product migration.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-30T06:03:02.854553Z f3922f6 Manual request
🔒 Security Review Completed 2026-08-30T06:03:07.813418Z f3922f6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current head, f3922f6.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: f3922f617e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

Validated head f3922f617e1e4ac9277c7473b800f4e76d3f5297. All five Actions workflows passed on their first attempt. Codex code review reported no major issues, the security review check passed, and there are no unresolved review threads.

The first hosted Node CI run completed all 25 jobs:

Run Node CI jobs Active runner minutes Waiting
Latest main, 1f8f84ff 29 54.7 5m10s
This PR, f3922f61 25 52.0 5m31s
Original four-run baseline in the description 29 55.4 5m42s

Against the latest main run, the observed tradeoff was 2.7 fewer runner minutes (about 4.9%) and 21 seconds more waiting. This single comparison is not a controlled benchmark; it is consistent with modest resource savings and does not establish a latency improvement.

The uploaded JUnit inventories and outcomes match the latest main run exactly: 2,137 cases on Linux, 2,137 on macOS, and 2,134 on Windows, with 111 shared test files per OS and no duplicate cases across shards. Typechecking and formatting ran successfully exactly once on Linux shard 1. The separate Windows policy check passed on shard 3, and the real Windows Node 24 package check passed.

The full local Bun 1.3.14 run with seed 67890 passed: 2,095 passed, 43 skipped, 0 failed. Seed 12345 finished with 2,094 passed, 43 skipped, and one process cleanup assertion failure. The three related process tests passed in isolated reruns on both unchanged main and this head. The affected implementation and test are unchanged in this PR.

This is an alternative to #745: it reuses a Linux test job for static checks, with later static-only failure feedback and fewer jobs. That PR and the branch protection rules were left unchanged. Human approval is still required; this PR has not been merged.

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