Why
Today one OTABulkOperationQueue is wired into AppEnvironment. With two bridges running concurrent OTAs, they'd serialize through the same queue — a bridge A bulk check would block bridge B's update.
What
AppEnvironment owns [BridgeID: OTABulkOperationQueue]. Lazily create on first connect to a bridge.
- Each queue's sender closure captures
registry.send(bridge: id, ...) so it sends to the right WebSocket.
AppStore.otaResponseForwarding becomes per-bridge — when a bridge/response/device/ota_* arrives tagged with bridgeID, it's routed to that bridge's queue.
Files
Shellbee/App/AppEnvironment.swift — replace single queue with map.
Shellbee/Core/Networking/OTABulkOperationQueue.swift — no internal change required, but verify nothing assumes singleton semantics.
Shellbee/Core/Store/AppStore+OTA.swift — per-bridge response routing.
Verification
- Run OTA on two bridges in parallel via test center (
POST /api/scenarios/ota/run); confirm each queue's progress and timeout settings are independent.
- UserDefaults concurrency/timeout settings (
appOTABulkConcurrency, appOTABulkCheckTimeoutSeconds) remain global — applied to both queues equally. Document this.
Phase
Phase 2 of multi-bridge support. Depends on #2.1, #2.2.
Why
Today one
OTABulkOperationQueueis wired intoAppEnvironment. With two bridges running concurrent OTAs, they'd serialize through the same queue — a bridge A bulk check would block bridge B's update.What
AppEnvironmentowns[BridgeID: OTABulkOperationQueue]. Lazily create on first connect to a bridge.registry.send(bridge: id, ...)so it sends to the right WebSocket.AppStore.otaResponseForwardingbecomes per-bridge — when abridge/response/device/ota_*arrives tagged with bridgeID, it's routed to that bridge's queue.Files
Shellbee/App/AppEnvironment.swift— replace single queue with map.Shellbee/Core/Networking/OTABulkOperationQueue.swift— no internal change required, but verify nothing assumes singleton semantics.Shellbee/Core/Store/AppStore+OTA.swift— per-bridge response routing.Verification
POST /api/scenarios/ota/run); confirm each queue's progress and timeout settings are independent.appOTABulkConcurrency,appOTABulkCheckTimeoutSeconds) remain global — applied to both queues equally. Document this.Phase
Phase 2 of multi-bridge support. Depends on #2.1, #2.2.