{"record":{"id":"98498026ea93fc24","repo":"BoundaryML/baml","slug":"run-filtered-failed-e","errorCode":null,"errorMessage":"run_filtered failed: {e}","messagePattern":"run_filtered failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_cli/src/test_command.rs","lineNumber":857,"sourceCode":"        i64::try_from(std::thread::available_parallelism().map_or(8, std::num::NonZero::get) * 2)\n            .unwrap_or(16);\n    let result = ctx.block_on_with_logs(\n        ctx.engine.call_function(\n            \"testing.TestRegistry.run_filtered\",\n            vec![\n                registry.clone(),\n                string_array(&invocation.profile_include),\n                string_array(&invocation.profile_exclude),\n                string_array(&invocation.cli_include),\n                string_array(&invocation.cli_exclude),\n                BexExternalValue::Int(max_concurrency),\n            ],\n            call_ctx,\n            true,\n        ),\n        logs.as_ref(),\n    );\n    result.map_err(|e| anyhow!(\"run_filtered failed: {e}\"))\n}\n\nfn list_selected_testset_names(\n    ctx: &RunCtx,\n    registry: &BexExternalValue,\n    invocation: &TestInvocation,\n) -> Result<Vec<String>> {\n    let call_ctx = FunctionCallContextBuilder::new(CallId::next())\n        .with_cancel_token(ctx.cancel.clone())\n        .build();\n    let value = ctx\n        .rt\n        .block_on(ctx.engine.call_function(\n            \"testing.TestRegistry.list_filtered\",\n            vec![\n                registry.clone(),\n                string_array(&invocation.profile_include),\n                string_array(&invocation.profile_exclude),","sourceCodeStart":839,"sourceCodeEnd":875,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_cli/src/test_command.rs#L839-L875","documentation":"run_filtered_report delegates to the core test runner to execute the filtered test set and report results; any underlying failure is wrapped as `run_filtered failed`. The wrapper keeps the CLI-level context while the inner error carries the actual cause.","triggerScenarios":"Calling run_filtered_report (from run) where the underlying run_filtered call returns Err — e.g. registry/bex evaluation failure, test execution failure at the infrastructure level, or invalid call context.","commonSituations":"Tests failing to even start due to engine/registry errors; bad filter expressions; corrupted testset configuration; environment issues when spawning the runner.","solutions":["Read the inner error chained below this message (anyhow context) for the root cause and fix that first","Verify the test filter/invocation arguments are valid for your testsets","Re-run with verbose logging to pinpoint which phase of run_filtered failed"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match result {\n    Ok(report) => print(report),\n    Err(e) => {\n        eprintln!(\"run_filtered failed: {e:#}\"); // full anyhow chain\n        for cause in e.chain() { eprintln!(\"caused by: {cause}\"); }\n        std::process::exit(1);\n    }\n}","preventionTips":["Always print the full anyhow error chain, not just the top message","Validate filters/invocations before running","Run with verbose logging when diagnosing","Keep the bex registry/engine binaries up to date"],"tags":["cli","baml","test-runner","wrapped-error"],"backgroundTag":"api-error-response","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}