vectordotdev/vector · error

invalid fragment contents for

Error message

invalid fragment contents for '{filename}': authors should be space delimited, not comma delimited.

What it means

Fired by validate_contents after stripping the 'authors: ' prefix from the last line of the fragment. If the remaining names string contains commas, the fragment is rejected because the authors line must be space-delimited; commas typically indicate a copy-pasted author list that the changelog generator cannot split correctly.

Solutions

  1. Replace commas with spaces between author handles.
  2. Verify the final line reads `authors: handle1 handle2 ...`.
  3. Re-run the check after editing.

Example fix

// before
authors: jdoe, asmith
// after
authors: jdoe asmith
Defensive patterns

Strategy: validation

Validate before calling

let names = last.strip_prefix("authors: ").unwrap_or("").trim();
assert!(!names.contains(','), "separate authors with spaces, not commas");

Prevention

When it happens

Trigger: Running `vdev check changelog-fragments` when the last line contains any ',', e.g. `authors: jdoe, asmith`.

Common situations: Listing multiple authors in prose style ('Jane, Bob'); converting a YAML-style list to the authors line without switching delimiters.

Understand the failure class

Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.

Related errors


AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16). Data as JSON: /api/errors/f5625a6e46702dcf. Report an issue: GitHub.

Appendix: source

Thrown at vdev/src/commands/check/changelog_fragments.rs:215

    // line must be the last line, no trailing blank lines allowed.
    let last_line = content.lines().last().unwrap_or("");

    let Some(names) = last_line.strip_prefix("authors: ") else {
        bail!(
            "invalid fragment contents for '{filename}': last line must be 'authors: <name> [<name> ...]' (no trailing blank lines)."
        );
    };
    let names = names.trim();
    if names.is_empty() {
        bail!("invalid fragment contents for '{filename}': authors line has no names.");
    }
    if names.contains('@') {
        bail!(
            "invalid fragment contents for '{filename}': author names should not be prefixed with '@'."
        );
    }
    if names.contains(',') {
        bail!(
            "invalid fragment contents for '{filename}': authors should be space delimited, not comma delimited."
        );
    }
    if names.split_whitespace().any(|n| n == TODO_HANDLE) {
        bail!(
            "invalid fragment contents for '{filename}': the scaffolder placeholder '{TODO_HANDLE}' must be replaced with a real GitHub handle."
        );
    }

    // Reject any scaffolded body placeholder that the author forgot to fill in.
    // All templates start their placeholder lines with a literal `TODO ` at column 0,
    // which is rare in real fragment text.
    if let Some(bad) = content.lines().find(|l| l.starts_with("TODO ")) {
        bail!(
            "invalid fragment contents for '{filename}': scaffolder placeholder line still present ({bad:?}). Replace it with real content."
        );
    }

View on GitHub (pinned to bdb87aeaa4)