Skip to content

fix(reticulum): stop blocking LoRa BLE while healthy RNode is online - #1036

Merged
rinchen merged 1 commit into
mainfrom
fix/rnode-online-lora-gatt-hold
Sep 21, 2026
Merged

rinchen merged 1 commit into
mainfrom
fix/rnode-online-lora-gatt-hold

Conversation

@rinchen

@rinchen rinchen commented Sep 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Exclusive LoRa GATT dispose (releaseGattBleCentral) is only for bleBondRemoved / LTK desync recovery — not while a healthy BLE RNode is online.
  • fix(reticulum): recover macOS BLE RNode LTK desync without false Paired state #1034’s permanent RNode-online hold blocked MeshCore BLE whenever Reticulum’s RNode came up (Meshtastic still worked over TCP).
  • Source-contract test asserts the online-RNode exclusive path cannot return.

Test plan

  • useReticulumRuntime.reconnect-hardening.test.ts (pre-commit / local)
  • Quit app, restart with Reticulum BLE RNode + MeshCore BLE auto-connect
  • Confirm MeshCore connects after RNode is online (no rnode_bond_recovery error)
  • Confirm Meshtastic still connects (TCP or BLE)
  • Optional: trigger real bond/LTK recovery and confirm exclusive hold still engages only then

Summary by CodeRabbit

  • Bug Fixes
    • LoRa GATT access is no longer blocked while a healthy BLE RNode is online.
    • Exclusive access is now limited to Bluetooth bond recovery and LTK desynchronization scenarios.
    • BLE coexistence between MeshCore/Meshtastic and LoRa connections is preserved.

Exclusive GATT dispose belongs only to bleBondRemoved / LTK recovery.
Holding it for every online BLE RNode blocked MeshCore coexistence after #1034.
@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Colorado-Mesh/mesh-client/.coderabbit.yaml

Review profile: QUIET

Plan: Advanced

Run ID: 3133f8b4-7099-431a-879c-0aa2d2568eb1

📥 Commits

Reviewing files that changed from the base of the PR and between 4e44509 and 86fd8db.

📒 Files selected for processing (3)
  • src/main/gatt-sidecar-proxy.ts
  • src/renderer/runtime/useReticulumRuntime.reconnect-hardening.test.ts
  • src/renderer/runtime/useReticulumRuntime.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The runtime no longer disposes or exclusively holds LoRa GATT when a healthy BLE RNode is online. Exclusive disposal remains limited to bond-recovery handling. Documentation and regression assertions reflect this behavior.

Changes

RNode bond recovery handling

Layer / File(s) Summary
Remove healthy RNode LoRa GATT hold
src/renderer/runtime/useReticulumRuntime.ts, src/main/gatt-sidecar-proxy.ts, src/renderer/runtime/useReticulumRuntime.reconnect-hardening.test.ts
The runtime removes online-RNode hold tracking and periodic release logic. Exclusive LoRa GATT disposal remains associated with bond recovery and LTK desynchronization. The documentation and regression assertions reflect the updated behavior.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Severity of issue fixed: Low

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preventing healthy BLE RNodes from blocking LoRa BLE access.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rinchen
rinchen merged commit 457c8c6 into main Sep 21, 2026
25 checks passed
@rinchen
rinchen deleted the fix/rnode-online-lora-gatt-hold branch September 21, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant