Skip to content

ci(cache): write R2 from opted-out main lanes and fix the stats docs - #342

Merged
hyperb1iss merged 2 commits into
mainfrom
nova/sccache-stats-docs
Oct 2, 2026
Merged

hyperb1iss merged 2 commits into
mainfrom
nova/sccache-stats-docs

Conversation

@hyperb1iss

@hyperb1iss hyperb1iss commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Two follow-ups from the first main run against the R2 compiler cache (run 37057694286).

🛠️ Opted-out lanes now write R2 on main

E2E Build / CPU Smoke compiled 267 objects on main in READ_ONLY mode. The R2 write mode followed the same cacheWriter decision as the Actions cache, which honors save-if, and two lanes (python-generated, e2e-build-cpu) set save-if: "false" to keep duplicate target directories out of the Actions cache budget. R2 has no such budget, so those lanes recompiled every run without filling the shared cache. R2 now writes from every trusted default-branch run regardless of save-if; pull requests and tags still read only. Every cache job already receives the read-write key on main through the sccache-writer environment, so this lets no new run write.

📝 Name the right statistic

The docs told readers to check a Cache writes row, which sccache 0.17 does not print. A writing run shows a nonzero Average cache write with Cache write errors 0: Rust Test / Native App reported 0.463 s across 4 misses with no write errors, and UI wrote 423 objects with none.

🧪 Validation

node --test .github/actions/rust-build-cache/*.test.mjs with sccache 0.17.0: 29 passed, including new cases that an opted-out lane writes on main and stays read-only on a pull request.

🤖 Generated with Claude Code

The docs told readers to look for a Cache writes row, which sccache
0.17 does not print. The first main run against R2 showed what a
writing run actually reports: Average cache write 0.463 s with Cache
write errors at 0 across 4 misses, where the read-only pull request
run had 4 write errors for the same 4 misses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: b0a4411d-248a-41f2-8444-f7f6dab4024c

📥 Commits

Reviewing files that changed from the base of the PR and between 782cd58 and 5f22a40.

📒 Files selected for processing (1)
  • docs/development/SERVO_BUILD_CACHING.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The build caching documentation updates the sccache 0.17 indicators for a writing run. It now specifies a nonzero Average cache write and zero Cache write errors.

Changes

Build caching documentation

Layer / File(s) Summary
Document sccache write indicators
docs/development/SERVO_BUILD_CACHING.md
The documentation identifies a writing run by a nonzero Average cache write and zero Cache write errors. It removes the previous expectation that the first main run shows Cache writes above zero.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 5f22a

This documentation-only update accurately describes sccache 0.17 output and does not change build or cache behavior; no actionable merge risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to 5f22a

The change affects 1 system.

Changed systems: docs

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — docs (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in docs/development/SERVO_BUILD_CACHING.md: The documentation replaces the expected Cache writes counter on the first main run with the sccache 0.17 indicators: writing runs have a nonzero Average cache write and zero Cache write errors.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title correctly mentions the cache statistics documentation update, but it also claims that opted-out main lanes write to R2. The provided changeset contains only documentation changes and does no… Use a documentation-focused title, such as "docs(cache): clarify sccache 0.17 write-run statistics".
✅ 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. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title correctly mentions the cache statistics documentation update, but it also claims that opted-out main lanes write to R2. The provided changeset contains only documentation changes and does not implement that CI behavior.

  • Fix all pre-merge checks with AI
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

@hyperb1iss hyperb1iss changed the title docs(cache): name the statistic that shows sccache 0.17 writing to R2 ci(cache): write R2 from opted-out main lanes and fix the stats docs Oct 2, 2026
The first main run against R2 showed E2E Build / CPU Smoke compiling
267 objects in READ_ONLY mode. The R2 write mode followed the same
cacheWriter decision as the Actions cache, which honors save-if, and
two lanes, python-generated and e2e-build-cpu, set save-if: "false" to
keep duplicate target directories out of the Actions cache budget. R2
has no such budget, so those lanes recompiled on every run without
ever filling the shared cache.

R2 now writes from every trusted default-branch run regardless of
save-if; pull requests and tags still read only. Those jobs already
receive the read-write key on main through the sccache-writer
environment, so no new run can write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hyperb1iss
hyperb1iss force-pushed the nova/sccache-stats-docs branch from 3a9ae2c to e01cafd Compare October 2, 2026 20:15
@hyperb1iss
hyperb1iss merged commit 874e553 into main Oct 2, 2026
42 checks passed
@hyperb1iss
hyperb1iss deleted the nova/sccache-stats-docs branch October 2, 2026 21:26
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