Repository navigation
fix(codex): purge the plugin data Codex keeps for a root-manifest package - #966
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…e from failing a done removal
|
Strix is installed on this repository, but we couldn't run this PR security review because this workspace's trial has ended. Add a card to resume code reviews here. So far, Strix has reviewed 392 pull requests, surfaced 113 security issues (1 critical/high) and blocked 3 risky merges across this workspace. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #966 +/- ##
=======================================
Coverage 63.09% 63.09%
=======================================
Files 2254 2255 +1
Lines 135180 135217 +37
=======================================
+ Hits 85294 85319 +25
- Misses 37525 37531 +6
- Partials 12361 12367 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Follow-up to #959.
remove --purge-datain user scope reporteddata_retained: falsebut left the plugin's data on disk. The managed Codex artifact keeps the package's rootplugin.jsonandmcp.json. Codex 0.162 prefers them over the projected.codex-pluginlayout and writes plugin data into its own profile, so the installer's purge never saw it.Removing the root manifests from the projection is not an option: the installer uses the root
plugin.jsonof the artifact for identity checks during repair, update and remove, and about seven existing tests rely on it. Instead, a confirmed Codex removal with--purge-datanow also deletes Codex's own data directory.<profile>/plugins/data/agent-plugins/<sha256(marketplace + NUL + plugin)>. The formula was checked against a real Codex 0.162.0 and is pinned by a test on an observed value.PurgeDataflag on the deactivation request carries the user's intent to the adapter. Other clients ignore it.codexCLI when nothing is registered. If the directory cannot be removed, the removal still succeeds and a manual step with the path is reported, so repair does not reinstall a plugin that was already removed.Tests: the unit tests cover purge only when requested and after a verified removal, the no-CLI path, a symlinked directory and the failure report. A
RemoveGrouptest goes through the real Codex adapter and fails if the flag is not passed down. Checked with a real Codex: user and projectremove --purge-dataleave no data. Lint passes.Not covered: purging retained data later with the same command on an already removed installation still does not reach Codex's directory, because the binding is gone by then.