vectordotdev/vector · error
Changelog fragment has unrecognized type ' ' (valid types: )
Error message
Changelog fragment {} has unrecognized type '{}' (valid types: {}) What it means
The fragment filename has the correct `<name>.<type>.md` shape, but the `<type>` portion does not match any name in `FRAGMENT_TYPES`. The tool cannot categorize the entry and aborts, listing the valid types.
Solutions
- Rename the fragment using a valid type from the message's list, e.g. `my-change.bug.md`.
- Consult `changelog.d/README.md` for the canonical set of fragment types.
- Check for typos in the type token (the rest of the filename is fine).
Example fix
// before changelog.d/cool-feature.feature.md // after changelog.d/cool-feature.enhancement.md
Defensive patterns
Strategy: validation
Validate before calling
type=$(basename "$f" .md | cut -d. -f2); case "$type" in bug|enhancement) ;; *) echo "unknown type: $type";; esac
Prevention
- Copy an existing fragment's type token instead of guessing.
- Document the valid types in your PR template.
- Tab-complete from existing files in changelog.d/.
When it happens
Trigger: Creating a fragment like `my-change.feature.md` or `my-change.fix.md` when the type token is not one of the supported FRAGMENT_TYPES names (e.g. `bug`, `enhancement`, etc.).
Common situations: Guessing type names instead of consulting `changelog.d/README.md`; copying conventions from other projects (e.g. `feat.` / `chore.` instead of this repo's vocabulary); typos like `enhancment.md`.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Changelog fragment is invalid (filename must be . .md)
- already exists
- Could not parse
- does not exist
- already exists. Delete it (or move it aside) and re-run.
AI-assisted analysis of vectordotdev/vector@0d4ab78a4f (2026-09-16).
Data as JSON: /api/errors/b88cef80bba2edb9.
Report an issue: GitHub.
Appendix: source
Thrown at vdev/src/commands/release/generate_cue.rs:364
}
Ok(entries)
}
fn parse_changelog_fragment(path: &Path) -> Result<ChangelogEntry> {
let stem = path
.file_stem()
.and_then(|n| n.to_str())
.ok_or_else(|| anyhow!("Bad fragment filename: {}", path.display()))?;
let parts: Vec<&str> = stem.split('.').collect();
if parts.len() != 2 {
bail!(
"Changelog fragment {} is invalid (filename must be <name>.<type>.md)",
path.display()
);
}
let fragment_type = parts[1];
let Some(entry) = FRAGMENT_TYPES.iter().find(|t| t.name == fragment_type) else {
bail!(
"Changelog fragment {} has unrecognized type '{}' (valid types: {})",
path.display(),
fragment_type,
FRAGMENT_TYPES
.iter()
.map(|t| t.name)
.collect::<Vec<_>>()
.join("|")
);
};
let breaking = entry.breaking;
let cue_type = entry.cue_type;
let raw =
fs::read_to_string(path).with_context(|| format!("Failed to read {}", path.display()))?;
// Strip the `authors:` trailer first — used by every fragment type.
let (body, contributors) = split_authors(&raw);View on GitHub (pinned to 0d4ab78a4f)