Skip to content

ci: expose compiler cache wall time and backend - #16230

Merged
teamleaderleo merged 4 commits into
mainfrom
ci/cache-archaeology
Oct 1, 2026
Merged

teamleaderleo merged 4 commits into
mainfrom
ci/cache-archaeology

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Compiler-cache host telemetry currently reports Xcode task time but omits the actual compile wall time and whether the fleet CAS route was active. It also records a candidate seed distance when the candidate was not adopted. This PR adds bounded compile_wall_seconds and categorical cache_backend (local or fleet) to the host sidecar, and reports seed distance only from the adoption step that actually installed the seed.

The backend is inferred from the Xcode build-settings echo and never copies the socket path into telemetry. Existing compile_seconds remains the summed Xcode timing-summary task time; fetch_seconds remains seed DerivedData adoption/fetch duration.

Validation:

  • Regression commit 7636d760e02: python3 tests/test_build_metrics.py failed with missing telemetry fields.
  • Fix commit 623db13f882: python3 tests/test_build_metrics.py (9/9), python3 -m py_compile scripts/ci/build_metrics.py, bash tests/test_ci_fleet_compilation_cache.sh, and git diff --check pass.
  • No native app build was run.

Changelog

Changed: expose compiler-cache wall time/backend and report only adopted seed distance in CI host telemetry.


Summary by cubic

Adds compiler-cache wall time and backend to CI host telemetry, and stops reporting seed distance when the candidate seed was never adopted.

  • Records compile_wall_seconds and categorical cache_backend (local or fleet) in the host sidecar; the backend is inferred from Xcode build-settings and the socket path is never copied into telemetry.
  • SEED_DISTANCE now comes only from the step that actually installed the seed; compile_seconds remains the summed Xcode timing-summary task time and fetch_seconds remains the seed adoption/fetch duration.

Written for commit 3c3a3ea. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Chores
    • Build metrics now include compile wall time and the aggregated cache backend, reported as Fleet when any scheme uses it and Local otherwise.
    • Cache backend reporting distinguishes Fleet builds using both the plugin setting and a nonempty remote-service path.
    • Xcode build metrics now report seed distance only when provided by the seed-derived data step; the previous fallback is no longer used.

teamleaderleo and others added 2 commits September 30, 2026 17:05
Co-authored-by: OpenAI <noreply@openai.com>
Report only an adopted seed distance so telemetry cannot claim a candidate seed after adoption fails.

Co-authored-by: OpenAI <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 7d49f4be-d3f4-429a-b0a3-e1e85a01e06c

📥 Commits

Reviewing files that changed from the base of the PR and between 27c7940 and 3c3a3ea.

📒 Files selected for processing (2)
  • scripts/ci/build_metrics.py
  • tests/test_build_metrics.py
 ________________
< CSI: Git Diff. >
 ----------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 8b338f3d-b24f-48eb-a8ef-fa2defff0ff8

📥 Commits

Reviewing files that changed from the base of the PR and between 8840999 and 27c7940.

📒 Files selected for processing (3)
  • .github/workflows/ci-macos.yml
  • scripts/ci/build_metrics.py
  • tests/test_build_metrics.py

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


📝 Walkthrough

Walkthrough

The CI workflow now passes seed distance only from the seed adoption step. Build metrics detect whether a scheme uses Fleet caching and include the aggregated cache backend and compile wall time in compiler-cache telemetry.

Changes

CI build metrics

Layer / File(s) Summary
Seed-distance input
.github/workflows/ci-macos.yml, tests/test_build_metrics.py
The workflow passes SEED_DISTANCE only from seed-derived-data. The workflow test rejects the previous fallback to prefer-seed.
Compiler-cache metrics
scripts/ci/build_metrics.py, tests/test_build_metrics.py
The script reports fleet when the log contains both the enabled cache plugin setting and a nonempty remote-service path. It reports local otherwise, and aggregates the backend across schemes. The compiler_cache receipt includes compile_wall_seconds and cache_backend. Tests cover local and Fleet receipts, socket-path omission, and host telemetry.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to 27c79

