Repository navigation
ci: restore the shared docs gate cache - #14560
EffortlessSteven wants to merge 1 commit into
Conversation
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 23 minutes. View limit details
|
| - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2 | ||
| with: | ||
| shared-key: ripr-docs-gate | ||
| shared-key: ripr-swarm-rust-small-${{ runner.os }} |
There was a problem hiding this comment.
🟡 Docs gate cache change lacks changelog
Changing docs-gate cache behavior without a changelog.d fragment leaves the workflow change out of the required change record.
Learn more
The contribution contract requires a new changelog.d fragment when a workflow changes. This PR changes the cache identity used by the docs gate, but its committed diff contains only the workflow edit. A one-line replacement here cannot add the required fragment.
Example: A reader checking the next release's folded changelog cannot find the docs gate cache restoration even though the workflow changed.
Recommended fix: Add a new changelog.d/<pr-or-issue>-<short-slug>.md file with the prescribed section comment, an entry ending in the PR or issue reference, and verify its formatting against changelog.d/README.md.
Was this helpful? React with 👍 or 👎 to provide feedback.
| - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2 | ||
| with: | ||
| shared-key: ripr-docs-gate | ||
| shared-key: ripr-swarm-rust-small-${{ runner.os }} |
There was a problem hiding this comment.
🔍 Shard jobs use a different cache key
The required test shards use ripr-swarm-rust-shards, so they cannot seed this cache. Only hosted Rust gates share its key; confirm that narrower cache coverage is intended.
Was this helpful? React with 👍 or 👎 to provide feedback.
EffortlessSteven
left a comment
There was a problem hiding this comment.
VERDICT: BLOCK 00739c4 — the new shared key matches the hosted producer, but the docs gate becomes a PR-time writer of the main-only cache and the CI change carries no changelog fragment.
Blocking
1. .github/workflows/routed-rust.yml:643-645 — the docs gate now writes the shared main-only cache.
The step changes shared-key to ripr-swarm-rust-small-${{ runner.os }} but keeps no save-if. In the pinned Swatinem/rust-cache action (d1527c8f), save-if defaults to true; only save-if: false makes a job restore-only. The shared key's producer sets save-if: ${{ github.ref == 'refs/heads/main' }} (rust-gates.yml:295), and the advisory shard trial that shares this key sets save-if: false (linux-nextest-shards.yml:49-50). The repo's cache-writer contract treats a broadened save as a regression (tools/repo-policy/tests/hosted_cache_continuity.rs, broadening_saves_is_not_a_trusted_default_scope_writer).
Effect: on a docs-only PR whose lock hash has no main-seeded entry yet, the docs gate saves a partial build (it runs cargo policy preflight and cargo xtask precommit, not the nextest test binaries) under the shared key. Cache entries are immutable, so the main push's full rust-gates save cannot replace it, and later heavy lanes restore the partial entry. The PR body only claims restore. Add save-if: false to make the docs gate a pure consumer.
2. Missing changelog.d/*.md — a CI plumbing change has no Internal / CI fragment.
docs/CHANGELOG_POLICY.md and changelog.d/README.md route xtask/CI plumbing to Internal / CI, and the recent CI PRs all add one (#14288, #14250, #14295, #14228). This diff is workflow-only and adds no fragment, so the change record is incomplete. check-changelog-fragments checks format, not presence; reviewers own presence, so this is a policy finding rather than a red check.
Non-blocking
- The PR body says the gate restores "dependencies seeded by the Rust gates and shard jobs". The required test shards use
ripr-swarm-rust-shards(rust-test-shards.yml:59), not this key;linux-nextest-shards.ymlsharesrust-smallbut is a manual, restore-only trial (save-if: false). Only the hostedrust-gatesjob seeds this cache, onmain. Reword to "the hosted Rust gates cache". - The head is based on
f5f65dd6; currentorigin/mainisa040a1e6. The three-dot diff is still the one line andgit merge-tree --write-tree a040a1e6 00739c43is clean (1da9e344), so base movement is not a source blocker.
Checks and threads
- No routed Rust lane or
cargo policy check-workflowshas run at this head; only Graphite, CodeRabbit (neutral) and GitGuardian are green. The body's localcargo policy check-workflowsclaim is not independently verified here. - Unresolved threads: 2, both from Devin at
.github/workflows/routed-rust.yml:645— the changelog finding above and the shard-key analysis above. The routed result refuses unresolved threads at request time, so both need a reply and resolution before merge.
|
Disposition: blocked on a code finding. Head |
|
The one-line key change on
All three exact keys ended in lockfile hash Before requesting qualification, identify a real main producer, align the intended compile settings and verify the effective fallback key and cache archive paths against it. Preserve restore-only behavior for the docs consumer and the changelog requirement from the existing review. The end-to-end check is a docs-only protected run recording an actual restore, the full docs proof, and elapsed time against the 39m20s baseline. A YAML key-string match alone does not establish reuse. |
|
Coordination note (evidence-only reviewer): this branch is now conflicted with main ( |
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY for head 00739c4
Independent native-Windows review of ci: restore the shared docs gate cache (PR #14560) at 00739c4.
Source review (verified against source at this head)
Delta (one line in .github/workflows/routed-rust.yml): the docs-gate job's Swatinem/rust-cache shared-key changes from the orphaned ripr-docs-gate to the established ripr-swarm-rust-small-${{ runner.os }} key.
-
The defect: the docs gate was warming and looking up a dedicated cache key that no other job shares, so every run paid a cold or near-empty cache restore.
-
The fix joins the sibling small jobs on the shared rust-small key, verified at this head: three jobs now use
ripr-swarm-rust-small-${{ runner.os }}and no workflow references the orphanedripr-docs-gatekey anymore. -
Risk is bounded: cache-key changes affect build throughput, not artifact contents; the worst case is a poisoned shared key, which rust-cache scopes per-OS and which the repo's lockfile-pinned toolchain bounds.
-
Native proof (native Windows, worktree wt-14560 at head 00739c4):
cargo xtask check-workflows(exit 0). Source-verified at this head: the orphanedripr-docs-gaterust-cache key is gone and the docs-gate job joins the establishedripr-swarm-rust-small-${ runner.os }shared key used by the sibling small jobs.
Scope and non-goals
- Reviewed and proven at this head only; a later push restarts review.
- Hosted CI remains the authority on actual cache-restore behavior; the native lane proves the workflow policy gate passes at this head.
- Merge mechanics belong to the writer; this review is evidence only.
Purpose
Use the existing shared Rust-small cache key in Ripr Docs Gate, so the gate can restore dependencies seeded by the Rust gates and shard jobs. The 20-minute timeout, policy checks and generated-file handling are unchanged.
Proof
cargo policy check-workflows: passgit diff --check: pass.github/workflows/routed-rust.ymlThe workflow-surface classifier sets
docs_only=falsefor this YAML-only change, so this PR does not select the docs-only gate. Cache restoration and its duration must be measured on a subsequent docs-only run; no such observation is claimed here.