-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Background
Based on the Manager <-> roxyd design discussed in #519
This issue sets up the review-protocol client-side connection skeleton for roxyd.
This is scaffolding-only.
No RequestCode handling or privileged operations are implemented in this issue.
Scope
In scope
- Connection lifecycle structure (e.g. connect -> run)
- A minimal mock Manager for tests (handshake-only)
Out of scope
- Implementing any RequestCode-specific logic
- Implementing or porting existing handlers
- Performing privileged operations
- Introducing retries, backpressure, or rate limiting
- Feature-flag–based switching logic
- Observability, metrics, or health endpoints
Tasks
1. Connection struct
- Introduce a connection-managing struct.
- The struct owns the review-protocol connection and related state.
2. Connect phase
- Implement
connect(...) -> Result<Self>(or equivalent) that:- establishes QUIC/mTLS connectivity
- performs the initial handshake
- returns a connected instance
- Use
review_protocol::client::ConnectionBuilder::new()as the single entrypoint for establishing the connection (no direct QUIC wiring in this issue).
3. Run loop
- Implement
run(self) -> Result<()>(or equivalent) that:- receives messages from Manager
- delegates message handling to a separate function
4. Dispatch boundary
- Add a function such as
handle_request(...) -> Result<()>that:- logs the received message /
RequestCode - includes an explicit
matchstatement that enumerates exactly theseRequestCodes:RebootShutdownResourceUsageProcessList
- for every
RequestCodearm, fail explicitly withunimplemented!()(scaffolding-only) - for all other
RequestCodes, use a fallback arm (e.g._ => ...) that also fails explicitly withunimplemented!()
- logs the received message /
5. Tests (mock Manager)
- Add a test that spins up a minimal mock Manager (review-protocol server) and verifies:
- QUIC/mTLS connection establishment using
review_protocol::client::ConnectionBuilder::new(), and - completion of the initial handshake.
- QUIC/mTLS connection establishment using
- The mock Manager should implement only the minimum required for handshake (no RequestCode business logic).
- Keep tests deterministic and self-contained (no external network dependencies).
Notes
- The review-protocol repository is here: https://github.com/petabi/review-protocol.
Acceptance Criteria
- A review-protocol client connection-managing skeleton exists for
roxydand compiles successfully. connect()establishes connectivity and handshake.- Incoming
RequestCodes are received and dispatched to handler (handle_request()). - All handler paths fail explicitly with
unimplemented!(). - No real handler logic or privileged operations are introduced.
- A unit/integration test exists that uses a minimal mock Manager to validate QUIC/mTLS + handshake.
- CI passes
Metadata
Metadata
Assignees
Labels
No labels