{"record":{"id":"b19cfae22a96ae35","repo":"dbt-labs/dbt-core","slug":"issue-10393-selector-yaml-should-parse","errorCode":null,"errorMessage":"issue #10393 selector YAML should parse","messagePattern":"issue #10393 selector YAML should parse","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-parser/src/resolve/resolve_selectors.rs","lineNumber":689,"sourceCode":"        assert!(selector_atom_to_yaml(&atom).is_err());\n    }\n\n    #[test]\n    fn test_manifest_selector_preserves_union_with_inline_exclude_shape() -> FsResult<()> {\n        let selector_file: SelectorFile = dbt_yaml::from_str(\n            r#\"\nselectors:\n  - name: all_except_c\n    description: Union of a and b, excluding c\n    definition:\n      union:\n        - a\n        - b\n        - exclude:\n            - c\n\"#,\n        )\n        .expect(\"issue #10393 selector YAML should parse\");\n        let original_definition = selector_file.selectors[0].definition.clone();\n        let normalized_include =\n            SelectorParser::new(BTreeMap::new()).parse_definition(&original_definition)?;\n        let resolved_selectors = HashMap::from([(\n            \"all_except_c\".to_string(),\n            SelectorEntry {\n                include: normalized_include,\n                is_default: false,\n                description: Some(\"Union of a and b, excluding c\".to_string()),\n                definition: original_definition,\n            },\n        )]);\n\n        let manifest_selectors = resolve_manifest_selectors(resolved_selectors)?;\n        let definition = manifest_selectors\n            .get(\"all_except_c\")\n            .and_then(|selector| selector.definition.as_ref())\n            .expect(\"selector definition should be present\");","sourceCodeStart":671,"sourceCodeEnd":707,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-parser/src/resolve/resolve_selectors.rs#L671-L707","documentation":"Test-only assertion: the selectors YAML from dbt-labs issue #10393 (union with inline exclude) must parse via dbt_yaml::from_str. Fires only if the SelectorFile deserializer regresses and rejects this valid shape.","triggerScenarios":"Thrown at crates/dbt-parser/src/resolve/resolve_selectors.rs:689 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix SelectorFile deserialization to accept inline exclude within union","Keep the #10393 fixture YAML in the regression suite","Treat failure as a selector parsing regression"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}