dbt-labs/dbt-core · error
issue #13604 selector YAML should parse
Error message
issue #13604 selector YAML should parse
What it means
Test-only assertion: the selectors YAML from dbt-labs issue #13604 — a method argument whose `value` is a one-element sequence like ["models"] — must parse via dbt_yaml::from_str. Fires if the deserializer starts rejecting sequence-valued selector arguments.
Solutions
- Keep SelectorFile deserialization tolerant of sequence-valued `value` fields
- Retain the #13604 fixture in the regression suite
- Treat failure as a selector parsing regression
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/dbt-parser/src/resolve/resolve_selectors.rs:896 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/b1074a27b12e2262.
Report an issue: GitHub.
Appendix: source
Thrown at crates/dbt-parser/src/resolve/resolve_selectors.rs:896
Ok(())
}
/// Regression (dbt-labs/fs#13604): dbt Core types a method argument's
/// `value` as `Any`, so a sequence like `value: ["models"]` loads fine
/// even for an unused selector. A one-element sequence is no exception:
/// `Path.glob()` still gets a `list`, so it must defer, not resolve.
#[test]
fn test_sequence_valued_selector_argument_parses() -> FsResult<()> {
let selector_file: SelectorFile = dbt_yaml::from_str(
r#"
selectors:
- name: default
definition:
method: path
value: ["models"]
"#,
)
.expect("issue #13604 selector YAML should parse");
let original_definition = selector_file.selectors[0].definition.clone();
let normalized_include =
SelectorParser::new(BTreeMap::new()).parse_definition(&original_definition)?;
if let SelectExpression::Atom(criteria) = &normalized_include {
assert_eq!(criteria.method, MethodName::Path);
assert!(
matches!(
criteria.value,
dbt_common::node_selector::SelectionValue::Unsupported(_)
),
"a sequence value has no selection semantics and must be deferred, not treated as a scalar"
);
} else {
panic!("Expected a single deferred Atom for a sequence value");
}
// Manifest round-trip must preserve the sequence shape, matching howView on GitHub (pinned to 0267ce9170)