ci: cache Chromium for server test shards #19632
t3/smart-ci-workflow-gating fromrefs/pull/19632/head·merged by maria-rcks View on GitHubEach server shard spent 12-17s installing Chromium plus its apt packages. Shards now cache the browser by Playwright version and only run install-deps when ldd finds a missing library; the Blacksmith image already has them, so the apt step is gone.

Measured from CI runs of #19587 (before), this PR's first run (cache miss) and a later stacked run (cache hit). About 13s off every shard on the critical path, ~5 vCPU-minutes per PR.
Stacked on #19587.
🤖 Generated with Claude Code (claude-opus-5-5, via T3 Code)
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
juliusmarminge added labelsmacroscope-review
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Approvability#
Verdict: Approved at
5cff1aeMacroscope's review found this PR approvable — This is a contained CI-only optimization that caches the pinned Chromium shell and conditionally installs missing system dependencies for server test shards. Product behavior, defaults, deployment configuration, and static-analysis settings are unchanged.
No code changes detected at
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).9b9e2db. Prior analysis still applies.No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
22ba4dc1-d496-4461-8f9b-4d43b416603b
📥 Commits
-
Reviewing files that changed from the base of the PR and between 5cff1ae8d39f4c252112601747684236dee92f58 and 9b9e2db93ae127e05f293644c7e23eb8a102aa55.
📒 Files selected for processing: 1
-
.github/workflows/ci.yml
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
-
📝 Walkthrough
-
The server test workflow caches Playwright’s Chromium files by runner OS, architecture, and version. It installs Chromium on a cache miss and installs system dependencies only when the browser has missing shared libraries.
Changes: Server test browser setup
Layer / File(s) Summary Cache and dependency setup
.github/workflows/ci.ymlThe workflow resolves the Playwright version and caches its browser files. When server tests are enabled, it installs Chromium on a cache miss and installs system dependencies only if lddreports missing shared libraries.Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Suggested reviewers:
juliusmarminge
Merge Risk: ⚪ Minimal · up to
9b9e2-
The CI change installs the browser when needed and checks its system libraries. No concrete current-head regression is established, so the PR is mergeable subject to the usual checks.
Security architecture risk: ⚪ Minimal · up to
9b9e2-
The browser cache does not introduce an identified privilege expansion. Pull-request caches cannot be restored by main-branch jobs, existing job permissions remain unchanged, and browser setup still precedes tests.
Retained concerns No architecture-level concerns identified.
Security review details
-
Security Blast Radius
- observed — The new persistent state is the Playwright browser directory, which contains executables later consumed by server tests. Cache reuse can span workflows in the same branch scope, but GitHub documents that a cache created by a pull-request run is confined to that PR's merge ref and cannot be restored by its base branch or other PRs.
Trust Boundaries and Controls
- inferred — Under the documented cache-service scope contract, modifying browser files in a pull-request job does not provide a cache-mediated execution path into main-branch jobs. The key's omission of a branch name therefore does not itself bypass the PR-to-main trust boundary. This conclusion depends on platform enforcement, not on the cache key authenticating its contents.
Resilience and Maintainability Implications
- inferred — Setup failures block the normal test step, and failed or canceled jobs do not satisfy the cache action's success-only save condition. Concurrent shards share the same versioned key, but immutable cache entries and no-resave behavior prevent repeated exact hits from rewriting the published snapshot. These controls bound persistent state changes; they do not attest the contents of an actual archive.
-
Pre-merge checks:
4-
Check name Status Explanation Title check The title clearly and concisely describes the main change: caching Chromium for server test shards. Description check The description explains the prior problem, the workflow change, measured results, and verification evidence. It also identifies the stacked PR and the agent model and harness. It does not use the tem… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
maria-rcks merged this9317661
maria-rcks closed this
Sign in to join this conversation.
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result:
9b9e2db· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.