backnotprop / backnotprop/plannotator
Close remaining uninstall host-integration recovery gaps
- Dominant language
- TypeScript
- Stars
- 8.7k
- Forks
- 649
- Avg merge
- 11h 12m
- Merged PRs (30d)
- 109
Description
## Context
Non-blocking follow-up from the independent review of #1177. The PR is merge-ready, but two pre-existing host-cleanup gaps remain.
## Problems
1. **Missing host CLI guidance assumes the host will return.** When a detected integration cannot be removed because its CLI is unavailable, the message only tells the user to restore that CLI on `PATH`. If the host was permanently uninstalled, the actionable recovery is to remove the exact Plannotator entry from the host configuration and rerun uninstall. Verified example: remove the Plannotator entry from `enabledPlugins` in `~/.factory/settings.json`.
2. **Customized Plannotator hooks can survive binary removal.** Managed-hook detection currently matches exact command strings. A hook using a documented option, such as `plannotator --browser Safari`, is not recognized and can be left pointing at a deleted binary.
## Required behavior
- For an unavailable host CLI, report both recovery routes: restore the CLI and rerun, or remove the exact detected Plannotator configuration entry and rerun. Name the file and field.
- Recognize Plannotator hook commands that include supported arguments without claiming unrelated custom commands.
- Before binary removal, detect remaining recognized host references to the Plannotator binary/command. If any remain, fail closed with the exact file, field, and cleanup guidance.
- Preserve unrelated user hooks and configuration in the same file.
- Keep the normal-uninstall versus purge data contract unchanged.
## Regression coverage
- Missing/permanently removed Droid CLI with a Plannotator `enabledPlugins` entry.
- Customized managed hook such as `plannotator --browser Safari`.
- A user-owned hook beside the managed hook survives cleanup.
- Binary removal remains blocked while a recognized Plannotator reference survives, then succeeds after manual cleanup.
## Evidence
Independent review of #1177 reproduced both behaviors against a compiled binary. Neither blocks #1177.
Contributor guide
Assessment
This issue has not been assessed yet.