Skip to content

fix(claws): remove owner-qualified skills - #119606

Merged
steipete merged 2 commits into
mainfrom
steipete/dazzling-jennings-b13fa3
Aug 5, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/dazzling-jennings-b13fa3

Conversation

@steipete

@steipete steipete commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Related: #117681

What Problem This Solves

Fixes an issue where removing a Claw that installed an owner-qualified skill such as @owner/triage would retain the skill instead of uninstalling it. The persisted package identity was passed directly to a local-slug validator, so the slash made removal look ambiguous.

Why This Change Was Made

The Claw package layer continues to preserve the publisher-qualified registry identity. The ClawHub skill lifecycle now owns translation to the installed local slug, checks that the requested publisher/source matches the validated origin and lock provenance, and carries the requested identity through apply-time replanning so deletion cannot be retargeted to a same-slug skill from another publisher.

The same identity invariant is applied when a direct owner-qualified install records independent ownership. This change is intentionally separate from #117681, which covers publisher propagation through search, detail, install, gateway, and UI surfaces.

User Impact

Operators can remove Claws containing owner-qualified ClawHub skills and have unchanged, Claw-managed skills cleaned up correctly. Publisher mismatches remain fail-safe: the skill is retained rather than deleting a different publisher's same-slug installation.

AI-assisted implementation; the code and ownership boundary were reviewed directly.

Evidence

  • node scripts/run-vitest.mjs src/skills/lifecycle/clawhub-uninstall.test.ts — 7 tests passed.
  • node scripts/run-vitest.mjs src/claws/package-remove.test.ts — 17 tests passed.
  • node scripts/run-vitest.mjs src/skills/lifecycle/clawhub.test.ts — 101 tests passed.
  • Targeted oxfmt, oxlint, and git diff --check passed.
  • Codex autoreview (gpt-5.6-sol, high reasoning) reported no accepted/actionable findings, including a fresh review after the CI fixture update.
  • pnpm check:test-types passed after updating remaining uninstall-plan fixtures; node scripts/run-vitest.mjs src/claws/export.test.ts src/claws/update-plan.test.ts passed 30 tests.
  • The aggregate changed-file gate was blocked by the unrelated current max-lines baseline entry for extensions/signal/src/channel.ts; no touched-surface failure was reported before that gate stopped.
  • Real CLI/network scenario with isolated state: openclaw claws add installed @steipete/[email protected], persisted the qualified package ref, and tracked the local skills/weather directory with ownerHandle: "steipete". The removal preview selected skill:@steipete/[email protected] for uninstall; applying the integrity-bound plan removed the skill directory, emptied .clawhub/lock.json, and removed the Claw status record.
  • Remote Testbox was unavailable because the Blacksmith CLI is not installed on this host, and direct Crabbox broker authentication returned 401, so trusted-source proof followed the documented local fallback.

@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Aug 5, 2026
@steipete
steipete marked this pull request as ready for review August 5, 2026 12:52
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 5, 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 repository_dispatch).
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 added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P2 Normal backlog priority with limited blast radius. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 9:08 AM ET / 13:08 UTC.

ClawSweeper review

What this changes

The branch lets Claw package cleanup remove an owner-qualified ClawHub skill by resolving its local slug and verifying the recorded publisher before deletion.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep this PR open: current main rejects the persisted owner-qualified reference before it can find the local skill directory, and the branch repairs that lifecycle boundary while retaining deletion provenance checks.

Priority: P2
Reviewed head: 2f0e505a3c3d0b5e9285310938e60a17a6327923

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch follows the established provenance boundary, covers the plan/apply race, and includes a concrete operator-visible CLI scenario.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR body documents an isolated real CLI/network add-and-remove run with the qualified reference, local directory, lockfile, and status-record outcomes observed after the fix.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body documents an isolated real CLI/network add-and-remove run with the qualified reference, local directory, lockfile, and status-record outcomes observed after the fix.
Evidence reviewed 6 items Current-main defect: Package cleanup passes the persisted package reference unchanged, while the uninstall planner sends it to a slug guard that rejects /; an @owner/triage reference therefore cannot reach the local triage directory.
Canonical repair boundary: The PR parses the registry reference before directory resolution, checks publisher/source provenance, retains the requested identity in the plan, and replans from it immediately before deletion.
Existing provenance contract: A linked skill status exposes owner and requested-source data only after the local origin metadata and workspace lock entry agree, so the new comparison is based on the lifecycle's established trust boundary.
Findings None None.
Security None None.

How this fits together

Claw packages persist the registry identity of skills installed into an agent workspace. The ClawHub lifecycle translates that identity to the local directory, validates origin and lock provenance, then removes the verified skill.

flowchart LR
  A[Claw package record] --> B[Package removal planner]
  B --> C[Qualified skill reference]
  C --> D[ClawHub lifecycle]
  D --> E[Origin and lock provenance]
  E --> F[Verified local skill directory]
  F --> G[Safe cleanup]
Loading

Before merge

  • Complete next step (P2) - No repair finding remains; this protected maintainer-labeled PR needs normal exact-head CI completion and maintainer merge handling.
Agent review details

Security

None.

PR surface

Source +23, Tests +199. Total +222 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 2 28 5 +23
Tests 5 205 6 +199
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 233 11 +222

Review metrics

Metric Value Why it matters
Production vs test delta production +28/-5; tests +205/-6 The net production growth establishes a single registry-identity-to-local-slug boundary and apply-time deletion invariant; the larger test delta covers its lifecycle outcomes.

