Skip to content

fix: harden stream recovery and adversarial coverage - #18

Merged
igorls merged 1 commit into
masterfrom
fix/adversarial-stream-coverage
Oct 20, 2026
Merged

igorls merged 1 commit into
masterfrom
fix/adversarial-stream-coverage

Conversation

@igorls

@igorls igorls commented Oct 20, 2026

Copy link
Copy Markdown
Member

Reconnect could confirm stale fork records left in the LIB buffer, deliver packets addressed to the previous subscription while its replacement was registering, or resume beyond unread records after repeated outages. Invalidate old reversible state on transport and relay loss, retire stale UUID routing, and preserve an inclusive recovery boundary. LIB subscriptions holding unconfirmed data now fail with retryable STREAM_REPLAY_REQUIRED if replay is disabled.

Also fix cancellation/cache delivery after stop, removal of once listeners by their original callbacks, immediate retry after cancelling connection setup, explicit-undefined option defaults, LIB stall detection, and rejected observer promises escaping as unhandled rejections. Observer failures remain independent of packet ACKs.

Validation:

  • 60 protocol tests against ESM and the same suite against CommonJS; 12 new adversarial regressions were observed failing before fixes.
  • Native Node 24 core runtime coverage: 97.95% lines / 89.86% branches / 92.16% functions (previously 89.00% / 80.47% / 87.91%). Node 22 also passes the new 95/88/90 coverage floors.
  • Six real Chromium ESM/UMD cases: finite history, structured setup rejection and malformed binary payloads, uint64 binary delivery and remote cancellation.
  • Whole-project typecheck, packed external ESM/CommonJS and TypeScript consumers, and production dependency audit pass locally.
  • CI runs the coverage gate and both Node format suites on Node 22/24 and Windows/Linux, with Chromium on Linux/Node 24.

The discovery report documents the reproductions and remaining gaps. Real Hyperion/proxy, retained-history, filtering, and long-running soak qualification remain under history-api #231. No npm publication or deployment is included.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 17:35

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 99ad2cf into master Oct 20, 2026
4 of 5 checks passed
@igorls
igorls deleted the fix/adversarial-stream-coverage branch October 20, 2026 19:51
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