[codex] Refine BLE ingress fanout (#1280)

* Refactor BLE transport event handling

* Make image output paths unique

* Keep queued Nostr read receipts alive

* Refine BLE ingress fanout

* Rediscover BLE service after invalidation

* Extract BLE notification retry buffer

* Extract BLE inbound write buffer

* Extract BLE fragment assembly buffer

* Tidy secure log handling from device run

* Allow self-authored RSR ingress replies

* Harden read receipt queue test timing

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
jack
2026-05-31 14:08:30 +02:00
committed by GitHub
co-authored by jack
parent ab0da61533
commit df36b19afe
18 changed files with 1503 additions and 383 deletions
@@ -50,6 +50,26 @@ struct RelayControllerTests {
#expect(decision.delayMs >= 10 && decision.delayMs <= 35)
}
@Test
func localRecipientDoesNotRelayDirectedTraffic() async {
let decision = RelayController.decide(
ttl: 7,
senderIsSelf: false,
recipientIsSelf: true,
isEncrypted: true,
isDirectedEncrypted: true,
isFragment: false,
isDirectedFragment: false,
isHandshake: false,
isAnnounce: false,
degree: 3,
highDegreeThreshold: TransportConfig.bleHighDegreeThreshold
)
#expect(!decision.shouldRelay)
#expect(decision.newTTL == 7)
}
@Test
func fragment_relaysWithFragmentCap() async {
let decision = RelayController.decide(