{"record":{"id":"b884b95c5978323c","repo":"deepset-ai/haystack","slug":"invalid-pipeline-snapshot-components-invalid-inp","errorCode":null,"errorMessage":"Invalid pipeline snapshot: components {invalid_input_data} in 'input_data' are not part of the current pipeline.","messagePattern":"Invalid pipeline snapshot: components (.+?) in 'input_data' are not part of the current pipeline\\.","errorType":"validation","errorClass":"PipelineInvalidPipelineSnapshotError","httpStatus":null,"severity":"error","filePath":"haystack/core/pipeline/breakpoint.py","lineNumber":80,"sourceCode":"    :param pipeline_snapshot: The saved state to validate.\n    \"\"\"\n\n    pipeline_state = pipeline_snapshot.pipeline_state\n    valid_components = set(graph.nodes.keys())\n\n    # Check if the ordered_component_names are valid components in the pipeline\n    invalid_ordered_components = set(pipeline_snapshot.ordered_component_names) - valid_components\n    if invalid_ordered_components:\n        raise PipelineInvalidPipelineSnapshotError(\n            f\"Invalid pipeline snapshot: components {invalid_ordered_components} in 'ordered_component_names' \"\n            f\"are not part of the current pipeline.\"\n        )\n\n    # Check if the original_input_data is valid components in the pipeline\n    serialized_input_data = pipeline_snapshot.original_input_data[\"serialized_data\"]\n    invalid_input_data = set(serialized_input_data.keys()) - valid_components\n    if invalid_input_data:\n        raise PipelineInvalidPipelineSnapshotError(\n            f\"Invalid pipeline snapshot: components {invalid_input_data} in 'input_data' \"\n            f\"are not part of the current pipeline.\"\n        )\n\n    # Validate 'component_visits'\n    invalid_component_visits = set(pipeline_state.component_visits.keys()) - valid_components\n    if invalid_component_visits:\n        raise PipelineInvalidPipelineSnapshotError(\n            f\"Invalid pipeline snapshot: components {invalid_component_visits} in 'component_visits' \"\n            f\"are not part of the current pipeline.\"\n        )\n\n    component_name = pipeline_snapshot.break_point.component_name\n    visit_count = pipeline_snapshot.pipeline_state.component_visits[component_name]\n\n    logger.info(\n        \"Resuming pipeline from {component} with visit count {visits}\", component=component_name, visits=visit_count\n    )","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/core/pipeline/breakpoint.py#L62-L98","documentation":"_validate_pipeline_snapshot_against_pipeline raises PipelineInvalidPipelineSnapshotError when keys of the snapshot's original_input_data (serialized_data) reference components that do not exist in the current pipeline. The input data must be addressed to components of the pipeline being resumed.","triggerScenarios":"Resuming with a snapshot whose original_input_data contains component keys from another/older pipeline; hand-editing a snapshot JSON and adding or renaming component keys.","commonSituations":"Sharing snapshot files between different pipeline definitions; refactoring component names after capturing a state; manually constructing snapshots for tests with wrong keys.","solutions":["Use a snapshot whose original_input_data keys match the current pipeline's components; regenerate it from the current pipeline.","Remove or rename the stale component keys in original_input_data['serialized_data'].","Pre-check in code: set(snapshot.original_input_data['serialized_data']) <= set(pipeline.graph.nodes)."],"exampleFix":"// before\nsnapshot.original_input_data[\"serialized_data\"] = {\"old_retriever\": {...}}\n// after\nsnapshot.original_input_data[\"serialized_data\"] = {\"retriever\": {...}}","handlingStrategy":"validation","validationCode":"invalid = set(snapshot.original_input_data[\"serialized_data\"]) - set(pipeline.graph.nodes)\nassert not invalid, f\"input_data references unknown components: {invalid}\"","typeGuard":"def input_data_valid(snapshot, pipeline) -> bool:\n    return set(snapshot.original_input_data[\"serialized_data\"]) <= set(pipeline.graph.nodes)","tryCatchPattern":"try:\n    result = pipeline.run(data, pipeline_snapshot=snapshot)\nexcept PipelineInvalidPipelineSnapshotError as e:\n    logger.error(\"Snapshot input_data invalid: %s\", e)","preventionTips":["Never hand-edit snapshot input_data keys","Rename keys when renaming components in saved snapshots","Validate all snapshot sections before resuming"],"tags":["haystack","pipeline","snapshot","validation"],"backgroundTag":"snapshot-mismatch","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}