{"record":{"id":"e8947114578a8c3b","repo":"vectordotdev/vector","slug":"mismatched-enacted-entry-for-the-existing-record-in-differs","errorCode":null,"errorMessage":"Mismatched enacted entry for '{}': the existing record in {} differs from the fragment data (deprecated_since or description). Either revert the fragment edit or update the enacted JSON by hand.","messagePattern":"Mismatched enacted entry for '(.+?)': the existing record in (.+?) differs from the fragment data \\(deprecated_since or description\\)\\. Either revert the fragment edit or update the enacted JSON by hand\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/utils/deprecation.rs","lineNumber":302,"sourceCode":"    let pending = read_deprecation_fragments(&dir)?;\n    let mut data = read_json(repo_root)?;\n    if let Some(existing) = data\n        .deprecations_enacted\n        .iter()\n        .find(|e| e.what == entry.what)\n    {\n        if existing.removed_in != entry.removed_in {\n            bail!(\n                \"Conflicting enacted entry for '{}': already recorded as removed in {}, refusing to record as removed in {}\",\n                entry.what,\n                existing.removed_in,\n                entry.removed_in\n            );\n        }\n        if existing.deprecated_since != entry.deprecated_since\n            || existing.description != entry.description\n        {\n            bail!(\n                \"Mismatched enacted entry for '{}': the existing record in {} differs from the fragment data \\\n                 (deprecated_since or description). \\\n                 Either revert the fragment edit or update the enacted JSON by hand.\",\n                entry.what,\n                existing.removed_in,\n            );\n        }\n        // Byte-for-byte duplicate; rewrite pending so a partial failure can\n        // recover, but don't push the entry again.\n    } else {\n        data.deprecations_enacted.push(entry);\n    }\n    sort_enacted(&mut data.deprecations_enacted);\n    data.deprecations_pending = pending_excluding_enacted(&pending, &data.deprecations_enacted);\n    write_json(repo_root, &data)\n}\n\n/// Sort enacted deprecations so generated output has a stable order.","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/vdev/src/utils/deprecation.rs#L284-L320","documentation":"After confirming removed_in matches, `append_enacted` also compares `deprecated_since` and `description` between the existing enacted entry and the fragment. Any mismatch means the fragment was edited after enactment, and it bails, instructing the developer to either revert the edit or hand-edit the enacted JSON.","triggerScenarios":"Calling `append_enacted` when an entry with the same `what` exists and its deprecated_since or description differs from the fragment's frontmatter values.","commonSituations":"Rephrasing a fragment's description after the deprecation was already recorded; changing the version a feature was deprecated since; merge conflicts resolved inconsistently between fragment and JSON.","solutions":["Revert the fragment edit so it matches the enacted JSON (git checkout the file)","Or deliberately update the deprecated_since/description in the enacted JSON to the new values","Keep descriptions stable after enactment; add corrections in a separate change","Re-run the deprecation sync to confirm consistency"],"exampleFix":"// before (fragment edited post-enactment)\ndescription: \"The `data_dir` option is deprecated\"\n// after\ndescription: \"original enacted description text\"  # or update the JSON by hand","handlingStrategy":"validation","validationCode":"if let Some(existing) = json.deprecations_enacted.iter().find(|e| e.what == fragment.what) {\n    assert_eq!(existing.deprecated_since, fragment.deprecated_since);\n    assert_eq!(existing.description, fragment.description);\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"Mismatched enacted entry\") => {\n        // revert fragment edit or update enacted JSON by hand, then retry\n    }\n    other => other?,\n}","preventionTips":["Treat enacted fragments as immutable; fix descriptions via a separate follow-up change","Bump versions wholesale via scripts so fragment and JSON stay in lockstep","Review merge resolutions touching both changelog.d and the enacted JSON together"],"tags":["rust","deprecation","versioning","conflict"],"backgroundTag":"conflicting-config-options","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"}