Skip to content

Refactor slot response streaming messages#3017

Open
markphelps wants to merge 1 commit into
mainfrom
cog-streaming-1
Open

Refactor slot response streaming messages#3017
markphelps wants to merge 1 commit into
mainfrom
cog-streaming-1

Conversation

@markphelps
Copy link
Copy Markdown
Contributor

Summary

  • Rename slot response log and output messages to explicit streaming-oriented variants.
  • Add protocol version and binary chunk variants for future transport extensions.
  • Include output chunk indexes and update parent/worker routing tests.

Test Plan

  • mise run fmt:rust:fix
  • mise run lint:rust
  • mise run test:rust

@markphelps markphelps requested a review from a team as a code owner May 13, 2026 18:11
@markphelps
Copy link
Copy Markdown
Contributor Author

/bonk review

@markphelps markphelps requested a review from michaeldwan May 13, 2026 18:28
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 13, 2026

@markphelps Bonk workflow was cancelled.

View workflow run · To retry, trigger Bonk again.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 13, 2026

Based on my review of the code changes in PR #3017, here's my assessment:

Review Summary

LGTM - The PR refactors slot response streaming messages cleanly and adds extensibility for future transport protocols.

Key Changes

  1. Renamed message variants for clarity:

    • LogLogLine (explicit streaming-oriented name)
    • OutputOutputChunk (explicit streaming-oriented name)
  2. Added protocol versioning with ProtocolVersion message and SLOT_RESPONSE_PROTOCOL_VERSION = 1 constant for future compatibility checking

  3. Added BinaryChunk for future WebSocket streaming support (currently logged and ignored)

  4. Added index: u64 to OutputChunk for output chunk ordering/tracking

  5. Updated all call sites in orchestrator, worker, and tests to use new variant names

Code Quality

  • Clean separation of concerns - protocol changes isolated to protocol.rs
  • Backward-compatible approach using explicit protocol version
  • Good test coverage for new variants
  • Proper handling of unknown protocol versions (logs warning, continues)

Minor Observation

The index field in OutputChunk is received but not currently used in the orchestrator (marked with _). This appears to be intentional groundwork for future ordering/reassembly logic.

github run

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.

1 participant