Skip to content

fix: use rolling cache key for clcache on Windows to get cache hits#1169

Merged
spoorcc merged 2 commits intomainfrom
claude/fix-nuitka-clcache-windows-IlOuU
Apr 29, 2026
Merged

fix: use rolling cache key for clcache on Windows to get cache hits#1169
spoorcc merged 2 commits intomainfrom
claude/fix-nuitka-clcache-windows-IlOuU

Conversation

@spoorcc
Copy link
Copy Markdown
Contributor

@spoorcc spoorcc commented Apr 29, 2026

The static key caused clcache to restore a stale entry after every MSVC
runner update, resulting in 0 hits / 701 misses on every build run. A
sha-based key with a prefix restore-keys fallback and save-always mirrors
the rolling strategy used by ccache-action on Linux/macOS.

https://claude.ai/code/session_01XTvMZtPH8WpuiRBZkqWiHk

Summary by CodeRabbit

  • Chores
    • Improved Windows build caching configuration to enhance cache retrieval efficiency and consistency across commits.

The static key caused clcache to restore a stale entry after every MSVC
runner update, resulting in 0 hits / 701 misses on every build run. A
sha-based key with a prefix restore-keys fallback and save-always mirrors
the rolling strategy used by ccache-action on Linux/macOS.

https://claude.ai/code/session_01XTvMZtPH8WpuiRBZkqWiHk
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

Warning

Rate limit exceeded

@spoorcc has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 7 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a70f59ef-bcec-40f1-a329-662e2e21f3ff

📥 Commits

Reviewing files that changed from the base of the PR and between b1caec8 and 9192d1e.

📒 Files selected for processing (1)
  • .github/workflows/build.yml

Walkthrough

Updated the Windows .clcache cache configuration in the GitHub Actions build workflow to use commit SHA-based cache versioning, added a restore fallback for earlier commits on the same platform, and enabled the save-always flag to ensure cache persistence regardless of job state.

Changes

Cohort / File(s) Summary
CI/CD Configuration
.github/workflows/build.yml
Updated Windows .clcache action/cache with commit SHA-based key, added restore-keys fallback for platform/job caches, and enabled save-always to persist cache across job states.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: implementing a rolling cache key strategy for clcache on Windows to improve cache hit rates.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fix-nuitka-clcache-windows-IlOuU

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
Review rate limit: 0/1 reviews remaining, refill in 50 minutes and 7 seconds.

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build.yml:
- Line 82: Replace the unsupported save-always input on actions/cache@v5 by
splitting restore and save into separate steps: use actions/cache@v5 with the
restore step (actions/cache/restore) before build, then add a distinct cache
save step (actions/cache/save) after build guarded with if: always() so it runs
even on failure; also read and use the cache-hit output (cache-hit) from the
restore step to avoid unnecessary overwrites when implementing the save step.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: beea262a-c35c-4750-90ab-33083730990c

📥 Commits

Reviewing files that changed from the base of the PR and between 9d54759 and b1caec8.

📒 Files selected for processing (1)
  • .github/workflows/build.yml

Comment thread .github/workflows/build.yml Outdated
actions/cache v5.0.5 marks save-always as deprecated and "not working as
intended". Replace the single cache step with a restore step before the
build and a save step after, guarded by always() so it runs on build
failure too. The save is skipped on an exact cache-hit to avoid redundant
uploads.

https://claude.ai/code/session_01XTvMZtPH8WpuiRBZkqWiHk
@spoorcc spoorcc merged commit 7e372b5 into main Apr 29, 2026
71 checks passed
@spoorcc spoorcc deleted the claude/fix-nuitka-clcache-windows-IlOuU branch April 29, 2026 05:12
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