Skip to content

feat(response-stream): order parallel and nested replies - #401

Merged
laipz8200 merged 1 commit into
mainfrom
laipz8200/response-reply-ordering
Nov 18, 2026
Merged

laipz8200 merged 1 commit into
mainfrom
laipz8200/response-reply-ordering

Conversation

@laipz8200

Copy link
Copy Markdown
Member

Important

Package E of #356, following merged prerequisites A (#366), B (#365), and D (#374). Complete child pause/resume and snapshot serialization remain stage F.

Related Issue

Refs #356

Summary

When parallel Iteration items finish out of order, stream the eligible reply live and buffer later replies in numeric item order. Reserve nested container groups at node start and keep each root or child reply contiguous through its suffix. A reply's final marker does not release its frame; following replies wait for the frame, its descendants, and pending text to finish.

Keep the hierarchy, pending text, and retry handling inside the response filter's private package. Drain replies before successful or partially successful graph termination, discard hidden replies on failure or abort, and replace wholly hidden retry attempts without changing already displayed text or unrelated captured values.

Preserve ordinary Answer outputs and files, raw execution delivery, result-array order, and root chunk and snapshot compatibility. Containers without descendant replies do not delay independent root responses. Pending child-response reservations and child resumption remain explicitly unsupported by the root-only snapshot format.

Checklist

  • This pull request links the issue it resolves or advances
  • This pull request title follows Conventional Commits, and any breaking change is marked with !
  • If CLA Assistant prompted me, I signed CLA.md in the pull request conversation

Keep reply presentation in a filter-owned frame and container hierarchy.
Reserve nested groups before their first reply, stream the eligible response
contiguously, and retain later item text until preceding frames drain.

Settle failed containers before releasing buffered siblings, replace wholly
hidden retry attempts without rereading other values, and preserve root-only
snapshot behavior around containers without replies and empty invocations.
Keep child ordering snapshots and resumption explicitly unsupported for stage F.
@laipz8200
laipz8200 marked this pull request as ready for review November 17, 2026 07:56
@laipz8200
laipz8200 merged commit 6c0d95b into main Nov 18, 2026
9 checks passed
@laipz8200
laipz8200 deleted the laipz8200/response-reply-ordering branch November 18, 2026 05:56
QuantumGhost added a commit to QuantumGhost/graphon that referenced this pull request Nov 18, 2026
Merge upstream main reply ordering while retaining per-response incremental
gates, frame-owned first edge decisions, v3 snapshot compatibility and
nominal node/edge IDs.

Keep the interleaved-frame regression aligned with ordered presentation:
opening B cannot open A, and B waits until frame A finishes.

Validation: 1402 tests passed; static checks passed. Historical filter
v1/v2 pause checkpoints continue to restore with the current v3 writer.

Refs: langgenius#398, langgenius#401
Assisted-by: Codex:gpt-6.1-sol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants