Skip to content

fix(ci): share CPU budget across parallel test workers - #1018

Merged
jxsl13 merged 2 commits into
mainfrom
codex/ci-command-output-prefix
Sep 13, 2026
Merged

jxsl13 merged 2 commits into
mainfrom
codex/ci-command-output-prefix

Conversation

@jxsl13

@jxsl13 jxsl13 commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Share the outer Go runtime CPU budget across parallel test workers instead of giving every worker the full runner budget.
  • Apply the same snapshotted GOMAXPROCS share to discovery, execution and inherited nested Go commands. Default inner test parallelism uses that share; an explicit positive -parallel still overrides test concurrency independently.
  • Preserve every existing test, test selection, worker count, race flag, shard deadline, command cancellation behavior and CI workflow command.

Why

Main CI run 34768201012 passed 13 jobs but failed the Windows stable output-limit control with an empty prefix. Its existing 200 ms deadline includes file creation and race-instrumented child startup. The command runner already waits for stream-copy completion and writes the bounded prefix before output-limit cancellation; bytes never emitted by a cancelled child must not be fabricated.

The prior defaults multiplied runnable analyzer/compiler work across workers. This change corrects that scheduling pressure without extending deadlines, changing the original assertion or retrying assertion failures. It does not guarantee operating-system startup within 200 ms or claim a measured CI speedup; the Windows matrix must validate the result.

Validation coverage

  • Per-worker budgets, explicit overrides and explicit-zero rejection.
  • Windows case-insensitive environment replacement and preservation of distinct Unix keys.
  • Real discovery/execution and nested-child inheritance.
  • Bounded-prefix persistence before cancellation and correct empty artifacts when cancellation precedes child startup.
  • Scoped Go 1.26 race and Go 1.27 ordinary tests passed, followed by both unchanged local hooks: formatting, vet, build, all 2,058 ordinary tests, all 45 race-test groups, matching-toolchain staticcheck, generated documentation, plugin build, benchmark smoke tests and self-scan.
  • Independent local review covered the scheduling/environment changes and the final unused-wrapper cleanup. Cross-platform GitHub CI, including the originally failing Windows stable shard, remains the merge gate.

@jxsl13
jxsl13 merged commit b38ccb0 into main Sep 13, 2026
14 checks passed
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