{"record":{"id":"4eddaf3c9be06e90","repo":"dbt-labs/dbt-core","slug":"selector-definition-should-be-present","errorCode":null,"errorMessage":"selector definition should be present","messagePattern":"selector definition should be present","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-parser/src/resolve/resolve_selectors.rs","lineNumber":707,"sourceCode":"        .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\");\n\n        assert!(\n            definition.get(\"intersection\").is_none(),\n            \"manifest must not serialize normalized runtime And as intersection\"\n        );\n        let union = definition\n            .get(\"union\")\n            .and_then(|value| value.as_sequence())\n            .expect(\"manifest should preserve original union\");\n        assert_eq!(union.len(), 3);\n        assert_eq!(union[0].get(\"method\").and_then(|v| v.as_str()), Some(\"fqn\"));\n        assert_eq!(union[0].get(\"value\").and_then(|v| v.as_str()), Some(\"a\"));\n        assert_eq!(union[1].get(\"method\").and_then(|v| v.as_str()), Some(\"fqn\"));\n        assert_eq!(union[1].get(\"value\").and_then(|v| v.as_str()), Some(\"b\"));\n        let exclude = union[2]\n            .get(\"exclude\")\n            .and_then(|value| value.as_sequence())\n            .expect(\"inline exclude should remain a list inside union\");","sourceCodeStart":689,"sourceCodeEnd":725,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-parser/src/resolve/resolve_selectors.rs#L689-L725","documentation":"Test-only assertion in the #10393 regression test: after resolving manifest selectors, the all_except_c entry must retain its definition. Fires only if manifest selector resolution drops definitions along the way.","triggerScenarios":"Thrown at crates/dbt-parser/src/resolve/resolve_selectors.rs:707 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix resolve_manifest_selectors to carry definitions through unchanged","Check the SelectorEntry construction path for dropped fields","Treat failure as a manifest serialization 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"}