feat(sidecar): protocol 1 — the transport #1
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/phase-1-transport"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First code in this repo. The rust-link sidecar: it owns the loopback listener the Oxide bridge plugin dials into, and serves the website a WebSocket feed plus store-backed reads.
Phase 1 of
modules/rust/PLAN.md. Lands with the Rust-Plugins, Module-Rust and docs PRs; the four are one change across four repos.What protocol 1 is
Three frames, deliberately:
server.hello,ping/pong, and one correlatedserver.status. Phase 1's job is the kit's own argument — get every seam working at once with almost nothing in them, so that afterwards you break exactly one at a time.What is load-bearing rather than incidental
/statusis the one route that fails when the game is down, and/serveranswers204rather than a null when the game has never connected. Those are different answers, and a client that cannot tell them apart renders a server that does not exist.503means the game is down;504means it is up and did not answer. Different fixes.rpc::REPLY_TIMEOUTis a ceiling every later command budget sits under. Core classifies a budget overrun as retryable unconditionally, so an action whosebudgetMsdoes not exceed it can never reportretry: false.One defect found while building
A four-connection SQLite pool over
:memory:hands out four separate empty databases, because an in-memory database is per connection. It presents asno such tablefrom a random subset of queries. The pool is now capped at one connection for an in-memory path, with a test asserting the pool size rather than just that a query works — asserting the query would pass again the moment someone tidied the sizing back.How it was verified
cargo test— 36 tests, green.cargo clippy --all-targets -- -D warningsclean,cargo fmt --checkclean.server.hellotravelled game → sidecar → module → the public website API. Killing this process left the game untouched; restarting it produced a second hello and the event history survived.409version gate, the401on an unauthenticated read and the204on an unpopulated board were each exercised by hand.🤖 Generated with Claude Code
https://claude.ai/code/session_016wDDVXWMDz82WqE1i969r4