{"record":{"id":"f0ce12d3c58c5ca4","repo":"dbt-labs/dbt-core","slug":"start-paused-set-multiple-times","errorCode":null,"errorMessage":"`start_paused` set multiple times.","messagePattern":"`start_paused` set multiple times\\.","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/dbt-runtime-macros/src/entry.rs","lineNumber":160,"sourceCode":"    ) -> Result<(), syn::Error> {\n        if self.worker_threads.is_some() {\n            return Err(syn::Error::new(\n                span,\n                \"`worker_threads` set multiple times.\",\n            ));\n        }\n\n        let worker_threads = parse_int(worker_threads, span, \"worker_threads\")?;\n        if worker_threads == 0 {\n            return Err(syn::Error::new(span, \"`worker_threads` may not be 0.\"));\n        }\n        self.worker_threads = Some((worker_threads, span));\n        Ok(())\n    }\n\n    fn set_start_paused(&mut self, start_paused: syn::Lit, span: Span) -> Result<(), syn::Error> {\n        if self.start_paused.is_some() {\n            return Err(syn::Error::new(span, \"`start_paused` set multiple times.\"));\n        }\n\n        let start_paused = parse_bool(start_paused, span, \"start_paused\")?;\n        self.start_paused = Some((start_paused, span));\n        Ok(())\n    }\n\n    fn set_crate_name(&mut self, name: syn::Lit, span: Span) -> Result<(), syn::Error> {\n        if self.crate_name.is_some() {\n            return Err(syn::Error::new(span, \"`crate` set multiple times.\"));\n        }\n        let name_path = parse_path(name, span, \"crate\")?;\n        self.crate_name = Some(name_path);\n        Ok(())\n    }\n\n    fn set_unhandled_panic(\n        &mut self,","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-runtime-macros/src/entry.rs#L142-L178","documentation":"The `start_paused` attribute option may appear only once per #[tokio::main]/#[tokio::test]. set_start_paused checks the stored Option and returns a syn::Error at the duplicate key's span if already set. Compile-time duplicate detection keeps the generated BuilderConfig unambiguous.","triggerScenarios":"#[tokio::test(start_paused = true, start_paused = false)] — the key `start_paused` appears twice within one attribute invocation.","commonSituations":"Merging test attributes when refactoring; a code generator emitting the option twice; accidentally duplicating a key while toggling values.","solutions":["Keep only one `start_paused = <bool>` key in the attribute","Use a boolean literal true/false; remove redundant repeats","Use time_paused explicitly in tests via runtime Builder if you need dynamic control"],"exampleFix":"// before\n#[tokio::test(start_paused = true, start_paused = false)]\nasync fn t() {}\n\n// after\n#[tokio::test(start_paused = true)]\nasync fn t() {}","handlingStrategy":"validation","validationCode":"fn check_attr_keys_once(attr_src: &str, key: &str) -> Result<(), String> {\n    let n = attr_src.matches(&format!(\"{} =\", key)).count();\n    if n <= 1 { Ok(()) } else { Err(format!(\"duplicate `{key}`\")) }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When toggling start_paused, replace the value instead of adding a second key","Review attribute diffs during code review for repeated keys","Use a single canonical test attribute template across the repo"],"tags":["rust","proc-macro","tokio","duplicate-key"],"backgroundTag":"conflicting-config-options","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}