fix(hosting): compile the hosting family into the product - #5619
Conversation
The `hosting` family has never been compiled in any configuration. Its gate in
the root Cargo.toml declares its own intent:
# ... Default-OFF, product-ON: a host with no hosting credential has no use
# for the tools, and an agent that can deploy to the internet is authority a
# headless embedding should have to ask for.
but `hosting` appears in neither `scripts/ci/product-features.txt` nor the
shell's forwarding list in `app/src-tauri/Cargo.toml`, and it is not in
`default`. So 1,643 lines - including a 511-line test file and nine `hosting_*`
agent tools - are compiled by nothing, tested by nothing, and shipped in
nothing.
This is the same shape as tinyhumansai#4901, where `voice` shipped missing to 56 users. The
feature-forwarding gate built to prevent a recurrence passes here, because it
asserts set equality between two lists and `hosting` is absent from both. A gate
cannot catch a feature nobody told it about.
It also explains the CI observation in tinyhumansai#5593: `Rust Core Coverage` reported
success having run `0 tests; 12202 filtered out`, because the feature under test
was in no CI command.
Everything else is already wired correctly - `src/openhuman/mod.rs:29` declares
the module behind the gate, and `tools/ops.rs:1031` registers the tools. That
registration is credential-gated on `Account::from_config`, so enabling the
feature adds no tools for a host without `[hosting].api_key` or the provider's
environment variable. Users who have not configured hosting see no change.
Verified `scripts/ci/check-feature-forwarding.mjs` passes with both lists moved
together (19 shell forwards).
Refs tinyhumansai#5578
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe desktop application now forwards the ChangesHosting feature enablement
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change compiles the hosting family into the product and activates its CI coverage without exposing tools to users lacking credentials. No actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
`scripts/ci/product-features.txt` decides which gates the Rust lanes compile — clippy's `--features`, the test suite's, and `rust-coverage-changed.sh`'s all read it through `scripts/ci/product-features.sh`. It was in no path filter, so changing the product's feature set did not arm the lanes that build the product. This PR is the demonstration. Its `Detect Changed Areas` job resolved `Changes output set to ["rust-tauri"]`, leaving `rust-core` false, so both clippy steps were skipped and Rust Core Coverage never queued — on the one PR whose entire purpose is to make `openhuman::hosting` compile for the first time. It would have gone green having compiled none of it. That is the same shape as tinyhumansai#5613: a lane that reports success because it was scoped to nothing. Adds the glob to `rust-core` and to `rust-core-full`. It belongs in both for the reason `Cargo.toml` is in both — a feature-set change alters what compiles, which invalidates per-module test scoping. The glob covers `product-features.sh` too, since the parser decides the same thing.
Pushed
|
Green — and the risk in the description is discharged, with evidenceAll 21 checks pass on The lanes ran, and in full-suite mode. clippy genuinely linted the family: All three clippy steps executed — product set, contributor set, Tauri shell — none skipped. Zero findings. So And the 511-line Suite totals: 13,058 passed, 0 failed. Not the So the claim in the description now has evidence behind it: the family is sound, and it had simply never been built. One caveat I would rather state than let you infer. This run armed If you want that locked in, the natural home is a case in Not requesting CodeRabbit re-approval — it re-reviewed |
Resolves the ci-lite.yml conflict in the `rust-core` and `rust-core-full` path filters by keeping BOTH sides. They are the same class of hole in different places — a file that decides what the Rust lanes compile without itself arming those lanes — so dropping either reopens one: from tinyhumansai#5619 scripts/ci/product-features.* (decides what compiles) from tinyhumansai#5621 scripts/ci/assert-coverage-presence.sh scripts/ci/coverage-presence-allowlist.txt (decides what fails) Also in this commit, two things main made true or CI made visible. Empty the allowlist. tinyhumansai#5619 merged and put `hosting` in product-features.txt, so the lane now compiles the family and the two entries would suppress files that ARE built. The file said "delete these when tinyhumansai#5619 lands"; this is that. Fix a fail-open in the gate itself, found by its first real CI run (32367545922). `git ls-files` died with `fatal: detected dubious ownership` in the container, because actions/checkout registers safe.directory under a temporarily overridden HOME that later steps do not run with. Read through a process substitution, that produced an empty candidate list, and the gate reported "clean — every eligible changed source file produced coverage records" having checked ZERO files: precisely the verified-nothing fail-open this script exists to close, reproduced inside it. Two guards, because either alone leaves a hole. Fall back to a filesystem walk when git cannot answer, and refuse to report success when a whole-tree run checked nothing — for this repository that means the walk broke, not that there is nothing to verify. `--files` stays exempt; a PR touching only tests legitimately has nothing to check. Both are covered by tests that fail when the guard is reverted, one of which stubs a always-failing `git` on PATH to reproduce the container's behaviour.
Summary
hostingfamily into the product. It is currently built in no configuration — 1,643 lines including a 511-line test file and ninehosting_*agent tools, shipped in nothing.Problem
The gate exists in the root
Cargo.tomland states what should happen:But
hostingis in[features] default— no; inscripts/ci/product-features.txt— no; in the shell's forwarding list — no. "product-ON" never happened.Why the guard did not catch it.
check-feature-forwarding.mjsasserts set equality between the core's default gates and the shell's forwarding list.hostingis absent from both, the sets agree, the gate passes. A gate cannot catch a feature nobody told it about.This is the shape of #4901, where
voiceshipped missing to 56 users — the incident that guard was built to prevent.It is also the concrete case behind #5613: because
hostingis in no CI command,Rust Core Coverageon #5593 ran0 tests; 12202 filtered outand reported success.Solution
Add
hostingtoscripts/ci/product-features.txtand to the shell's forwarding list together — the forwarding gate requires both to move at once.Everything else was already wired:
src/openhuman/mod.rs:29declares the module behind the gate andsrc/openhuman/tools/ops.rs:1031registers the tools.This does not expose anything to users who have not asked for it
Tool registration is credential-gated on
Account::from_config, matching the gate's own comment that "a tool that cannot work is worse than a tool that is not there". A host without[hosting].api_keyor the provider's environment variable sees no new tools. What changes is that the code is compiled, linted and tested.app/src-tauri/Cargo.lockgainstinyhosts 0.1.5— a required consequence, and CI builds--locked, so it ships with the change. Verified the lockfile diff is that one package and nothing else.Submission Checklist
N/A: build-configuration change.The family already carries a 511-linetest.rswhich this PR causes to be compiled and run for the first time. That is the substance of the change: no new test is needed, an existing suite starts executing.N/A: no executable lines changed.The diff is a feature-list entry, a forwarding-list entry and a lockfile.hostingnewly reaches the product set. If the matrix tracks it as a feature row, it wants adding; I could not find an existinghostingrow to update, so flagging for a reviewer rather than inventing one.## Related—N/A: no matrix feature IDs identified for hosting.hosting_*tools can appear, so a smoke entry for "configure a hosting credential, confirm the tools register" is worth adding. Not added here — I would rather a maintainer own that wording.Closes #NNN— see## Related.Impact
openhuman::hostingand linktinyhosts. Expect a small build-time and binary-size increase.Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
Validation Run
pnpm --filter openhuman-app format:check— N/A: no formatted source changed.pnpm typecheck— N/A: no TypeScript changed.node scripts/ci/check-feature-forwarding.mjs→ OK, 19 shell forwards, both lists moved together.app/src-tauri/Cargo.tomlfeature list + lockfile only.Validation Blocked
command:cargo check --features "$(bash scripts/ci/product-features.sh)"including hostingerror:not blocked by tooling — declined on cost (a second ~25-35GBtarget/for the product feature set)impact:the family's first compile happens in this PR's CI. Called out under Impact.Behavior Changes
openhuman::hostingis compiled into the product and the shell.hosting_*tools become available as originally intended.Parity Contract
check-feature-forwarding.mjspasses with both lists updated.Duplicate / Superseded PR Handling
Summary by CodeRabbit