Skip to content

ci: constrain benchmark cache access - #32

Open
philip-gai wants to merge 1 commit into
actions:mainfrom
philip-gai:philip-gai/constrain-benchmark-caches
Open

ci: constrain benchmark cache access#32
philip-gai wants to merge 1 commit into
actions:mainfrom
philip-gai:philip-gai/constrain-benchmark-caches

Conversation

@philip-gai

@philip-gai philip-gai commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Cache producers: enforce write-only for jobs that seed fresh Maven/JDK entries or benchmark uploads to unique keys.
  • Cache consumers: enforce read for measurement jobs that restore seeded entries without mutating them.
  • Key computation: enforce none for the probe job, which inspects deterministic cache keys without reading or writing cache data.

Why job-scoped

  • The workflows deliberately separate cache producers from consumers, so job-level modes express each boundary without changing preparation, reporting, or artifact-only jobs.
  • Existing action inputs such as cache-read-only remain intact. Platform cache-mode adds an independent enforcement layer around the job.

Validation

  • npm test (66 tests)
  • Parsed all changed workflow YAML files with Ruby Psych
  • git diff --check

@philip-gai philip-gai changed the title chore: constrain benchmark cache access ci: constrain benchmark cache access Aug 18, 2026
@philip-gai
philip-gai marked this pull request as ready for review August 18, 2026 14:45
Copilot AI lite review requested due to automatic review settings August 18, 2026 14:45

Copilot AI 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.

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-mode to seed/upload jobs to constrain cache writes.
  • Add job-level cache-mode: read to measurement jobs to prevent cache mutation.
  • Add job-level cache-mode: none to 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
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.

2 participants