dbt-labs/dbt-core · error
hidden artifact flags must remain accepted
Error message
hidden artifact flags must remain accepted
What it means
Test-only assertion: the hidden artifact flags (--write-catalog, --write-lineage, --write-index, --write-metadata) must still be accepted by the CLI parser even though they are hidden from --help. Fires only if one of these flags is removed or renamed in the clap definition.
Solutions
- Restore the hidden flag in the CommonArgs clap definition
- Keep the hidden artifact flags in sync with the artifacts subsystem
- Update the test if a flag is intentionally retired
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/dbt-clap-core/src/lib.rs:3260 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/f0a3e81fa897f2c4.
Report an issue: GitHub.
Appendix: source
Thrown at crates/dbt-clap-core/src/lib.rs:3260
);
}
assert!(
help.contains("--generate-info-schema"),
"public artifacts flag must remain in --help, got:\n{help}"
);
assert!(
help.contains("--write-catalog"),
"--write-catalog stays in --help, got:\n{help}"
);
let parsed = CommonArgs::try_parse_from([
"dbt",
"--write-catalog",
"--write-lineage",
"--write-index",
"--write-metadata",
])
.expect("hidden artifact flags must remain accepted");
assert!(parsed.write_catalog);
assert!(parsed.write_lineage);
assert!(parsed.write_index);
assert!(parsed.write_metadata);
assert!(
CommonArgs::try_parse_from(["dbt", "--lineage"]).is_err(),
"--lineage is not a clap flag"
);
}
#[test]
fn show_info_parses_and_conflicts_with_inline() {
let parsed = ShowArgs::try_parse_from(["show", "--info", "models"])
.expect("--info must parse on show");
assert_eq!(parsed.info.as_deref(), Some("models"));
assert!(View on GitHub (pinned to 0267ce9170)