Skip to content

feat: add native stream JSON and credit foundations - #296

Merged
igorls merged 4 commits into
release/4.5from
feat/native-stream-json-v1
Oct 23, 2026
Merged

igorls merged 4 commits into
release/4.5from
feat/native-stream-json-v1

Conversation

@igorls

@igorls igorls commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Adds the protocol and flow-control foundations for #294 after the shared history extraction in #295. This slice provides codec and credit modules; the native endpoint and session integration remain subsequent work.

  • Validate bounded JSON envelopes, canonical decimal-string identifiers, exact sequence metadata and receipt structures, nondecreasing blocks within a frame, UTF-8 byte limits, duplicate/escaped keys, Unicode and finite numbers. Arbitrary contract data remains opaque and wider/compound delta identities retain their strings.
  • Pin client 346c473f55979ff2dd841aa2bbba4bcfebc49ef7. Execute all 37 shared wire vectors and verify the frozen protocol, manifest, 24 state scenarios and two network-session fixtures by SHA-256. Session/network fixture execution awaits the server integration.
  • Account for per-connection/per-subscription counts and complete encoded bytes. Fence serialization reentry, reserve before synchronous transport write, commit only on explicit acceptance, release failed writes, reject stale/duplicate/out-of-order ACK credit and bound active/lifetime identities. Only the next committed frame settles its retained costs.
  • Document remaining bounded queues/query memory, page splitting, deadlines, independently deliverable controls, real replay anchors, confirmed cleanup and fork/relay handling.

Validation at e8dd91a7693ad22fbfd4d98c0c2ec46461f6256a: Bun 1.4.4 whole-project check (256 files), TypeScript 7.0.2 artifact build and all 91 focused history/filter/codec/credit tests pass on Node 22.23.3 and 24.19.0. Regressions cover serialization reentry/error/retirement, exact credit release, malformed known metadata, opaque payloads and unrelated root counts, and descending frame blocks. CI includes the native suites; independent final Standards/Spec reviews found no remaining scoped issues; artifacts were independently hash-verified. All nine final-head CI jobs passed. Merged as d665dc6a6211079cacd2bee6bba0a44c5f4ba321; its tree equals the reviewed head. Post-merge CI is running.

This PR registers no route or operator default. #294 and #231 remain open for endpoint, retained-history, proxy, recovery and real server/client acceptance. No throughput, peak-memory recovery or Bun indexing-runtime qualification is claimed.

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

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.

@igorls
igorls merged commit d665dc6 into release/4.5 Oct 23, 2026
9 of 10 checks passed
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