Skip to content

feat(rules): cache-saves saves CI caches from main only - #56

Draft
PiquelChips wants to merge 1 commit into
feat/rule-job-timeoutsfrom
feat/rule-cache-saves
Draft

PiquelChips wants to merge 1 commit into
feat/rule-job-timeoutsfrom
feat/rule-cache-saves

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Stacked on #55; part of a stack adding the standard's rules over manifests, config files, workflows, recipes and docs. Rebased onto #13's head c4a57df.

What and why

C6: a cache saved by a pull request is readable only by that pull request, and evicts main's, which every branch reads.

  • Every Swatinem/rust-cache step's save-if is false or mentions refs/heads/main.
  • No composite action, nor workflow triggered by pull_request, pull_request_target or merge_group, uses actions/cache, which saves on a miss. They restore with actions/cache/restore and save with actions/cache/save from main.

Measured

piqueld sourceorigin DirkEngine
Violations 1 0 0

Measured read-only at origin/main: piqueld a17710f52, sourceorigin e99cc0e6b, DirkEngine 07e8ba44.

piqueld's dashboard action uses actions/cache. Its comment says saving from pull requests is deliberate there (small, content-keyed entries), so it is a deviation candidate. piqueld's release workflow's save-if: false passes.

Testing

  • New fixture test: rust-cache with and without save-if, with save-if: false, actions/cache/restore, and actions/cache in a PR workflow and in a push-only one.
  • At this commit: Clippy with -D warnings, cargo nextest run --workspace and cargo xtask standard pass with a clean tree; just readme regenerated the rules list.
  • At the stack's tip: just check-changed origin/feat/readme-standard passes (fmt-check, audit, unused, standard, lint, doc, test, doc-test, package).

Checklist

  • The crate's README (its documentation on docs.rs) shows the change, and a repository's xtask can still follow it.
  • A change to the public API is noted for the next release, with what each repository's xtask must change. (A new rule: each repository fixes its violations (cargo xtask standard --fix where a fix exists) or adds a deviation with its reason.)
  • just check-changed passes.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

@PiquelChips
PiquelChips force-pushed the feat/rule-cache-saves branch from d42583f to c870e95 Compare November 22, 2026 22:30
@PiquelChips
PiquelChips force-pushed the feat/rule-job-timeouts branch from 55a8666 to ab61a8f Compare November 22, 2026 22:30
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