Skip to content

Multi-bridge Phase 2.6: Per-bridge OTABulkOperationQueue #74

@tashda

Description

@tashda

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions