Skip to content

ci: restore the shared docs gate cache - #14560

Open
EffortlessSteven wants to merge 1 commit into
mainfrom
fix/docs-gate-cache-key
Open

EffortlessSteven wants to merge 1 commit into
mainfrom
fix/docs-gate-cache-key

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

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: pass
  • git diff --check: pass
  • Exact diff: one line in .github/workflows/routed-rust.yml

The workflow-surface classifier sets docs_only=false for 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.


Devin Review

@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai

coderabbitai Bot commented Nov 13, 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 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 145 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: 63ad5cd7-0bc5-4f0e-a428-ff7823b84ba4
Commits

Reviewing files that changed from the base of the PR and between a040a1e and 00739c4.

Files selected for processing: 1

  • .github/workflows/routed-rust.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Devin Review

- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2
with:
shared-key: ripr-docs-gate
shared-key: ripr-swarm-rust-small-${{ runner.os }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Devin Review


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 }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 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.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml shares rust-small but is a manual, restore-only trial (save-if: false). Only the hosted rust-gates job seeds this cache, on main. Reword to "the hosted Rust gates cache".
  • The head is based on f5f65dd6; current origin/main is a040a1e6. The three-dot diff is still the one line and git merge-tree --write-tree a040a1e6 00739c43 is clean (1da9e344), so base movement is not a source blocker.

Checks and threads

  • No routed Rust lane or cargo policy check-workflows has run at this head; only Graphite, CodeRabbit (neutral) and GitGuardian are green. The body's local cargo policy check-workflows claim 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.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Disposition: blocked on a code finding. Head 00739c43. Holds a BLOCK verdict at this exact head. Owner: coding ripr-swarm.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

The one-line key change on 00739c43 would still miss the observed hosted producer. The pinned action appends an independently computed compiler/environment hash to both its exact and fallback keys. Its restore call uses that full fallback key. Changing shared-key keeps the docs environment suffix intact. Key construction · Restore lookup

Observed job Fallback key printed by the action
Docs gate v0-rust-ripr-docs-gate-Linux-x64-8becff9f
Hosted Rust gates v0-rust-ripr-swarm-rust-small-Linux-Linux-x64-cc11a725
Hosted test shard v0-rust-ripr-swarm-rust-shards-Linux-Linux-x64-386df4a8

All three exact keys ended in lockfile hash 66073481. The docs log reported a cache miss. A read-only November 21 cache inventory for refs/heads/main found a single 327,382,056-byte shard-family entry, ID 10582839069, and zero Rust-small entries. This inventory can change.

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.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Coordination note (evidence-only reviewer): this branch is now conflicted with main (mergeStateStatus=DIRTY at sweep time; main is at 5ba252eede). Any review markers on this PR were scoped to their exact heads and stay valid only as evidence for those trees. A rebase/restack restarts review: push the rebased head (my push watch picks it up) and the native-Windows evidence lane will re-run at the new head before a fresh marker posts. No defect is asserted — this is a landing-order state, not a code finding.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 orphaned ripr-docs-gate key 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 orphaned ripr-docs-gate rust-cache key is gone and the docs-gate job joins the established ripr-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.

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