fix(app): forward voice + tokenjuice-treesitter to the desktop build#4916
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Tauri shell now forwards the ChangesTauri feature forwarding
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
…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.
…ce-tokenjuice # Conflicts: # app/src-tauri/Cargo.toml
M3gA-Mind
left a comment
There was a problem hiding this comment.
Approving.
The desktop app depends on openhuman with default-features = false and an explicit feature list that omitted tokenjuice-treesitter, so the shipped build silently lost AST-aware code compression and fell back to the brace-depth heuristic in src/openhuman/tokenjuice/compressors/code.rs. This restores it.
Verified against fresh upstream/main:
app/src-tauri/Cargo.toml— addstokenjuice-treesitterto the explicit list;tokenjuice-treesitter = ["tinyjuice/tinyjuice-treesitter"]in the core[features]block confirms the target.Cargo.lock— purely additive (+61 lines, zero removals, no version churn). The newtree-sitter/tree-sitter-{python,rust,typescript}/tree-sitter-language/streaming-iteratorentries are exactly the transitive closure that feature enables.- CI — all required checks green, including Rust Tauri Coverage, which actually compiles the Tauri build with the new feature set. That is the lane that matters for a build-config change.
Minimal, low-risk, correctly scoped. No changes requested.
…inyhumansai#4916) Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
Summary
voiceandtokenjuice-treesitterto the core dependency inapp/src-tauri/Cargo.toml, which consumes the core withdefault-features = false.Problem
app/src-tauri/Cargo.tomldeclares the core as:default-features = falsemeans the desktop app only receives features listed explicitly. The core'sdefault = ["tokenjuice-treesitter", "voice", "media"]does not apply.The voice gate (#4803 / PR #4833, merged 2026-07-14) moved
openhuman::voice+openhuman::audio_toolkitbehind a default-ONvoicefeature but did not add it here.tokenjuice-treesitterhas never been forwarded.Consequences in the shipped desktop build:
openhuman::voicecompiles 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.Why nothing caught it. The app compiles cleanly either way — silent absence is precisely what a correct gate produces. The
Rust Feature-Gate Smokelane 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 areleasebranch containing the voice gate, so it is the first affected shipped build.v0.61.0and earlier predate the promotion and are unaffected — verified by inspectingsrc/openhuman/voice/mod.rsat each tag (26#[cfg(feature = "voice")]sites atv0.61.2, zero atv0.61.0).Solution
Add the two missing features to the existing multi-line array:
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.lockgains:houndandlettre— voice's exclusive dependencies, per the gate table inAGENTS.mdtree-sitter,tree-sitter-python,tree-sitter-rust,tree-sitter-typescript,streaming-iteratorThese 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 acargo test --no-default-featuresstep and cfg the twoall_tests.rsassertions that currently fail in the disabled config.Submission Checklist
diff-coverhas no Rust/TS statements to measure in a Cargo manifest + lockfile.hound,lettre, and thetree-sitter*crates are already core dependencies; this only re-enables them for the desktop build.Closesin the## RelatedsectionImpact
hound/lettre/tree-sitter*crates — this is the intended pre-gate baseline, not a regression.cargo checkon the app manifest.Related
featuresarray: feat(core): compile-time flows feature gate (#4797) #4912 (flows), feat(core): compile-time skills feature gate (#4798) #4913 (skills), feat(core): compile-time mcp feature gate (#4799) #4914 (mcp), feat(core): compile-time meet feature gate (#4800) #4915 (meet), feat(web3): compile-time web3 feature gate for wallet/web3/x402 (#4802) #4855 (web3)cargo test --no-default-featuresto the feature-gate smoke lane and cfg the two pre-existingvoiceassertions insrc/core/all_tests.rs(group_mapping_smoke,harness_excludes_gated_namespaces) that fail in the disabled config today. Every future gate needs its feature forwarded here — worth adding to the epic's Definition of Done.AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
fix/app-forward-voice-tokenjuice514a5b521Validation Run
pnpm --filter openhuman-app format:check— no frontend files changedpnpm typecheck— no TypeScript changedGGML_NATIVE=OFF cargo check --manifest-path app/src-tauri/Cargo.tomlpasses (2m41s)cargo tree --manifest-path app/src-tauri/Cargo.toml -e features -i openhumanreportsmedia,tokenjuice-treesitter,voiceSummary by CodeRabbit