Summary
The desktop app is built without the core's default tokenjuice-treesitter feature, so AST-aware code compression silently falls back to the brace-depth heuristic in every shipped build. Same root cause as #4901, but it fails soft — no error, no Sentry signal, just quietly worse output.
Problem
app/src-tauri/Cargo.toml declares the core with default-features = false. That line predates the core having any defaults (written 2026-05-16, when [features] had no default list), so it silently drops each default the core later gained. #4901 fixed voice; tokenjuice-treesitter — the core's other default — is still dropped.
What happens: tokenjuice-treesitter = ["tinyjuice/tinyjuice-treesitter"] is never enabled for the shipped binary, so tinyjuice uses the brace-depth heuristic instead of tree-sitter grammars.
What's expected: the desktop app compresses code with the AST-aware path, as default = ["tokenjuice-treesitter", "voice"] intends.
Steps to reproduce (same probe + control that diagnosed #4901):
# Shell (what ships) — tree-sitter ABSENT
cd app/src-tauri && cargo tree -i tree-sitter
# error: package ID specification `tree-sitter` did not match any packages
# Control: root crate (tokenjuice-treesitter default-ON) — tree-sitter PRESENT
cd ../.. && GGML_NATIVE=OFF cargo tree -i tree-sitter
# tree-sitter v0.26.10
# └── tinyjuice v0.2.1 → openhuman v0.61.2
Version/platform: verified on upstream/main @ 0e86b85c9 (macOS). Affects all desktop platforms and every release since the feature became a default.
Unlike #4901 this is not user-visible as an error — it degrades output quality silently, which is why it has gone unnoticed.
Solution (optional)
Likely one line — add tokenjuice-treesitter to the openhuman_core feature list in app/src-tauri/Cargo.toml:
openhuman_core = { path = "../..", package = "openhuman", default-features = false, features = [
"voice",
"tokenjuice-treesitter",
] }
Decide first whether the drop is intentional. The shell separately declares tinyjuice = { version = "0.2.1", default-features = false }, which hints the tree-sitter C build may be avoided deliberately (build time / cross-compilation). If so, the fix is to document that on the default list rather than enable it. This is exactly why it was excluded from #4917 instead of bundled in.
Enabling it adds tree-sitter's C grammar build to the desktop build — measure the build-time and binary-size cost before merging.
Acceptance criteria
Related
Summary
The desktop app is built without the core's default
tokenjuice-treesitterfeature, so AST-aware code compression silently falls back to the brace-depth heuristic in every shipped build. Same root cause as #4901, but it fails soft — no error, no Sentry signal, just quietly worse output.Problem
app/src-tauri/Cargo.tomldeclares the core withdefault-features = false. That line predates the core having any defaults (written 2026-05-16, when[features]had nodefaultlist), so it silently drops each default the core later gained. #4901 fixedvoice;tokenjuice-treesitter— the core's other default — is still dropped.What happens:
tokenjuice-treesitter = ["tinyjuice/tinyjuice-treesitter"]is never enabled for the shipped binary, so tinyjuice uses the brace-depth heuristic instead of tree-sitter grammars.What's expected: the desktop app compresses code with the AST-aware path, as
default = ["tokenjuice-treesitter", "voice"]intends.Steps to reproduce (same probe + control that diagnosed #4901):
Version/platform: verified on
upstream/main@0e86b85c9(macOS). Affects all desktop platforms and every release since the feature became a default.Unlike #4901 this is not user-visible as an error — it degrades output quality silently, which is why it has gone unnoticed.
Solution (optional)
Likely one line — add
tokenjuice-treesitterto theopenhuman_corefeature list inapp/src-tauri/Cargo.toml:Decide first whether the drop is intentional. The shell separately declares
tinyjuice = { version = "0.2.1", default-features = false }, which hints the tree-sitter C build may be avoided deliberately (build time / cross-compilation). If so, the fix is to document that on thedefaultlist rather than enable it. This is exactly why it was excluded from #4917 instead of bundled in.Enabling it adds tree-sitter's C grammar build to the desktop build — measure the build-time and binary-size cost before merging.
Acceptance criteria
cargo tree -i tree-sitterfromapp/src-tauriresolves the crate (or the intentional-drop decision is documented).Related
default-features = false)tokenjuice-treesitterwork