Fix graph stall for collectors downstream of empty iterators#9349
Fix graph stall for collectors downstream of empty iterators#9349JPPhoto wants to merge 2 commits into
Conversation
|
I ran a review of this branch at 495656c (multi-agent find + adversarial verify; every finding below was checked against the code, and the main one was reproduced by running it). The flat empty-iterator fix itself holds up well — completion logic, JSON round-trip/resume, event consumers, and the frontend all tolerate the empty-marked nodes (the If-branch skip path already set that precedent). But the fallback is wrong for nested iteration. 1. Confirmed bug:
|
495656c to
f928e93
Compare
f928e93 to
b6753cd
Compare
|
@lstein Thanks for the review. I believe I've addressed those issues with the latest commits. |
Summary
Fixes graph execution stalling when a
Collectnode is downstream of an iterator over an empty collection.Zero-iteration expansions are now explicitly recorded as complete. This allows downstream collectors to execute with an empty collection, typed consumers to receive
[], and the session to report completion.Collector output validation now handles materialized collectors with no runtime input edges. In this case, the already-validated source graph remains authoritative for type compatibility.
Related Issues / Discussions
Closes #9347
QA Instructions
Added coverage for:
IntegerCollection([]) -> Iterate -> Add -> Collect -> typed consumerIterate -> Collect -> Iterate -> Collectchains[]GraphExecutionState.is_complete()returningTrueMerge Plan
Checklist
What's Newcopy (if doing a release after this PR)