You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resuming a pipeline snapshot could fail when the breakpoint hit a component on its second visit (or later) in a loop. The root cause was that the snapshot lost the input provenance needed to know that the paused component should run again.
This PR preserves that provenance in new snapshots, keeps a best-effort compatibility path for older snapshots, and fixes the optional-socket sentinel case so resume does not silently drop paused inputs.
How did you test it?
hatch run test:unit test/core/pipeline
hatch run test:integration test/core/pipeline/breakpoints
hatch run test:types
hatch run fmt haystack/core/pipeline/breakpoint.py haystack/core/pipeline/pipeline.py test/core/pipeline/test_breakpoint.py
Reproduced the original blocked-resume case and the optional-socket regression locally
Notes for the reviewer
Suggested review order:
haystack/core/pipeline/breakpoint.py
haystack/core/pipeline/pipeline.py
test/core/pipeline/test_breakpoint.py
If you only look at one test first, please start with test_break_point_with_pipeline_snapshot_resumes_mid_loop_visit, because it captures the core failure this PR fixes.
The main cases covered by tests are:
new-format mid-loop resume
legacy snapshot compatibility
one-shot legacy resume behavior
optional socket / _NO_OUTPUT_PRODUCED handling
One intentional tradeoff: raw saved snapshot inputs are now more internal-looking because they preserve sender metadata needed for correct resume behavior.
Legacy snapshots are supported on a best-effort basis; older files may still be limited by missing provenance in the original snapshot format.
I have updated the related issue with new insights and changes.
I have added unit tests and updated the docstrings.
I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
Hi @Aarkin7, thanks for your interest in contributing to Haystack! 🙏
⚠️ Issue #12145 is already being addressed by open pull request(s) #12152. Before opening a PR for an issue, please check whether a PR is already linked to it, and consider contributing to the existing PR instead. We may close duplicate PRs to keep the review queue manageable.
⚠️ You currently have 3 open pull requests in this repository (#11963, #11814 and this one). Our review capacity is limited, so please hold off opening more PRs until we've had a chance to review your first 2 open PRs. This helps us give each contribution the attention it deserves. Thank you!
This is an automated message to help us keep the review queue healthy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes:
Resuming a pipeline snapshot could fail when the breakpoint hit a component on its second visit (or later) in a loop. The root cause was that the snapshot lost the input provenance needed to know that the paused component should run again.
This PR preserves that provenance in new snapshots, keeps a best-effort compatibility path for older snapshots, and fixes the optional-socket sentinel case so resume does not silently drop paused inputs.
How did you test it?
hatch run test:unit test/core/pipelinehatch run test:integration test/core/pipeline/breakpointshatch run test:typeshatch run fmt haystack/core/pipeline/breakpoint.py haystack/core/pipeline/pipeline.py test/core/pipeline/test_breakpoint.pyNotes for the reviewer
Suggested review order:
haystack/core/pipeline/breakpoint.pyhaystack/core/pipeline/pipeline.pytest/core/pipeline/test_breakpoint.pyIf you only look at one test first, please start with
test_break_point_with_pipeline_snapshot_resumes_mid_loop_visit, because it captures the core failure this PR fixes.The main cases covered by tests are:
_NO_OUTPUT_PRODUCEDhandlingOne intentional tradeoff: raw saved snapshot inputs are now more internal-looking because they preserve sender metadata needed for correct resume behavior.
Legacy snapshots are supported on a best-effort basis; older files may still be limited by missing provenance in the original snapshot format.
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.