Skip to content

bug(response-stream): child Answer drops suffix when an outer source is skipped #455

In review

Description

@WH-2099

An Answer inside a Loop or Iteration can lose the rest of its streamed text when it references an outer node skipped by a conditional branch.
Reproduced with Graphon 0.9.0 through the Dify workflow runner in langgenius/dify#45356, for both container types.

Reproduce

  1. Add a root If/Else node with true → source → container and false → container.
    source is a Template Transform that returns ok.
  2. Use a Loop with one round, or an Iteration over ["one"].
    Its body contains an Answer with template ({{#source.output#}}).
  3. Add a root Answer after the container with text |after.
  4. Take the false branch so source is skipped while the container still runs.

Expected and actual

Observation Expected Actual
Child Answer's completed answer output () ()
Text received by the caller ()|after (|after
Workflow terminal event GraphRunSucceededEvent GraphRunSucceededEvent

The missing reference should finish as empty text so the remaining template can be emitted.
Instead, the child stream stops at (, although the following root Answer still emits and the run succeeds.

#439 fixed the root Answer case and explicitly noted this remaining container case.
Related: #356, #436.

Activity

  1. self-assigned this
    on Dec 1, 2026
  2. dosubot commented on Dec 1, 2026

    @dosubot

    The child response filter can’t see that the outer source was skipped. GraphEdgeSkippedEvent goes only to the session for its own frame, and the child session computes skipped nodes from its body graph. With no value or stream for source.output, the child reader leaves that reference open. The final flush only marks nodes in the body graph as finished, so it still can’t advance to ) [1] [2] [3] [4] [5] [6].

    I’d make the child filter consult the source’s owning frame for skip status, including skips observed before the child starts, without mixing ancestor edges into child reply activation. For both Loop and Iteration, I’d test that the false branch streams ()|after and the true branch still streams (ok)|after, with exactly one child final marker after ) [7] [8].

    To reply, just mention @dosu.


    Docs are dead. Just use Dosu.

    Leave Feedback Ask Dosu about graphon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions