Skip to content

Uninstall is a placeholder — no privileged teardown #679

@malpern

Description

@malpern

Tier: 2 (rough edge — incomplete critical flow)

From the pre-release feature-gap audit.

Problem

InstallerEngine.uninstall is a placeholder: it delegates to a legacy coordinator and returns failure if one isn't configured. The broker is "reserved for future privileged uninstall steps," so privileged cleanup (e.g., the VirtualHID driver, LaunchDaemon artifacts) is not implemented. Basic user-level uninstall works, but a clean teardown does not.

Evidence

  • Sources/KeyPathInstallationWizard/Core/InstallerEngine.swift:604-617:
/// Execute uninstall via the existing coordinator (placeholder until uninstall recipes exist)
public func uninstall(deleteConfig: Bool, using broker: PrivilegeBroker) async -> InstallerReport {
    _ = broker // Reserved for future privileged uninstall steps
    ...
    guard let coordinator = WizardDependencies.createUninstallCoordinator?() else {
        return InstallerReport(success: false, failureReason: "Uninstall coordinator not configured")
    }

Impact

Uninstall may leave system artifacts behind; fails entirely if the coordinator isn't registered.

Suggested fix

Implement recipe-based uninstall including privileged steps via the broker, or document the current limitation clearly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions