The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(ci): use --all-targets for rust coverage suites
Steven Enamakel9c5b0d3a4414
diff --git a/scripts/__tests__/rust-coverage-status.test.mjs b/scripts/__tests__/rust-coverage-status.test.mjsindex 83afededdb..aed5620aeb 100644--- a/scripts/__tests__/rust-coverage-status.test.mjs+++ b/scripts/__tests__/rust-coverage-status.test.mjs@@ -305,7 +305,7 @@ test("private coverage executes every package configuration once and reports aft// resolves (and builds) the core and its dependencies once for all of them.const unified = selections.filter((line) =>line.includes(- "--features channels --no-report --no-fail-fast -p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli --tests -E ",+ "--features channels --no-report --no-fail-fast -p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli --all-targets -E ",),);assert.equal(unified.length, 4);@@ -365,7 +365,6 @@ test("CLI inventory sends product features only to nextest, preserving instrumenconst script = ["set -euo pipefail",'CORE_PRODUCT_FEATURES="channels,modules"',- "SUITE_TARGETS=(--tests)",...source.split("\n").filter((line) => /^(UNIFIED_PRODUCT_ARGS|FILTER_CLI_TESTS)=/.test(line)),@@ -378,7 +377,7 @@ test("CLI inventory sends product features only to nextest, preserving instrumendoneprintf '%s\\n' 'export INVENTORY_INSTRUMENTED=1' 'export CARGO_TARGET_DIR=instrumented-target'elif [[ "$*" == *"nextest list"* ]]; then- [[ "$*" == *"--features channels,modules -p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli --tests -E package(=openhuman-cli) & kind(test)"* ]] || return 65+ [[ "$*" == *"--features channels,modules -p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli --all-targets -E package(=openhuman-cli) & kind(test)"* ]] || return 65[[ "$INVENTORY_INSTRUMENTED" == 1 && "$CARGO_TARGET_DIR" == instrumented-target && "$CARGO_BUILD_TARGET_DIR" == preserved-target ]] || return 66else return 67fi@@ -469,13 +468,7 @@ test("nextest product suites share one Cargo argument set and differ only in theconst args = source.match(/^UNIFIED_PRODUCT_ARGS=\((.*)\)$/m)[1];assert.equal(args,- '-p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli "${SUITE_TARGETS[@]}"',- );- // Under nextest only test targets are built: examples run nothing yet each- // links the whole instrumented core and stays on the scratch disk.- assert.match(- source,- /if \[ "\$\{OH_COV_RUNNER:-cargo\}" = "nextest" \]; then\n SUITE_TARGETS=\(--tests\)\nelse\n SUITE_TARGETS=\(--all-targets\)\nfi/,+ "-p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli --all-targets",);// Exact package matches: `package(openhuman)` alone would be a glob of the name.for (const value of [@@ -489,7 +482,7 @@ test("nextest product suites share one Cargo argument set and differ only in the// feature suites keep their own resolutions.assert.doesNotMatch(source, /-p openhuman-cli --tests/);- assert.match(source, /suite "openhuman-rpc" llvm_cov_package .*-p openhuman-rpc "\$\{SUITE_TARGETS\[@\]\}"/);- assert.match(source, /suite "openhuman-tui" llvm_cov_package .*-p openhuman-tui "\$\{SUITE_TARGETS\[@\]\}"/);- assert.match(source, /suite "openhuman-embed \(default\)" llvm_cov_package .*-p openhuman-embed "\$\{SUITE_TARGETS\[@\]\}"/);+ assert.match(source, /suite "openhuman-rpc" llvm_cov_package .*-p openhuman-rpc --all-targets/);+ assert.match(source, /suite "openhuman-tui" llvm_cov_package .*-p openhuman-tui --all-targets/);+ assert.match(source, /suite "openhuman-embed \(default\)" llvm_cov_package .*-p openhuman-embed --all-targets/);});diff --git a/scripts/ci/rust-coverage.sh b/scripts/ci/rust-coverage.shindex c1ff5dedff..7b6ede0f32 100755--- a/scripts/ci/rust-coverage.sh+++ b/scripts/ci/rust-coverage.sh@@ -71,28 +71,15 @@ llvm_cov_embed() {# each unit by its resolved feature set, and the core's feature graph differs# per selected package set (core alone, embed/tinyhumans, and the cli, which# drops the core's `default` alias), so separate `-p` invocations each compile-# the core and its dependencies again. With the same packages, targets and-# `--features` on every invocation, the first suite builds them once and the-# rest find them fresh. Suites, reports and execution order are unchanged;+# the core and its dependencies again. With the same packages, `--all-targets`+# and `--features` on every invocation, the first suite builds them once and+# the rest find them fresh. Suites, reports and execution order are unchanged;# each filter selects what the old per-package arguments built and ran:-# core its lib and bins' unit tests-# embed lib, bins and integration tests-# tinyhumans lib, bins and integration tests-# cli `-E 'kind(test)'` (integration targets only)-#-# Targets are `--tests`, not `--all-targets`, under nextest. Examples and-# benches only compile: nextest runs none of them, so they produce no profile,-# yet every example links the whole instrumented core (about as large as a test-# binary; embed alone has 26, and it builds twice, product and default-# features) and stays on the scratch disk until the report. They add no lcov-# either: cargo-llvm-cov ignores `examples/` paths, and clippy `--all-targets`-# already compiles them. The cargo runner keeps `--all-targets`.-if [ "${OH_COV_RUNNER:-cargo}" = "nextest" ]; then- SUITE_TARGETS=(--tests)-else- SUITE_TARGETS=(--all-targets)-fi-UNIFIED_PRODUCT_ARGS=(-p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli "${SUITE_TARGETS[@]}")+# core its only target is the lib (`--lib --bins`)+# embed `--all-targets`+# tinyhumans `--all-targets`+# cli `--tests -E 'kind(test)'` (integration targets only)+UNIFIED_PRODUCT_ARGS=(-p openhuman -p openhuman-embed -p openhuman-tinyhumans -p openhuman-cli --all-targets)FILTER_CORE='package(=openhuman)'FILTER_EMBED='package(=openhuman-embed)'FILTER_TINYHUMANS='package(=openhuman-tinyhumans)'@@ -312,27 +299,27 @@ if [ "${OH_COV_RUNNER:-cargo}" = "nextest" ]; thensuite "openhuman-embed" llvm_cov --no-report --no-fail-fast \"${UNIFIED_PRODUCT_ARGS[@]}" -E "${FILTER_EMBED}"else- suite "openhuman-embed" llvm_cov_embed --no-report --no-fail-fast -p openhuman-embed "${SUITE_TARGETS[@]}"+ suite "openhuman-embed" llvm_cov_embed --no-report --no-fail-fast -p openhuman-embed --all-targetsfi-suite "openhuman-rpc" llvm_cov_package --no-report --no-fail-fast -p openhuman-rpc "${SUITE_TARGETS[@]}" \+suite "openhuman-rpc" llvm_cov_package --no-report --no-fail-fast -p openhuman-rpc --all-targets \--features storage-sqliteif [ "${OH_COV_RUNNER:-cargo}" = "nextest" ]; thensuite "openhuman-tinyhumans" llvm_cov --no-report --no-fail-fast \"${UNIFIED_PRODUCT_ARGS[@]}" -E "${FILTER_TINYHUMANS}"else- suite "openhuman-tinyhumans" llvm_cov_product_facade --no-report --no-fail-fast -p openhuman-tinyhumans "${SUITE_TARGETS[@]}"+ suite "openhuman-tinyhumans" llvm_cov_product_facade --no-report --no-fail-fast -p openhuman-tinyhumans --all-targetsfiif [ "${OH_COV_RUNNER:-cargo}" = "nextest" ]; then# Contributor/default features are distinct from product features. Keep both# configurations instrumented rather than dropping the default-only surface.- suite "openhuman-embed (default)" llvm_cov_package --no-report --no-fail-fast -p openhuman-embed "${SUITE_TARGETS[@]}"- suite "openhuman-tinyhumans (default)" llvm_cov_package --no-report --no-fail-fast -p openhuman-tinyhumans "${SUITE_TARGETS[@]}"+ suite "openhuman-embed (default)" llvm_cov_package --no-report --no-fail-fast -p openhuman-embed --all-targets+ suite "openhuman-tinyhumans (default)" llvm_cov_package --no-report --no-fail-fast -p openhuman-tinyhumans --all-targetsfi# The terminal frontend builds the core a third time (default features, not the# product set). It is on by default and on in the PR lane; OH_COV_TUI=0 is an# opt-out for local runs.if [ "${OH_COV_TUI:-1}" = "1" ]; then- suite "openhuman-tui" llvm_cov_package --no-report --no-fail-fast -p openhuman-tui "${SUITE_TARGETS[@]}"+ suite "openhuman-tui" llvm_cov_package --no-report --no-fail-fast -p openhuman-tui --all-targetselselog "skipping openhuman-tui (OH_COV_TUI=${OH_COV_TUI})"fi