Conversation
- Reconnect the radio from StationService after unexpected disconnects (meshcore auto-reconnect was disabled by max_reconnect_attempts=0). - Keep the outgoing queue loop alive after unexpected errors. - Await direct-message ACKs outside the send lock, with early-ACK caching. - Resolve prefix-only senders to known contacts and merge prefix stubs. - Batch message timeline queries; move blocking I/O off the event loop. - Build the app lazily and run uvicorn with the factory. - Sort automatic backups by creation time; prune stale release venvs. - Stop tracking release .deb files in git. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NXj9Mqu9E6pSbpkbkvVXyi
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.
Summary
Fixes found during a full code review of the project.
Reliability
meshcorewas created withauto_reconnect=True, max_reconnect_attempts=0, and the library'sattempts < max_attemptscheck means zero reconnect attempts.StationServiceonly marked the link as disconnected, so after a USB unplug or BLE drop the station stayed offline until a manual reconnect or service restart. The library's auto-reconnect is now off;StationServiceschedules its own reconnect loop on an unexpected disconnect, and the port is re-resolved on each attempt. There is no reconnect during maintenance (firmware flashing) or shutdown.transport.start()releases any previous session first._queue_loopsilently. Errors are now logged and the loop keeps running.send_msg, returnsentwithack_timeout, and the ACK is awaited in a background task. The next queued messages are no longer blocked by the ACK wait. The status then becomesdeliveredorunconfirmed. The transport caches ACKs that arrive before the waiter is registered. Pending ACK waits are markedunconfirmedon shutdown.Performance / housekeeping
list_serial_ports()and firmware-upload writes no longer block the event loop.meshcore_station.mainno longer creates a database on import (appis lazy); uvicorn starts throughcreate_appwithfactory=True.postinstremoves stale.venv.release.*environments and keeps the active and previous ones. Relative symlink targets are normalized..debfiles are no longer tracked in git (/dist/is in.gitignore); v1.0.0 and v1.0.1 remain in GitHub Releases.Testing
python -m pytest -q: 71 passed (12 new intests/test_reliability.py: reconnect, no reconnect during maintenance, queue survival, ACK without blocking, early ACK, stub merging and protection of non-hex IDs, backup ordering, side-effect-free import, installer pruning).compileall,node --check app.js,dash -n deploy/postinst.sh./api/statusand message sending work.🤖 Generated with Claude Code
https://claude.ai/code/session_01NXj9Mqu9E6pSbpkbkvVXyi
Generated by Claude Code