Repository navigation
refactor(response-stream): extract reusable template assembly - #365
Merged
Merged
Conversation
Move template draining, selector buffers, and response cursors into a private template_stream module owned by ResponseStreamFilter. Pass graph and variable access explicitly so later frame sessions can reuse independent state. Keep traversal, response ordering, file-adapter binding, and snapshot coordination in the filter. Preserve root Answer/End events, existing shared-selector consumption, execution identities, final values, and v1/v2 snapshot compatibility.
laipz8200
marked this pull request as ready for review
October 27, 2026 05:37
laipz8200
enabled auto-merge (squash)
October 27, 2026 06:50
WH-2099
approved these changes
Oct 27, 2026
WH-2099
left a comment
Member
There was a problem hiding this comment.
Reviewed the template assembly extraction through its upstream producers, downstream consumers, file runtime context, and snapshot restoration paths.
No blocking findings.
Validation: all 1,001 tests and just check passed.
Baseline/HEAD comparisons matched across 576 scenarios and four real-engine streaming/resume cases; bidirectional snapshot restoration between revisions also passed.
2 of 3 tasks
This was referenced Nov 16, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Important
This is the filter assembly prerequisite for #356. Child-frame activation and reply ordering remain separate work.
Related Issue
Refs #356
Summary
Extract the existing template assembly, source buffers, and response cursors into a private module inside the response-filter package. Each filter owns its assembly state; later frame sessions can reuse separate instances while the filter controls which response drains.
Preserve root Answer/End output, current shared-selector consumption, final-value and file rendering, execution identities, and v1/v2 snapshots. Traversal, response scheduling, file-adapter binding, and snapshot coordination stay in
ResponseStreamFilter. Public imports and Answer output keys remain unchanged.Checklist
!