Skip to content

fix(skills): stop skills update from destroying local skill changes - #118190

Merged
obviyus merged 8 commits into
openclaw:mainfrom
yetval:fix/skills-update-preserve-local-changes
Aug 22, 2026
Merged

obviyus merged 8 commits into
openclaw:mainfrom
yetval:fix/skills-update-preserve-local-changes

Conversation

@yetval

@yetval yetval commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

openclaw skills update always passed force: true to the ClawHub installer. The shared package sink then replaced the tracked skill directory and deleted its backup, even when the installed tree no longer matched the recorded skillFile and fileTreeSha256 digests. Same-version updates could report changed: false after silently deleting local edits and added files.

The uninstall owner already enforced the missing invariant: destructive lifecycle operations must verify the installed tree against its recorded digests at the commit boundary.

Fix

  • Unforced updates verify the tracked skill before network work and carry that exact digest plan into the install transaction.
  • The package-install owner now moves the existing directory to its rollbackable backup, validates that moved tree, restores it on mismatch, and only then publishes the staged replacement. This closes the prior async check-to-backup race.
  • Restore failures are surfaced instead of silently discarding the rollback error.
  • CLI skills update --force and Gateway skills.update { force: true } provide the explicit destructive override. Blocked results use code: "force_required".
  • Current security.installPolicy warning acknowledgement behavior is preserved.
  • Digest-free released installs fail closed once: one explicit forced update records digests; later updates verify normally. This matches the existing uninstall policy and is documented.
  • Maintainer decision: accept the conservative one-time forced update rather than adding a historical-artifact bootstrap. The refusal now explains why local changes cannot be detected, and docs warn against using --all --force for this migration.

Fresh installs and forced updates do not run the guard. Archive and GitHub-backed ClawHub resolutions share the same transaction-owned boundary.

Review finding resolved

The previous head ran its second check in afterInstall, then awaited target existence before moving the live directory. An edit in that interval was still deleted. The repaired owner boundary validates the already-moved backup and rolls it back on refusal.

The branch was conflict-resolved against main without rewriting contributor history or force-pushing.

Evidence

Exact head: 2216e2d52d9aaabdea4c23c8fc5a23c238a4759b

  • Regression red on exact pre-fix main 0933263f76f435b16d73c29dc60b98cd30e4c45e: src/infra/install-package-dir.test.ts > restores edits detected after the existing install moves to backup received { ok: true }; the local edit was not preserved.
  • Regression green on this head.
  • Focused grouped run: 305/305 tests pass across:
    • src/infra/install-package-dir.test.ts
    • src/skills/lifecycle/archive-install.test.ts
    • src/skills/lifecycle/clawhub-uninstall.test.ts
    • src/skills/lifecycle/clawhub.test.ts
    • src/cli/skills-cli.commands.test.ts
    • src/gateway/server-methods/skills.clawhub.test.ts
    • packages/gateway-protocol/src/schema/agents-models-skills.test.ts
  • oxfmt --check: pass on all 15 changed files.
  • targeted oxlint: pass on all changed TypeScript files.
  • pnpm tsgo: pass.
  • pnpm check:test-types: pass.
  • node scripts/check-changed.mjs -- <changed paths>: pass, including assertion-safety, formatting, dependency, boundary, dead-code, lint, schema, database-first, import-cycle, and type gates.
  • Autoreview (gpt-5.6-sol, high): clean; patch correct, zero actionable findings.
  • git diff --check: pass.

Distill result: one digest plan, one rollback owner, no duplicate update implementation. Greybeard result: unforced updates perform one fail-fast tree read and one required transaction-boundary read; forced updates perform neither.

Effective diff versus integrated main: production +196/-24, tests +445/-4, docs +7/-1. Production growth is the rollback hook, carried digest plan, force retry contract, and explicit rollback-failure reporting.

  • Exact-head CI run 32557839497: every touched-path, build, docs, type, baseline-ratchet, security, and 65 test-shard lane passed. The sole failure is current-main ui/src/components/markdown.test.ts exceeding its max-lines baseline; this PR has no diff in that file. ci-gate fails only as its aggregate consequence.
  • Exact-head ClawSweeper (gpt-5.6-terra, high): PASS; patch correct, 0 findings, 0 security concerns, no maintainer decision, 0 Rank-up moves. Report: local-review-118190-gpt-5-6-terra-2216e2d5-20260822T064937.161Z.
  • Final Telegram userbot proof against this exact checkout: real-user DM to @foremanclawbot, live @steipete/weather install, local SKILL.md edit plus notes/local-note.md, then unforced update. Gateway recorded force_required; both files remained byte-for-byte intact. Telegram emitted CLAWHUB_LOCAL_CHANGES_FIXED_DONE as Bot API message 1881. Recording: 3 messages, 9 edits, 1 deletion, 6 typing events; 5 mock-provider turns; both workspace assertions passed.

User-visible behavior

Without --force, locally edited, added, unreadable, or concurrently changed skill files survive and the update reports force_required. With --force, replacement proceeds intentionally.

@yetval
yetval marked this pull request as ready for review August 2, 2026 20:46
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes size: M labels Aug 2, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 22, 2026, 2:23 AM ET / 06:23 UTC.

ClawSweeper review

What this changes

The PR protects tracked ClawHub skill updates from replacing locally changed files, adds explicit CLI and Gateway force overrides, and restores the original directory when sink-bound verification rejects a replacement.

Regression provenance

Possible regression — probable (reviewed change; known regression link). No predecessor PR is attributed.

Merge readiness

⚠️ Needs maintainer review before merge - 5 items remain

Keep open: the skill-update repair follows the correct lifecycle owner, but this head also reintroduces a nested Control UI main landmark and reverts a current-main Gateway allocation fix. Those unrelated regressions block merge; legacy digest-free update behavior still needs maintainer confirmation.

Priority: P1
Reviewed head: eccd2ab40894e92edd138c744faa9936d19afec8
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The lifecycle proof is useful, but the current head contains two concrete regressions outside its stated repair.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR body and follow-up describe isolated loopback-registry lifecycle runs showing unforced local-file survival and deliberate forced replacement after the fix.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body and follow-up describe isolated loopback-registry lifecycle runs showing unforced local-file survival and deliberate forced replacement after the fix.
Evidence reviewed 8 items Sink-owned repair boundary: The PR carries the verified tracked-skill plan into the update transaction and validates the moved backup before publishing the staged replacement.
Rollback owner: The shared installer moves an existing target to backup, runs after-backup validation, and restores backup on refusal.
Current-main UI regression: Current main commit c8d6604 explicitly changed this element to div and added a test requiring no nested main; this head reverses both changes.
Findings 2 actionable findings [P1] Restore the page-level landmark boundary
[P2] Keep session lookup caches lazy
Security None None.

Live Verification

Command: pnpm openclaw skills update --help

Result: PASS (completed)

pnpm openclaw skills update --help
runner@runnervm76f27:/tmp/clawsweeper-live-proof-118190-tHV8tz/target$ pnpm openclaw skills update --help
$ node scripts/run-node.mjs skills update --help
pnpm openclaw skills update --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 108.07 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.7s
node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

[tsdown-build] invocation 2/2 finished in 14.7s
[plugin-control-plane-loads] verified 35 built modules with native require and checked doctor closures
runtime-postbuild: 11 phases completed in 4354ms (slowest: built plugin control-plane loads 3581ms)
│
◇

OpenClaw 2026.8.1 (eccd2ab) — All your chats, one OpenClaw.

Usage: openclaw skills update [options] [skill-ref]

Update ClawHub-installed skills in the active or shared managed directory

Arguments:
  skill-ref                             Single ClawHub skill ref (@owner/slug)

Options:
  --acknowledge-clawhub-risk            Acknowledge ClawHub release trust warnings without prompting (default: false)
  --acknowledge-inst
… output truncated …

Assertions:

  • PASS expect_output: --force

How this fits together

ClawHub updates resolve a tracked skill, download and stage a replacement, and hand it to the shared package-directory installer. The installer owns the destructive swap; CLI and Gateway surfaces report whether an update was refused or forced.

flowchart LR
A[Tracked skill metadata] --> B[Skill update request]
B --> C[Download and stage replacement]
C --> D[Shared package installer]
D --> E[Move existing skill to backup]
E --> F{Backup matches digests?}
F -->|yes| G[Publish replacement]
F -->|no| H[Restore original skill]
G --> I[CLI or Gateway result]
H --> I
Loading

