Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Resuming a legacy breakpoint snapshot crashes with IndexError when the paused component has an empty input socket

Abierto Apto para principiantes
#13,486 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
backend, testing

Línea de trabajo

Lee _consume_component_inputs en haystack/core/pipeline/base.py alrededor de la línea 1357 y la cobertura de snapshots heredados en test/core/pipeline/test_breakpoint.py, especialmente TestResumeFromLegacyPipelineSnapshot. Reproduce el caso omitido del socket opcional y luego añade una prueba de regresión que muestre que un snapshot heredado se reanuda con el valor predeterminado del socket ({'greeter': {'result': 'hi'}}) y confirma que las pruebas de breakpoint pasan.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Describe the bug

Resuming a breakpoint snapshot saved by an older Haystack (legacy inputs_format=None, flattened inputs) crashes with IndexError: list index out of range when the paused component has an input socket with no stored value. This happens for a component with all-optional inputs triggered with no input, or any optional socket omitted from the snapshot. Current-format snapshots resume correctly.

Error message

IndexError: list index out of range
  at haystack/core/pipeline/base.py:1357 in _consume_component_inputs (is_resume branch)

is_resume indexes socket_inputs_values[0] without checking the list is non-empty.

Expected behavior

The component resumes with its socket default: {'greeter': {'result': 'hi'}}.

To Reproduce

A pipeline with a component whose only input is optional (greeting: str = "hi") is run with break_point=Breakpoint(component_name="greeter"); the snapshot is converted to the legacy format (inputs_format=None, flattened inputs via the same helpers the migration uses) and resumed:

Case A (all-optional component, no inputs) legacy snapshot inputs: {'greeter': {}}
Case A FAILED: IndexError : list index out of range
Case B (current-format snapshot) resume: {'greeter': {'result': 'hi'}}

A self-contained script (repro_legacy_variants.py, plus a second shape repro_legacy_optional.py) is available; happy to attach it.

Additional context

  • Legacy snapshot resume is explicitly supported (haystack/core/pipeline/breakpoint.py:60-70, the fix-pipeline-snapshot-resume-in-loops release note, and TestResumeFromLegacyPipelineSnapshot), but no test covers a missing socket value.
  • Suggested fix: guard the index (if socket_inputs_values:) and add a legacy-resume test with an omitted optional socket; verified locally that this fixes both repro shapes and test/core/pipeline/test_breakpoint.py stays green (41 passed).
  • Searched open and closed issues/PRs for breakpoint/snapshot/legacy resume IndexError: no duplicate. Open PR #13415 touches _consume_component_inputs but only adds lazy-variadic sorting, not this branch.

System

  • OS: Windows 11
  • Haystack version: 4b5dd70 (main, v3.5.0-rc0)

Reported with AI assistance (Claude); the reproduction was executed and verified locally.

Lenguaje dominante
Python
Estrellas
26.8k
Forks
3.3k
Merge medio
1 d 1 h
PR fusionados (30 d)
235

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de deepset-ai/haystack

Todos los issues de deepset-ai/haystack

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.