feat(install)!: refuse forced uninstall data purge without a store receipt (AB7009) - #853
Conversation
🦋 Changeset detectedLatest commit: b672f50 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b122a9026
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
commit: |
Summary
Owner decision, following up the #841 review, which left the no-receipt purge as a separate product decision.
agent-bundle uninstall claude|codex --force --purge-data --confirm-purgeon a host-registered copy with no store receipt (forced-missing) used to delete the web-data root and Claude'splugins/data/<id>/anyway. Now it is refused withAB7009before any host verb runs, and--planrefuses the same way.--forcewithout--purge-datastill uninstalls through the host CLI and keeps the data. The refusal applies even when no data exists: it fails closed and is easy to predict. Without--confirm-purge,AB7008still comes first.packages/agent-bundle/src/install/uninstall.ts: the refusal is in thereceipt === undefinedbranch ofuninstallPublicCli.AB7007, even with--force), a Cursor marketplace holds no data, and Amp refuses without a receipt even with--force. The emitted standaloneinstall.mjsonly uninstalls Cursor copies and requires a receipt in local mode, so it has no no-receipt purge path. Only its generated Claude/Codex README text changed.docs/diagnostics.md(managed-uninstall prose and theAB7009row) and the en and zh versions ofwebsite/docs/*/reference/cli.mdxandwebsite/docs/*/guide/distribution/installation.mdx.uninstall.test.ts(Claude and Codex) assertsAB7009for the forced purge and its plan, that onlyplugin list --jsonran, and that the web-data andplugins/datafiles survive. It then runs a plain--forceuninstall and checks the data is kept. The host-install proof (tests/support/host-install.ts, used by the integration and packed proofs) assertsAB7009for--force --purge-data --confirm-purgewithout a receipt..changeset/refuse-unreceipted-purge.md(minor,agent-bundle).Local gate
On b672f50, which contains current origin/main cf82ffe:
pnpm build: passpnpm typecheck: passpnpm lint: passpnpm test:unit: pass (4,324 tests, 0 failed)On 9b216cb. The only change after it is the #844 merge from main, which touches
src/rstestonly and doesn't overlap the install code:rstest --config rstest.integration.config.ts packages/agent-bundle/tests/host-install-proof.test.ts packages/agent-bundle/tests/dev-host-install.test.ts: pass (21 passed, 0 skipped)pnpm test:packed packages/agent-bundle/tests/packed-host-install-proof.test.ts packages/agent-bundle/tests/packed-install-bin.test.ts: pass (8 passed, 0 skipped)pnpm docs:site:build: pass (language parity OK, 0 broken links)Review
Independent change-risk review (Claude Opus 5.5) found no material issues. It confirmed:
purgeData.Two low notes:
Codex bot threads:
--force --purge-data --confirm-purge, since the shorter form isAB7008: fixed in 9b216cb. Replied and resolved.