Skip to content

doc: clarify QUIC stream state wording#63660

Open
EduardF1 wants to merge 1 commit into
nodejs:mainfrom
EduardF1:fix/quic-doc-wording
Open

doc: clarify QUIC stream state wording#63660
EduardF1 wants to merge 1 commit into
nodejs:mainfrom
EduardF1:fix/quic-doc-wording

Conversation

@EduardF1

@EduardF1 EduardF1 commented May 30, 2026

Copy link
Copy Markdown

Summary

  • describe createBidirectionalStream() without a body as half-open instead of half-closed
  • make the same clarification for createUnidirectionalStream()
  • note explicitly that omitting body does not send a FIN immediately

Fixes #63655

Validation

  • node tools/lint-md/lint-md.mjs doc/api/quic.md

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/quic

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. quic Issues and PRs related to the QUIC implementation / HTTP/3. labels May 30, 2026
@EduardF1 EduardF1 force-pushed the fix/quic-doc-wording branch from 478cae7 to a9a4f4e Compare May 30, 2026 12:31
@EduardF1 EduardF1 changed the title doc: fix half-closed wording in quic createBidirectionalStream and createUnidirectionalStream doc: clarify QUIC stream state wording May 30, 2026
@EduardF1 EduardF1 force-pushed the fix/quic-doc-wording branch from a9a4f4e to 6f7ce01 Compare June 4, 2026 00:07
@EduardF1

EduardF1 commented Jun 4, 2026

Copy link
Copy Markdown
Author

Friendly ping — just checking in on this documentation clarification. Happy to make any changes if needed!

@Qard

Qard commented Jun 5, 2026

Copy link
Copy Markdown
Member

Note that half-open and half-closed generally have different meanings in networking. Half-open is a failure case, implying one side has crashed or broken somehow. Half-closed implies one side was explicitly/intentionally closed, but the other remains open for listening, this exact scenario.

@EduardF1

EduardF1 commented Jun 6, 2026

Copy link
Copy Markdown
Author

Hi @Qard, thank you for the feedback on the terminology. You make a great point regarding 'half-open' implying a failure state in networking contexts vs 'half-closed' implying intentional closure of one stream direction. I will update the documentation to explicitly use 'half-closed' instead to avoid any ambiguity.

@EduardF1

Copy link
Copy Markdown
Author

Thanks @Qard. I've aligned the wording on "half-closed" throughout, since that matches the intentional one-direction-closed semantics here (writable side open, readable side not yet closed), rather than "half-open" which would imply a failure/crash on one peer.

The current head already reflects this at all four spots in doc/api/quic.md:

  • the body-omitted note for opening a stream (writable side open, no body queued, no immediate FIN)
  • the bidirectional-stream open note (writable side open, no FIN sent)

So there's no separate term left to change. Let me know if you'd prefer I also spell out "readable side open until the peer sends data / writable side open until end()" inline for extra clarity.

@Qard

Qard commented Jun 13, 2026

Copy link
Copy Markdown
Member

It does not appear to have been updated, and also looks like it needs a rebase.

@EduardF1 EduardF1 force-pushed the fix/quic-doc-wording branch from 99aebb5 to 980617d Compare June 26, 2026 10:35
@EduardF1

Copy link
Copy Markdown
Author

Thanks for the patience @Qard, and sorry for the earlier confusion — you were right on both counts. The branch had not actually been updated and was stale.

I've now force-pushed a rebased, corrected version:

  • Rebased onto the current main (the branch is now a single commit on top of HEAD).
  • Aligned the wording on "half-closed" in all four spots in doc/api/quic.md, per your terminology note. To avoid the "half-open implies a peer failure" ambiguity, the docs now consistently describe the no-body case as half-closed and explicitly note that the writable side stays open and no FIN is sent immediately (so the stream can still be written via stream.setBody() or the writer):
    • createBidirectionalStream() option note + prose
    • createUnidirectionalStream() option note + prose (these previously said "closed"/"closed immediately", which was misleading since a body can still be set afterwards)

Validation: node tools/lint-md/lint-md.mjs doc/api/quic.md passes with no warnings.

Let me know if you'd prefer different phrasing for the unidirectional case (a unidirectional send stream only has the one writable direction, so I kept the same "half-closed (writable side open, no FIN sent)" wording for consistency — happy to adjust if you'd rather it read simply "writable side open, no FIN sent").

@EduardF1 EduardF1 force-pushed the fix/quic-doc-wording branch from 980617d to bdf316b Compare June 27, 2026 14:17
@EduardF1

Copy link
Copy Markdown
Author

Thanks @Qard — I rebased the branch onto current main and confirmed the QUIC docs now use "half-closed" for this intentional writable-side-open/no-immediate-FIN state. The updated head is bdf316b.

When the `body` option is omitted, no FIN is sent immediately and the
writable side remains open, so the stream can still be written later via
`stream.setBody()` or the writer.

Per reviewer feedback, describe this state as "half-closed" rather than
"half-open": in networking "half-open" implies a failure case (one peer
crashed or vanished), whereas "half-closed" reflects the intentional
one-direction-open semantics here. Update both
`createBidirectionalStream()` and `createUnidirectionalStream()`
accordingly and explicitly note that no FIN is sent immediately.

Fixes: nodejs#63655

Signed-off-by: Eduard Fischer-Szava <fischer_eduard@yahoo.com>
@EduardF1 EduardF1 force-pushed the fix/quic-doc-wording branch from bdf316b to 897d796 Compare June 27, 2026 14:44

@Qard Qard 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.

It's a bit inconsistent with the "outgoing stream" part. The "outgoing" stream is one of the two halves the "half-closed" terminology is referring to, so saying the outgoing stream itself is half-closed feels a bit semantically wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. quic Issues and PRs related to the QUIC implementation / HTTP/3.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quic: Wording docu createBidirectionalStream (and uni)

4 participants