perf(ci): experiment with sccache for relay builds - #5224
Conversation
Reuse unchanged workspace compilation units when the exact relay artifact cache misses. Keep pull requests read-only, preserve trusted push writes for main and release, and stop creating isolated PR artifact caches that cannot warm other refs. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Let only PR 5224 write compiler outputs to its PR-scoped cache during the bounded experiment. Document the matching cache-poisoning suppression; the trial output cannot be restored by main, release, or unrelated pull requests. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
wesbillman
left a comment
There was a problem hiding this comment.
Carl safety review on Wes’s behalf at exact head 54cfe936c87a90c44388c592f3dc992abfc9edc0: I found no correctness or cache-poisoning blocker. The action is SHA-pinned, the downloaded v0.16.0 binary was checksum-verified in the run, RUSTC_WRAPPER is scoped to the relay build step, PR 5224 writes only to its isolated refs/pull/5224/merge cache scope, other PRs are read-only, and only the workflow’s trusted main/release push triggers can populate shared caches. The exact finished-artifact cache remains the first path. The head merges cleanly with current main and the resulting workflow delta is unchanged. Would approve from a safety perspective; GitHub does not permit self-approval from the PR-author account. Operational caveat, not a blocker: the cold proof showed 3/1309 cacheable hits (0.23%), 1,285 writes, and 21 write errors, so benefit and cache-pressure cost remain unproven. Treat the merge as the advertised bounded performance experiment and remove/revert it if the warm measurement does not materially improve the relay job.
…overy * origin/main: fix(link-preview): reliably render previews sent right after they resolve (#5245) fix(link-preview): restore Buzz entity link cards (#5494) chore(release): release Buzz Desktop version 0.5.9 (#5521) feat(cli): add --visibility flag to channels update (#5119) Polish desktop onboarding flow (#5310) fix(desktop): quiesce renderer polling while hidden (#3677) (#5490) fix(channels): restore member invitations to private channels (#5493) perf(ci): experiment with sccache for relay builds (#5224) fix(desktop): bound nine unbounded localStorage stores (#5454) feat(desktop): time-based sweep for stale localStorage caches (#5453) ci(release): gate OSS desktop auto-update promotion (#5398) fix(release): pin desktop PR operations to block/buzz (#5212) fix(search): surface exact short profile names (#5480) Reduce repeated ACP session context (#5423) feat(desktop): NIP-AM agent-usage backend — P2 emission/transport/archive + P4a aggregation/D6 (#4000) fix(desktop): resolve overlapping member mentions (#5225) Signed-off-by: Brainy Bumble <0ed7657b57c0e8a9f5288390dd6c8d5d0a3a06abe9b01b9006814f52077d6cdf@buzz.block.builderlab.xyz> Co-authored-by: Atish Patel <atish@squareup.com> Signed-off-by: Atish Patel <atish@squareup.com>
Bring in main's runtime.rs mesh acp_model wire translation so local checks and CI both run on the merged tree. Clean auto-merge; the PR's fail-closed spawn gating and main's model translation touch disjoint regions of spawn_agent_child. * origin/main: (24 commits) Improve desktop search scoping (#5306) Add glass appearance and cohesive settings (#5478) Add Send to channel for thread messages (#5305) Fix macOS attachment picker lifecycle and allow inert HTML downloads (#5569) fix(desktop): preserve fresh channel timelines (#5577) fix(desktop): suppress fresh focus-return refetches for channels and home-feed (#5535) chore: mesh upgrade, clean up legacy special case code, simplify model selection for mesh (#5289) fix(desktop): preserve theme when opening communities (#5266) fix(link-preview): resolve YouTube videos through oEmbed (#5520) fix(buzz-agent): harden Databricks OAuth token cache and callback (#5534) fix(link-preview): reliably render previews sent right after they resolve (#5245) fix(link-preview): restore Buzz entity link cards (#5494) chore(release): release Buzz Desktop version 0.5.9 (#5521) feat(cli): add --visibility flag to channels update (#5119) Polish desktop onboarding flow (#5310) fix(desktop): quiesce renderer polling while hidden (#3677) (#5490) fix(channels): restore member invitations to private channels (#5493) perf(ci): experiment with sccache for relay builds (#5224) fix(desktop): bound nine unbounded localStorage stores (#5454) feat(desktop): time-based sweep for stale localStorage caches (#5453) ... Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
## Summary - add a SHA-pinned sccache action to reuse unchanged Rust compilation units when the exact relay artifact cache misses - keep pull requests read-only while preserving cache writes for trusted `main` and `release` pushes - stop saving isolated exact relay-artifact caches from PRs, reducing cache churn - preserve the exact artifact cache as the zero-build fast path ## Why this is an experiment The relay artifact job currently misses its exact cache whenever any file under `crates/**` changes, forcing a full workspace rebuild. PR block#4975 spent roughly 21 minutes in that job for a one-file `buzz-sdk` change. sccache targets the relevant reuse boundary—individual compiler inputs—but the repository cache pool is already under heavy eviction pressure, so this PR does **not** claim a proven timing win yet. ## Safety - `Mozilla-Actions/sccache-action` is pinned to commit `fc920bf0ec8de6ee65d409111f7ec508035751ba` - `RUSTC_WRAPPER` is scoped only to `Build relay artifacts` - PRs use `READ_ONLY`; trusted `push` runs (`main` and `release`) use `READ_WRITE` - the existing exact finished-artifact cache remains the first/fast path - finished artifacts are saved only by trusted pushes, preserving the former trust boundary - workflow permissions remain `contents: read`; no `pull_request_target` path is introduced - the pinned action automatically emits sccache hit/miss/error/write/duration statistics in its post-job hook ## Validation - `actionlint .github/workflows/ci.yml` - `git diff --check` - desktop release-cache contract test - release-ref contract test - independent code-shape reviews from Princess Donut and Mongo: 9/10, no remaining findings ## Measurement plan 1. purge obsolete PR-scoped `relay-artifacts-*` cache entries before measurement 2. merge/push a trusted writer to populate sccache 3. run a representative one-crate PR 4. compare relay job duration and automatic sccache statistics against the 21–22 minute baseline 5. retain this only if the warm run demonstrates material improvement --------- Signed-off-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: bhargavms <bhargav.m@ewa-services.com>
…xt reduction) * origin/main: (27 commits) fix(link-preview): reliably render previews sent right after they resolve (block#5245) fix(link-preview): restore Buzz entity link cards (block#5494) chore(release): release Buzz Desktop version 0.5.9 (block#5521) feat(cli): add --visibility flag to channels update (block#5119) Polish desktop onboarding flow (block#5310) fix(desktop): quiesce renderer polling while hidden (block#3677) (block#5490) fix(channels): restore member invitations to private channels (block#5493) perf(ci): experiment with sccache for relay builds (block#5224) fix(desktop): bound nine unbounded localStorage stores (block#5454) feat(desktop): time-based sweep for stale localStorage caches (block#5453) ci(release): gate OSS desktop auto-update promotion (block#5398) fix(release): pin desktop PR operations to block/buzz (block#5212) fix(search): surface exact short profile names (block#5480) Reduce repeated ACP session context (block#5423) feat(desktop): NIP-AM agent-usage backend — P2 emission/transport/archive + P4a aggregation/D6 (block#4000) fix(desktop): resolve overlapping member mentions (block#5225) chore(deps): update react monorepo (block#4441) ci(security): allow retired relay pool advisory (block#5404) chore(deps): update dependency @tanstack/react-virtual to v3.14.9 (block#4439) chore(deps): update all non-major dependencies (block#3049) ... Signed-off-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> Co-authored-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> Signed-off-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
Bring in main's runtime.rs mesh acp_model wire translation so local checks and CI both run on the merged tree. Clean auto-merge; the PR's fail-closed spawn gating and main's model translation touch disjoint regions of spawn_agent_child. * origin/main: (24 commits) Improve desktop search scoping (block#5306) Add glass appearance and cohesive settings (block#5478) Add Send to channel for thread messages (block#5305) Fix macOS attachment picker lifecycle and allow inert HTML downloads (block#5569) fix(desktop): preserve fresh channel timelines (block#5577) fix(desktop): suppress fresh focus-return refetches for channels and home-feed (block#5535) chore: mesh upgrade, clean up legacy special case code, simplify model selection for mesh (block#5289) fix(desktop): preserve theme when opening communities (block#5266) fix(link-preview): resolve YouTube videos through oEmbed (block#5520) fix(buzz-agent): harden Databricks OAuth token cache and callback (block#5534) fix(link-preview): reliably render previews sent right after they resolve (block#5245) fix(link-preview): restore Buzz entity link cards (block#5494) chore(release): release Buzz Desktop version 0.5.9 (block#5521) feat(cli): add --visibility flag to channels update (block#5119) Polish desktop onboarding flow (block#5310) fix(desktop): quiesce renderer polling while hidden (block#3677) (block#5490) fix(channels): restore member invitations to private channels (block#5493) perf(ci): experiment with sccache for relay builds (block#5224) fix(desktop): bound nine unbounded localStorage stores (block#5454) feat(desktop): time-based sweep for stale localStorage caches (block#5453) ... Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
…xt reduction) * origin/main: (27 commits) fix(link-preview): reliably render previews sent right after they resolve (block#5245) fix(link-preview): restore Buzz entity link cards (block#5494) chore(release): release Buzz Desktop version 0.5.9 (block#5521) feat(cli): add --visibility flag to channels update (block#5119) Polish desktop onboarding flow (block#5310) fix(desktop): quiesce renderer polling while hidden (block#3677) (block#5490) fix(channels): restore member invitations to private channels (block#5493) perf(ci): experiment with sccache for relay builds (block#5224) fix(desktop): bound nine unbounded localStorage stores (block#5454) feat(desktop): time-based sweep for stale localStorage caches (block#5453) ci(release): gate OSS desktop auto-update promotion (block#5398) fix(release): pin desktop PR operations to block/buzz (block#5212) fix(search): surface exact short profile names (block#5480) Reduce repeated ACP session context (block#5423) feat(desktop): NIP-AM agent-usage backend — P2 emission/transport/archive + P4a aggregation/D6 (block#4000) fix(desktop): resolve overlapping member mentions (block#5225) chore(deps): update react monorepo (block#4441) ci(security): allow retired relay pool advisory (block#5404) chore(deps): update dependency @tanstack/react-virtual to v3.14.9 (block#4439) chore(deps): update all non-major dependencies (block#3049) ... Signed-off-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> Co-authored-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> Signed-off-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
## Summary - add a SHA-pinned sccache action to reuse unchanged Rust compilation units when the exact relay artifact cache misses - keep pull requests read-only while preserving cache writes for trusted `main` and `release` pushes - stop saving isolated exact relay-artifact caches from PRs, reducing cache churn - preserve the exact artifact cache as the zero-build fast path ## Why this is an experiment The relay artifact job currently misses its exact cache whenever any file under `crates/**` changes, forcing a full workspace rebuild. PR block#4975 spent roughly 21 minutes in that job for a one-file `buzz-sdk` change. sccache targets the relevant reuse boundary—individual compiler inputs—but the repository cache pool is already under heavy eviction pressure, so this PR does **not** claim a proven timing win yet. ## Safety - `Mozilla-Actions/sccache-action` is pinned to commit `fc920bf0ec8de6ee65d409111f7ec508035751ba` - `RUSTC_WRAPPER` is scoped only to `Build relay artifacts` - PRs use `READ_ONLY`; trusted `push` runs (`main` and `release`) use `READ_WRITE` - the existing exact finished-artifact cache remains the first/fast path - finished artifacts are saved only by trusted pushes, preserving the former trust boundary - workflow permissions remain `contents: read`; no `pull_request_target` path is introduced - the pinned action automatically emits sccache hit/miss/error/write/duration statistics in its post-job hook ## Validation - `actionlint .github/workflows/ci.yml` - `git diff --check` - desktop release-cache contract test - release-ref contract test - independent code-shape reviews from Princess Donut and Mongo: 9/10, no remaining findings ## Measurement plan 1. purge obsolete PR-scoped `relay-artifacts-*` cache entries before measurement 2. merge/push a trusted writer to populate sccache 3. run a representative one-crate PR 4. compare relay job duration and automatic sccache statistics against the 21–22 minute baseline 5. retain this only if the warm run demonstrates material improvement --------- Signed-off-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
Summary
mainandreleasepushesWhy this is an experiment
The relay artifact job currently misses its exact cache whenever any file under
crates/**changes, forcing a full workspace rebuild. PR #4975 spent roughly 21 minutes in that job for a one-filebuzz-sdkchange. sccache targets the relevant reuse boundary—individual compiler inputs—but the repository cache pool is already under heavy eviction pressure, so this PR does not claim a proven timing win yet.Safety
Mozilla-Actions/sccache-actionis pinned to commitfc920bf0ec8de6ee65d409111f7ec508035751baRUSTC_WRAPPERis scoped only toBuild relay artifactsREAD_ONLY; trustedpushruns (mainandrelease) useREAD_WRITEcontents: read; nopull_request_targetpath is introducedValidation
actionlint .github/workflows/ci.ymlgit diff --checkMeasurement plan
relay-artifacts-*cache entries before measurement