Repository navigation
fix(plugins): allow intentional uninstall size drops - #110991
Conversation
1082c96 to
090a350
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1082c96f8f
ℹ️ 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".
| @@ -184,6 +184,7 @@ export async function runPluginUninstallCommand( | |||
| nextConfig, | |||
| ...(snapshot.hash !== undefined ? { baseHash: snapshot.hash } : {}), | |||
| writeOptions: { | |||
| allowConfigSizeDrop: true, | |||
There was a problem hiding this comment.
Extend the size-drop exemption to Gateway uninstalls
For Control UI uninstalls where removing plugin-owned config cuts a config of at least 512 bytes below half its original size, this exemption is never used: ui/src/lib/plugins/index.ts:46-50 calls plugins.uninstall, src/gateway/server-methods/plugins.ts:158-163 dispatches to uninstallManagedPlugin, and that service still forwards snapshot.writeOptions unchanged at src/plugins/management-service.ts:1301-1307. The size-drop guard in src/config/io.write-safety.ts:158-183 therefore still rejects the same operation that now succeeds through the CLI; apply the exemption to the shared/service uninstall path and cover that entry point with a regression test.
Useful? React with 👍 / 👎.
090a350 to
0ff75cb
Compare
|
Merged via squash.
|
|
Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 6:25 PM ET / 22:25 UTC. Summary PR surface: Source +1, Tests +13. Total +14 across 2 files. Reproducibility: yes. from source: remove plugin-owned configuration large enough to cross the existing size-drop guard through the Control UI/Gateway uninstall route; the unchanged shared service does not receive the new exemption. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Next step before merge
Security Review findings
Review detailsBest possible solution: Move the intentional-uninstall exemption to the shared managed-plugin uninstall boundary so CLI and Control UI/Gateway removals have one guarded-write contract, then demonstrate both entry points with focused regression coverage and a redacted real behavior transcript. Do we have a high-confidence way to reproduce the issue? Yes, from source: remove plugin-owned configuration large enough to cross the existing size-drop guard through the Control UI/Gateway uninstall route; the unchanged shared service does not receive the new exemption. Is this the best way to solve the issue? No. The CLI-only call-site exemption duplicates an uninstall policy that also belongs to the shared managed-plugin service; placing it at that common boundary is the narrower durable fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a21385a37266. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +1, Tests +13. Total +14 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
(cherry picked from commit 7fbfc2e)
(cherry picked from commit 7fbfc2e) Co-authored-by: Peter Steinberger <[email protected]>
Summary
plugins uninstallProof
pnpm exec vitest run src/cli/plugins-cli.uninstall.test.tspnpm test:docker:kitchen-sink-plugin(7 scenarios; controlled pnpm-pack candidate because host npm 12 omitsnpm-shrinkwrap.json).agents/skills/autoreview/scripts/autoreview --mode local