Add the source@v1 protocol layer - #112
Draft
chrisuthe wants to merge 1 commit into
Draft
Conversation
chrisuthe
force-pushed
the
source-role/01-protocol
branch
from
September 1, 2026 02:31
a49c06d to
8b8a514
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A new test comment violates the repository’s documentation convention by recording transient external implementation history.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds the internal source@v1 protocol foundation for issue #95.
Changes:
- Adds source role identifiers, messages, serialization, and command parsing.
- Centralizes big-endian 64-bit timestamp helpers.
- Adds protocol coverage for source messages and timestamp encoding.
File summaries
| File | Description |
|---|---|
src/protocol_messages.h |
Defines source protocol types and endian helpers. |
src/protocol.cpp |
Parses and serializes source messages. |
src/player_role.cpp |
Uses shared timestamp decoding. |
src/artwork_role.cpp |
Uses shared timestamp decoding. |
src/visualizer_role.cpp |
Uses shared timestamp decoding. |
tests/test_protocol.cpp |
Tests source protocol and endian behavior. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+829
to
+830
| // Exact-field assertions, including the hyphenated "client-stream/start" type string (the | ||
| // reference Python implementation still sends an underscore and must not be copied). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1/6 of the source@v1 stack (tracker: #95). Each part is based on the previous one.
What it adds: the source@v1 protocol layer — the source role/binary ids (chunk type 12), the
client-stream/start/client-stream/endserializers,server/commandsource parsing, and shared big-endian 64-bit read/write helpers (the player/artwork/visualizer readers now use them).How it's used: nothing calls the new pieces yet; part 3's source role uses them to announce and frame its outbound audio. The be64 dedup is a pure refactor covered by the existing suites.