Skip to content

ci: build hosted test shards one memory-heavy crate at a time - #12704

Merged
EffortlessSteven merged 2 commits into
mainfrom
claude/project-thread-1ynt33
Nov 2, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
claude/project-thread-1ynt33

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Governing issue or accepted claim: #12703
Acceptance delta (one sentence): Hosted test shards no longer compile the ripr lib test and xtask bin test at the same time, removing the memory spike that ended shards with a runner shutdown signal (exit 143).

Cause

Of 23 failed hosted shard jobs since 11-01, 14 ended with "The runner has received a shutdown signal" (exit 143), always 10-13 min into the job, inside the test-profile compile of cargo nextest run --workspace. Examples: runs 41490865359 (shard 2), 41473728937 (shard 2), 41494005737, 41495107332, 41499224675. Successful shards spend 6.5 min in that compile (xtask test alone); the lost ones die in it.

Reproduction on a 4 CPU / 16 GB box with cargo test --workspace --no-run and CARGO_INCREMENTAL=0: peak 15.1 GB used, rustc sum 13.4 GB, kernel OOM-killed xtask (bin test) and ripr (lib test), with single rustc at 11.4 GB and 9.5 GB. Compiling -p xtask alone peaks at 7.3 GB. CARGO_PROFILE_DEV_DEBUG=0 did not help (peak 15.4 GB), so it is not in this PR.

Change

New step builds --workspace --exclude xtask, then --workspace, so the two heavy compiles are serialised (jobs capped at 3), with a memory trace in the log. The nextest command, shard verifier and Result are untouched; a build failure fails the shard.

Not proven

My local disk quota stopped a clean before/after of the split itself, so this run is the measurement: check the "peak memory sample" line in the new step. The split assumes --exclude xtask yields identical unit fingerprints for the second build (no recompilation); the step log will show it. Residual infra loss still costs a fresh run, see #12703.

cargo xtask check-workflows passes locally. precommit could not run (shallow clone, no merge base, then timed out); hosted gates will.


Generated by Claude Code

The ripr lib test and xtask bin test compiles (about 9-11 GB each) overlapped
inside cargo nextest's workspace build on 16 GB hosted runners, ending shards
with a runner shutdown signal (exit 143) or lost communication. Build the
workspace without xtask first, then add xtask, and log a memory trace. Nextest
command, verifier and Result are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmr2V8kCE8LReycVLHP
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven EffortlessSteven self-assigned this Nov 2, 2026
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 147 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 3b7ba546-2bff-4e7f-98fd-6c7e2d43889e
Commits

Reviewing files that changed from the base of the PR and between 32f8d12 and 3dfabd1.

Files selected for processing: 2
  • .github/workflows/rust-test-shards.yml
  • changelog.d/12704-hosted-test-shard-memory-split.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review November 2, 2026 20:28
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

EffortlessSteven commented Nov 2, 2026 •

Copy link
Copy Markdown
Member Author

Review of record, head 3dfabd1

Angles: (1) correctness and fail-closed, (2) build semantics, (3) spec/contract conformance. Done by an independent reviewer agent against the exact head, plus the hosted run 41523357447 (Result green, all four shards and verify green).

Findings, none blocking:

  • Fail-closed holds. The step runs under bash -e, so a failing build fails the shard. The EXIT trap does not change the exit status. Nextest selection and partition counts (6760/6688/6606/6538) are unchanged.
  • Build semantics. The second cargo test --no-run --workspace recompiles only xtask (1m37s to 2m03s); ripr compiles once, and the nextest step's build finishes in 0.18 to 0.29 s, so fingerprints match.
  • No xtask check, policy file or doc pins the step list; the run-block line budget is respected.
  • Non-blocking, resolution: the "peak memory sample" line prints empty (sort -t= rejected on the runner), so the trace is not yet readable. It does not affect the result. Fixed in follow-up ci: print the shard build step's peak memory sample #12709 rather than re-spending a 45 minute run here.
  • Non-blocking, noted: CARGO_BUILD_JOBS=3 applies to the new step only.

Resolution: merged on the green exact-head Result.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants