The single global repo lock becomes one lock per marketplace, and refresh_pins takes each marketplace's lock only while setting its pins, so a slow fetch no longer queues installs and refreshes of other marketplaces. refresh_marketplace now takes the lock first and reads the settings store under it (a closure, not a copy captured earlier); a marketplace removed meanwhile gets no cache and no snapshot. Removing a marketplace deletes its snapshot and cache under the same lock (remove_marketplace_cache). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>