Assert feature-gate forwarding across embed, tinyhumans and cli crates
Summary
Make scripts/ci/check-feature-forwarding.mjs assert that openhuman-embed, openhuman-tinyhumans and openhuman-cli forward the same feature-gate list, so a gate added to or removed from the core cannot silently drift in the layers above it.
Problem / Context
The core's gates are forwarded 1:1 three times: openhuman-embed → openhuman-tinyhumans → openhuman-cli (plus the desktop shell's openhuman_core line, which the script already checks). Today the script only inspects the shell manifest, so the other three lists are maintained by hand.
This bit during #6360: peripheral-rpi was removed from the core mid-flight, and openhuman-embed/openhuman-tinyhumans still forwarded it — a cargo check error (package openhuman-cli depends on openhuman with feature peripheral-rpi but openhuman does not have that feature) rather than a gate check. The inverse (a new core gate that embed forgets to forward) fails silently: the product lanes' --features "$(scripts/ci/product-features.sh)" still resolve on openhuman-cli, but the gate is off for any embedder.
Scope (optional)
- Parse
[features]ofcrates/openhuman-embed/Cargo.toml,crates/openhuman-tinyhumans/Cargo.toml,crates/openhuman-cli/Cargo.toml. - Assert: every non-
defaultcore gate is forwarded by embed as<gate> = ["openhuman-core/<gate>"]; tinyhumans forwards exactly embed's list toopenhuman-embed/<gate>; cli forwards every core gate toopenhuman-core/<gate>(and toopenhuman-tinyhumans/<gate>where tinyhumans has it). Allow the crate-local gates (bin-tools,rss-bench-dhat,crash-reporting's extradep:sentry) via an explicit allowlist, mirroringINTENTIONALLY_NOT_FORWARDEDinscripts/lib/feature-forwarding.mjs. - Wire into the same CI Lite step that runs the existing check; add a node test beside
scripts/__tests__/.
Acceptance criteria
- [ ] Drift is caught — removing a gate from the core (or adding one) without touching the three forwarding lists fails
node scripts/ci/check-feature-forwarding.mjswith a message naming the crate and gate. - [ ] Current tree passes — the check is green on
mainas-is. - [ ] Tested — a
node --testcase for each direction (missing forward, stale forward, allowlisted local gate). - [ ] Diff coverage ≥ 80% — the implementing PR meets the changed-lines coverage gate.
Related
- #6360 (where the drift surfaced), #6362
scripts/lib/feature-forwarding.mjs,scripts/ci/product-features.txt
Assert feature-gate forwarding across embed, tinyhumans and cli crates
Labelled priority: p2.
Picking this one up. I'll extend the existing check so it also walks embed, tinyhumans and cli, with the crate-local gates allow-listed so they don't read as drift, and add tests for the missing and stale cases.