From 2eb6c00f9cbfe94c0af130234791df858c311245 Mon Sep 17 00:00:00 2001 From: legop3 Date: Tue, 30 Jun 2026 19:34:35 -0400 Subject: [PATCH] fix private rover requests hopefully! --- plans/laptoprover.md | 2 +- .../services/privateRoverAccessRequestService/core.js | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/plans/laptoprover.md b/plans/laptoprover.md index ea74a3f1..73d6cc94 100644 --- a/plans/laptoprover.md +++ b/plans/laptoprover.md @@ -1,4 +1,4 @@ -addition to roverd to make it possible to use a normal linux laptop + usb serial adapter as a rover, instead of a raspberry pi +addition to / variant of roverd to make it possible to use a normal linux laptop + usb serial adapter as a rover, instead of a raspberry pi - USE THIS AS AN OPPURTINITY TO: diff --git a/server/src/services/privateRoverAccessRequestService/core.js b/server/src/services/privateRoverAccessRequestService/core.js index 57a56c39..ab12f8ed 100644 --- a/server/src/services/privateRoverAccessRequestService/core.js +++ b/server/src/services/privateRoverAccessRequestService/core.js @@ -55,7 +55,6 @@ function pruneExpiredGrantsAndRefresh(reason = 'grant_expired') { function listPendingForRequester(socket) { const requesterKey = buildRequesterKey(socket); - const identity = getIdentitySummary(socket); const pending = []; for (const request of pendingRequests.values()) { if (request.requesterKey !== requesterKey) continue; @@ -321,6 +320,15 @@ function createRequest(socket, roverIdRaw) { throw new Error(`Please wait ${remaining}s before sending another request`); } + /* + Private rover requests are forwarded to lockdown admins through Discord, so + the request record should carry the canonical identity fields that admins + need for moderation and audit context. The requester key above decides + dedupe/cooldown behavior, while this summary keeps the human-facing payload + aligned with the newer identity service state on the socket. + */ + const identity = getIdentitySummary(socket); + const request = { id: `prr_${crypto.randomBytes(8).toString('hex')}`, status: 'pending',