Decision needed

Question Recommendation
Should digest-free tracked skills fail closed until an operator explicitly forces one update, or should OpenClaw implement a non-destructive digest-bootstrap path? Adopt one-time forced migration: Keep the documented fail-closed behavior so unknown local state is never silently treated as an unmodified install.

Why: Both options change the upgrade contract for released installs, and source evidence cannot choose the operator-policy tradeoff.

Before merge

  • Restore the page-level landmark boundary (P1) - This changes the activity body back to main and removes the regression test, even though it renders inside the shell's existing #control-ui-main. Merging recreates the nested landmark that current main fixed in c8d6604; keep the div and its test.
  • Keep session lookup caches lazy (P2) - This reverts current main's 9d33b0b optimization and allocates two lookup maps for every non-admin request, including requests that never resolve a session target. Preserve the lazy lookupCaches ??= form or drop this unrelated hunk.
  • Resolve merge risk (P1) - Digest-free released installs now require an explicit forced update, changing the upgrade path for existing tracked skills without recorded digests.
  • Resolve merge risk (P1) - The current-base diff is production +200/-28; after removing the unrelated reversions, maintainers should confirm the remaining lifecycle expansion is the smallest owner-boundary shape.

Findings

  • [P1] Restore the page-level landmark boundary — ui/src/pages/activity/session-activity-view.ts:461
  • [P2] Keep session lookup caches lazy — src/gateway/session-sharing.ts:443
Agent review details

Security

None.

PR surface

Source +172, Tests +441, Docs +6. Total +619 across 15 files.

View PR surface stats
Area Files Added Removed Net
Source 8 196 24 +172
Tests 5 445 4 +441
Docs 2 7 1 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 648 29 +619

Review metrics

Metric Value Why it matters
Production vs test LOC production +200/-28; tests +445/-19; docs +7/-1 The lifecycle repair adds substantial production surface for a bug fix and the current-base total includes two unrelated reversions.
Public update contract 1 CLI flag, 1 Gateway parameter, 1 result code added Existing operators and Gateway clients gain an explicit destructive-update retry path.

Stored data model

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

Merge-risk options

Maintainer options:

  1. Remove current-main regressions before merge (recommended)
    Restore the lazy Gateway cache and div landmark/test while retaining the skill lifecycle repair, then rerun the affected tests.
  2. Accept the digest-free migration explicitly
    Confirm that existing digest-free installs must use one deliberate forced update rather than silently bootstrap local state.

Technical review

Best possible solution:

Keep the sink-owned backup validation, remove the unrelated UI and Gateway reversions, then explicitly accept or replace the one-time forced migration for digest-free installs.

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

Yes for the PR-introduced UI regression: the app shell already renders main and the activity view is inserted beneath it, while current main's regression test asserts that view adds no main. The reported local-skill loss is supported by the PR's before/after lifecycle evidence but was not executed in this read-only review.

Is this the best way to solve the issue?

No for the branch as submitted: the sink-owned validation is the right repair location, but it must not carry unrelated current-main reversions and the legacy digest migration needs explicit product acceptance.

Full review comments:

  • [P1] Restore the page-level landmark boundary — ui/src/pages/activity/session-activity-view.ts:461
    This changes the activity body back to main and removes the regression test, even though it renders inside the shell's existing #control-ui-main. Merging recreates the nested landmark that current main fixed in c8d6604; keep the div and its test.
    Confidence: 0.99
  • [P2] Keep session lookup caches lazy — src/gateway/session-sharing.ts:443
    This reverts current main's 9d33b0b optimization and allocates two lookup maps for every non-admin request, including requests that never resolve a session target. Preserve the lazy lookupCaches ??= form or drop this unrelated hunk.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P1: Merging the current head reintroduces an invalid nested main landmark in the Control UI.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • remove P0: Current review triage priority is P1, so this older priority label is no longer current.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove merge-risk: 🚨 security-boundary: Current PR review merge-risk labels are merge-risk: 🚨 compatibility, merge-risk: 🚨 other.

