Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

docs(scripts): document module source builds and the CI source gate

Steven Enamakel96552575909f
diff --git a/scripts/README.md b/scripts/README.md
index 1de55de363..29742307e7 100644
--- a/scripts/README.md
+++ b/scripts/README.md
@@ -22,7 +22,8 @@ drivers live in
| [`test-planning/`](test-planning/README.md) | Mines GitHub issues/PRs into a test-planning backlog via an LLM CLI. |
| [`release/`](release) | Release build, signing, packaging, and publishing scripts (macOS notarization, APT/Homebrew, npm, updater manifests). |
| [`mock-api/`](mock-api) | The shared mock backend modules (routes, socket, admin, state) behind [`mock-api-server.mjs`](mock-api-server.mjs) / [`mock-api-core.mjs`](mock-api-core.mjs); exercised by `pnpm mock:api` and Rust/E2E test runs. |
-| [`lib/`](lib) | Small parsers shared by the CI gates (checklist, coverage matrix, feature forwarding, module pins). |
+| [`modules/`](modules) | `build.mjs <id\|all>` builds a loadable module from its vendored gitlink for local development (`SourceSpec` in the registry record; artifact plus an operator-trust `modules.toml` under `target/module-sources/<id>/`, cached by submodule tree, rustc, target, profile and features). `stage-local-modules.sh` is the helper `test-rust-with-mock.sh` and `test-rust-e2e.sh` source. With `OPENHUMAN_MODULE_SOURCE=source` those runners build modules from source; without it they use the pinned releases, same as CI. CI never calls `build.mjs`. |
+| [`lib/`](lib) | Small parsers shared by the CI gates (checklist, coverage matrix, feature forwarding, module pins, module source specs). |
| [`__tests__/`](__tests__), [`tests/`](tests) | Unit tests for the scripts themselves (`node --test`, plus a PowerShell installer test). |
| [`fixtures/`](fixtures) | `latest.json` / `release.json` release-metadata fixtures consumed by [`test_install.sh`](test_install.sh) (the [`install.sh`](install.sh) test). |
| [`theme-codemod/`](theme-codemod) | Codemod collapsing audited `light dark:` Tailwind pairings into the semantic theme utilities (`node scripts/theme-codemod/migrate.mjs [--write]`; see [`gitbooks/developing/theming.md`](../gitbooks/developing/theming.md)). |
diff --git a/scripts/ci/README.md b/scripts/ci/README.md
index e9cb0ab8eb..1d3e1713a0 100644
--- a/scripts/ci/README.md
+++ b/scripts/ci/README.md
@@ -11,6 +11,7 @@ authoritative spec; this is an index so a CI failure log points somewhere.
| [`check-crate-chain.mjs`](check-crate-chain.mjs) | The crate chain holds: each OpenHuman crate's normal dependencies name only the layer below it (core: none; embed: core; tinyhumans: embed; rpc: tinyhumans; app/cli/tui: rpc), and host `src/` never names `__host`, `core_host` or `openhuman_core::`. Dev-dependencies are exempt. Runs as part of `pnpm rust:layout`. |
| [`product-features.txt`](product-features.txt) / [`product-features.sh`](product-features.sh) | Source of truth for the shipped desktop product's Cargo feature gates, distinct from `[features] default` (the contributor build). The `.sh` prints them comma-separated for `cargo --features "$(scripts/ci/product-features.sh)"`. |
| [`check-module-pins.mjs`](check-module-pins.mjs) + [`module-pin-exemptions.json`](module-pin-exemptions.json) | A loadable module's registry pin ([`crates/openhuman-core/src/modules/registry.rs`](../../crates/openhuman-core/src/modules/registry.rs)) and its `vendor/*` submodule pin must describe the same release (openhuman#5727). The exemptions file records known, expected drift, not a way to silence the gate. Logic lives in [`scripts/lib/module-pins.mjs`](../lib/module-pins.mjs). |
+| [`check-ci-module-source.mjs`](check-ci-module-source.mjs) | CI selects the pinned, digest-checked release only: no `OPENHUMAN_MODULE_SOURCE*`, no `linked`/`source` override, no `linked-modules` feature, and no call to the local source build `scripts/modules/build.mjs`. `self-hosted/install-test-modules.sh` still builds libtinyconnectors inline until E0.6 removes the CI source builds. |
| [`check-submodule-monotonic.mjs`](check-submodule-monotonic.mjs) | A `vendor/*` submodule pin may never move backwards onto a commit that is an ancestor of what the base branch already has. |
| [`check-toolchain-image.mjs`](check-toolchain-image.mjs) | The CI image's toolchain, the version-pinned `dtolnay/rust-toolchain@<version>` workflow steps, and [`.github/Dockerfile`](../../.github/Dockerfile) all match the channel pinned in [`rust-toolchain.toml`](../../rust-toolchain.toml). |
| [`rust-coverage.sh`](rust-coverage.sh) | Runs the complete product-feature Rust suite under `cargo-llvm-cov`, including every core integration target and the root Rust support crates. |