ci(desktop): build the oab-mcp sidecar with a fast profile (~23min → minutes) - #51
Merged
Merged
Conversation
… minutes) Timing a bundle-macos run showed 23 of ~26 minutes is a single step: 'cargo build --release -p oab-mcp' — release-optimizing the aws-config / aws-sdk / aws-lc-sys / ring tree for aarch64. The root Cargo.toml had no profile overrides (default release: opt-level 3, codegen-units 16), so LLVM optimization of the aws-sdk codegen dominates. oab-mcp is an I/O-bound MCP server (AWS API calls, no hot loops), so full release opt buys nothing. Add a release-ci profile (inherits release; opt-level 1, codegen-units 256, no lto) and build the sidecar with it. The aws-sdk tree now compiles in minutes; the shipped sidecar is marginally larger/slower but functionally identical. The app itself (tauri build) still uses the full release profile. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
brettchien
pushed a commit
that referenced
this pull request
Aug 14, 2026
…f-heal
Follow-up within this PR: the prefix-key bump alone is a one-time manual
reset. Add `key: ${{ hashFiles('Cargo.toml') }}` so the profile-defining
manifest is part of the cache key — any future [profile.*] edit now
auto-mints a fresh key and busts the cache, instead of silently reusing a
stale slot (the exact trap #51 fell into). No need to hand-bump prefix-key
again.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
brettchien
added a commit
that referenced
this pull request
Aug 14, 2026
…#53) * ci(desktop): bump rust-cache prefix so release-ci deps actually cache #51 added a `release-ci` profile but never got the promised speedup: sidecar build still took ~20m on every run, including on main after merge. Root cause: Swatinem/rust-cache keys on Cargo.lock (+ rustc + cargo config), not on Cargo.toml `[profile.*]`. Adding release-ci left the key unchanged, so every run got a "full match" against the old v0 cache — which only held deps compiled under `release/`, never `release-ci/`. `cargo build --profile release-ci` therefore rebuilt the whole aws-sdk/aws-lc-sys/ring tree cold (~20m) each time, and because the key matched, the post step logged "Cache up-to-date" and saved nothing (GitHub cache keys are immutable) — so release-ci deps never persisted. Fix: bump prefix-key v0 -> v1-rust to mint a fresh key. First run misses, does the cold build once, and actually saves the release-ci deps. After that, restores hit and cargo's fingerprinting recompiles only oab-mcp itself (deps unchanged) — the "minutes" #51 was aiming for. No manual invalidation key needed, so no risk of shipping a stale sidecar when a workspace dep like studio-cp changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * ci(desktop): fold Cargo.toml into rust-cache key so profile edits self-heal Follow-up within this PR: the prefix-key bump alone is a one-time manual reset. Add `key: ${{ hashFiles('Cargo.toml') }}` so the profile-defining manifest is part of the cache key — any future [profile.*] edit now auto-mints a fresh key and busts the cache, instead of silently reusing a stale slot (the exact trap #51 fell into). No need to hand-bump prefix-key again. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: brettchien <brett@openab.dev> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The finding
Timing a real
bundle-macosrun (per-step):23 of ~26 min is one step:
cargo build --release -p oab-mcp— release-optimizing theaws-config/aws-sdk-*/aws-lc-sys/ringtree for aarch64. The rootCargo.tomlhad no profile overrides, so default release (opt-level 3, codegen-units 16) makes LLVM optimization of the aws-sdk codegen dominate. Notablytauri build(compiling studio-desktop, also aws-sdk-heavy) was only 81s — cache-hit — so this is specific to the sidecar's release compile.The fix
oab-mcpis an I/O-bound MCP server (AWS API calls, no hot loops) — full release optimization buys nothing. Add arelease-ciprofile and build the sidecar with it:The aws-sdk tree now compiles in minutes instead of ~23; the shipped sidecar is marginally larger/slower but functionally identical. The app (
tauri build) still uses the fullreleaseprofile.Verification
cargo build --profile release-ci -p acp-tunnelbuilds and lands intarget/release-ci/(profile is valid; cross-target pathtarget/aarch64-apple-darwin/release-ci/matches the updatedcp).bundle-macosrun will show the new sidecar-build time.Possible follow-up (not in this PR)
oab-mcpdoesn't depend onacp-tunnel, so most PRs (all chat work) don't change the sidecar at all — a targetedactions/cacheon the built sidecar binary keyed bycrates/oab-mcp/**+Cargo.lockcould skip the build entirely on unrelated PRs. Left out here to keep this change low-risk; happy to add if wanted.🤖 Generated with Claude Code