{"record":{"id":"188a37ee8a547e44","repo":"tinyhumansai/openhuman","slug":"sentry-test-unavailable-built-without-the-crash-r","errorCode":null,"errorMessage":"sentry-test unavailable: built without the crash-reporting feature — rebuild with `--features crash-reporting`","messagePattern":"sentry-test unavailable: built without the crash-reporting feature — rebuild with `--features crash-reporting`","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/cli.rs","lineNumber":322,"sourceCode":"\n    println!(\"{event_id}\");\n\n    if do_panic {\n        eprintln!(\n            \"[sentry-test] Triggering panic as requested — the panic integration should capture it.\"\n        );\n        panic!(\"openhuman sentry-test intentional panic\");\n    }\n\n    Ok(())\n}\n\n/// Disabled-build stand-in for [`run_sentry_test_command`]. Same signature as\n/// the `crash-reporting` version; reports that the probe is unavailable in a\n/// build compiled without the feature rather than pretending to succeed.\n#[cfg(not(feature = \"crash-reporting\"))]\nfn run_sentry_test_command(_args: &[String]) -> Result<()> {\n    Err(anyhow::anyhow!(\n        \"sentry-test unavailable: built without the crash-reporting feature — \\\n         rebuild with `--features crash-reporting`\"\n    ))\n}\n\n/// Loads key/value pairs from a `.env` file into the process environment.\n///\n/// This is used for all CLI entrypoints so direct namespace commands pick up\n/// the same repo-local configuration as `run` / `serve`.\n///\n/// Precedence:\n/// 1. Variables already set in the process environment are **not** overwritten.\n/// 2. If `OPENHUMAN_DOTENV_PATH` is set, that file is loaded.\n/// 3. Otherwise, it searches for `.env` in the current working directory.\npub(crate) fn load_dotenv_for_cli() -> Result<()> {\n    match std::env::var(\"OPENHUMAN_DOTENV_PATH\") {\n        Ok(path) if !path.trim().is_empty() => {\n            dotenvy::from_path(&path).map_err(|e| {","sourceCodeStart":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/cli.rs#L304-L340","documentation":"`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.","triggerScenarios":"Running `openhuman sentry-test` on any build whose feature list omits `crash-reporting` (contrib default, `--no-default-features` slim builds, custom feature sets).","commonSituations":"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.","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"],"exampleFix":"# before\nopenhuman sentry-test --message hi\n# -> sentry-test unavailable: built without the crash-reporting feature\n# after\ncargo build --manifest-path Cargo.toml --bin openhuman-core --features crash-reporting\nOPENHUMAN_CORE_SENTRY_DSN=... ./target/debug/openhuman-core sentry-test --message hi","handlingStrategy":"validation","validationCode":"# bash: confirm the build carries the sentry tree before invoking the probe\ncargo tree --manifest-path Cargo.toml -i sentry --features crash-reporting >/dev/null 2>&1 \\\n  || { echo 'rebuild with --features crash-reporting to use sentry-test' >&2; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["`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"],"tags":["feature-gate","build-config","sentry"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}