Skip to content

fix(plugins): allow intentional uninstall size drops - #110991

Merged
steipete merged 1 commit into
mainfrom
codex/fix-plugin-uninstall-size-guard
Jul 18, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-plugin-uninstall-size-guard

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • allow the intentional config size reduction performed by plugins uninstall
  • retain the independent gateway-mode removal guard
  • assert the exact guarded write options in the uninstall regression test

Proof

  • pnpm exec vitest run src/cli/plugins-cli.uninstall.test.ts
  • pnpm test:docker:kitchen-sink-plugin (7 scenarios; controlled pnpm-pack candidate because host npm 12 omits npm-shrinkwrap.json)
  • .agents/skills/autoreview/scripts/autoreview --mode local

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XS maintainer Maintainer-authored PR labels Jul 18, 2026
@steipete
steipete force-pushed the codex/fix-plugin-uninstall-size-guard branch from 1082c96 to 090a350 Compare July 18, 2026 22:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@steipete
steipete force-pushed the codex/fix-plugin-uninstall-size-guard branch from 090a350 to 0ff75cb Compare July 18, 2026 22:23
@steipete
steipete merged commit 7fbfc2e into main Jul 18, 2026
117 checks passed
@steipete
steipete deleted the codex/fix-plugin-uninstall-size-guard branch July 18, 2026 22:28
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jul 18, 2026
@clawsweeper

clawsweeper Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 6:25 PM ET / 22:25 UTC.

Summary
The branch adds allowConfigSizeDrop: true to the CLI plugin-uninstall guarded config write and asserts the resulting write options in the CLI regression test.

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.

  • Uninstall-path coverage: 1 guarded CLI write changed; 0 shared Gateway service writes changed. The patch fixes only one of the two established uninstall entry paths, leaving the Control UI/Gateway route unable to perform the same intentional config reduction.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🦐 gold shrimp
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Move the exemption and regression coverage to the shared managed-plugin uninstall path.
  • [P1] Add redacted after-fix evidence showing a real config-size-drop uninstall through the relevant supported entry point.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The body names automated tests and autoreview, but does not provide after-fix evidence from a real CLI or Control UI/Gateway uninstall; add a redacted terminal transcript, recording, or runtime log after exercising the completed shared-path fix. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Next step before merge

  • [P1] This PR has a concrete P2 correction, but its protected maintainer label requires a maintainer to direct the follow-up rather than placing it in an automated repair lane.

Security
Cleared: The two-file patch changes no dependency, workflow, permission, secret, artifact, or code-execution surface.

Review findings

  • [P2] Apply the exemption to the shared uninstall route — src/cli/plugins-uninstall-command.ts:187
Review details

Best 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:

  • [P2] Apply the exemption to the shared uninstall route — src/cli/plugins-uninstall-command.ts:187
    The new flag is passed only by the CLI. Control UI uninstalls still route through Gateway into uninstallManagedPlugin, which forwards unchanged write options and therefore still rejects the same intentional config reduction. Put the uninstall-specific exemption at the shared service boundary and cover that route so both supported entry points agree.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a21385a37266.

Label changes

Label changes:

  • add P2: Plugin uninstall remains broken for the Control UI/Gateway entry point when the config-size safety threshold is crossed.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The body names automated tests and autoreview, but does not provide after-fix evidence from a real CLI or Control UI/Gateway uninstall; add a redacted terminal transcript, recording, or runtime log after exercising the completed shared-path fix. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: Plugin uninstall remains broken for the Control UI/Gateway entry point when the config-size safety threshold is crossed.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The body names automated tests and autoreview, but does not provide after-fix evidence from a real CLI or Control UI/Gateway uninstall; add a redacted terminal transcript, recording, or runtime log after exercising the completed shared-path fix. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +1, Tests +13. Total +14 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 0 +1
Tests 1 13 0 +13
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 14 0 +14

What I checked:

Likely related people:

  • steipete: The available PR history identifies steipete as the author of the current focused uninstall-size-guard change; no broader merged-history ownership could be established from the read-only review data. (role: recent area contributor; confidence: low; commits: 0ff75cb9417a; files: src/cli/plugins-uninstall-command.ts, src/cli/plugins-cli.uninstall.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant