Skip to content

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

Merged
M3gA-Mind merged 3 commits into
tinyhumansai:mainfrom
oxoxDev:fix/app-forward-voice-tokenjuice
Jul 16, 2026
Merged

fix(app): forward voice + tokenjuice-treesitter to the desktop build#4916
M3gA-Mind merged 3 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

Summary by CodeRabbit

  • Bug Fixes
    • Improved support for token-aware processing in the application.
    • Enhanced compatibility with Tree-sitter-based tokenization.

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

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b4152a46-8264-405f-acc6-a2a692b44810

📥 Commits

Reviewing files that changed from the base of the PR and between 97ade54 and 0282564.

⛔ 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

📝 Walkthrough

Walkthrough

The Tauri shell now forwards the tokenjuice-treesitter compile-time feature to its embedded openhuman_core dependency.

Changes

Tauri feature forwarding

Layer / File(s) Summary
Forward treesitter feature
app/src-tauri/Cargo.toml
Adds tokenjuice-treesitter to the forwarded openhuman_core feature list.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related issues

Possibly related PRs

Suggested labels: feature

Suggested reviewers: codeghost21

Poem

A rabbit hops through Cargo’s gate,
Treesitter joins the feature fête.
One small flag is passed along,
The Tauri shell now builds more strong.
“Hop hop!” says Bun. 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The diff only adds tokenjuice-treesitter forwarding; #4803 requires the voice feature and related desktop gating, which aren’t shown here. Also forward the voice feature in the desktop build and update the related core/domain gating per #4803.
✅ 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 is relevant to the diff, but it’s broader than the actual change since only tokenjuice-treesitter was added.
Out of Scope Changes check ✅ Passed No unrelated changes are shown; the single Cargo.toml edit matches the PR’s stated feature-forwarding goal.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.
@coderabbitai coderabbitai Bot added the feature Net-new user-facing capability or product behavior. label Jul 16, 2026

@M3gA-Mind M3gA-Mind left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 — adds tokenjuice-treesitter to 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 new tree-sitter / tree-sitter-{python,rust,typescript} / tree-sitter-language / streaming-iterator entries 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.

@M3gA-Mind
M3gA-Mind merged commit 2566f3b into tinyhumansai:main Jul 16, 2026
21 of 22 checks passed
senamakel added a commit to M3gA-Mind/openhuman that referenced this pull request Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Net-new user-facing capability or product behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(core): feature gate — voice

3 participants