BoundaryML/baml · error
list_filtered failed: {e}
Error message
list_filtered failed: {e} What it means
Before running, the CLI lists the testset names matching the invocation's filters via a list_filtered call into the registry; any failure is wrapped as `list_filtered failed`. This is a discovery/enumeration step, so failures here mean the filter set could not be evaluated.
Source
Thrown at baml_language/crates/baml_cli/src/test_command.rs:882
) -> 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),
string_array(&invocation.cli_include),
string_array(&invocation.cli_exclude),
],
call_ctx,
true,
))
.map_err(|e| anyhow!("list_filtered failed: {e}"))?;
Ok(string_array_values(&value))
}
/// Print a flat report and fold its counts into the running totals.
///
/// Print the aggregate testset result and fold its counts into the running
/// totals. Both filtered and unfiltered runs go through the same aggregate path
/// (filtered selections still run under their testset runners), so a failing
/// leaf whose runner still passes the suite is reported as a *tolerated* failure
/// — kept out of the hard `failed` count and not failing the command. Every
/// leaf line uses the same canonical ID emitted by `baml test --list`; aggregate
/// runner verdicts are labeled as aggregates rather than presented as test IDs.
fn consume_flat_report(
flat: &FlatReport,
passed: &mut usize,
failed: &mut usize,
tolerated: &mut usize,
total: &mut usize,View on GitHub (pinned to bd85ce9dee)
Solutions
- Check the --include/--exclude filter arguments for syntax errors and correct them
- Ensure the project compiles/tests are discoverable (run a plain `baml test` without filters)
- Inspect the chained inner error for the registry-level root cause
Example fix
# before baml test --include "[[bad-filter" # after baml test --include "my_testset.*"
Defensive patterns
Strategy: try-catch
Try / catch
match list_selected_testset_names(&ctx, ®istry, &invocation) {
Ok(names) if !names.is_empty() => run(names),
Ok(_) => eprintln!("no testsets matched the given filters"),
Err(e) => eprintln!("list_filtered failed: {e:#}"),
} Prevention
- Validate include/exclude filter syntax before invoking
- Ensure the project compiles before filtering testsets
- Start with unfiltered runs to confirm testsets exist
- Log the filter arguments on failure
When it happens
Trigger: Calling list_selected_testset_names (from run) where list_filtered errors — bad include/exclude filter values, registry lookup failure, or an invalid call context while converting the returned value with string_array_values.
Common situations: Malformed --include/--exclude CLI filter expressions; testsets not yet compiled/registered; internal registry state unavailable.
Related errors
- run_filtered failed: {e}
- compilation failed: {e:?}
- no `.baml` files found in {}
- could not find packaged playground assets. For local debuggi
- `--file` and `--project` are mutually exclusive; `--file` al
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/efb5bbf139e5f480.
Report an issue: GitHub.