{"record":{"id":"efb5bbf139e5f480","repo":"BoundaryML/baml","slug":"list-filtered-failed-e","errorCode":null,"errorMessage":"list_filtered failed: {e}","messagePattern":"list_filtered failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_cli/src/test_command.rs","lineNumber":882,"sourceCode":") -> 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),\n                string_array(&invocation.cli_include),\n                string_array(&invocation.cli_exclude),\n            ],\n            call_ctx,\n            true,\n        ))\n        .map_err(|e| anyhow!(\"list_filtered failed: {e}\"))?;\n    Ok(string_array_values(&value))\n}\n\n/// Print a flat report and fold its counts into the running totals.\n///\n/// Print the aggregate testset result and fold its counts into the running\n/// totals. Both filtered and unfiltered runs go through the same aggregate path\n/// (filtered selections still run under their testset runners), so a failing\n/// leaf whose runner still passes the suite is reported as a *tolerated* failure\n/// — kept out of the hard `failed` count and not failing the command. Every\n/// leaf line uses the same canonical ID emitted by `baml test --list`; aggregate\n/// runner verdicts are labeled as aggregates rather than presented as test IDs.\nfn consume_flat_report(\n    flat: &FlatReport,\n    passed: &mut usize,\n    failed: &mut usize,\n    tolerated: &mut usize,\n    total: &mut usize,","sourceCodeStart":864,"sourceCodeEnd":900,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_cli/src/test_command.rs#L864-L900","documentation":"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.","triggerScenarios":"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.","commonSituations":"Malformed --include/--exclude CLI filter expressions; testsets not yet compiled/registered; internal registry state unavailable.","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"],"exampleFix":"# before\nbaml test --include \"[[bad-filter\"\n\n# after\nbaml test --include \"my_testset.*\"","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match list_selected_testset_names(&ctx, &registry, &invocation) {\n    Ok(names) if !names.is_empty() => run(names),\n    Ok(_) => eprintln!(\"no testsets matched the given filters\"),\n    Err(e) => eprintln!(\"list_filtered failed: {e:#}\"),\n}","preventionTips":["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"],"tags":["cli","baml","filtering","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-14T11:17:12.474Z"}