Skip to content

fix(tauri): rename misleading ci feature and fail loudly without it…#1354

Open
VanshajPoonia wants to merge 2 commits into
AOSSIE-Org:mainfrom
VanshajPoonia:fix/1347-prod-sidecar-feature-flag
Open

fix(tauri): rename misleading ci feature and fail loudly without it…#1354
VanshajPoonia wants to merge 2 commits into
AOSSIE-Org:mainfrom
VanshajPoonia:fix/1347-prod-sidecar-feature-flag

Conversation

@VanshajPoonia

@VanshajPoonia VanshajPoonia commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #1347

Screenshots/Recordings:

N/A — this is a backend/build-config fix (Rust feature flag rename + CI workflow args), no UI changes.

Additional Notes:

The prod() function that spawns the bundled backend/sync sidecars was gated behind a Cargo feature named ci, which reads as "only needed for continuous integration." In reality it's required for every working release build — both pr-check-build.yml and build-and-release.yml already pass --features ci to all of them. A release build compiled without that flag still launched normally, but silently never started its backend, with no error.

Changes:

  • Renamed the feature from ci to bundled-sidecars everywhere it's referenced (Cargo.toml, main.rs cfg attributes, both workflow files) so its purpose is clear from the name.
  • Made the no-feature prod() variant fail loudly (return an Err that aborts startup) when built in release mode, while still no-op'ing in debug builds so cargo tauri dev is unaffected.
  • Verified with cargo check against both feature combinations (with/without bundled-sidecars, debug and release) and cargo fmt --check — all clean.

AI Usage Disclosure:

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.

Check one of the checkboxes below:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: Codex

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • New Features

    • Release builds now use bundled sidecars for the app’s backend and sync processes on macOS, Linux, and Windows.
    • Added clearer runtime feedback when bundled sidecars are enabled.
  • Bug Fixes

    • Release builds now report an error if bundled sidecars are missing, instead of failing silently.
    • Updated build checks to match the new release configuration.

…AOSSIE-Org#1347)

The `prod()` function that spawns the bundled backend/sync sidecars was
gated behind a feature named `ci`, which reads as "only needed for
continuous integration." In reality it's required for every working
release build (pr-check-build.yml and build-and-release.yml already
pass --features ci to all of them). A release build without that flag
compiled fine and launched normally, but silently never started its
backend.

- Rename the feature to `bundled-sidecars` everywhere it's referenced
  (Cargo.toml, main.rs cfg attributes, both workflow files) so its
  purpose is clear from the name.
- Make the no-feature `prod()` variant fail loudly (return an Err that
  aborts startup) when built in release mode, while still no-op'ing in
  debug builds so `cargo tauri dev` is unaffected.
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@VanshajPoonia, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 30 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4b2e3c83-7871-4603-a164-b4d27c692f48

📥 Commits

Reviewing files that changed from the base of the PR and between 5275448 and 0562b2a.

📒 Files selected for processing (1)
  • frontend/src-tauri/src/main.rs

Walkthrough

Renames the Tauri Cargo feature ci to bundled-sidecars across Cargo.toml, main.rs, and both CI workflows. The fallback prod implementation (when the feature is absent) now returns an explicit error in non-debug release builds instead of silently succeeding.

Changes

bundled-sidecars feature rename and error guard

Layer / File(s) Summary
Cargo feature rename and sidecar gate logic
frontend/src-tauri/Cargo.toml, frontend/src-tauri/src/main.rs
Replaces ci = [] with bundled-sidecars = [] (with added doc comments), updates all #[cfg(feature = "ci")] / #[cfg(not(feature = "ci"))] gates to bundled-sidecars, and makes the non-feature prod path return Err in non-debug release builds.
CI workflow matrix update
.github/workflows/build-and-release.yml, .github/workflows/pr-check-build.yml
Switches --features ci to --features bundled-sidecars in all matrix args entries for macOS, Ubuntu, and Windows.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • AOSSIE-Org/PictoPy#492: Adds sync microservice build and startup wiring that is directly affected by the sidecar feature flag being renamed here.

Suggested labels

Rust

🐇 A feature called ci was quite the disguise,
It silently failed right before your eyes!
Now bundled-sidecars rings loud and clear,
Release builds that break will shout loud with fear.
No more silent no-ops — the rabbit hops on! 🎉

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the feature rename and the new loud failure behavior in release builds.
Linked Issues check ✅ Passed The PR renames ci to bundled-sidecars and makes release builds without it error, satisfying #1347.
Out of Scope Changes check ✅ Passed The changes stay focused on the Tauri feature rename, workflow updates, and startup behavior required by the issue.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Extract the no-op/fail-loudly decision into prod_without_bundled_sidecars()
so it's testable without mocking tauri::AppHandle (the no-feature prod()
variant never touches its app/resource_path args). Add a test asserting
it no-ops under debug_assertions and errors otherwise, verified to pass
under both `cargo test` and `cargo test --release`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Production backend/sync sidecars only spawn under the ci Cargo feature - misnamed flag is a silent footgun

1 participant