This change adds cache backend and compile wall time to CI build telemetry and reports seed distance only when a seed is adopted. It affects CI metrics only, tests cover the new behavior, and no merge-blocking risk is identified.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 27c79

The change adds limited timing and cache metadata without changing the inspected security controls or exposing cache connection paths. Risk is low, with uncertainty about how the receiving host handles the expanded telemetry.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The visible changed exposure is build metadata in the CI receipt and host job sidecar. No new credential, cache-write authority, or application-data sink appears in the changed producer path. Exposure beyond the external host reader cannot be bounded from the available evidence.

Security Findings and Attack Paths

  • inferred — An actor able to influence build-log text could cause the new backend label to report fleet by emitting matching settings. Within the inspected workflow, that label is generated after compilation and has no demonstrated feedback into routing, admission, or authorization. This is an untrusted telemetry input, not an established privilege-escalation path.

Trust Boundaries and Controls

  • observed — Metrics arguments use quoted shell-array values, and seed distance is passed only when numeric. The upstream producer emits distance only for a successful adoption with a known distance and matching seed key. Removing the candidate fallback therefore improves the attribution of reported state without changing adoption authority.

Resilience and Maintainability Implications

  • observed — The producer writes the receipt before the sidecar, using direct non-atomic writes. Earlier failures prevent sidecar generation; sidecar-write failure prevents successful metrics publication. This ordering predates the added fields. Startup cleanup addresses normal stale-file reuse, but interruption and concurrent-reader behavior remain unverified at the external host boundary.

Hardening Proposals

  • proposed — Confirm the external host reader accepts these optional v1 fields and treats the log-derived backend label as advisory metadata, never as authorization or cache-routing proof.
🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: exposing compiler-cache wall time and backend in CI telemetry.
Description check ✅ Passed The description includes a clear summary, testing results, changelog entry, and relevant implementation details. The omitted demo video is not needed for this non-UI change; the checklist is not repro…
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.
Cmux Cloud Persistent Session And Early Input ✅ Passed PASS: The PR changes only macOS CI seed-distance reporting, compiler-cache telemetry, and tests. The authoritative diff contains no Cloud terminal creation, cmux-tui transport, manual renderer, PTY re…
Cmux Swift Actor Isolation ✅ Passed PASS: The authoritative pull-request diff changes only .github/workflows/ci-macos.yml, scripts/ci/build_metrics.py, and tests/test_build_metrics.py. It contains no Swift files or Swift productio…
Cmux Swift Blocking Runtime ✅ Passed The pull request changes only .github/workflows/ci-macos.yml, scripts/ci/build_metrics.py, and tests/test_build_metrics.py. The review-scoped diff contains no Swift or Objective-C production fil…
Cmux Browser Automation Off-Main ✅ Passed The PR changes only CI workflow and build-metrics Python/tests files. The browser-automation rule scopes its failure conditions to Sources/TerminalController.swift and `ControlCommandExecutionPolicy…
Cmux Expensive Synchronous Load ✅ Passed PASS: The pull request changes only a GitHub workflow, a Python metrics script, and Python tests. It adds no production Swift changes and cannot introduce an expensive synchronous agent-history load o…
Cmux Cache Substitution Correctness ✅ Passed PASS. The authoritative pull-request diff changes only .github/workflows/ci-macos.yml, scripts/ci/build_metrics.py, and tests/test_build_metrics.py. It contains no production Swift, TypeScript, …
Cmux No Hacky Sleeps ✅ Passed The pull request introduces no fixed sleeps, timers, polling, delayed dispatch, or wall-clock waits. The production Python changes only parse build logs and add telemetry fields. The workflow change i…
Cmux Algorithmic Complexity ✅ Passed The diff adds only linear work to the CI metrics parser: two full-log joins and regex searches in parse_log, plus a linear any check across schemes in aggregate. It does not add nested scans, pe…
Cmux Swift Concurrency ✅ Passed The pull request changes only .github/workflows/ci-macos.yml, scripts/ci/build_metrics.py, and tests/test_build_metrics.py. The authoritative diff contains no Swift files and introduces no Swift…
Cmux Swift @Concurrent ✅ Passed PASS. The pull-request diff changes only .github/workflows/ci-macos.yml, scripts/ci/build_metrics.py, and tests/test_build_metrics.py. It introduces no Swift code or Swift concurrency call-site …
Cmux Swift Package Boundaries ✅ Passed PASS: The pull request changes only .github/workflows/ci-macos.yml and Python files. It introduces no production Swift change, SwiftPM target change, or app-target domain logic. The Swift package bo…
Cmux Swiftpm Lockfiles ✅ Passed The PR changes only .github/workflows/ci-macos.yml, scripts/ci/build_metrics.py, and tests/test_build_metrics.py. The workflow change updates telemetry only. No Package.swift, `Package.resolve…
Cmux Swift Logging ✅ Passed PASS: The pull request changes only CI YAML, Python telemetry code, and Python tests. It adds no production Swift changes and no prohibited Swift logging statements.
Cmux User-Facing Error Privacy ✅ Passed PASS. The PR changes only macOS CI workflow logic, build-metrics parsing, CI summary output, artifacts, and tests. The new host sidecar emits bounded numeric fields and the categorical values local …
Cmux Full Internationalization ✅ Passed PASS. The PR changes only a macOS CI workflow, compiler-cache telemetry generation, and tests. The added values are machine-readable fields and literal configuration tokens (cache_backend, `compile_…
Cmux Swiftui State Layout ✅ Passed PASS: The pull request changes only .github/workflows/ci-macos.yml, scripts/ci/build_metrics.py, and tests/test_build_metrics.py. The authoritative diff contains no Swift or SwiftUI source chang…
Cmux Architecture Rethink ✅ Passed The pull request changes only GitHub Actions YAML, Python telemetry code, and Python tests. It introduces no Swift architecture change and no prohibited timing, blocking, state-ownership, observer, or…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS: The pull request changes only .github/workflows/ci-macos.yml, scripts/ci/build_metrics.py, and tests/test_build_metrics.py. It changes no Swift files and adds no user-visible NSWindow, NSP…
Cmux Source Artifacts ✅ Passed PASS. The diff changes only .github/workflows/ci-macos.yml, scripts/ci/build_metrics.py, and tests/test_build_metrics.py. These are intentional workflow, source, and test files. The added Fleet …
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS: The authoritative PR diff changes only .github/workflows/ci-macos.yml, scripts/ci/build_metrics.py, and tests/test_build_metrics.py. It contains no Swift file under a production Sources/…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

❤️ Share

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

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

CI failure attribution

CI failed on 27c7940067 (run 36870619557 attempt 1): 1 code.

Job Verdict Why
macos / macOS compile admission code a compile error
Matched log lines
macos / macOS compile admission: /tmp/cmux-ci/src/Sources/Update/UpdateTitlebarAccessory.swift:989:49: error: invalid redeclaration of 'cmuxAccent'

Not re-run automatically: macos / macOS compile admission is not a machine failure.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's.

@cursor

cursor Bot commented Oct 1, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@teamleaderleo
teamleaderleo enabled auto-merge (squash) October 1, 2026 15:15
@teamleaderleo
teamleaderleo merged commit 06b1968 into main Oct 1, 2026
46 of 50 checks passed
@teamleaderleo
teamleaderleo deleted the ci/cache-archaeology branch October 1, 2026 15:16
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Merge receipt for 3c3a3eafb3, merged 2026-10-01 15:16:58 UTC

  • Not verified at merge: ci-status (not reported), macOS compile admission (in progress), CI fast guards (in progress), GhosttyKit release check (in progress), guards (18) (in progress), Web complexity (in progress)
  • Verified: Fast static checks, receipt-contract, transport, web-validation
  • Skipped by policy: admission-placement, browser, Claude wrapper regressions, Dogfood build #​${{ github.event.pull_request.number }}, full-suite-coverage, remote-daemon, suite-coverage, swift-package-tests, web, web-build, web-database-tests, web-tests
  • Full suite: runs on main after merge.

Labeled merged-unverified: if main breaks near this merge, look here first.

@github-actions github-actions Bot added the merged-unverified A judging check was not green at merge; see the merge receipt comment label Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-unverified A judging check was not green at merge; see the merge receipt comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant