Skip to content

Uninstall no longer protects an app that other apps need once the dependent's store listing cannot be found #596

Closed

Description

@nixfred

What happens

uninstall() (omarchyd/apps.mjs line 1757) decides which installed apps depend on the app being removed by calling findInRegistry(other.id) and reading src.needs from the live store listing; if the listing is missing, needs is []. The dependency list is not stored on the installed app record (line 1616). So the guard "X needs Y. Uninstall it first." disappears whenever the dependent's listing is unavailable, for example:

  • the person removes the store the dependent came from,
  • the store cannot be loaded (registry() skips a store whose loadStore throws),
  • the app was renamed or removed in the store.

I reproduced only the first case. The dependency can then be uninstalled although a running app relies on it.

How to reproduce

I drove the real omarchyd in-process (as test/apps.test.mjs does) with a scripted docker-compose: store with aa and bb (dependencies: [aa]). Install bb (installs aa first).

[["aa","running"],["bb","running"]]
guard while store present: bb needs aa. Uninstall it first.
(after appStore.removeRepository)
uninstall aa after store removed -> true
[["bb","running"]]  containers up: [ 'omarchy-bb' ]

Expected: the same refusal as before, because bb is still installed and still needs aa.

Suggested fix

Store the resolved needs (or the dependencies) on the app record at install time and use that in uninstall(), falling back to the live listing only for apps installed before this was recorded.

Environment

Omarchy Server main (6aa7f7d, 0.9.52), Node 26.

Activity

  1. added a commit that references this issue on Nov 21, 2026
    841870a
  2. calledtoconstruct commented on Nov 21, 2026

    @calledtoconstruct
    Collaborator

    Thank you @nixfred. An installed app still blocks uninstall while another installed app depends on it, even when its store listing is missing. This is on main in #858.

    🤖 Generated with Grok 4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions