feat(install-targets): generic plan-diff retirement for all install targets - #1
kunaaaalcodes wants to merge 1 commit into
Conversation
…argets (Fmarzochi#1412) Extend the plan-diff retirement mechanism from OpenCode-only (Fmarzochi#1411) to every install target. When a file leaves an install plan, the copy an earlier install wrote is cleaned up on the next install/auto-update. Changes: - Add planGenericRetirements(), collectCurrentlyCoveredDestinations(), and isDestinationCovered() helpers to install-targets/helpers.js - Update the default planRetirements in createInstallTargetAdapter to call planGenericRetirements instead of returning [] - Pass precomputed operations into planRetirements in registry.js to avoid redundant planning - Add clarifying comment to install-lifecycle.js explaining the split between pruneOrphanedOperations and planGenericRetirements - Add 2 new tests: generic retirement and directory scaffold shielding - Update CHANGELOG.md and docs/ROADMAP.md
|
Thank you for your contribution to EGC! Please sign our Contributor License Agreement to get this PR merged. Read .github/CLA.md, then post the comment below:
I have read the CLA Document and I hereby sign the CLA. Kunal Jaiswal seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
|
DCO sign-off missing One or more commits in this PR are missing a How to fix: # Single commit
git commit --amend -s
git push --force-with-lease
# Multiple commits -- replace N with the number of commits in your PR
git rebase --signoff HEAD~N
git push --force-with-lease
|
Summary
Extends the plan-diff retirement mechanism from OpenCode-only (Fmarzochi#1411) to every install target. When a file leaves an install plan, the copy an earlier install wrote is cleaned up on the next install/auto-update.
Problem
PR Fmarzochi#1411 added planRetirements to the OpenCode adapter, but every other install target (Cursor, Windsurf, Claude, Copilot, Kiro, etc.) had planRetirements: () => [] as a no-op default. Files copied to non-EGC-managed destinations accumulate silently when modules are deselected or plans change.
What Changed
Identity Rules
The same identity rules from Fmarzochi#1411 apply: only regular files, no linked ancestor, byte-identical to the source EGC copied, are actually deleted (enforced by �pply.js's isRetirableFile). Sources no longer in the repository are left in place (report-and-leave). Only \copy-file\ operations are diffed; \merge-json\ and \hook\ have no retirement counterpart yet (open follow-up).
Validation