Skip to content

fix(ci): prevent sccache from evicting Rust target cache - #799

Merged
proerror77 merged 1 commit into
mainfrom
codex/rust-cache-quota
Aug 10, 2026
Merged

proerror77 merged 1 commit into
mainfrom
codex/rust-cache-quota

Conversation

@proerror77

@proerror77 proerror77 commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • disable GitHub sccache object-cache writes in CI, Ploy, and ACR Rust jobs
  • keep the per-job sccache wrapper and rust-cache target archive
  • pin the cache policy in the existing CI and ACR contract tests

Root cause

The repository was writing thousands of sccache objects into the same GitHub Actions cache quota as the large Rust target archive. The research target key (1.39 GiB) was evicted, so the main build restored no target cache and fell back to a cold compile.

Validation

  • bash .github/scripts/test-select-rust-ci-scope.sh
  • bash .github/scripts/test-acr-publish-workflow.sh
  • bash -n .github/scripts/test-select-rust-ci-scope.sh .github/scripts/test-acr-publish-workflow.sh
  • git diff --check

Out of scope

The tag-only release workflow remains unchanged because it has a pre-existing macos-15-intel actionlint runner-label failure; no production services, collectors, uploaders, OSS objects, or runtime state changed.

Issue relationship

None

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR disables the GitHub Actions sccache backend across Rust, ACR, and Ploy workflows. Contract tests now require disabled backend settings and reject write-mode configuration.

Changes

sccache policy

Layer / File(s) Summary
Core Rust workflow configuration
.github/workflows/ci.yml, .github/workflows/release-rust.yml
Rust CI and release jobs disable GitHub Actions-backed sccache. Concurrency comments now reference the shared Rust target cache.
ACR and Ploy workflow configuration
.github/workflows/acr-publish.yml, .github/workflows/ploy-ci.yml
ACR and Ploy jobs disable GitHub Actions-backed sccache. The research image job no longer sets SCCACHE_GHA_RW_MODE.
sccache contract validation
.github/scripts/test-acr-publish-workflow.sh, .github/scripts/test-select-rust-ci-scope.sh
Contract tests require disabled GitHub Actions sccache settings and reject release or research image write-mode configuration.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change and validation, but it omits the required Change contract, Dependencies and merge order, Rollout and rollback, and Scope exception sections. Add all missing template sections and include the required focused-validation counterexample, even if the values are None.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly states that the CI change prevents sccache from evicting the Rust target cache.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/rust-cache-quota

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5741b49c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/scripts/test-acr-publish-workflow.sh (1)

198-201: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Scope the cache-policy assertions to research-runner-binaries.

The grep -Fqx checks search the entire ACR workflow. They do not prove that RUSTC_WRAPPER, SCCACHE_GHA_ENABLED, mozilla-actions/sccache-action, and continue-on-error belong to the same job. A future job could satisfy these checks while research-runner-binaries loses the disabled backend.

Extract the research-runner-binaries block and run these assertions against that block.

Proposed test fix
+research_runner_block=$(awk '
+  /^  research-runner-binaries:/ { found=1; next }
+  found && /^  [a-z0-9-]+:/ { exit }
+  found { print }
+' "$workflow")
-grep -Fqx '      RUSTC_WRAPPER: sccache' "$workflow"
-grep -Fqx '      SCCACHE_GHA_ENABLED: "false"' "$workflow"
+grep -Fqx '      RUSTC_WRAPPER: sccache' <<<"$research_runner_block"
+grep -Fqx '      SCCACHE_GHA_ENABLED: "false"' <<<"$research_runner_block"
-grep -Fqx '        uses: mozilla-actions/sccache-action@v0.0.10' "$workflow"
-grep -Fqx '        continue-on-error: true' "$workflow"
+grep -Fqx '        uses: mozilla-actions/sccache-action@v0.0.10' <<<"$research_runner_block"
+grep -Fqx '        continue-on-error: true' <<<"$research_runner_block"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/scripts/test-acr-publish-workflow.sh around lines 198 - 201, Update
the assertions in test-acr-publish-workflow.sh to first extract the
research-runner-binaries job block from the workflow, then run all four grep
-Fqx cache-policy checks against that extracted block rather than the entire
workflow. Preserve the existing assertions for RUSTC_WRAPPER,
SCCACHE_GHA_ENABLED, mozilla-actions/sccache-action, and continue-on-error.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/scripts/test-acr-publish-workflow.sh:
- Around line 198-201: Update the assertions in test-acr-publish-workflow.sh to
first extract the research-runner-binaries job block from the workflow, then run
all four grep -Fqx cache-policy checks against that extracted block rather than
the entire workflow. Preserve the existing assertions for RUSTC_WRAPPER,
SCCACHE_GHA_ENABLED, mozilla-actions/sccache-action, and continue-on-error.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6f264aaa-c734-4351-90c4-29f3a15dc9ab

📥 Commits

Reviewing files that changed from the base of the PR and between 2a979c4 and b5741b4.

📒 Files selected for processing (6)
  • .github/scripts/test-acr-publish-workflow.sh
  • .github/scripts/test-select-rust-ci-scope.sh
  • .github/workflows/acr-publish.yml
  • .github/workflows/ci.yml
  • .github/workflows/ploy-ci.yml
  • .github/workflows/release-rust.yml

@proerror77
proerror77 force-pushed the codex/rust-cache-quota branch from b5741b4 to 6e96770 Compare August 10, 2026 04:45
@proerror77
proerror77 enabled auto-merge (squash) August 10, 2026 05:22
@proerror77
proerror77 merged commit be9e746 into main Aug 10, 2026
47 of 48 checks passed
@proerror77
proerror77 deleted the codex/rust-cache-quota branch August 10, 2026 05:24
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