fix: handle node pairing events on current master#144
fix: handle node pairing events on current master#144andyeskridge wants to merge 1 commit intoopenclaw:masterfrom
Conversation
|
🤖 This is an automated response from Repo Assist. Nice work Logic review: The current master treated // old behaviour
_isPendingApproval = true; // no token → still waitingThis PR changes that to always treat // new behaviour
_isPendingApproval = false;
_isPaired = true; // hello-ok with no token → treated as pairedThe comment explains the rationale: "Current gateways only send hello-ok for approved/accepted nodes, even when auth.deviceToken is omitted." If this is confirmed gateway behaviour, the change is correct — but it's worth noting that it flips the meaning of a tokenless Minor: if (_isPendingApproval)
{
return; // suppress duplicate NOT_PAIRED events
}This silently suppresses subsequent Test: The test sets Overall: The fix is a meaningful improvement over the current handling of
|
Summary
Small follow-up to #80 that ports the pairing-specific fixes onto current
master.This PR adds:
NOT_PAIREDhandling during node registrationnode/device.pair.requestednode/device.pair.resolvedPayloadTargetsCurrentDevice()hello-okwhen current gateways omitauth.deviceTokenTesting
Added regression tests for:
hello-okwith and withoutauth.deviceTokenNOT_PAIREDresponsesValidated locally with:
dotnet test tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csprojdotnet test tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj