{"record":{"id":"8553985cc5868c70","repo":"dbt-labs/dbt-core","slug":"manifest-should-preserve-original-union","errorCode":null,"errorMessage":"manifest should preserve original union","messagePattern":"manifest should preserve original union","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-parser/src/resolve/resolve_selectors.rs","lineNumber":716,"sourceCode":"                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\");\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","sourceCodeStart":698,"sourceCodeEnd":734,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-parser/src/resolve/resolve_selectors.rs#L698-L734","documentation":"Test-only assertion in the #10393 regression test: the manifest-serialized definition must preserve the original union list rather than re-serializing the normalized runtime And as an intersection. Fires if normalization leaks into the manifest output.","triggerScenarios":"Thrown at crates/dbt-parser/src/resolve/resolve_selectors.rs:716 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure resolve_manifest_selectors writes the original definition, not the normalized AST","Keep the intersection-must-not-appear assertion in the suite","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"}