ci: constrain benchmark cache access - #32
Open
philip-gai wants to merge 1 commit into
Open
Conversation
philip-gai
marked this pull request as ready for review
August 18, 2026 14:45
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens GitHub Actions cache access in benchmark workflows by adding job-scoped cache enforcement, separating cache producers (seed/upload) from consumers (measurement), and disabling cache access entirely for key-probe jobs.
Changes:
- Add job-level
cache-modeto seed/upload jobs to constrain cache writes. - Add job-level
cache-mode: readto measurement jobs to prevent cache mutation. - Add job-level
cache-mode: noneto the cache-key stability probe job to avoid cache access while computing deterministic keys.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/jdk-cache.yml | Adds cache access mode boundaries between seed (producer) and measure (consumer) jobs. |
| .github/workflows/cache-value.yml | Marks seed as cache producer and measure as read-only cache consumer via job-level cache mode. |
| .github/workflows/cache-save.yml | Constrains the cache-save measurement job’s cache access mode for uploads. |
| .github/workflows/cache-key-stability.yml | Disables cache access for the probe job that inspects deterministic cache keys. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/4 changed files
- Comments generated: 3
- Review effort level: Lite
| seed: | ||
| name: Seed cache | ||
| runs-on: ubuntu-24.04 | ||
| cache-mode: write-only |
| name: Seed caches | ||
| needs: prepare | ||
| runs-on: ubuntu-24.04 | ||
| cache-mode: write-only |
| measure: | ||
| name: paired / ${{ matrix.sample }} | ||
| runs-on: ubuntu-24.04 | ||
| cache-mode: write-only |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
write-onlyfor jobs that seed fresh Maven/JDK entries or benchmark uploads to unique keys.readfor measurement jobs that restore seeded entries without mutating them.nonefor the probe job, which inspects deterministic cache keys without reading or writing cache data.Why job-scoped
cache-read-onlyremain intact. Platformcache-modeadds an independent enforcement layer around the job.Validation
npm test(66 tests)git diff --check