{"record":{"id":"3976ec90f7e15247","repo":"vectordotdev/vector","slug":"content-between-the-title-and-summary-is-not-allowed-move-it","errorCode":null,"errorMessage":"content between the title and `## Summary` is not allowed — move it into `## Summary` or `## Migration`.","messagePattern":"content between the title and `## Summary` is not allowed — move it into `## Summary` or `## Migration`\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/commands/changelog/mod.rs","lineNumber":153,"sourceCode":"    }\n    if after_title.matches(MIGRATION_MARKER).count() != 1 {\n        bail!(\"exactly one `## Migration` section is required\");\n    }\n    let s_pos = after_title.find(SUMMARY_MARKER).unwrap();\n    let m_pos = after_title.find(MIGRATION_MARKER).unwrap();\n    if s_pos >= m_pos {\n        bail!(\"`## Summary` must come before `## Migration`\");\n    }\n\n    // Reject any prose between the H1 title and `## Summary`. Someone hand-migrating an\n    // old free-form breaking fragment could carry over the previous body here and it\n    // would silently disappear from both the release CUE and the upgrade guide.\n    // Everything before Summary must be whitespace (`\\n## Summary\\n` starts with the\n    // leading newline, so `s_pos` includes it).\n    if let Some(prefix) = after_title.get(..s_pos)\n        && !prefix.trim().is_empty()\n    {\n        bail!(\n            \"content between the title and `## Summary` is not allowed — move it into `## Summary` or `## Migration`.\"\n        );\n    }\n\n    let summary = after_title\n        .get(s_pos + SUMMARY_MARKER.len()..m_pos)\n        .unwrap_or(\"\")\n        .trim()\n        .to_string();\n    let migration = after_title\n        .get(m_pos + MIGRATION_MARKER.len()..)\n        .unwrap_or(\"\")\n        .trim()\n        .to_string();\n\n    if summary.is_empty() {\n        bail!(\"`## Summary` must not be empty\");\n    }","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/vdev/src/commands/changelog/mod.rs#L135-L171","documentation":"`parse_breaking_sections` rejects any non-whitespace prose between the H1 title line and the `## Summary` heading. This guards against hand-migrated free-form fragments whose body would silently disappear from the release CUE and upgrade guide. If the prefix before Summary contains visible content, it bails with this error telling the author to move the content into Summary or Migration.","triggerScenarios":"Parsing a breaking fragment with any text, list items, or code blocks placed between the title line and the first `## Summary` heading.","commonSituations":"Pasting an old free-form breaking-change fragment (which was one blob of prose under the title) into the new format; writing an intro paragraph before the Summary heading.","solutions":["Move the prose between the title and `## Summary` into the `## Summary` section.","Alternatively move content describing upgrade steps into `## Migration`.","Ensure only blank lines remain between the title and `## Summary`."],"exampleFix":"// before\n# My change\nThis note explains the change.\n## Summary\nSummary text.\n## Migration\nSteps.\n// after\n# My change\n## Summary\nThis note explains the change. Summary text.\n## Migration\nSteps.","handlingStrategy":"validation","validationCode":"let s_pos = after_title.find(\"## Summary\").unwrap_or(0);\nlet prefix = &after_title[..s_pos];\nif !prefix.trim().is_empty() {\n    eprintln!(\"move prose between title and Summary into Summary or Migration\");\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = parse_breaking_sections(text) {\n    eprintln!(\"fragment structure: {e}\");\n}","preventionTips":["When migrating old free-form fragments, move all prose into Summary/Migration sections.","Never write intro paragraphs between the title and `## Summary`.","Validate fragments before committing."],"tags":["changelog","validation","markdown"],"backgroundTag":"schema-validation-failed","analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}