{"record":{"id":"e77bce71768ebbda","repo":"dbt-labs/dbt-core","slug":"inline-exclude-should-remain-a-list-inside-union","errorCode":null,"errorMessage":"inline exclude should remain a list inside union","messagePattern":"inline exclude should remain a list inside union","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-parser/src/resolve/resolve_selectors.rs","lineNumber":725,"sourceCode":"            .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\");\n        assert_eq!(exclude.len(), 1);\n        assert_eq!(\n            exclude[0].get(\"method\").and_then(|v| v.as_str()),\n            Some(\"fqn\")\n        );\n        assert_eq!(exclude[0].get(\"value\").and_then(|v| v.as_str()), Some(\"c\"));\n        Ok(())\n    }\n\n    #[test]\n    fn test_manifest_selector_preserves_dot_notation_method() -> FsResult<()> {\n        let original_definition =\n            SelectorDefinitionValue::Full(SelectorExpr::Atom(AtomExpr::Method(MethodAtomExpr {\n                method: \"config.materialized\".to_string(),\n                value: SelectorValue::from(\"table\").into(),\n                childrens_parents: SelectorDefaultSpec::from(false),\n                parents: SelectorDefaultSpec::from(false),\n                children: SelectorDefaultSpec::from(false),","sourceCodeStart":707,"sourceCodeEnd":743,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-parser/src/resolve/resolve_selectors.rs#L707-L743","documentation":"Test-only assertion in the #10393 regression test: the inline exclude inside the union must remain a list entry within the union sequence (union length 3: a, b, exclude). Fires if the exclude is hoisted out of the union or collapsed.","triggerScenarios":"Thrown at crates/dbt-parser/src/resolve/resolve_selectors.rs:725 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Preserve the original union/exclude nesting when writing manifest definitions","Verify the union element count and ordering in serialization","Treat failure as a manifest shape 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"}