feat(sidecar): protocol 7 — the raid frame, and again no new code
All checks were successful
PR Checks / rust-gates (pull_request) Successful in 1m7s

entity.destroyed gains the cupboard's authorised list and covers doors,
walls and the cupboard. The sidecar stores and serves events as they
arrive, so only the number moves. The bump is what stops a website that
alerts on `authorized` from pairing with a protocol-6 plugin that never
sends it, which would read every raid as a base with no cupboard.

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:52:56 -05:00
parent 437b392861
commit cb0913388d

View File

@@ -118,9 +118,21 @@ use tracing_subscriber::EnvFilter;
/// `truncated` when it had to stop, because a board that never arrived would read as a server
/// with no clans.
///
/// # Protocol 7 — a raid frame that names who lives there
///
/// `entity.destroyed` widens to doors, external walls and the tool cupboard, and gains the
/// cupboard's `buildingId` and its `authorized` list, which is what lets the website send the
/// raid alert to the people whose base it was (the module's PLAN.md §25).
///
/// **Again nothing here changed but this number.** The frame is an `event`, stored and served as
/// it arrived. The bump exists because a website that alerts on `authorized` must not pair with a
/// plugin that never sends it — against protocol 6 it would read every raid as a base with no
/// cupboard, and alert nobody while looking healthy.
///
/// `docs/rust-link/PROTOCOL.md` is the specification — §8 the read path, §9 identity, §10 the
/// mirror, §11 configuration, §12 clans; this constant is one of its four declaration sites.
pub const PROTOCOL_VERSION: u32 = 6;
/// mirror, §11 configuration, §12 clans, §13 the raid frame; this constant is one of its four
/// declaration sites.
pub const PROTOCOL_VERSION: u32 = 7;
fn main() -> anyhow::Result<()> {
let args = match cli::parse(std::env::args().skip(1)) {