fix(build): stop serialising release codegen — macOS desktop 90m timeout to 46m - #5610
Conversation
…acOS legs `codegen-units = 1` landed in 38ec4b0 (tinyhumansai#5541, 2026-08-14) to shrink the release binary. It also serialised codegen for the whole crate and took the desktop release matrix from ~46 min to ~84 min - past the 90-minute job timeout - which has blocked every production release since. The last green production release is v0.63.7 on 2026-08-07. The regression was invisible pre-merge by construction: `[profile.ci]` overrides all three settings, so every PR lane kept its old timings while only the release lane, which builds `--release`, paid the cost. 38ec4b0's own comment anticipated slower release builds and concluded "the fast CI lanes are unaffected" - correct, but the release lane was never considered. Two independent measurements identify the profile as the variable: Windows is the control - it never times out, so its durations are uncensored: step 18, 08-13 -> 08-19: 46m13s -> 84m14s (+82%) Staging ran the same tree the same day with `build_profile: debug`, 21 min before the first failing production run: aarch64-apple-darwin: 15m46s (debug) vs 1h28m22s (release) Setting `codegen-units = 16` restores parallelism while keeping `lto = "thin"` and `strip = "symbols"`, so tinyhumansai#5541's size win should largely survive. That is an expectation, not yet a measurement - the binary size wants checking against tinyhumansai#5541's 43% before this is considered settled. Raise `timeout-minutes` to 120 as well. Every failing macOS leg was clipped at exactly 90m, so their true durations were never observed; the headroom means a slow runner reports a real result rather than another censored timeout. All three Cargo worlds are changed together, as the profile comments require: root, `app/src-tauri`, and `app/src-tauri-mobile`. Refs tinyhumansai#5595
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe release profiles now use 16 codegen units. The desktop build workflow timeout increases from 90 to 120 minutes. Thin LTO remains enabled in the root release profile. ChangesBuild configuration
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: 🔵 Low · up to Release builds now use 16 codegen units, substantially reducing build time while retaining thin LTO and symbol stripping; artifact size may change and should be compared with the previous baseline. The PR is mergeable with explicit owner awareness and follow-up. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
CI is green, plus two additions to the evidenceNo code changes — this comment is verification only. The diff is unchanged at 1. All checks pass
17 pass, 9 path-skipped, 0 failures, no re-runs needed. Four skips (Frontend Checks, Scripts Self-Tests, TinyCortex Memory Tests, Pester) are Two
|
| leg | Build and package Tauri app |
duration |
|---|---|---|
| aarch64-apple-darwin | 10:39:09 → 11:17:50 | 38m41s |
| x86_64-apple-darwin | 10:38:47 → 11:13:18 | 34m31s |
| windows | 10:40:10 → 11:39:42 | 59m32s |
| ubuntu | 10:38:33 → 11:09:05 | 30m32s |
| ubuntu-arm64 | 10:38:54 → 11:04:13 | 25m19s |
Both macOS legs — which failed every release run from 2026-08-14 onward — finish comfortably inside even the old 90-minute cap. That strengthens the description's own closing note: 90 would be sufficient, and 120 is insurance rather than a requirement.
3. rust-rss-bench independently corroborates the fix, inside this repo's own CI
Worth flagging because it isn't mentioned in the description: rust-rss-bench builds with cargo build --release (ci-lite.yml:610), so it is the one PR-lane job this change touches — a third platform (Linux container), separate from the desktop matrix.
| step | main @ codegen-units = 1 (32300652568) |
this PR @ codegen-units = 16 |
|---|---|---|
| Cache Rust build artifacts | 33s | 11s |
Run rss-bench fixture tests (uses the ci profile — unaffected) |
5m21s | 6m21s |
| Build stripped-release rss-bench | 23m28s | 15m27s — −34% |
Two things make this a well-controlled comparison rather than noise:
- The fixture-test step got slower (5m21s → 6m21s). It compiles under the
ciprofile, which this PR does not change, so the PR's runner was if anything marginally slower — yet the--releasestep dropped eight minutes. - The PR's cache restore was shorter (11s vs 33s), meaning less was reused. That biases against the PR, so −34% is a conservative figure.
Still open — unchanged by any of the above
The binary-size caveat in the description stands. rss-bench measures RSS, not artifact size, so none of this answers whether #5541's 43% reduction survives. Still worth a reviewer's eye before this is considered settled, and the description's suggested fallback (lto = "fat" with codegen-units = 16, not a return to one codegen unit) remains the right shape if it hasn't.
CodeRabbit reported no actionable comments and there are no open review threads.
Summary
codegen-units = 1on[profile.release].timeout-minutesto 120 as headroom — see the note below, it is now insurance rather than a requirement.Problem
#5595 documents the symptom precisely and states the open question plainly: "Something between 2026-08-13 and 2026-08-19 roughly doubled desktop build time across all three platforms. I have not identified what."
It is
38ec4b0a— "perf(build): cut the release binary 43% via LTO, codegen-units and strip" (#5541, 2026-08-14), which addedlto = "thin",codegen-units = 1andstrip = "symbols"to[profile.release]in both cargo worlds. It landed ~9 hours after the last passing release run and before every failing one.The commit anticipated the cost and reasoned it was contained:
That is correct about the PR lanes and wrong about the release lane: the desktop matrix builds
--release, notci(release-production.yml:353), so it absorbs the full cost. The regression was invisible pre-merge by construction.Two independent measurements
Windows never times out, so its durations are uncensored — step 18 (
Build and package Tauri app):And staging ran the same tree the same day with
build_profile: debug, 21 minutes before the first failing production run: macOS aarch64 in 15m46s versus production's 1h28m22s. Same runners, same commits. The profile is the only variable.This also explains the log signature — both macOS legs go quiet after
Compiling directories v5.0.1for ~80 minutes. That is not a hang; a single-codegen-unit LTO link over an 825-crate binary emits nothing while it runs.Solution
codegen-units = 16restores codegen parallelism while keepinglto = "thin"andstrip = "symbols", so #5541's size win should largely survive. All three cargo worlds move together, as the profile comments require.Verified on a real desktop matrix run
Fork run with no secrets,
build_profile: release:Both macOS legs, which had failed every release run since 2026-08-14, now pass.
Two honest caveats
stripretains most of refactor(modules): load TinyJuice outside dependency graph #5541's 43% reduction, but that is an expectation. If the binary grows materially, the tradeoff to revisit islto = "fat"withcodegen-units = 16— not a return to one codegen unit. Worth a reviewer checking against refactor(modules): load TinyJuice outside dependency graph #5541's number before this is considered settled.On the timeout bump
timeout-minutes: 120was written when macOS durations were censored and genuinely unknown. With the profile fixed at ~46 minutes, 90 would now be comfortable. I have kept 120 as protection against a slow runner, but it is insurance, not a requirement — strike it if you would rather keep the ceiling tight as a regression tripwire. I would not object.Submission Checklist
N/A: build-profile configuration change.There is no unit test for "the release build is fast enough"; the evidence is the matrix run above, with Windows and a same-day debug build as controls.N/A: no executable lines changed.The diff is Cargo profile keys, a workflow timeout value and comments.N/A: no feature added, removed or renamed.## Related—N/A: no matrix feature IDs touched.N/A: build timing only; no packaging, signing or artifact surface changes.Closes #NNN— deliberately not closing. See## Related.Impact
codegen-unitsin any way I can measure here;lto = "thin"still does cross-crate inlining.app/src-tauri-mobile) moves in lockstep as its own comment requires, so the iOS/Android lanes get the same change.Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
Validation Run
pnpm --filter openhuman-app format:check— ran, clean (pre-commit hook; prettier +cargo fmtboth pass).pnpm typecheck— N/A: no TypeScript changed.cargo fmt --checkran clean via the pre-commit hook on both manifests. A fullcargo checkwas not run locally — a release-profile build is precisely the 45-minute operation under discussion; CI is the right place for it.cargo fmt --checkonapp/src-tauriclean via the same hook.Validation Blocked
command:localcargo build --releaseto measure binary sizeerror:not blocked by tooling — declined on cost/disk grounds (~25-35GB oftarget/and ~45 minutes per world)impact:the size claim is stated as an expectation, not a measurement. Flagged for a reviewer.Behavior Changes
Parity Contract
ltoandstripunchanged, so the debug-symbol/dSYM and Sentry symbolication path (Sentry events from production lack source maps, release tag, and OS context #1403) is untouched.[profile.ci]still overrides all three keys, so PR-lane timings are unchanged.Duplicate / Superseded PR Handling
Summary by CodeRabbit