Skip to content

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

Merged
RomneyDa merged 1 commit into
extended-stable/2026.6.33from
fix/extended-stable-plugin-uninstall-size-drop
Sep 7, 2026
Merged

RomneyDa merged 1 commit into
extended-stable/2026.6.33from
fix/extended-stable-plugin-uninstall-size-drop

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Backports 7fbfc2e8ad3 (fix(plugins): allow intentional uninstall size drops (#110991)) to the frozen extended-stable candidate.

The full validation Kitchen Sink Plugin scenario ran openclaw plugins uninstall ... --force; its known removal plan legitimately contracts the config from 555 to 180 bytes, but the CLI omitted the write owner’s allowConfigSizeDrop authorization and rejected its own planned mutation. The repair attaches that authorization only to the uninstall lifecycle commit; suspicious writes elsewhere stay protected.

Evidence

  • Reproduction: Plugin Prerelease exact-frozen run 33707894263, Kitchen Sink Plugin job 100502023283, error Config write rejected ... (size-drop:555->180).
  • Owner: src/cli/plugins-uninstall-command.ts calls commitPluginInstallRecordsWithConfig after generating planPluginUninstall; it is the authoritative, force-confirmed uninstall mutation.
  • Upstream history: source commit 7fbfc2e8ad3 is absent from frozen candidate 659df810 and applies cleanly as this PR commit 8f9ea3b.
  • Regression: the imported CLI unit assertion fails before the source fix because the write options omit allowConfigSizeDrop.

Validation

Scope

Production: +1 / -0. Tests: +13 / -0. The test proves the exact write contract. No config schema, plugin contract, release tag, npm state, or frozen-candidate mutation is included.

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@RomneyDa

RomneyDa commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact lifecycle backport with pre-fix reproduction in Plugin Prerelease run 33707894263 / Kitchen Sink job 100502023283. Please review the scoped uninstall write authorization and regression assertion.

@openclaw-barnacle openclaw-barnacle Bot added the cli CLI command changes label Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 3:53 PM ET / 19:53 UTC.

ClawSweeper review

What this changes

The PR lets confirmed plugin uninstalls authorize their planned configuration size reduction and adds an assertion for the exact write options.

Merge readiness

✅ Ready for maintainer review

This remains a useful extended-stable backport with no blocking findings. Main already contains the fix, but the pinned release-branch base does not. The previous checkout blocker is resolved: current-head preflight and security-fast passed.

Priority: P2
Reviewed head: 31f76d5355157e26b684ce7d67d88777b5c2f537

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused backport using an established internal contract, with relevant regression coverage and no blocking defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its reported frozen Kitchen Sink failure maps to the changed uninstall owner; focused tests are supplemental, and no after-fix runtime execution is claimed by this review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its reported frozen Kitchen Sink failure maps to the changed uninstall owner; focused tests are supplemental, and no after-fix runtime execution is claimed by this review.
Evidence reviewed 10 items Introduced change and release target: Host-verified introduction evidence limits this PR to the uninstall write option and its regression assertion. The target is extended-stable/2026.6.33 at 91b225e; the verified test merge has that base followed by the exact PR head. MEMBER authorship and the maintainer label also prohibit automatic closure.
Uninstall owner and commit boundary: The full command returns before mutation for dry-run, rejected confirmation, or invalid plans. It passes the snapshot hash and size-drop exception through the install-record commit helper; failed configuration writes restore installation records, and directory deletion follows successful commit.
Narrow internal write contract: The exception suppresses only size-drop rejection. Unreadable-config and gateway-mode-removal rejection remain active; replacement also retains path, Nix-mode, snapshot-hash, and final-write checks. This is OpenClaw-owned configuration behavior and does not depend on a Codex contract.
Findings None None.
Security None None.

How this fits together

The plugin CLI previews and confirms removal, then commits configuration and installation records before removing managed files. The configuration writer normally rejects unexpectedly large size reductions.

flowchart TD
  A[Plugin uninstall command] --> B[Build removal plan]
  B --> C[Preview and confirmation]
  C --> D[Commit config and install records]
  D --> E[Check remaining write guards]
  E --> F[Remove managed files]
  F --> G[Refresh plugin registry]
Loading

Before merge

None.

Agent review details

Security

None.

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

Review metrics

None.

Technical review

Best possible solution:

Keep the size-drop exception confined to confirmed uninstall commits while preserving all independent configuration guards.

Do we have a high-confidence way to reproduce the issue?

Yes, on the pinned release base: a planned uninstall shrinking a configuration of at least 512 bytes below half its size reaches the guard without the required exception. Current main already contains the fix; this review did not execute a reproduction.

Is this the best way to solve the issue?

Yes. Using the existing narrow write option at the confirmed uninstall owner is preferable to relaxing the shared writer or granting the exception to every plugin lifecycle operation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c688a95c34f1.

Labels

Label justifications:

  • P2: Repairs a bounded plugin-uninstall failure on the extended-stable candidate.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its reported frozen Kitchen Sink failure maps to the changed uninstall owner; focused tests are supplemental, and no after-fix runtime execution is claimed by this review.

Evidence

What I checked:

  • Introduced change and release target: Host-verified introduction evidence limits this PR to the uninstall write option and its regression assertion. The target is extended-stable/2026.6.33 at 91b225e; the verified test merge has that base followed by the exact PR head. MEMBER authorship and the maintainer label also prohibit automatic closure. (src/cli/plugins-uninstall-command.ts:188, 31f76d535515)
  • Uninstall owner and commit boundary: The full command returns before mutation for dry-run, rejected confirmation, or invalid plans. It passes the snapshot hash and size-drop exception through the install-record commit helper; failed configuration writes restore installation records, and directory deletion follows successful commit. (src/cli/plugins-uninstall-command.ts:151, 31f76d535515)
  • Narrow internal write contract: The exception suppresses only size-drop rejection. Unreadable-config and gateway-mode-removal rejection remain active; replacement also retains path, Nix-mode, snapshot-hash, and final-write checks. This is OpenClaw-owned configuration behavior and does not depend on a Codex contract. (src/config/io.ts:537, 31f76d535515)
  • Regression and sibling coverage: The added CLI assertion checks the exact exception, restart intent, snapshot hash, and installation-record unset path. Existing writer coverage accepts intentional shrinking while rejecting gateway-mode removal. Install and update use the shared commit helper without enabling this exception, supporting placement at the uninstall caller. (src/config/io.write-config.test.ts:1091, 31f76d535515)
  • Current main preserves the same behavior: Current main moved uninstall execution into a shared owner, which still sets allowConfigSizeDrop for the CLI's final configuration mutation. The merged upstream fix is fix(plugins): allow intentional uninstall size drops #110991; its presence on main does not satisfy this separate release-branch backport. (src/plugins/management-uninstall.ts:316, c688a95c34f1)
  • Upstream history and shipped ancestry: Git records the upstream fix at 2026-07-18T23:28:18+01:00, and tag containment includes v2026.9.2. This establishes release ancestry, not the first release containing the fix. Some historical blobs were unavailable, so exact source-line introduction attribution was not established. (7fbfc2e8ad33)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-03T02:56:49.987Z sha 8f9ea3b :: needs maintainer review before merge. :: none
  • reviewed 2026-09-03T03:04:01.840Z sha 8f9ea3b :: blocked before merge. :: none
  • reviewed 2026-09-03T23:53:48.835Z sha 8f9ea3b :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 3, 2026
@RomneyDa

RomneyDa commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review exact current head; please confirm only current actionable findings and rank-up moves.

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@RomneyDa
RomneyDa force-pushed the fix/extended-stable-plugin-uninstall-size-drop branch from 8f9ea3b to 31f76d5 Compare September 7, 2026 19:47
@RomneyDa
RomneyDa merged commit 01b26bf into extended-stable/2026.6.33 Sep 7, 2026
93 checks passed
@RomneyDa
RomneyDa deleted the fix/extended-stable-plugin-uninstall-size-drop branch September 7, 2026 20:19
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants