{"record":{"id":"75a8b8cfc3e3bfe9","repo":"dbt-labs/dbt-core","slug":"args-should-parse","errorCode":null,"errorMessage":"args should parse","messagePattern":"args should parse","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-clap-core/src/lib.rs","lineNumber":3703,"sourceCode":"        );\n    }\n\n    fn test_system_args(command: FsCommand) -> SystemArgs {\n        SystemArgs {\n            command,\n            io: IoArgs::default(),\n            from_main: false,\n            exit_process_on_panic: false,\n            num_threads: None,\n            no_parallel: false,\n            target: None,\n        }\n    }\n\n    fn parse_core_command(args: &[&str]) -> CoreCommand {\n        let cli = CliParser::new(\"dbt-fusion\", \"2.0.0\", Box::new(NoopParser))\n            .try_parse_from(std::iter::once(\"dbt\").chain(args.iter().copied()))\n            .expect(\"args should parse\");\n        match cli.command {\n            Command::Core(cmd) => cmd,\n            Command::Extension(_) => panic!(\"expected a core command\"),\n        }\n    }\n\n    #[test]\n    fn top_level_freshness_command_parses_and_is_not_sources_only() {\n        let cmd = parse_core_command(&[\"freshness\", \"--select\", \"stg_orders+\"]);\n\n        let CoreCommand::Freshness(args) = &cmd else {\n            panic!(\"expected CoreCommand::Freshness, got {cmd:?}\");\n        };\n        assert_eq!(\n            args.common_args.select.as_deref(),\n            Some([\"stg_orders+\".to_string()].as_slice())\n        );\n        assert!(!cmd.as_command().is_sources_only_freshness());","sourceCodeStart":3685,"sourceCodeEnd":3721,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-clap-core/src/lib.rs#L3685-L3721","documentation":"Test-helper assertion in parse_core_command: the argument list under test must parse into a CliParser command. Fires only when a CLI parsing regression makes previously valid argument combinations fail.","triggerScenarios":"Thrown at crates/dbt-clap-core/src/lib.rs:3703 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect which flag combination fails to parse and fix the clap definition","Re-run the CLI parsing tests to find the offending change","Treat failure as a CLI compatibility 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"}