feat(sidecar): protocol 6 — first-party clans, and no new code #6

Merged
whitlocktech merged 1 commits from feat/phase-9-clans into edge 2026-09-23 10:33:39 +00:00
Showing only changes of commit 4adc9bccf2 - Show all commits

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)) {