{"record":{"id":"b88cef80bba2edb9","repo":"vectordotdev/vector","slug":"changelog-fragment-has-unrecognized-type-valid-types","errorCode":null,"errorMessage":"Changelog fragment {} has unrecognized type '{}' (valid types: {})","messagePattern":"Changelog fragment (.+?) has unrecognized type '(.+?)' \\(valid types: (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/commands/release/generate_cue.rs","lineNumber":364,"sourceCode":"    }\n    Ok(entries)\n}\n\nfn parse_changelog_fragment(path: &Path) -> Result<ChangelogEntry> {\n    let stem = path\n        .file_stem()\n        .and_then(|n| n.to_str())\n        .ok_or_else(|| anyhow!(\"Bad fragment filename: {}\", path.display()))?;\n    let parts: Vec<&str> = stem.split('.').collect();\n    if parts.len() != 2 {\n        bail!(\n            \"Changelog fragment {} is invalid (filename must be <name>.<type>.md)\",\n            path.display()\n        );\n    }\n    let fragment_type = parts[1];\n    let Some(entry) = FRAGMENT_TYPES.iter().find(|t| t.name == fragment_type) else {\n        bail!(\n            \"Changelog fragment {} has unrecognized type '{}' (valid types: {})\",\n            path.display(),\n            fragment_type,\n            FRAGMENT_TYPES\n                .iter()\n                .map(|t| t.name)\n                .collect::<Vec<_>>()\n                .join(\"|\")\n        );\n    };\n    let breaking = entry.breaking;\n    let cue_type = entry.cue_type;\n\n    let raw =\n        fs::read_to_string(path).with_context(|| format!(\"Failed to read {}\", path.display()))?;\n\n    // Strip the `authors:` trailer first — used by every fragment type.\n    let (body, contributors) = split_authors(&raw);","sourceCodeStart":346,"sourceCodeEnd":382,"githubUrl":"https://github.com/vectordotdev/vector/blob/0d4ab78a4f0d9c9e5d03a50108a2ae4d2f4b2460/vdev/src/commands/release/generate_cue.rs#L346-L382","documentation":"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.","triggerScenarios":"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.).","commonSituations":"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`.","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)."],"exampleFix":"// before\nchangelog.d/cool-feature.feature.md\n// after\nchangelog.d/cool-feature.enhancement.md","handlingStrategy":"validation","validationCode":"type=$(basename \"$f\" .md | cut -d. -f2); case \"$type\" in bug|enhancement) ;; *) echo \"unknown type: $type\";; esac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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/."],"tags":["cli","changelog","naming-convention"],"backgroundTag":"invalid-enum-value","analyzedSha":"0d4ab78a4f0d9c9e5d03a50108a2ae4d2f4b2460","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}