feat(sidecar): protocol 5 — three routes, and the one timeout worth explaining #5

Merged
whitlocktech merged 1 commits from feat/phase-7b-config into edge 2026-09-22 15:02:03 +00:00
Member

Phase 7b, the sidecar half of R18. Spec: docs/rust-link/PROTOCOL.md §11.

GET /config/files, GET /config/file, POST /config/write — and the dumb-forwarder property holds for a third protocol version. No schema for any of it, nothing filed in the store, no opinion about a path.

The path is forwarded verbatim and judged at the far end, deliberately: only the process holding the configuration directory can decide whether a path resolves inside it, and a guard here would be a weaker second opinion with no way to check itself — the kind that makes the real one feel optional.

Nothing is cached. A config this sidecar stored would be an edit an operator made over SSH that the website then silently overwrote, so all three fail when the game is down, like /status.

The one addition beyond forwarding

A 504 on /config/write is the only timeout on this bridge with a knowable answer: the plugin writes a whole set or restores a whole set and never half of either. So the body says to re-read rather than guess, and names the reload window that is probably still running.

CONFIG_RELOAD_WINDOW mirrors the plugin's four seconds, and a test asserts that two of them plus a second of slack fit inside REPLY_TIMEOUT — a rollback that reports after its caller has given up is worse than no rollback, because the plugin is healthy and the website says otherwise.

PROTOCOL_VERSION is 5; cargo fmt, clippy -D warnings and 50 tests green.

  • AI-assisted: Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01PMH6bw1jXMgbyF3ZWGEzSM

Phase 7b, the sidecar half of R18. Spec: `docs/rust-link/PROTOCOL.md` §11. `GET /config/files`, `GET /config/file`, `POST /config/write` — and the dumb-forwarder property holds for a third protocol version. No schema for any of it, nothing filed in the store, no opinion about a path. **The path is forwarded verbatim and judged at the far end**, deliberately: only the process holding the configuration directory can decide whether a path resolves inside it, and a guard here would be a weaker second opinion with no way to check itself — the kind that makes the real one feel optional. **Nothing is cached.** A config this sidecar stored would be an edit an operator made over SSH that the website then silently overwrote, so all three fail when the game is down, like `/status`. ## The one addition beyond forwarding A `504` on `/config/write` is the only timeout on this bridge with a knowable answer: the plugin writes a whole set or restores a whole set and never half of either. So the body says to re-read rather than guess, and names the reload window that is probably still running. `CONFIG_RELOAD_WINDOW` mirrors the plugin's four seconds, and **a test asserts that two of them plus a second of slack fit inside `REPLY_TIMEOUT`** — a rollback that reports after its caller has given up is worse than no rollback, because the plugin is healthy and the website says otherwise. `PROTOCOL_VERSION` is 5; `cargo fmt`, `clippy -D warnings` and 50 tests green. - [x] 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-22 13:56:33 +00:00
feat(sidecar): protocol 5 — three routes, and the one timeout worth explaining
All checks were successful
PR Checks / rust-gates (pull_request) Successful in 1m27s
9532b7b26c
`GET /config/files`, `GET /config/file` and `POST /config/write` (R18). The
sidecar keeps the property protocol 4 relied on: it defines no schema for any of
it, stores none of it, and judges no path — only the process holding the
configuration directory can decide whether a path resolves inside it, and a
guard here would be a weaker second opinion with no way to check itself.

Nothing reaches the store or the feed. A config this sidecar cached would be an
edit an operator made over SSH that the website then silently overwrote, so all
three routes fail when the game is down, like `/status`.

The one thing added beyond forwarding is a better 504 on the write: the plugin
writes a whole set or restores a whole set and never half of either, so the body
says to re-read rather than guess, and names the reload window that is probably
still running. `CONFIG_RELOAD_WINDOW` mirrors the plugin's, and a test asserts
that two of them plus slack fit inside `REPLY_TIMEOUT` — a rollback that reports
after its caller has gone is worse than no rollback.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PMH6bw1jXMgbyF3ZWGEzSM
whitlocktech merged commit 6ad49ea9fe into edge 2026-09-22 15:02:03 +00:00
whitlocktech deleted branch feat/phase-7b-config 2026-09-22 15:02:05 +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#5
No description provided.