Add session_id support to wardrive client for capacity tracking#111
Merged
MrAlders0n merged 2 commits intodevfrom Dec 21, 2025
Merged
Add session_id support to wardrive client for capacity tracking#111MrAlders0n merged 2 commits intodevfrom
MrAlders0n merged 2 commits intodevfrom
Conversation
- Add state.wardriveSessionId to store session ID from capacity check - Modify checkCapacity() to capture session_id from API response - Add validation: fail and disconnect if allowed=true but session_id missing - Add session_id parameter to all postToMeshMapperAPI() calls - Add validation: fail and disconnect if posting without valid session_id - Clear session_id on disconnect in both cleanupAllTimers() and disconnect handler - Add debug logging for session_id lifecycle (receive, store, attach, clear) - Add new error disconnect reasons: "session_id_error" - Update STATUS_MESSAGES.md with new status messages - Implement fail-closed policy for missing session_id Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update debugging and status message guidelines
Add session_id support to wardrive client for capacity tracking
Dec 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The wardrive client now captures and includes
session_idfrom the capacity check API in all MeshMapper posts to enable server-side session tracking and slot management.Changes
session_idfromcapacitycheck.phpresponse whenallowed=true, store instate.wardriveSessionIdsession_idin allpostToMeshMapperAPI()callssession_idmissing at connect or before postingsession_idon disconnect in three locations (capacity release, event handler, timer cleanup)"session_id_error"with terminal status messageExample
Capacity check response:
{ "allowed": true, "session_id": "20251221-0019" }MeshMapper API post (with session_id):
{ "key": "59C7754DABDF5C11CA5F5D8368F89", "lat": 45.42150, "lon": -75.69720, "who": "MrAlders0n", "power": "1.0w", "heard_repeats": "4e(11.5),b7(9.75)", "ver": "v1.4.1", "test": 0, "iata": "YOW", "session_id": "20251221-0019" }Error Behavior
Missing
session_idtriggers immediate error disconnect with terminal status: "Session ID error; try reconnecting"Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.