Skip to content

fix(apps): let owners uninstall provider apps and recover stuck legacy handoffs #648

Done

Description

@RentnerKev

Problem

Provider apps can never be uninstalled or purged.

  • core/src/app_manager.rs:540-542 sets slot.provider_dependencies_unknown on every activation of an app whose manifest declares providers. Nothing in core/src clears it; only tests reset it (core/tests/private/app_manager/lifecycle.rs:1595-1598).
  • Manager::remove() and Manager::purge() return ResourceBusy while the flag is set (core/src/app_manager/removal.rs:13-18, :65-70), before they ask the platform whether the generation is removable. A boot that resumes Removing/Purging hits the same check.
  • The control CLI (core/src/app_manager/control.rs) has no command to clear the flag. The only way out today is editing the root journal by hand.
  • Monitoring (providers: ["monitoring"]) is the first app affected.

A second gap sits behind the first: legacy handoffs are aborted only from the removable handler (web/src/server/AppRuntime/lifecycle.server.ts:397-398), not when a generation is revoked (:433-474). An exported handoff keeps platform writers for that domain fenced (web/src/server/LegacyHandoff/journal.server.ts:90-94). Restarting the app resumes or aborts the export, but if the app stays stopped or keeps crashing, nothing an admin can trigger releases the domain, because uninstall is blocked before it reaches the abort.

Proposal

  • Replace the one-way flag with a dependency answer from the platform at removal time: /internal/v1/app-generations/removable reports open handoffs and provider dependencies for the installation.
  • Uninstalling an app with an uncommitted (exported) handoff aborts the handoff and returns the domain to the built-in feature.
  • Uninstalling after a committed handoff requires an explicit Owner confirmation that names what stops working.
  • Add an Owner action that aborts a stuck exported handoff while the app is stopped.
  • Migrate journals that already carry the flag.

Decision (2026-12-01)

After a committed handoff, uninstalling the provider app needs an explicit Owner confirmation. The feature then stays off; the built-in feature is not re-enabled. The app's data stays until purge, so reinstalling the app restores it.

Acceptance

  • Integration test: install a provider app, start it, begin a handoff, uninstall without touching the flag: the app is removed and the domain is back with the platform.
  • Test for the committed case with and without confirmation.

Related: #454 (provider registration).


Found in the app platform audit of 2026-11-30.

Activity

  1. added
    bug
    area: runtime
    on Nov 30, 2026
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

    area: runtimebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions