Skip to content
Source
Sign inSign up
pingdotgg/t3code

ci: cache Chromium for server test shards #19632

Mergedmaria-rcksmerged 2 commits intot3/smart-ci-workflow-gating fromrefs/pull/19632/headmerged by maria-rcks View on GitHub

maria-rckscommented

Each 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.

Chromium setup per server shard: 12-17s before, 5-6s on a cache miss, 1-2s on a cache hit

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

    2. juliusmarminge added labelsmacroscope-review

    3. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire—5.0 KiB—6.8 KiB✅
      CodexThread snapshot wire—3.8 KiB—4.9 KiB✅
      CodexLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
      CodexLive turn WebSocket decoded—20.9 KiB—29.3 KiB✅
      CodexLive turn messages—2—8✅
      ClaudeTotal thread wire—5.0 KiB—6.8 KiB✅
      ClaudeThread snapshot wire—3.8 KiB—4.9 KiB✅
      ClaudeLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
      ClaudeLive turn WebSocket decoded—21.2 KiB—29.3 KiB✅
      ClaudeLive turn messages—2—8✅

      Baseline: unavailable · PR result: 9b9e2db · Source CI: success

      Scenario 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.

      • Codex decoded thread snapshot: 108.5 KiB
      • Claude decoded thread snapshot: 108.8 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved at 5cff1ae

      Macroscope'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 9b9e2db. Prior analysis still applies.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      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.yml
      The 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 ldd reports 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: Passed 4
      Check nameStatusExplanation
      Title checkPassedThe title clearly and concisely describes the main change: caching Chromium for server test shards.
      Description checkPassedThe 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 checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck 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
      Comment `@coderabbitai help` to get the list of available commands.
    6. maria-rcks merged this9317661

    7. maria-rcks closed this

Sign in to join this conversation.