Skip to content

Rename client_stream/* to client/stream-* and document the message-type naming convention #150

Closed

Description

@balloob

Revised after the review by @maximmaxim345. The first version proposed client/stream-start, and that name was wrong. See the discussion below.

Problem

The prefix client_stream/ is the only message prefix with an underscore. Two messages use it, client_stream/start and client_stream/end.

The spec also does not give the rule for its message prefixes. Thus the reader makes a rule, and then finds the exceptions:

  • stream/request-format goes from the client to the server. The other stream/ messages go from the server to the client.
  • management/ requests go from the server to the client. Only management/result goes to the server.
  • pair/abort and noise/handshake go in both directions.

Change 1: rename client_stream/*

Change client_stream/start to stream/client-start. Change client_stream/end to stream/client-end.

The prefix stream/ is a category, not a sender. @maximmaxim345 gives the rule: these messages carry the metadata for a binary channel, and they open, close or reconfigure that channel. The two client_stream/* messages have the same function.

Thus the new names keep the category. The prefix gives the function, and the name gives the direction. The messages stream/start, stream/end and stream/clear do not change.

All 15 occurrences are in roles/source/v1.md, and no other file links to them. Thus this is a change to one file.

Change 2: give the rule in messaging.md

Add a short note in the Communication section, near the text about type and payload.

Give this rule: a prefix identifies a group of messages. The prefixes client/ and server/ give the sender. The prefix stream/ gives the messages that control a binary channel. The prefixes group/, management/, pair/ and noise/ give a subject. A message that is not in the client/ or server/ group can go in either direction, and each message gives its own direction.

The rule for stream/ is the important part. The spec does not give it today, and for this reason the first version of this issue proposed the wrong names.

Not proposed

A full correction of the message names. It changes 16 to 22 of the 38 message types. It also cannot be fully consistent, because a message in both directions has no sender prefix.

@maximmaxim345 gives one alternative: rename stream/start to server/stream-start, and use client/stream-start for the source. This makes the sender the rule for all messages, but it removes the stream/ category. This issue does not propose it.

Compatibility

Change 1 breaks compatibility for a source client. No other message type changes.

Activity

  1. maximmaxim345 commented on Aug 18, 2026

    @maximmaxim345
    Member

    The client_stream/ prefix was deliberate: The stream/start, stream/end, stream/clear are messages with the purpose of providing metadata for binary messages. They are different from the regular server/... messages.

    The two client_stream/* messages carry the same purpose: open, close and reconfigure a binary channel. client/stream-start classifies by sender and drops that meaning. (unless we also rename the regular stream/start to server/stream-start)

    The underscore is a valid point though.

  2. balloob commented on Aug 18, 2026

    @balloob
    ContributorAuthor

    You are correct, and I withdraw the proposed names.

    I did not see that stream/ is a category. The messages stream/start, stream/end and stream/clear carry the metadata for a binary channel. The two client_stream/* messages have the same function. Thus client/stream-start classifies by sender and removes the category.

    But a third form keeps the category and removes the underscore:

    Old New
    client_stream/start stream/client-start
    client_stream/end stream/client-end

    Then one prefix holds all binary-channel messages. The prefix gives the function, and the name gives the direction. The messages stream/start, stream/end and stream/clear do not change.

    Change 2 is now the more important half. Your comment gives the rule for the stream/ category, and the spec does not give this rule anywhere. That is the text to add. The first version of this issue proposed the wrong names for exactly this reason.

    I updated the issue with both changes, and recorded your alternative (rename stream/start to server/stream-start) as an option that this issue does not propose.


    Generated by Claude Code

  3. maximmaxim345 commented on Aug 19, 2026

    @maximmaxim345
    Member

    Don't see the value that stream/client-start adds over client-stream/start though.
    With client-stream it's IMO clearer that the scope of the command is different to stream.
    server to client streams are completely separate from client to server streams after all. Both types of streams don't share the same lifetime.

  4. moved this from Next to In Progress in Sendspin Project Boardon Aug 20, 2026
  5. added a commit that references this issue on Aug 24, 2026
    092ffb1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions