Repository navigation
ci: set cache-mode on release workflows - #68
claude[bot] wants to merge 1 commit into
Conversation
Add top-level `cache-mode: none` to release.yml so release runs never read from or write to the Actions cache, regardless of per-step settings. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MYe3WCXtgiqomNuVQdi4Yd
There was a problem hiding this comment.
I reviewed this PR and didn't find any confirmed bugs, but because this change touches the release workflow and depends on a GitHub Actions key I can't independently verify, a human look is still worthwhile before merging.
What was reviewed:
- The one-line diff adding
cache-mode: noneplus a comment to.github/workflows/release.yml, placed right after the top-levelpermissions: {}block. - Whether
cache-modeis a key GitHub Actions recognizes at the workflow top level versus one that would cause the whole workflow file to be rejected as invalid if unsupported — this isn't verifiable from this environment. - Confirmed the change is purely additive config (a comment and one key); no job/step logic, permissions, or secrets handling were touched.
Extended reasoning...
The diff only touches .github/workflows/release.yml, adding a one-line cache-mode: none key (with a comment) right after permissions: {}, before jobs:; nothing else in the pipeline (job logic, permissions, secrets) changed. The PR description cites a GitHub changelog dated 2026-09-10 announcing this as a new top-level/job-level workflow key, which postdates this review's ability to verify from documented knowledge, and the key is not one I have confirmed in GitHub's established workflow schema. Unknown top-level keys in GitHub Actions workflows have historically caused the entire workflow file to be rejected as invalid rather than silently ignored, which would be a more severe failure mode (no releases trigger at all) than the cache-miss behavior the PR description anticipates. This is the repo's release pipeline, a critical path, and the bug hunter's own candidate note on this exact line was only dismissed as a duplicate rather than independently confirmed safe, so I'm deferring rather than approving.
|
Confirming the reviewer's open question: As noted in the description, PR CI does not run Generated by Claude Code |
Requested by David Sanders · Slack thread
Before: On a push to
main, the Release workflow runs thetestjob (viatest.yml, whosesetup-nodestep usescache: 'yarn') and then thereleasejob. Nothing in the workflow itself forbids cache access; the release job only avoids the cache because its ownsetup-nodestep setspackage-manager-cache: false, and the reused test job still restores and saves the yarn cache during release runs.After: The Release workflow declares
cache-mode: noneat the top level, so no job in a release run can read from or write to the Actions cache, regardless of what individual steps ask for. Because thetestjob callstest.ymlviauses:, the caller'snonealso caps that called workflow during release runs: itscache: 'yarn'restore is skipped and reported as a cache miss, and the save is a no-op. PR CI (test.ymltriggered directly) is untouched and keeps caching.GitHub added a workflow- and job-level
cache-modekey that enforces cache access declaratively; see the changelog and the workflow syntax reference.How: Adds a one-line comment and
cache-mode: nonedirectly after the top-levelpermissions: {}block in.github/workflows/release.yml. The existingpackage-manager-cache: falseline is left in place. Note that PR CI does not exercise the release workflow, so the first release after merge is the real test; if a step is denied cache access,actions/cacheand the@actions/cachetoolkit log a message and continue rather than failing the job.🤖 Generated with Claude Code
https://claude.ai/code/session_01MYe3WCXtgiqomNuVQdi4Yd
Generated by Claude Code