Label justifications:

  • P1: Merging the current head reintroduces an invalid nested main landmark in the Control UI.
  • merge-risk: 🚨 compatibility: Digest-free tracked installs are newly refused until an operator uses the added force path.
  • merge-risk: 🚨 other: The branch reverses current-main UI semantics and a Gateway performance fix outside the stated skill-update repair.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The PR body and follow-up describe isolated loopback-registry lifecycle runs showing unforced local-file survival and deliberate forced replacement after the fix.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body and follow-up describe isolated loopback-registry lifecycle runs showing unforced local-file survival and deliberate forced replacement after the fix.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs ui/src/pages/activity/session-activity-view.test.ts src/gateway/session-sharing.test.ts.
  • [P1] node scripts/run-vitest.mjs src/infra/install-package-dir.test.ts src/skills/lifecycle/archive-install.test.ts src/skills/lifecycle/clawhub-uninstall.test.ts src/skills/lifecycle/clawhub.test.ts src/cli/skills-cli.commands.test.ts src/gateway/server-methods/skills.clawhub.test.ts packages/gateway-protocol/src/schema/agents-models-skills.test.ts.
  • [P1] pnpm check:test-types.

What I checked:

Likely related people:

  • Peter Steinberger: Current main history includes the affected ClawHub lifecycle work and the two base fixes this head reverses. (role: recent area contributor; confidence: high; commits: 359d8d867b67, 9d33b0b7275b, c8d6604261ef; files: src/skills/lifecycle/clawhub.ts, src/gateway/session-sharing.ts, ui/src/pages/activity/session-activity-view.ts)
  • Jesse Merhi: The merged install-policy work is the adjacent contract the new forced-update path must preserve. (role: adjacent security-contract contributor; confidence: medium; commits: bf40269cb792; files: src/skills/lifecycle/archive-install.ts, src/skills/lifecycle/clawhub-install-core.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Restore the current-main UI landmark and its regression test.
  • Restore lazy session lookup-cache allocation.
  • Get a maintainer decision on the digest-free upgrade contract.

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 (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-05T16:27:48.826Z sha 657be6c5e1193b18bd23723e4f2e491b8b8f2b6b :: needs changes before merge. :: [P1] Block unreadable existing skills before replacement | [P2] Return Gateway-usable force retry guidance
  • reviewed 2026-08-05T20:30:19.126Z sha 7f2c2e39cfac6d689df756c6182181145b3ed655 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-05T20:38:09.201Z sha 7f2c2e39cfac6d689df756c6182181145b3ed655 :: found issues before merge. :: [P1] Revalidate the original skill at the replacement commit boundary
  • reviewed 2026-08-05T22:30:28.454Z sha 5520ab7ce40425cc39d7de72b327c40889f8f49e :: needs real behavior proof before merge. :: [P1] Revalidate local state at the install-sink replacement boundary
  • reviewed 2026-08-06T06:37:01.938Z sha 5520ab7ce40425cc39d7de72b327c40889f8f49e :: needs real behavior proof before merge. :: [P1] Guard the actual replacement boundary | [P2] Preserve force-required through the boundary refusal
  • reviewed 2026-08-07T19:39:35.595Z sha 5520ab7ce40425cc39d7de72b327c40889f8f49e :: needs real behavior proof before merge. :: [P1] Revalidate at the install sink's replacement boundary
  • reviewed 2026-08-09T18:49:18.962Z sha cc63af2 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-20T18:41:25.120Z sha cc63af2 :: found issues before merge. :: [P1] Close the post-check replacement window

@yetval

yetval commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Applied two of the three review items at head c8b924c:

  • Upgrade coverage: added a released-version fixture regression for digest-free tracked records (the shape v2026.7.x writes). It proves the exact contract: the first update is refused with the no-complete-digest message, one --force performs the replacement and records skillFile plus fileTreeSha256 digests, and the following update verifies and proceeds without force. The block is one-time and self-healing.
  • Operator guidance: docs/cli/skills.md now states that pre-digest installs are unverifiable by design and that their first update asks for one --force, which migrates them to digest-verified updates.

The remaining item is the maintainer call the review names: whether fail-closed is the accepted upgrade behavior for digest-free records. The PR keeps fail-closed deliberately because a digest-free directory is indistinguishable from a locally modified one, silent replacement is unrecoverable, and both uninstall and Claw package removal already refuse the same state. If maintainers prefer a non-destructive migration instead, a follow-up could compare the freshly downloaded same-version tree against the installed directory and auto-record digests on an exact match; happy to build that if preferred.

PR body Evidence and head references are refreshed for c8b924c; the production diff is unchanged from the reviewed 45bd736 (the new commit adds only the regression fixture and docs).

@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 2, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. and removed 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. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. P1 High-priority user-facing bug, regression, or broken workflow. labels Aug 5, 2026
@yetval
yetval force-pushed the fix/skills-update-preserve-local-changes branch from 657be6c to 7f2c2e3 Compare August 5, 2026 17:45
@yetval

yetval commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Addressed every open verdict item at head 7f2c2e39cfa (rebased onto current main 6aee279).

[P1] Block unreadable existing skills before replacement: fixed. The guard no longer trusts the planner's missing code as proof of absence. guardTrackedSkillLocalState (src/skills/lifecycle/clawhub.ts) now verifies absence itself with lstat: only ENOENT bypasses the guard, any other inspection failure blocks, and every non-ok planner result (including the missing that EISDIR/EACCES read failures collapse into) blocks unless force is passed. Regression added: a tracked skill whose SKILL.md was replaced by a directory is refused without touching the directory, and the local content survives ("refuses to update a ClawHub skill whose SKILL.md is unreadable unless forced"). The refreshed real behavior proof in the PR body includes this exact scenario end to end against the loopback registry.

[P2] Gateway-usable force retry guidance: fixed. Blocked updates now return a transport-neutral code: "force_required" on the failed result (same channel the existing trust error codes use, and already serialized into the gateway error details.results). The lifecycle error text no longer contains the CLI-only --force spelling; the CLI renders "Re-run with --force to update it anyway." at its own boundary, and docs/gateway/protocol.md now documents the additive force parameter and the force_required retry contract for skills.update.

Rebase onto current main: done. The branch absorbed the clawhub lifecycle facade split and #119606's owner-qualified uninstall refs. Because the update flow deliberately accepts tracked slugs via the lenient normalizeTrackedSkillSlug (lockfile compatibility) while #119606's requested-ref parse is stricter user-input validation, the guard now calls a split-out planTrackedClawHubSkillState (parse-free inner verification of planClawHubSkillUninstall, which keeps its exact contract and retargeting protection for uninstall callers). Without that split the guard would have force-blocked tracked skills with legacy slug spellings before the security-verdict refusal could surface.

Owner decision (digest-free installs require one explicit force): unchanged and still yours to accept. The PR keeps the documented fail-closed one-time migration, matching the review's own recommendation. The non-destructive digest bootstrap alternative remains available as a follow-up if you prefer it.

Proof refreshed against the pushed head; the unforced update refusal, byte-for-byte local file survival, forced replacement, and the unreadable-SKILL.md preservation case are all live lifecycle runs on pristine main vs this patch.

@clawsweeper clawsweeper Bot removed the rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. label Aug 5, 2026
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P1 High-priority user-facing bug, regression, or broken workflow. and removed P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 9, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. and removed 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. P1 High-priority user-facing bug, regression, or broken workflow. labels Aug 20, 2026
@openclaw-barnacle openclaw-barnacle Bot added r: skill Auto-close: skills should be published on ClawHub, not added to core. size: L and removed size: M labels Aug 22, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Thanks for the contribution! New skills should be published on ClawHub for everyone to use. We’re keeping the core lean on skills, so I’m closing this out.

@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Aug 22, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Thanks for the contribution! New skills should be published on ClawHub for everyone to use. We’re keeping the core lean on skills, so I’m closing this out.

@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Aug 22, 2026
@obviyus obviyus added the bad-barnacle Suppress Barnacle automation on this issue or PR. label Aug 22, 2026
@obviyus obviyus reopened this Aug 22, 2026
@clawsweeper clawsweeper Bot added the P1 High-priority user-facing bug, regression, or broken workflow. label Aug 22, 2026
@obviyus

obviyus commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Maintainer decision: I accept the documented one-time explicit --force requirement for released ClawHub installs without recorded file digests. An unverifiable legacy directory must not be replaced silently; the forced update records digests so later updates can protect local changes.

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

Labels

app: web-ui App: web-ui bad-barnacle Suppress Barnacle automation on this issue or PR. cli CLI command changes docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. r: skill Auto-close: skills should be published on ClawHub, not added to core. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants