tinyhumansai/openhuman · error
sentry-test unavailable: built without the crash-reporting f
Error message
sentry-test unavailable: built without the crash-reporting feature — rebuild with `--features crash-reporting`
What it means
`run_sentry_test_command` here is the #[cfg(not(feature = "crash-reporting"))] stub: this binary was compiled without the `crash-reporting` cargo feature, so the whole Sentry tree is absent and the probe reports the build fact rather than pretending to succeed. It is compile-time — the `crash-reporting` feature is not in the repo's `default` list, so bare `cargo build` produces binaries that hit this.
Source
Thrown at src/core/cli.rs:322
println!("{event_id}");
if do_panic {
eprintln!(
"[sentry-test] Triggering panic as requested — the panic integration should capture it."
);
panic!("openhuman sentry-test intentional panic");
}
Ok(())
}
/// Disabled-build stand-in for [`run_sentry_test_command`]. Same signature as
/// the `crash-reporting` version; reports that the probe is unavailable in a
/// build compiled without the feature rather than pretending to succeed.
#[cfg(not(feature = "crash-reporting"))]
fn run_sentry_test_command(_args: &[String]) -> Result<()> {
Err(anyhow::anyhow!(
"sentry-test unavailable: built without the crash-reporting feature — \
rebuild with `--features crash-reporting`"
))
}
/// Loads key/value pairs from a `.env` file into the process environment.
///
/// This is used for all CLI entrypoints so direct namespace commands pick up
/// the same repo-local configuration as `run` / `serve`.
///
/// Precedence:
/// 1. Variables already set in the process environment are **not** overwritten.
/// 2. If `OPENHUMAN_DOTENV_PATH` is set, that file is loaded.
/// 3. Otherwise, it searches for `.env` in the current working directory.
pub(crate) fn load_dotenv_for_cli() -> Result<()> {
match std::env::var("OPENHUMAN_DOTENV_PATH") {
Ok(path) if !path.trim().is_empty() => {
dotenvy::from_path(&path).map_err(|e| {View on GitHub (pinned to a221052e0d)
Solutions
- Rebuild with the gate: `cargo build --bin openhuman-core --features crash-reporting`
- Or test against a product build that ships the feature
- If you only need the CLI, skip the probe on builds without the feature
Example fix
# before openhuman sentry-test --message hi # -> sentry-test unavailable: built without the crash-reporting feature # after cargo build --manifest-path Cargo.toml --bin openhuman-core --features crash-reporting OPENHUMAN_CORE_SENTRY_DSN=... ./target/debug/openhuman-core sentry-test --message hi
Defensive patterns
Strategy: validation
Validate before calling
# bash: confirm the build carries the sentry tree before invoking the probe
cargo tree --manifest-path Cargo.toml -i sentry --features crash-reporting >/dev/null 2>&1 \
|| { echo 'rebuild with --features crash-reporting to use sentry-test' >&2; exit 1; } Prevention
- `crash-reporting` is not in the repo's default feature list — add it explicitly to debug builds that will test Sentry
- Gate CI observability steps on the same feature list used to build the binary under test
- Treat 'unavailable: built without the ... feature' messages as build facts, not runtime bugs
When it happens
Trigger: Running `openhuman sentry-test` on any build whose feature list omits `crash-reporting` (contrib default, `--no-default-features` slim builds, custom feature sets).
Common situations: Developer builds optimized for compile speed that skip the sentry tree; CI binaries built from the default feature set; probing observability on a build that never shipped it.
Related errors
- tui feature disabled at compile time; rebuild with `--featur
- Local model runtime is unavailable in this core build. Resta
- missing value for --message
- unknown sentry-test arg: {other}
- Sentry is not initialized in this binary — no DSN is resolva
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/188a37ee8a547e44.
Report an issue: GitHub.