Skip to content

refactor: share stream history delivery across transports - #295

Merged
igorls merged 2 commits into
release/4.5from
feat/native-stream-session
Oct 23, 2026
Merged

igorls merged 2 commits into
release/4.5from
feat/native-stream-session

Conversation

@igorls

@igorls igorls commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Historical replay currently depends directly on Socket.IO framing and acknowledgements. Extract a small delivery interface so the additive native stream adapter can reuse the existing Elasticsearch queries, filters, metadata shaping, readiness/proof checks and scroll cleanup. streamPastCommon remains the legacy wrapper; its adapter preserves the existing packet shape and per-batch acknowledgement behavior.

Every delivery connection must provide disconnect listeners. A focused regression confirms an in-flight canonical proof is cancelled and its listener removed. HistoryStart.firstBlock is explicitly the first matching hit; the native adapter must resolve its actual inclusive replay anchor separately.

This is the first bounded slice of #294. The native endpoint, count/byte flow control, history/live coordination and pinned cross-language conformance remain subsequent work; #294 and #231 stay open. No dependency, configuration, default activation or retained-history change.

Validation at e21a54cf913e54f3cc53cf417ebfba110e81794c:

  • Committed-lock installation, Bun 1.4.4 whole-project check (254 files), and TypeScript 7.0.2 native artifact emission pass.
  • All 28 focused native history/lifecycle/filter checks pass on Node 22.23.3 and Node 24.19.0, including exact keys/false-valued filters, cancellation during admission, delivery rejection/owned scroll cleanup and disconnect during proof work.
  • Independent final Standards/Spec reviews have no scoped findings; review artifacts were independently hash-verified.
  • Node 22/24 CI includes the new native interface suite. All nine final-head CI jobs passed. Merged as 7e7f018bae39a255b787e3b3b884e31ffeca9bf3; its tree matches the reviewed head. All nine post-merge CI jobs passed.

The separate real uWebSockets/Socket.IO listener probe supports /stream and /stream/v2 coexistence, but is not endpoint or public protocol qualification.

@igorls
igorls marked this pull request as ready for review October 23, 2026 13:32
Copilot AI balanced review requested due to automatic review settings October 23, 2026 13:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

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