Skip to content

ci: keep the dependency cache, deflake readiness tests, and drop file-content tests - #12602

Merged
cv merged 3 commits into
v1from
ci/stable-dependency-cache
Oct 5, 2026
Merged

cv merged 3 commits into
v1from
ci/stable-dependency-cache

Conversation

@cv

@cv cv commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Two fixes found while looking into why #12598's CI took 20–28 minutes instead of 13–19.

1. ci: restore the dependency cache after workspace manifest changes

  • Cause: every CI / Native job on build: trim agent images and move host tooling to Rust #12598 restored no Rust dependency cache and recompiled about 860 crates.
    • .github/actions/setup-rust added hashFiles('Cargo.toml') to the cache key, in the part Swatinem/rust-cache also uses to restore older caches.
    • Any root manifest change (build: trim agent images and move host tooling to Rust #12598 added a workspace member) therefore left nothing to restore. PR runs don't save caches, so every push started cold.
  • Why the hash was there: rust-cache didn't see the dev profiles in the root manifest (f639c20ed2).
  • Fix:
    • the profiles move to .cargo/config.toml, which rust-cache hashes itself;
    • the extra key is now just the platform.
  • Effect:
    • manifest and lockfile changes restore the platform's previous cache and rebuild only what changed;
    • changing a profile still selects a fresh cache.
  • No test covers this: the only possible test would check the action's text, and commit 3 removes tests like that.

2. test(e2e): give standalone readiness checks room on slow runners

  • Failure: macOS failed standalone_proxy_readiness_rechecks_identity_and_credentials_without_sdk_or_gateway on the v1 push of 7da9a23d6c, with "service readiness check timed out" on an apply that should succeed.
  • Cause: both standalone readiness tests waited at most 1 s, and each check makes several round trips through the SSH fixture. Delaying each fixture call by 0.4 s reproduced the failure locally.
  • Fix:
    • the proxy test waits up to 30 s; its expected failures return immediately, so this costs nothing when the fixture is fast;
    • the managed test waits 3 s, because its loading phase fails only when the wait expires.

3. test: remove tests that check file contents instead of behavior

  • These tests checked what a file says, not what the code does, so they broke on any edit and passed whether or not the behaviour worked.
  • Removed:
    • CI files: the cache key and profile location (added in commit 1), the workflow step list, the setup action's text, and the URL format of the nextest, protoc and Docker provider pins;
    • the proxy Dockerfile's text;
    • version agreement between versions.json, Cargo.toml dependency revisions and docs links (the build reads image defaults from versions.json, so that test compared a file with itself);
    • lists of resource kinds and TLS modes that must not exist;
    • hashes of the hosted v0 fixtures, plus the two v0.yaml manifests that existed only to be hashed. The parity tests still compare the v0 exports with the v1 documents.
  • Kept: the OpenShell telemetry test (renamed telemetry.rs), and tests that read data files as inputs to the code under test.
  • 16 files, +35/−422.

Validation (Linux ARM64)

  • cargo ci: passes every step on the final commit: 1028 tests, then 90 lifecycle tests.
  • Profiles after the move: a clean build still compiles workspace crates with debuginfo=1 and sha2 with opt-level=3. The existing target directory needed no rebuild.
  • Readiness tests: with a 0.4 s fixture delay both pass (the managed one also at 0.6 s). Without a delay they passed three runs in a row: proxy about 9 s as before, managed about 8 s instead of 6 s.

What to expect in this PR's CI

  • First run: this PR's own run still restores no cache, because the key format changed and no cache exists for it yet. Expect cold timings.
  • After merge: the next v1 run saves caches under the new key, and later PRs restore them even when they change Cargo.toml.
  • Cache storage: the repository holds about 10.7 GB of caches, above GitHub's default 10 GB limit, so GitHub evicts old ones; old-key caches will age out.

cv added 2 commits October 3, 2026 14:59
Every CI / Native job on #12598 restored no Rust dependency cache and
recompiled about 860 crates, taking 20-28 minutes instead of 13-19. The
setup action added a hash of the root Cargo.toml to the part of the key
that rust-cache also uses to restore older caches, so any root manifest
change, here a new workspace member, left nothing to restore. PR runs
don't save caches, so every push started cold until v1 saved a new one.

That hash existed because rust-cache didn't see the dev profiles in the
root manifest. The profiles now live in .cargo/config.toml, which the
action hashes itself, and the extra key is just the platform. Manifest
and lockfile changes now restore the platform's previous cache and
rebuild only what changed; a profile change still selects a fresh key.
A new test failed first on the hashFiles key and the root profiles.

Validation: the CI workflow tests pass. A clean build still compiles
workspace crates with debuginfo=1 and sha2 with opt-level=3, and the
existing target directory needed no rebuild. The docs check passes. The
warm-cache effect shows only in CI.
macOS CI on the v1 push of 7da9a23 failed
standalone_proxy_readiness_rechecks_identity_and_credentials_without_sdk_or_gateway:
an apply that should succeed reported 'service readiness check timed
out'. Both standalone readiness tests waited at most 1 second, and each
check makes several round trips through the SSH fixture, which starts a
new process each time. Delaying each fixture call by 0.4 s reproduced the
failure locally.

The proxy test now waits up to 30 seconds. Its expected failures (stopped
container, changed identity, missing key, changed model) return
immediately, so the longer wait costs nothing when the fixture is fast.
The managed test waits 3 seconds: its loading phase fails only when the
wait expires, so a long wait would make every run slower.

Validation: with a 0.4 s delay per fixture call both tests now pass, and
the managed test also passes at 0.6 s. Without a delay they passed three
runs in a row: the proxy test in about 9 s as before, the managed test
in about 8 s instead of 6 s.
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Several tests asserted what a file says rather than what the code does,
so they failed on any edit and passed regardless of whether the behavior
worked. The cache-key test added in the previous commit was one of them.

Removed:
- CI files: the dependency-cache key and profile location, the workflow
  step list, the setup action's text, and the URL format of the nextest,
  protoc and Docker provider pins.
- The proxy Dockerfile's text.
- Version agreement between versions.json, Cargo.toml dependency
  revisions and documentation links. The build reads image defaults from
  versions.json, so the test only compared a file with itself.
- Lists of resource kinds and TLS modes that must not exist.
- Hashes of the hosted v0 fixtures, and the two v0.yaml manifests that
  existed only to be hashed. The parity tests still compare the v0
  exports with the authored v1 documents.

The OpenShell telemetry test runs code, so it stays, renamed to
telemetry.rs. Tests that read data files as inputs to the code under test
stay. Fixture notices and the hosted scenario pages no longer mention
the removed checks.

No test failed first: this only removes tests.

Validation: cargo ci passes every step (1028 tests, then 90 lifecycle
tests), clippy is clean, and the docs check passes.
@cv cv changed the title ci: keep the dependency cache across manifest changes and deflake readiness tests ci: keep the dependency cache, deflake readiness tests, and drop file-content tests Oct 3, 2026
@cv
cv merged commit 03cb375 into v1 Oct 5, 2026
17 checks passed
@cv
cv deleted the ci/stable-dependency-cache branch October 5, 2026 05:29
@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 6, 2026
@cv cv added the v1 NemoClaw v1 branch label Oct 12, 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