Skip to content

ci: share native caches and shard Unix lifecycle tests - #12884

Merged
cv merged 3 commits into
v1from
ci/native-performance
Oct 9, 2026
Merged

cv merged 3 commits into
v1from
ci/native-performance

Conversation

@cv

@cv cv commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Failure

Recent successful Native PR runs had a median of 19m33s. Warm Linux jobs spent roughly 11–12 minutes in lifecycle tests. Rust caches included job-specific keys, duplicating native dependencies in Docker and Kind jobs; repository cache usage was 9.64 GB against a 10 GB limit. Superseded pushes could also hold newer Native runs in the queue.

Decision

  • Share compatible Rust dependency caches by platform. Native builds write the shared cache on v1; Docker and Kind only restore it. Documentation and Brev keep separate prefixes.
  • Cancel superseded Native and Images pushes as well as PR runs. Keep manual runs separate and leave live-resource workflows unchanged.
  • Build each Unix platform once, then run two nextest lifecycle partitions on separate runners. Each platform starts its workers after its own build, without waiting for Windows. Windows keeps its smaller suite inline.
  • Keep the four existing Test / PLATFORM required checks; each fails if any job for that platform fails. Plain cargo ci still runs the complete local suite.
  • Derive archived binaries from nextest's resolved lifecycle selection rather than maintaining a second test list. Transfer the bundle, pinned tools, CI runner, and provider helpers in a permission-preserving tar; workers do not compile. Use runtime fixture paths so archived executables can move between checkouts.
  • Retain input artifacts for one day. Failed-shard reruns use the producer's artifact name, including when it came from an earlier attempt.

The new shared cache key will cause a one-time cold build. Old job-specific entries can expire normally; this PR does not delete caches or change repository limits.

Validation

  • Observed the new tests fail before implementing partition forwarding, archive execution, default-run safeguards, extraction setup, archive selection, and input packaging. Six focused CLI regressions pass, including failure propagation and empty-selection rejection.
  • cargo ci passed on Linux ARM64: formatting, Clippy, compilation, 1,297 ordinary tests, doctests, schema checks, bundle verification, and all 112 lifecycle tests.
  • Executed both archived partitions from fresh matching source directories using only transferred binaries: 64 and 48 tests passed. Their JUnit union exactly matches the unsharded report, with no omissions, extras, or duplicates.
  • Reproduced a missing-helper failure before the runtime-path fix. Provider and SSH fixture smoke tests now pass with the original build-directory helper binaries temporarily unavailable.
  • Warm cargo ci archive completed in two seconds locally. Selecting lifecycle binaries reduced the nextest archive from 1.2 GB to 140 MB; the input tar is compressed by the artifact uploader.
  • Actionlint 1.7.12 and git diff --check passed. Fern checks passed with zero errors and one warning per site.

Hosted platform compatibility, cache reuse, artifact-transfer overhead, and end-to-end timing still need confirmation from CI. Local timings are not a claim of hosted-CI speedup.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

The archive regression compared a temporary path with the child process working directory. On macOS, /var and /private/var can identify the same directory. Compare canonical paths while retaining the archive and no-build assertions.

Reproduced the failure with a symlinked TMPDIR on Linux before the fix. The integration suite now passes with that TMPDIR, and full cargo ci passes, including all 112 lifecycle tests.
@cv

cv commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

Fixed the macOS failure in fa9c3eb. The new test compared the temporary directory’s literal /var/... path with the child process’s resolved /private/var/... path. Both identify the same checkout; production behavior was correct. The assertion now compares canonical paths.

Reproduced the failure on Linux using a symlinked TMPDIR before the fix. Afterwards, that integration suite passed (42 passed, one opt-in live test ignored), the six CI regressions passed with an ordinary temporary directory, and full cargo ci passed all 1,297 ordinary tests and 112 lifecycle tests. Only the test changed. Fresh hosted CI will confirm the macOS result.

Replace labels and prose that implied a contrast the workflow does not have: no nondeterministic tests, no non-native bundle, and no ordinary/unordinary test split. Name the `nemoclaw-build` executable instead of "CI runner", which could mean the GitHub runner.
@cv
cv merged commit dcf7b11 into v1 Oct 9, 2026
27 of 28 checks passed
@cv
cv deleted the ci/native-performance branch October 9, 2026 08:41
cv added a commit that referenced this pull request Oct 9, 2026
#12884 moved the native test steps into native-platform.yml and runs the
Unix lifecycle in two partitions. The timing report now names the
partition it covers, and the deterministic step's JUnit report is
uploaded from the new workflow.
cv added a commit that referenced this pull request Oct 9, 2026
cv added a commit that referenced this pull request Oct 9, 2026
## Failure

#12884 made `CI / Native` cancel superseded `v1` pushes. Only `v1`
pushes save the shared Rust dependency caches, and the post-step that
saves them runs at the end of each platform's build job.

After #12884 merged, both completed `v1` pushes were cancelled by the
next merge after 16.9 and 8.8 minutes. Linux saved its caches, but cold
macOS and Windows builds take 17–21 minutes, so neither saved a shared
cache. Every PR since has built those platforms cold: Windows alone took
20.9 minutes in #12888's run, longer than the previous 19.5-minute PR
median. Warm Linux now finishes `Build and test` in 6.6–7.0 minutes.

Cancelling pushes also helped less than #12884 claimed. PR runs use a
separate concurrency group, so they never waited behind push runs.

## Decision

Cancel only superseded PR runs in `CI / Native`. Push runs finish, so
each platform saves its cache; a newer push still replaces an older
pending run, so `v1` does not build every intermediate merge. `CI /
Images` keeps cancelling superseded pushes because it does not write the
Rust caches.

## Validation

- `cargo ci` passed on Linux ARM64: formatting, Clippy, 1,297 tests,
doctests, schema check, bundle verification, and 112 lifecycle tests.
- Actionlint 1.7.12 and `git diff --check` passed.
- After merge, the next completed `v1` push should create
`native-deps-v2-darwin_arm64-*` and `native-deps-v2-windows_amd64-*`
cache entries. Their absence would mean this did not fix the cold
builds.
@cv cv added the v1 NemoClaw v1 branch label Oct 12, 2026
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance labels Oct 28, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants