Skip to content

fix(app): forward voice + tokenjuice-treesitter to the desktop build#4916

Open
oxoxDev wants to merge 2 commits into
tinyhumansai:mainfrom
oxoxDev:fix/app-forward-voice-tokenjuice
Open

fix(app): forward voice + tokenjuice-treesitter to the desktop build#4916
oxoxDev wants to merge 2 commits into
tinyhumansai:mainfrom
oxoxDev:fix/app-forward-voice-tokenjuice

Conversation

@oxoxDev

@oxoxDev oxoxDev commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Forwards voice and tokenjuice-treesitter to the core dependency in app/src-tauri/Cargo.toml, which consumes the core with default-features = false.
  • Fixes a regression already shipped in v0.61.2: the desktop app is currently built with the voice facade's disabled stub — dictation, TTS, and podcast audio are absent from the shipped binary.
  • Also restores tree-sitter-backed TokenJuice compression, which has been silently falling back to its brace-depth heuristic in the desktop app.
  • Two-line manifest change; the lockfile delta is the evidence.

Problem

app/src-tauri/Cargo.toml declares the core as:

openhuman_core = { path = "../..", package = "openhuman", default-features = false, features = [
    "media",
] }

default-features = false means the desktop app only receives features listed explicitly. The core's default = ["tokenjuice-treesitter", "voice", "media"] does not apply.

The voice gate (#4803 / PR #4833, merged 2026-07-14) moved openhuman::voice + openhuman::audio_toolkit behind a default-ON voice feature but did not add it here. tokenjuice-treesitter has never been forwarded.

Consequences in the shipped desktop build:

  • openhuman::voice compiles to its #[cfg(not(feature = "voice"))] stub, so the voice/audio controllers are unregistered — openhuman.voice_* returns unknown-method and the namespaces are absent from /schema.
  • The dictation / TTS / podcast agent tools are absent from the tool belt.
  • TokenJuice uses the brace-depth heuristic rather than tree-sitter.

Why nothing caught it. The app compiles cleanly either way — silent absence is precisely what a correct gate produces. The Rust Feature-Gate Smoke lane checks the core manifest, not the app's. No test asserts the shipped app's tool surface.

Blast radius. v0.61.2 (tagged 2026-07-15) is the first release cut from a release branch containing the voice gate, so it is the first affected shipped build. v0.61.0 and earlier predate the promotion and are unaffected — verified by inspecting src/openhuman/voice/mod.rs at each tag (26 #[cfg(feature = "voice")] sites at v0.61.2, zero at v0.61.0).

Solution

Add the two missing features to the existing multi-line array:

openhuman_core = { path = "../..", package = "openhuman", default-features = false, features = [
    "media",
    "voice",
    "tokenjuice-treesitter",
] }

The array shape is kept multi-line so sibling gate PRs (#4912 flows, #4913 skills, #4914 mcp, #4915 meet) each append one line without reflowing.

The lockfile delta is the proof this was real. app/src-tauri/Cargo.lock gains:

  • hound and lettre — voice's exclusive dependencies, per the gate table in AGENTS.md
  • tree-sitter, tree-sitter-python, tree-sitter-rust, tree-sitter-typescript, streaming-iterator

These were absent from the desktop app's dependency graph entirely, confirming the voice code was never compiled into the shipped binary.

Follow-up (not in this PR). The underlying gap is that CI cannot see this class of defect: the feature-gate smoke lane runs cargo check, which never links a binary or compiles test code. A separate PR will add a cargo test --no-default-features step and cfg the two all_tests.rs assertions that currently fail in the disabled config.

Submission Checklist

  • N/A: manifest-only change — the restored behaviour is the pre-feat(core): feature gate — voice #4803 desktop surface, already covered by existing voice tests in the default (enabled) configuration. No new logic to test.
  • N/A: no changed lines are executable code — diff-cover has no Rust/TS statements to measure in a Cargo manifest + lockfile.
  • N/A: behaviour-only change — restores an existing feature surface; no matrix rows added, removed, or renamed.
  • N/A: no matrix feature IDs affected by this change.
  • No new external network dependencies introduced — hound, lettre, and the tree-sitter* crates are already core dependencies; this only re-enables them for the desktop build.
  • N/A: this restores a release-cut surface rather than changing one; the existing manual smoke steps for dictation/TTS already cover it.
  • Linked issue closed via Closes in the ## Related section

Impact

  • Platform: desktop (all OSes). No CLI, mobile, or web impact — the core binary and CLI already build with default features.
  • User-visible: restores dictation, TTS, always-on listening, and podcast audio to the desktop app; restores tree-sitter-backed context compression.
  • Binary size: increases the desktop bundle by the hound / lettre / tree-sitter* crates — this is the intended pre-gate baseline, not a regression.
  • Migration/compat: none. No wire-contract, schema, or config change.
  • Security: none.
  • Risk: low. Two lines of manifest; verified by cargo check on the app manifest.

Related


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

Linear Issue

  • Key: N/A — GitHub-issue driven
  • URL: N/A

Commit & Branch

  • Branch: fix/app-forward-voice-tokenjuice
  • Commit SHA: 514a5b521

Validation Run

  • N/A: pnpm --filter openhuman-app format:check — no frontend files changed
  • N/A: pnpm typecheck — no TypeScript changed
  • N/A: Focused tests — no logic changed; see checklist rationale
  • N/A: Rust fmt/check (core) — no core source changed
  • Tauri fmt/check: GGML_NATIVE=OFF cargo check --manifest-path app/src-tauri/Cargo.toml passes (2m41s)
  • Feature forwarding verified: cargo tree --manifest-path app/src-tauri/Cargo.toml -e features -i openhuman reports media, tokenjuice-treesitter, voice

The Tauri shell consumes the core with `default-features = false`, so every
core feature the desktop app needs must be listed explicitly. The voice gate
(tinyhumansai#4803) moved `openhuman::voice` + `openhuman::audio_toolkit` behind a
default-ON `voice` feature but never added it here, and `tokenjuice-treesitter`
has never been forwarded either.

Effect on the shipped app: the voice facade compiled to its disabled stub, so
`openhuman.voice_*` answered unknown-method, the dictation/TTS/podcast tools
were absent from the agent tool belt, and TokenJuice fell back to its
brace-depth heuristic instead of tree-sitter. Nothing caught it — the app
compiles either way, and silent absence is exactly what a clean gate produces.

v0.61.2 (tagged 2026-07-15) is the first release carrying the gate, so it is
the first shipped build affected; v0.61.0 and earlier predate the promotion and
are unaffected.

The lockfile delta is the proof: `hound` and `lettre` (voice's exclusive deps,
per the gate table in AGENTS.md) and the `tree-sitter*` crates were absent from
the app's dependency graph entirely and are restored by this change.

Verified: `cargo check --manifest-path app/src-tauri/Cargo.toml` passes, and
`cargo tree --manifest-path app/src-tauri/Cargo.toml -e features -i openhuman`
now reports media + voice + tokenjuice-treesitter.
@oxoxDev oxoxDev requested a review from a team July 15, 2026 14:41
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 26 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4426a8f1-e718-458a-b378-8977d75eec18

📥 Commits

Reviewing files that changed from the base of the PR and between d320c43 and 612147d.

⛔ Files ignored due to path filters (1)
  • app/src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • app/src-tauri/Cargo.toml

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

oxoxDev added a commit to oxoxDev/openhuman that referenced this pull request Jul 15, 2026
…inyhumansai#4797)

The flows controllers are cfg-gated out of the slim build (src/core/all.rs),
so openhuman.flows_* become unknown JSON-RPC methods there. The eight flows
cases in tests/json_rpc_e2e.rs called them unconditionally and asserted
success, which would fail once the target compiles in the slim direction.

Gate the eight tests plus their four flows-only helpers so the disabled-build
suite skips them. Verified with voice on / flows off (isolating the
pre-existing voice test_seam gap tracked in tinyhumansai#4916):
  cargo check --no-default-features --features tokenjuice-treesitter,voice --test json_rpc_e2e
-> 0 errors, no unused-helper warnings. Default build unchanged.
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.

feat(core): feature gate — voice

2 participants