From 9a3c19b3806186c1d8288b13f5845d6705a160a8 Mon Sep 17 00:00:00 2001 From: Michel de Graaf Date: Wed, 29 Jul 2026 10:41:29 +0200 Subject: [PATCH] fix(daemon): version the contract by its protocol, not by the crate info.version carried the crate version, so release-plz bumping Cargo.toml left docs/openrpc.json a version behind and failed document_is_current on every platform. With the CI gate in front of publishing, that made every release PR unmergeable. The protocol version is what auth negotiates and what the contract actually describes. --- docs/openrpc.json | 2 +- soulseek-rs/src/daemon/openrpc.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/openrpc.json b/docs/openrpc.json index 144c76a..213bfc7 100644 --- a/docs/openrpc.json +++ b/docs/openrpc.json @@ -1225,7 +1225,7 @@ "name": "MIT" }, "title": "soulseek-rs daemon", - "version": "12.0.0" + "version": "1" }, "methods": [ { diff --git a/soulseek-rs/src/daemon/openrpc.rs b/soulseek-rs/src/daemon/openrpc.rs index f965e58..90e6473 100644 --- a/soulseek-rs/src/daemon/openrpc.rs +++ b/soulseek-rs/src/daemon/openrpc.rs @@ -331,7 +331,10 @@ fn document() -> Value { "openrpc": "1.3.2", "info": { "title": "soulseek-rs daemon", - "version": env!("CARGO_PKG_VERSION"), + // The contract's own version, which is what a client negotiates in + // `auth`. The crate version would put a release bump in this file + // and fail `document_is_current` on every release PR. + "version": crate::daemon::proto::PROTOCOL_VERSION.to_string(), "description": "Control a running soulseek-rs daemon. Newline-delimited \ JSON-RPC 2.0 over a Unix socket (local, authenticated by socket permissions) or \ TCP (remote, authenticated by the token in /daemon.token). `auth` must \