Stored data model

Persistent data-model change detected: serialized state: src/claws/package-remove.test.ts, serialized state: src/skills/lifecycle/clawhub-uninstall.test.ts, serialized state: src/skills/lifecycle/clawhub-uninstall.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Preserve the package layer's qualified registry identity, translate it only in the ClawHub lifecycle, and land the provenance-revalidated cleanup once the exact head completes required checks.

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

Yes—current main passes an owner-qualified persisted reference into a slash-rejecting slug validator, which deterministically produces the failed removal path; this read-only review did not execute it.

Is this the best way to solve the issue?

Yes—the lifecycle is the correct owner for converting registry identity to a local slug, and apply-time replanning keeps a same-slug publisher change from retargeting deletion.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This fixes a bounded current-main skill cleanup regression without evidence of a shipped-release or broad availability impact.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body documents an isolated real CLI/network add-and-remove run with the qualified reference, local directory, lockfile, and status-record outcomes observed after the fix.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body documents an isolated real CLI/network add-and-remove run with the qualified reference, local directory, lockfile, and status-record outcomes observed after the fix.

Label justifications:

  • P2: This fixes a bounded current-main skill cleanup regression without evidence of a shipped-release or broad availability impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body documents an isolated real CLI/network add-and-remove run with the qualified reference, local directory, lockfile, and status-record outcomes observed after the fix.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body documents an isolated real CLI/network add-and-remove run with the qualified reference, local directory, lockfile, and status-record outcomes observed after the fix.

Evidence

What I checked:

Likely related people:

  • steipete: Current-main blame attributes the affected planner to the lifecycle introduction commit, and the same person authored the proposed repair. (role: introduced the current lifecycle path and authored the repair; confidence: high; commits: 2b003f186dd8, aebfbb5c3f25; files: src/skills/lifecycle/clawhub-uninstall.ts, src/skills/lifecycle/clawhub-install-core.ts, src/claws/package-remove.ts)
  • Vincent Koc: Feature history shows a recent Skill Workshop lifecycle change in the same ClawHub lifecycle area. (role: adjacent lifecycle contributor; confidence: medium; commits: 14940edf15f6; files: src/skills/lifecycle/clawhub-install-core.ts)

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.

@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for head 2f0e505a3c3d0b5e9285310938e60a17a6327923:

  • node scripts/run-vitest.mjs src/skills/lifecycle/clawhub-uninstall.test.ts — 7 passed.
  • node scripts/run-vitest.mjs src/claws/package-remove.test.ts — 17 passed.
  • node scripts/run-vitest.mjs src/skills/lifecycle/clawhub.test.ts — 101 passed.
  • pnpm check:test-types — passed.
  • node scripts/run-vitest.mjs src/claws/export.test.ts src/claws/update-plan.test.ts — 30 passed.
  • Targeted formatting, lint, and git diff --check passed.
  • Fresh Codex autoreview after the final fixture update: no accepted/actionable findings.
  • Exact-head CI succeeded: https://github.com/openclaw/openclaw/actions/runs/31008285914
  • Live isolated CLI/network proof installed @steipete/[email protected] through openclaw claws add. The removal preview selected skill:@steipete/[email protected] for uninstall; applying the integrity-bound plan removed skills/weather, emptied the workspace .clawhub/lock.json, and removed the Claw status record.

Remote Testbox was unavailable because the Blacksmith CLI is absent on this host, and direct Crabbox broker authentication returned 401, so trusted-source live proof used the documented local fallback.

@steipete
steipete merged commit 359d8d8 into main Aug 5, 2026
134 of 138 checks passed
@steipete
steipete deleted the steipete/dazzling-jennings-b13fa3 branch August 5, 2026 13:41
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to VACInc/openclaw that referenced this pull request Aug 5, 2026
* origin/main: (130 commits)
  refactor(qa): consolidate scenario runtime helpers (openclaw#119623)
  fix(telegram): bind Mini App auth to dashboard launches
  refactor(agent-core): unify session projection and compaction summaries (openclaw#119639)
  fix(codex): allow natural reactions in the current conversation (openclaw#119649)
  refactor(providers): deduplicate bundled model catalogs (openclaw#119627)
  fix(ui): observe the active service worker after asset refresh (openclaw#119622)
  fix(agents): strip echoed base64 image payloads so photo-heavy turns no longer hit the per-turn output cap (openclaw#119488)
  improve: make state-heavy test suites faster (openclaw#119617)
  perf(agents): add concurrency benchmark (openclaw#119569)
  fix(browser): visibly report failed pairing and tab-sharing actions (openclaw#119526)
  refactor(lobster): consolidate embedded workflow execution (openclaw#119630)
  fix(plugin-sdk): stabilize tuple-derived API baseline ordering (openclaw#119635)
  docs(skills): make full-authority maintainer runs unattended (openclaw#119629)
  fix(managed-child): honor process groups that vanish before cleanup (openclaw#119614)
  fix(ci): stop label-driven automation churn (openclaw#119610)
  fix(media): keep the ttl sweep out of the managed outgoing tree (openclaw#119127)
  fix(claws): remove owner-qualified skills (openclaw#119606)
  fix(clawrouter): show stable error for malformed usage responses (openclaw#119580)
  fix(gateway): claim malformed plugin icon routes (openclaw#119559)
  fix(telegram): preserve truthful empty-content delivery (openclaw#88810)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 6, 2026
* fix(claws): remove qualified skill refs

* test(claws): update uninstall plan fixtures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

1 participant