Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

docs(devices): correct the stated backend schema history\n\nThe struct comment said backend PR #709 moved the ACK to snake_case. It did the\nopposite: #709 introduced the camelCase shape, and `main` still emits it. The\naliases are additive compatibility for a shape nothing currently sends.\n\nRaised by CodeRabbit and matching my own review finding. It matters beyond\ntidiness — the comment is what the next reader will treat as ground truth, and\nthe two real defects here were both missed while the field names were the\nsuspect.\n

M3gA-Mind341bae94d0b6
diff --git a/src/openhuman/security/devices/tunnel_client.rs b/src/openhuman/security/devices/tunnel_client.rs
index 47d704cf50..71ba5ea7b8 100644
--- a/src/openhuman/security/devices/tunnel_client.rs
+++ b/src/openhuman/security/devices/tunnel_client.rs
@@ -25,9 +25,18 @@ pub struct TunnelRegisterPayload {
/// Response from the `tunnel:register` ACK callback.
///
-/// Accepts both camelCase (historic backend shape) and snake_case (backend
-/// PR #709 shape) field names via `alias` so the client is forward- and
-/// backward-compatible without a coordinated deploy.
+/// The backend sends **camelCase**: backend PR #709 introduced
+/// `TunnelRegisterAck { channelId, pairingToken, pairingExpiresAt: number }`
+/// (`socketHandlers/tunnel/types.ts`) and `main` still emits exactly that. The
+/// `alias` entries are additive compatibility for a snake_case shape nothing
+/// currently sends — kept so a future rename needs no coordinated deploy, not
+/// because a rename has happened.
+///
+/// An earlier version of this comment had the history backwards, describing
+/// #709 as the move *to* snake_case. It is recorded here because the two real
+/// defects in this path — a numeric `pairingExpiresAt` decoded as a string, and
+/// a `{ ok: false }` refusal parsed as the success shape — were both missed
+/// while the field names were the suspect.
#[derive(Debug, Clone, Deserialize)]
pub struct TunnelRegisterResponse {
#[serde(rename = "channelId", alias = "channel_id")]