Skip to content

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

fix(devices): log ACK field names instead of raw value on parse failure\n\nSwap the raw-ACK log for a field-name-only log to prevent exposing\npairingToken (a ~10 min credential) in application logs and Sentry.\nThe two-arg log! form is also correctly formatted by rustfmt (the prior\nsingle-arg form was being collapsed to one line, failing fmt --check).\n

shanu6b7ee8000f91
diff --git a/src/openhuman/security/devices/tunnel_client.rs b/src/openhuman/security/devices/tunnel_client.rs
index fb4aef6a9d..61e49f9578 100644
--- a/src/openhuman/security/devices/tunnel_client.rs
+++ b/src/openhuman/security/devices/tunnel_client.rs
@@ -92,10 +92,9 @@ pub async fn emit_register() -> Result<TunnelRegisterResponse, String> {
.map_err(|e| format!("[devices/tunnel] emit tunnel:register failed: {e}"))?;
serde_json::from_value::<TunnelRegisterResponse>(ack.clone()).map_err(|e| {
- // Log the raw ACK so mismatches between backend field naming and this
- // struct's rename/alias table are immediately visible in the logs.
log::error!(
- "[devices/tunnel] parse tunnel:register ack failed: {e}; raw ack = {ack}"
+ "[devices/tunnel] parse tunnel:register ack failed: {e}; ack fields = {:?}",
+ ack.as_object().map(|o| o.keys().collect::<Vec<_>>())
);
format!("[devices/tunnel] parse tunnel:register ack failed: {e}")
})