openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Define slim and headless dependency profiles for large default-on feature groups

Open senamakel opened this issue 4 months ago • 3 comments

Problem

The root crate's default feature set is appropriate for the all-in-one CLI, but it makes headless/core consumers opt out manually. Dependency-graph measurements on Linux show these feature-exclusive package counts:

Feature Approximate exclusive packages
documents 48
tui 30
flows 21
crash-reporting 19
web3 11
tokenjuice-treesitter 6
inference 6
http-server 4

The documents group is especially expensive: docx-rs, ppt-rs, and pdf-extract retain an older zip 0.6 tree alongside the root zip 2.x, plus PDF/font parsers and compression libraries. The TUI is already intentionally omitted from the desktop shell but remains default-on for every standalone core build.

Proposed direction

Define explicit supported build profiles rather than requiring consumers to maintain ad-hoc feature lists. Options include:

  • A dedicated headless/core package or wrapper feature with a documented minimal set.
  • Splitting the TUI into a separate binary/package while preserving CLI compatibility.
  • Making document generation an optional/installable capability for deployments that do not need it.
  • CI jobs that build and report dependency/binary-size deltas for full desktop, full CLI, headless API, and embedded library profiles.

Definition of done

  • Named, documented full CLI, desktop, headless API, and embedded-library configurations exist.
  • Each configuration is built in CI.
  • Headless/embedded configurations exclude TUI and documents unless explicitly requested.
  • Release behavior and existing desktop feature forwarding remain unchanged.
  • CI records package-count and release-binary size baselines so regressions are visible.

senamakel avatar Jul 25 '26 15:07 senamakel

Verified — unimplemented on main (6be58a9ab). The DoD is unmet on every line, though some groundwork has landed.

No named profiles exist. The root [features] table has no headless, slim, embedded, desktop, cli, or full entry. The full list is still the capability-flag set the issue describes:

default, http-server, inference, documents, hosting, modules, voice, web3,
runtime-node, contacts, media, flows, skills, mcp, crash-reporting, tui,
medulla, channels, sandbox-landlock, sandbox-bubblewrap, peripheral-rpi,
browser-native, fantoccini, landlock, whatsapp-web, e2e-test-support,
rss-bench, rss-bench-dhat, file-logging, scheduler-gate, bin-tools

So a headless consumer still assembles its own list, which is the exact "ad-hoc feature lists" the issue asks to replace.

Against the Definition of Done:

DoD item status
Named, documented full-CLI / desktop / headless-API / embedded-library configurations exist ✗ no named profile features
Each configuration is built in CI ✗ partially — see below
Headless/embedded exclude TUI and documents unless requested ~ achievable only via --no-default-features + an explicit list
Release behavior and desktop feature forwarding unchanged n/a — nothing changed
CI records package-count and release-binary-size baselines ✗ no baseline recorded anywhere

What has landed since filing is real and worth crediting, because it makes the remaining work smaller:

  • A gates-off CI lane exists (.github/workflows/ci-lite.yml:465-591) that runs cargo check --no-default-features plus a handful of single-feature combinations (--features tui, --features e2e-test-support, --features mcp, --features flows). That is the "does it still compile without defaults" half.
  • examples/embed_headless.rs exists as a working embedded-library entry point (referenced from Cargo.toml:758).
  • The feature table is now heavily documented in situ — Cargo.toml carries explicit "Slim / headless builds opt out via …" notes on the expensive default-ON groups (:845, :885, :914, :948, :988, :1037), and :426 names a "headless embedding target (#5046)".

The gap between that and the DoD is the part with the leverage: those notes describe profiles in prose without ever naming one, so nothing is enforceable and nothing is measured. A consumer reading Cargo.toml:885 learns which flag to drop but still hand-maintains the list, and no CI job would notice if documents became transitively required again.

Suggested smallest next step

The cheapest DoD progress is probably the measurement half rather than the profile half: add package-count and binary-size reporting to the existing gates-off lane, which already builds the configurations in question. That establishes the baselines the last DoD item asks for and makes the dependency table in this issue reproducible rather than a one-off measurement — useful regardless of how the named profiles eventually get carved.

Worth re-running the exclusive-package table before acting on it, too: it was measured 2026-07-25 and the documents group's zip 0.6 / zip 2.x split in particular may have shifted since.

Leaving open.

YellowSnnowmann avatar Sep 11 '26 09:09 YellowSnnowmann

Triage: needs opinion — “Define slim and headless dependency profiles for large default-on feature groups” needs a maintainer decision on product scope/priority or fresh reproduction evidence before its status can be settled. Please advise whether to pursue, narrow, or close it.

senamakel avatar Oct 09 '26 17:10 senamakel

Thanks. On current main there's still no named headless or slim feature profile, though some groundwork has landed since July (separate TUI and embed crates, a product feature list, and a smaller contributor default in the core crate). Defining the profiles is still open. It needs a maintainer's decision on which feature groups a headless build should drop.

M3gA-Mind avatar Nov 16 '26 16:11 M3gA-Mind