ci: cache mypy incremental state in Backend Type Check - #520
Conversation
Backend Type Check ran full-strict mypy cold on every push (~2m15s). Mypy is incremental, so restoring .mypy_cache lets it re-check only the modules whose dependencies changed — typical pushes drop to seconds. The key embeds the commit SHA because actions/cache never overwrites an existing key; restore-keys falls back to the newest snapshot for the same poetry.lock + pyproject.toml. The other candidate (caching pre-commit hook environments) turned out to already exist inside pre-commit/action@v3, so it is not duplicated here. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PnuHL7w3UisSk6KQ81q3Qf
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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. Comment |
Backend Type Check ran full-strict mypy cold on every push (~2m15s across recent runs). Mypy is incremental by design, so this restores
.mypy_cachebefore the gate: typical pushes re-check only the modules whose dependencies changed, dropping the job to tens of seconds.Cache mechanics:
actions/cachenever overwrites an existing key, so the key embeds the commit SHA (every run saves a fresh snapshot) andrestore-keysfalls back to the newest snapshot for the samepoetry.lock+pyproject.toml. A deps or mypy-config change misses the fallback and does one cold run, exactly as today. Same pinnedactions/cacheSHA as the existing Poetry cache steps.Investigated and rejected while here: caching
~/.cache/pre-commit—pre-commit/action@v3already does that internally (verified in its action.yml), so the Pre-commit job's ~3m40s is genuine hook execution. Backend Tests' ~6m is real test execution; the lever there would be--parallel, deliberately not bundled into this change.First run on this PR is the cold seed; the speedup shows from the next push onward.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PnuHL7w3UisSk6KQ81q3Qf