Skip to content

fix(deps): gate native input crates behind voice - #5225

Draft
samrusani wants to merge 1 commit into
tinyhumansai:mainfrom
samrusani:codex/5197-gate-voice-input-deps
Draft

fix(deps): gate native input crates behind voice#5225
samrusani wants to merge 1 commit into
tinyhumansai:mainfrom
samrusani:codex/5197-gate-voice-input-deps

Conversation

@samrusani

@samrusani samrusani commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Make arboard, enigo, and rdev optional root dependencies.
  • Enable all three explicitly through the existing default-on voice feature.
  • Let slim/headless builds omit the native clipboard, input-simulation, and global-hotkey stack without changing the shipped desktop feature set.

Problem

The only production imports of these crates live in modules compiled behind feature = "voice", but the dependencies were unconditional. As a result, --no-default-features builds still retained native text-input dependencies even though the voice domain was absent.

Solution

The root manifest now marks each dependency optional and adds the corresponding dep: edge to voice. The feature documentation names the newly gated dependencies. No source or lockfile change is required: enabled voice builds resolve the same crate versions and compile the same modules as before.

Submission Checklist

If a section does not apply to this change, mark the item as N/A with a one-line reason. Do not delete items.

  • Tests added or updated (happy path + at least one failure / edge case) per Testing Strategy - N/A: manifest-only dependency wiring; the existing 200-test voice suite passed under the minimal voice feature set, and dependency-tree checks covered both disabled and enabled configurations.
  • Diff coverage >= 80% - N/A: only Cargo.toml dependency metadata and comments changed; there are no executable changed lines.
  • Coverage matrix updated - N/A: no feature row was added, removed, or renamed; this narrows dependencies behind the existing voice gate.
  • All affected feature IDs from the matrix are listed in the PR description under ## Related - N/A: no coverage-matrix feature ID applies.
  • No new external network dependencies introduced - the same three existing dependencies are now optional.
  • Manual smoke checklist updated if this touches release-cut surfaces - N/A: no release flow or user-facing surface changed.
  • Linked issue closed via Closes #NNN in the ## Related section.

Impact

  • Slim/headless builds without voice no longer resolve arboard, enigo, or rdev.
  • Default root builds and the desktop shell still enable voice, so shipped clipboard insertion and global-hotkey behavior are unchanged.
  • No persisted data, RPC, frontend, or runtime behavior changes.

Related


AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

Commit & Branch

  • Branch: codex/5197-gate-voice-input-deps
  • Commit SHA: 28e853cd50d0a80b0f31a03966cd0d7cd5b725f0

Validation Run

  • pnpm --filter openhuman-app format:check - N/A: no frontend files changed; cargo fmt --all -- --check passed.
  • pnpm typecheck - N/A: no TypeScript changed.
  • Focused tests: GGML_NATIVE=OFF cargo test --locked --lib --no-default-features --features voice 'openhuman::voice::' - 200 passed, 0 failed.
  • Rust fmt/check (if changed): cargo fmt --all -- --check; GGML_NATIVE=OFF cargo check --locked --no-default-features --lib; GGML_NATIVE=OFF cargo check --locked --no-default-features --features voice --lib; GGML_NATIVE=OFF cargo check --locked --lib; node scripts/ci/check-feature-forwarding.mjs.
  • Tauri fmt/check (if changed) - N/A: no Tauri files changed; the shell check is blocked locally as documented below and is left to CI.

Dependency-graph proof:

  • cargo tree --locked --no-default-features -i arboard|enigo|rdev reports that each package ID is absent.
  • The same three commands with --features voice resolve each crate directly from openhuman.

Validation Blocked

  • command: pnpm rust:check

  • error: the clean worktree does not initialize app/src-tauri/vendor/tauri-cef, so Cargo cannot read vendor/tauri-cef/crates/tauri/Cargo.toml (OS error 2). The command also reports the local Node 22 version below the app's Node 24 requirement.

  • impact: Tauri-shell compilation is left to CI. The diff contains no Tauri source changes; the root crate passes the exact minimal voice build, the default build, and the feature-forwarding guard that verifies the shell still forwards voice.

  • command: GGML_NATIVE=OFF cargo test --locked --lib 'openhuman::mcp_server::resources::tests::' on untouched origin/main at dcc5b9b251f18e74b9b1ea9a3175cf1221dcacfb

  • error: 7 tests pass and 2 fail because RESOURCE_CATALOG is missing the flow_memory_agent added by feat(flows): general read-only flow memory-agent (#5204) #5205; the same two tests fail in this PR's Rust Core Coverage job.

  • impact: this current-main resource-catalog regression is unrelated to the one-file Cargo.toml diff. The PR remains draft until an upstream catalog fix lands and CI can be rerun green.

Behavior Changes

  • Intended behavior change: builds without voice exclude the native clipboard/input/hotkey dependencies.
  • User-visible effect: none; default desktop builds still enable voice and retain existing behavior.

Parity Contract

  • Legacy behavior preserved: the default root feature set and desktop shell both continue to enable voice, which restores all three dependencies and their existing modules.
  • Guard/fallback/dispatch parity checks: disabled and enabled dependency trees were checked separately; the minimal voice build and 200 voice tests passed; the desktop feature-forwarding guard passed.

Duplicate / Superseded PR Handling

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 657e972d-236a-48f3-96d5-08c03d68dcdc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@samrusani

Copy link
Copy Markdown
Contributor Author

CI note: the Rust Core Coverage failure is reproducible on untouched origin/main at dcc5b9b251f18e74b9b1ea9a3175cf1221dcacfb.

GGML_NATIVE=OFF cargo test --locked --lib 'openhuman::mcp_server::resources::tests::' passes 7 resource tests and fails the same 2 shown in CI:

  • catalog_mirrors_builtins
  • read_resource_returns_content_for_each_subagent

Both report that flow_memory_agent, added by #5205, is missing from RESOURCE_CATALOG. This PR's diff is limited to Cargo.toml, so I am keeping it draft until the upstream catalog regression is fixed and the coverage lane can be rerun green. I have not bundled that unrelated fix into #5225.

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.

Gate native text-input dependencies behind the voice feature

1 participant