Skip to content

refactor(response-stream): extract reusable template assembly - #365

Merged
laipz8200 merged 1 commit into
mainfrom
laipz8200/issue-356-filter-assembly
Oct 27, 2026
Merged

laipz8200 merged 1 commit into
mainfrom
laipz8200/issue-356-filter-assembly

Conversation

@laipz8200

Copy link
Copy Markdown
Member

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

  • 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

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
laipz8200 marked this pull request as ready for review October 27, 2026 05:37
@laipz8200
laipz8200 enabled auto-merge (squash) October 27, 2026 06:50
@WH-2099 WH-2099 self-assigned this Oct 27, 2026

@WH-2099 WH-2099 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@laipz8200
laipz8200 merged commit 020c4be into main Oct 27, 2026
8 checks passed
@laipz8200
laipz8200 deleted the laipz8200/issue-356-filter-assembly branch October 27, 2026 11:17
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