fix(provision): keep late app lookups out of the invalidated cache

Merged
TH
2d ago
+88-65

Summary

Bind each asynchronous app resolution to the device cache it started with. Deployment detaches that cache at both invalidation boundaries. A simulator-selection probe can overlap deployment because selection lists candidate apps before it chooses a device.

Each cache retains up to 128 device maps, evicting the least recently looked-up device when full.

Before / after

Before, a delayed list returning the old bundle ID after deployment could overwrite a newer name resolution for up to 30 seconds. After, the pending caller receives its result and the next lookup retains the fresh bundle ID.

Validation

CI pending at 217808e075861bdf897b100acaa3f78efe2611c4. The previous head failed formatting in the cache module. Applied the formatter and added a regression test for a lookup that finishes after its device map is evicted. CI owns validation.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.