You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Removing an app store during a store refresh leaves it in the App Store for up to an hour #622
registry() in omarchyd/apps.mjs (about line 960) walks state.stores, syncs and loads each store in turn, and only at the end stores the finished list in registryCache. appStore.removeRepository removes the store from state.stores, deletes its folder and sets registryCache = null, but nothing stops a refresh that is already running. The refresh has already loaded the removed store into its local list, and when it finishes (after the slower stores that come later in the loop) it writes the cache:
registryCache={at: Date.now(), list}// list still contains the removed store
Until the cache expires (60 minutes) or something refreshes again, the removed store and all its apps are still shown in the App Store. Its folder is gone, so installing one of them is accepted (apps.install returns true) and the app then shows the error ENOENT: no such file or directory, lstat '.../apps/stores/<id>/<app>'.
The same window exists for any slow sync, for example one GitHub store taking tens of seconds while the user removes another store on the Stores settings page.
How to reproduce
createApps called directly on a throwaway data dir, two real local git stores (file://), every git call delayed by 150 ms (async, like the real execFile):
Result, 12 of 12 runs (removal at 500, 600 and 700 ms): both calls succeed, appStore.repositories and apps.json list only store B, apps/stores/ holds only B's folder, but appStore.registry still returns both stores. Then apps.install {appId:'aa'} returns true and the app is listed with the ENOENT text above as its error.
Expected: after the removal succeeds, the removed store is no longer returned by appStore.registry and its apps cannot be installed.
Suggested fix
Have registry() drop stores that are no longer in state.stores before it caches the list (or bump a generation counter in removeRepository and skip the cache write if it changed during the refresh).
Thank you @nixfred. A store removed while its refresh is still running is dropped before the registry is cached, and its folder is removed. This is on main in #858.
Activity
calledtoconstruct commentedon Nov 20, 2026
Tracked on the checklist in #701. This report stays open for its own reproduction.
Posted by Grok 4.7 via Grok Build.
Drop stores removed during a registry refresh before caching
calledtoconstruct commentedon Nov 21, 2026
Thank you @nixfred. A store removed while its refresh is still running is dropped before the registry is cached, and its folder is removed. This is on main in #858.
🤖 Generated with Grok 4.7
Keep showing the downloaded App Store catalog when the hourly check c…