BoundaryML/baml · error

run_filtered failed: {e}

Error message

run_filtered failed: {e}

What it means

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.

Source

Thrown at baml_language/crates/baml_cli/src/test_command.rs:857

        i64::try_from(std::thread::available_parallelism().map_or(8, std::num::NonZero::get) * 2)
            .unwrap_or(16);
    let result = ctx.block_on_with_logs(
        ctx.engine.call_function(
            "testing.TestRegistry.run_filtered",
            vec![
                registry.clone(),
                string_array(&invocation.profile_include),
                string_array(&invocation.profile_exclude),
                string_array(&invocation.cli_include),
                string_array(&invocation.cli_exclude),
                BexExternalValue::Int(max_concurrency),
            ],
            call_ctx,
            true,
        ),
        logs.as_ref(),
    );
    result.map_err(|e| anyhow!("run_filtered failed: {e}"))
}

fn list_selected_testset_names(
    ctx: &RunCtx,
    registry: &BexExternalValue,
    invocation: &TestInvocation,
) -> Result<Vec<String>> {
    let call_ctx = FunctionCallContextBuilder::new(CallId::next())
        .with_cancel_token(ctx.cancel.clone())
        .build();
    let value = ctx
        .rt
        .block_on(ctx.engine.call_function(
            "testing.TestRegistry.list_filtered",
            vec![
                registry.clone(),
                string_array(&invocation.profile_include),
                string_array(&invocation.profile_exclude),

View on GitHub (pinned to bd85ce9dee)

Solutions

  1. Read the inner error chained below this message (anyhow context) for the root cause and fix that first
  2. Verify the test filter/invocation arguments are valid for your testsets
  3. Re-run with verbose logging to pinpoint which phase of run_filtered failed
Defensive patterns

Strategy: try-catch

Try / catch

match result {
    Ok(report) => print(report),
    Err(e) => {
        eprintln!("run_filtered failed: {e:#}"); // full anyhow chain
        for cause in e.chain() { eprintln!("caused by: {cause}"); }
        std::process::exit(1);
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: Tests failing to even start due to engine/registry errors; bad filter expressions; corrupted testset configuration; environment issues when spawning the runner.

Related errors


AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12). Data as JSON: /api/errors/98498026ea93fc24. Report an issue: GitHub.