mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-16 15:43:57 -06:00
6fc76e8a62
The parser trusted the envelope around the fields it read. A null, scalar, or empty payload carries neither tokenDelivery nor token, so it matched the legacy omission state and produced the reassuring completion dialog after the previous credential had already been invalidated. A blank token did the same, though the result schema bounds token to a non-empty string. Only DeviceTokenRotateResultSchema's shapes are accepted now: the payload must be a record that identifies the grant it rotated - every Gateway answering this method returns deviceId and role, before and after tokenDelivery existed - and token must be either absent or a non-empty string. This has to happen here because the browser Gateway client resolves frame.payload directly, so the registered result schema never runs on the client. The mid-flight-reconnect reveal test asserted on a two-field stub no Gateway sends; it now uses the real response shape.