feat(sidecar): protocol 6 — first-party clans, and no new code
All checks were successful
PR Checks / rust-gates (pull_request) Successful in 1m24s

Protocol 6 adds one board (`clans`) and five clan events. The sidecar
files frames by `type`, so none of them needs an arm here. That is
protocol 2's promise kept. The bump exists for the other declaration
sites: a website that reads clans must not pair with a plugin that
never sends them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
2026-09-23 05:14:18 -05:00
parent 6ad49ea9fe
commit 4adc9bccf2

View File

@@ -103,9 +103,24 @@ use tracing_subscriber::EnvFilter;
/// rollback as well. `web::CONFIG_RELOAD_WINDOW` is that budget, mirrored from the plugin, and a
/// test asserts the pairing rather than trusting it.
///
/// # Protocol 6 — first-party clans
///
/// One board (`clans`) and five events (`clan.created`, `clan.disbanded`, `clan.member.added`,
/// `clan.member.left`, `clan.member.kicked`), from which the website builds core's Teams (R5).
///
/// **Nothing in this process changed except this number**, and that is protocol 2's promise
/// kept: the board is filed by `type: "snapshot"` and the events by `type: "event"`, so the
/// sidecar needs no arm for any of them. The bump exists for the other two declaration sites —
/// a website that reads clans must not pair with a plugin that never sends them.
///
/// One property of this process does bear on the board: [`game::MAX_INBOUND_LINE_BYTES`]
/// discards a line over 1 MiB outright. The plugin bounds the board well inside it and says
/// `truncated` when it had to stop, because a board that never arrived would read as a server
/// with no clans.
///
/// `docs/rust-link/PROTOCOL.md` is the specification — §8 the read path, §9 identity, §10 the
/// mirror, §11 configuration; this constant is one of its four declaration sites.
pub const PROTOCOL_VERSION: u32 = 5;
/// mirror, §11 configuration, §12 clans; this constant is one of its four declaration sites.
pub const PROTOCOL_VERSION: u32 = 6;
fn main() -> anyhow::Result<()> {
let args = match cli::parse(std::env::args().skip(1)) {