feat(sidecar): protocol 4 — two routes, and no opinion about either #4

Merged
whitlocktech merged 1 commits from feat/phase-7-permissions into edge 2026-09-22 06:53:36 +00:00
Member

GET /permissions/catalogue and POST /permissions/sync (R2) — the first pair that exists so the website can write to the game, and the smallest change in this repository that a protocol bump has ever needed.

That is the dumb-forwarder property paying for itself a second time: protocol 4 adds the largest command on the bridge and touches neither the store nor the feed. This process does not know what a group is, which names are managed, or what the plugin will do with any of it.

What this side does own

The envelope. cmd and reqId are inserted after the caller's object is taken, so they overwrite anything a caller put there: no request can arrive claiming to be a different command, or aimed at a correlation id somebody else is waiting on.

The line cap. A command larger than the game link's own 1 MiB limit is refused here, with the limit in the body. Forwarded, it would be discarded silently by both ends (§3.1 — an over-long line is dropped, not buffered) and reach the caller as a 504, which sends an operator to look at a game server that is working perfectly.

Everything else is the existing shape

A refusal from the plugin (perm.error, reason busy or too-large) comes back as a 200, exactly like a refused link code: the sidecar keeps its own status codes for the transport, because the website has to tell "the game said no" from "the game never answered" to say the right thing to an operator (§4.3).

Checks

cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test — 48 tests green, two of them new and both asserting a refusal rather than a happy path.

Walked end to end against this binary: a real core with module-rust installed, this sidecar, and a stand-in plugin speaking protocol 4 on the loopback. The catalogue route answered a live read through to the "game", and every sync in that walk travelled through perm_sync.

Base branch

edge, per D18.

AI disclosure

  • This contribution was AI-assisted (Claude Code).

🤖 Generated with Claude Code

https://claude.ai/code/session_01PMH6bw1jXMgbyF3ZWGEzSM

`GET /permissions/catalogue` and `POST /permissions/sync` (R2) — the first pair that exists so the website can **write** to the game, and the smallest change in this repository that a protocol bump has ever needed. That is the dumb-forwarder property paying for itself a second time: protocol 4 adds the largest command on the bridge and touches neither the store nor the feed. This process does not know what a group is, which names are managed, or what the plugin will do with any of it. ## What this side does own **The envelope.** `cmd` and `reqId` are inserted *after* the caller's object is taken, so they overwrite anything a caller put there: no request can arrive claiming to be a different command, or aimed at a correlation id somebody else is waiting on. **The line cap.** A command larger than the game link's own 1 MiB limit is refused here, with the limit in the body. Forwarded, it would be discarded silently by *both* ends (§3.1 — an over-long line is dropped, not buffered) and reach the caller as a `504`, which sends an operator to look at a game server that is working perfectly. ## Everything else is the existing shape A refusal from the plugin (`perm.error`, reason `busy` or `too-large`) comes back as a `200`, exactly like a refused link code: the sidecar keeps its own status codes for the transport, because the website has to tell "the game said no" from "the game never answered" to say the right thing to an operator (§4.3). ## Checks `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, `cargo test` — 48 tests green, two of them new and both asserting a refusal rather than a happy path. Walked end to end against this binary: a real core with `module-rust` installed, this sidecar, and a stand-in plugin speaking protocol 4 on the loopback. The catalogue route answered a live read through to the "game", and every sync in that walk travelled through `perm_sync`. ## Base branch `edge`, per D18. ## AI disclosure - [x] This contribution was AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PMH6bw1jXMgbyF3ZWGEzSM
wtclaude added 1 commit 2026-09-21 23:28:11 +00:00
feat(sidecar): protocol 4 — two routes, and no opinion about either
All checks were successful
PR Checks / rust-gates (pull_request) Successful in 1m38s
8f5440089c
`GET /permissions/catalogue` and `POST /permissions/sync` (R2). The first pair
that exists so the website can WRITE to the game, and the smallest change in this
repository that a protocol bump has ever needed.

That is the dumb-forwarder property paying for itself a second time: protocol 4
adds the largest command on the bridge and touches neither the store nor the feed.
The sidecar does not know what a group is, which names are managed, or what the
plugin will do with any of it. It puts an envelope on an object and forwards it.

**The envelope is this side's.** `cmd` and `reqId` are inserted AFTER the caller's
object is taken, so they overwrite anything a caller put there — no request can
arrive claiming to be a different command, or aimed at a correlation id somebody
else is waiting on.

**A command larger than the game link's line cap is refused here**, with the
limit in the body. Forwarded, it would be discarded silently by both ends
(§3.1 — an over-long line is dropped, not buffered) and present to the caller as
a `504`, which sends an operator to look at a game server that is working
perfectly.

Two tests, and both assert a refusal rather than a happy path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PMH6bw1jXMgbyF3ZWGEzSM
whitlocktech merged commit c005f5e12f into edge 2026-09-22 06:53:36 +00:00
whitlocktech deleted branch feat/phase-7-permissions 2026-09-22 06:53:37 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/Rust-Link#4
No description provided.