Skip to content

fix(claws): bind consent to exact plugin and skill artifacts - #163299

Closed
Patrick-Erichsen wants to merge 10 commits into
codex/claw-1093-v2-05-lifecycle-uifrom
codex/claw-1093-v2-06-artifact-trust
Closed

Patrick-Erichsen wants to merge 10 commits into
codex/claw-1093-v2-05-lifecycle-uifrom
codex/claw-1093-v2-06-artifact-trust

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Publication Refresh: October 7

Layer 5/16. Previous: #163298 | Next: #163300. Published checkpoint: 9b046246cdc2.

The stack now includes 45 previously local follow-up commits in four additional draft PRs, ending at #166801 (9e653a8ed286). Fresh combined-tip checks passed: 100 backend tests and 13 built-UI browser tests with a mocked Gateway. Before/after review captures are attached. Evidence below that names 6765a8741e4 remains historical evidence for that revision, not a new real-ClawHub run or per-layer CI result.

The stack remains draft and its first layer conflicts with current main. Reconciliation, exact-head CI/review, and the existing release gates remain outstanding. No merge or deployment is authorized by this publication.

What Problem This Solves

A reviewed package can install a different plugin or skill artifact unless consent is tied to the exact resolved release.

User Impact

Add and Update disclose pinned plugin artifacts and skill trust changes. Owned ClawHub skills upgrade transactionally, with rollback rather than a partially replaced managed skill.

Why This Change Was Made

Gateway/CLI review tokens now carry artifact and trust details through installation. The package, plugin, and skill installers verify the same resolved source and preserve Claw ownership across updates.

Evidence

Artifact-review, plugin-capability consent, skill-upgrade/rollback, Gateway, and CLI regression tests are included; pnpm check:changed passed at final stack tip 6765a8741e4. On an installed host, Add review disclosed the pinned Lobster plugin and required consent; the agent then ran Lobster for a real task. A second installed-host profile updated Workflow Operator from 0.1.4-claw1093.local.1 to 0.1.5, replaced the managed plugin, and completed another Lobster task. The main installed host passed Labs-off status/chat and reviewed Remove. After correcting Executive Assistant's version, the local 30-package source-sync dry run reports 30 exact-match skips; production publication and security review remain outstanding.

Release gate: Land the OpenClaw stack together only after ClawHub #3883 and local publish-to-real-task lifecycle proof.

@clawsweeper

clawsweeper Bot commented Oct 2, 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.

@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: XL labels Oct 2, 2026
@Patrick-Erichsen Patrick-Erichsen changed the title codex/claw 1093 v2 06 artifact trust fix(claws): bind consent to exact plugin and skill artifacts Oct 2, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Claws, OpenClaw’s packaged agent setups, disclose exact plugin artifacts, require reviewed skill-warning consent, preserve CLI source provenance, and transactionally replace managed skills.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful implementation and inspected setup evidence remain limited by five unresolved findings and missing authority recovery proof.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Merge readiness

⛔ Blocked before merge - 12 items remain

Keep open: this remains useful stack hardening, but all five earlier findings persist at the pinned head. Successful installed-host observations do not resolve rollback authority or recovery compatibility.

Priority: P2
Reviewed head: 9b046246cdc28220bdb80fc15d83d26073f3adb2

Before merge

  • Add real behavior proof - Authority-chain proof required: inspected screenshots and historical installed-host reports support artifact disclosure and successful Add/plugin Update, but do not show denied consent or revoked/reassigned skill rollback ownership stopping final directory and tracking writes. Add redacted production-boundary traces for those cases and existing-state recovery; terminal output and logs count. Redact private details, then update the PR body for automatic re-review or ask a maintainer to comment @clawsweeper re-review. Serialized formats are unchanged, but recovery compatibility remains unresolved.
  • Bind deferred rollback mutations to the current lifecycle owner (P1) - This earlier blocker remains: deferred installation calls requestDeferredPackageDirInstall without an ownership assertion. The outer rollback checks its reacquired lease before awaited reads, but directory rollback and lock replacement receive no current-owner guard. If that lease expires or is reassigned during those awaits, rollback can still remove or restore skill directories and rewrite tracking before the subsequent lease check fails. Carry the active rollback authority into each final mutation.
  • Retain the skill transaction before the post-install authority check (P2) - This earlier blocker remains: assertCurrent() runs after installation returns but before its rollback receipt reaches onSkillTransaction. Authority loss at this point throws after the replacement directory and tracking have been written. The update's undo list still contains only reference restoration, and upgrades suppress the external-mutation marker, so recovery can restore the old reference while leaving the new skill bytes. Register the receipt before any post-install assertion can throw.
  • Use the normalized preflight for owned skill upgrade warnings (P2) - This earlier blocker remains: the CLI records raw skill_version_conflict failures, while the planner normalizes a valid owned upgrade into an install action. updatePlanSkillWarnings then sees the raw ok: false result and throws “The Claw skill trust review is incomplete,” even for a clean managed upgrade. Consume the planner's normalized result so dry-run and apply remain usable.
  • Include skill reviews in the positive protocol fixture (P2) - This earlier blocker remains: the new positive plugin-artifact fixture omits skillReviews, which this patch makes mandatory in the lifecycle-plan schema. Its first validation assertion therefore fails before testing plugin integrity. Add skillReviews: [] to the valid fixture.
  • Advance the regression clock without a real sleep (P3) - This earlier blocker remains: the second-upgrade regression waits 20 ms in the mocked download to force timestamp ordering. That makes the regression depend on wall-clock scheduling and violates the applicable test-cost policy. Advance a controlled clock at this boundary while preserving the assertion that a completed upgrade permits the next exact upgrade.
  • Resolve security concern: Rollback can outlive its lifecycle authorization - A reacquired lease is checked before asynchronous reads, but the deferred directory transaction has no owner assertion and tracking restoration receives no live guard. Revocation or reassignment can therefore be detected only after rollback has changed the skill.
  • Resolve merge risk - Final-effect proof remains missing for denied artifact consent and revoked or reassigned skill rollback authority.
  • Resolve merge risk - Existing tracked-skill recovery compatibility remains unresolved for interruption and authority loss after directory publication.
  • Resolve merge risk - The stack still requires coordinated reconciliation and its recorded ClawHub, catalog security, RFC, and production lifecycle gates before landing.
  • Complete next step - The stack owner must reconcile the conflicting root, propagate reviewed repairs through dependent branches, and satisfy the recorded cross-repository launch gates before landing.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P1] Bind deferred rollback mutations to the current lifecycle owner — src/skills/lifecycle/archive-install.ts:269-270
  • [P2] Retain the skill transaction before the post-install authority check — src/claws/packages.ts:337-350
  • [P2] Use the normalized preflight for owned skill upgrade warnings — src/cli/claws-update-cli.runtime.ts:214-217
  • [high] Rollback can outlive its lifecycle authorization — src/skills/lifecycle/archive-install.ts:270
Agent review details

How this fits together

Claws turns package manifests and registry artifacts into agent setups through Gateway and CLI lifecycle operations. Reviewed consent controls installation, while package ownership and rollback protect existing plugins, skills, and tracking state.

flowchart TD
  A[Package manifest and registry artifacts] --> B[Add or Update plan]
  B --> C[Artifact and trust review]
  C --> D[Consent and current ownership checks]
  D --> E[Plugin and skill installers]
  E --> F[Agent setup and tracking]
  E --> G[Commit or guarded rollback]
Loading

Technical review

Best possible solution:

Use one lifecycle owner to bind artifact consent and guard installation, rollback, and tracking writes through settlement, preserving existing skill bytes whenever recovery lacks authority.

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

Yes, source inspection establishes the pinned-head receipt-ordering, raw-preflight, and protocol-fixture failures. Runtime reproduction was not executed in this read-only review.

Is this the best way to solve the issue?

Unclear: artifact-bound consent is the right direction, but transactional recovery must carry current authority to final writes and retain its receipt before post-install checks.

Full review comments:

  • [P1] Bind deferred rollback mutations to the current lifecycle owner — src/skills/lifecycle/archive-install.ts:269-270
    This earlier blocker remains: deferred installation calls requestDeferredPackageDirInstall without an ownership assertion. The outer rollback checks its reacquired lease before awaited reads, but directory rollback and lock replacement receive no current-owner guard. If that lease expires or is reassigned during those awaits, rollback can still remove or restore skill directories and rewrite tracking before the subsequent lease check fails. Carry the active rollback authority into each final mutation.
    Confidence: 0.98
  • [P2] Retain the skill transaction before the post-install authority check — src/claws/packages.ts:337-350
    This earlier blocker remains: assertCurrent() runs after installation returns but before its rollback receipt reaches onSkillTransaction. Authority loss at this point throws after the replacement directory and tracking have been written. The update's undo list still contains only reference restoration, and upgrades suppress the external-mutation marker, so recovery can restore the old reference while leaving the new skill bytes. Register the receipt before any post-install assertion can throw.
    Confidence: 0.99
  • [P2] Use the normalized preflight for owned skill upgrade warnings — src/cli/claws-update-cli.runtime.ts:214-217
    This earlier blocker remains: the CLI records raw skill_version_conflict failures, while the planner normalizes a valid owned upgrade into an install action. updatePlanSkillWarnings then sees the raw ok: false result and throws “The Claw skill trust review is incomplete,” even for a clean managed upgrade. Consume the planner's normalized result so dry-run and apply remain usable.
    Confidence: 0.99
  • [P2] Include skill reviews in the positive protocol fixture — packages/gateway-protocol/src/claws-validators.test.ts:165-170
    This earlier blocker remains: the new positive plugin-artifact fixture omits skillReviews, which this patch makes mandatory in the lifecycle-plan schema. Its first validation assertion therefore fails before testing plugin integrity. Add skillReviews: [] to the valid fixture.
    Confidence: 1
  • [P3] Advance the regression clock without a real sleep — src/claws/package-update.skill-upgrade.test.ts:595-598
    This earlier blocker remains: the second-upgrade regression waits 20 ms in the mocked download to force timestamp ordering. That makes the regression depend on wall-clock scheduling and violates the applicable test-cost policy. Advance a controlled clock at this boundary while preserving the assertion that a completed upgrade permits the next exact upgrade.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Merge-risk options

Maintainer options:

  1. Repair through the stack owner (recommended)
    Propagate the lifecycle and receipt fixes across dependent layers, then prove denied consent, revoked rollback authority, and existing-state recovery through the production owners.
  2. Keep transactional upgrades unpublished
    Retain the draft stack until guarded skill recovery and the recorded cross-repository launch gates are verified.

Security

Needs attention: Deferred skill rollback lacks current lifecycle authority at final filesystem and tracking effects.

Evidence

Security concerns:

  • [high] Rollback can outlive its lifecycle authorization — src/skills/lifecycle/archive-install.ts:270
    A reacquired lease is checked before asynchronous reads, but the deferred directory transaction has no owner assertion and tracking restoration receives no live guard. Revocation or reassignment can therefore be detected only after rollback has changed the skill.
    Confidence: 0.98

What I checked:

  • Pinned introduction: Reviewed the introduced delta from a493efd to 9b04624. The supplied test merge is stale and cannot establish the result of merging into current main. (9b046246cdc2)
  • Rollback authority chain: Deferred directory installation supplies no assertOwned callback. The rollback wrapper checks a newly acquired lease before asynchronous ownership reads, then calls a transaction whose filesystem guards only retain directory identity; the tracking replacement likewise receives no assertCurrent callback. A later lease check occurs after rollback effects. (src/skills/lifecycle/archive-install.ts:270, 9b046246cdc2)
  • Receipt ordering: The post-install authority assertion precedes transaction registration. Deferred upgrades intentionally avoid the external-mutation marker, so an assertion failure here leaves the outer undo list with reference restoration rather than the directory rollback receipt. (src/claws/packages.ts:338, 9b046246cdc2)
  • CLI upgrade warning mismatch: The CLI stores raw preflight results. The planner separately normalizes an exclusively owned skill_version_conflict into an install action, but updatePlanSkillWarnings rejects the raw unsuccessful result before printing the preview. (src/cli/claws-update-cli.runtime.ts:216, 9b046246cdc2)
  • Earlier findings remain: The positive plugin protocol fixture still omits mandatory skillReviews, and the second-upgrade regression still sleeps for 20 ms. The earlier reviewed revision could not be compared because a required historical object was unavailable; no unchanged-code or introduction attribution is inferred from that failure. (packages/gateway-protocol/src/claws-validators.test.ts:158, 9b046246cdc2)
  • Inspected real setup evidence: Inspected all four prepared screenshots. They show Labs, catalog discovery, Lobster artifact integrity and capabilities, and a retained agent. The captured body ties installed-host Add and plugin Update success to historical stack revision 6765a87. Neither those images nor the reported combined-tip mocked tests show denied artifact consent or revoked/reassigned skill rollback authority stopping final filesystem and tracking writes.

PR surface

Source +1294, Tests +2431, Docs +6. Total +3731 across 71 files.

View PR surface stats
Area Files Added Removed Net
Source 40 1507 213 +1294
Tests 30 2461 30 +2431
Docs 1 6 0 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 71 3974 243 +3731

Review metrics

Metric Value Why it matters
Production versus validation growth production +1,294 net lines; tests and support +2,431 net lines Production growth has a stated artifact-consent and transactional-recovery purpose, with substantial supplemental regression coverage.
New consent surfaces 1 CLI flag; skill acknowledgements added to 2 Gateway apply methods CLI and browser callers must carry the same reviewed trust decision into Add and Update.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This hardens an unpublished experimental package lifecycle rather than demonstrating an urgent shipped regression.
  • merge-risk: 🚨 compatibility: Managed skill replacement changes existing-state recovery, and receipt loss can leave artifact bytes inconsistent with restored ownership.
  • merge-risk: 🚨 security-boundary: Deferred rollback can reach filesystem and tracking mutations without current lifecycle authority at the final effect.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

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

  • Resolve all five findings through coordinated stack repair.
  • Prove denied consent and revoked or reassigned rollback authority stop final filesystem and tracking effects.
  • Demonstrate existing tracked-skill recovery after interruption and inspect before/after Add and Update captures for the repaired stack.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-02T06:15:37.968Z sha 144b0e1 :: needs real behavior proof before merge. :: [P2] Use the normalized preflight for owned skill upgrade warnings | [P2] Retain the skill transaction before the post-install authority check | [P1] Bind deferred rollback mutations to the current lifecycle owner | [P2] Include skill reviews in the positive protocol fixture | [P3] Advance the regression clock without a real sleep
  • reviewed 2026-10-02T11:07:08.113Z sha 144b0e1 :: needs real behavior proof before merge. :: [P1] Bind deferred rollback mutations to the current lifecycle owner | [P2] Retain the skill transaction before the post-install authority check | [P2] Use the normalized preflight for owned skill upgrade warnings | [P2] Include skill reviews in the positive protocol fixture | [P3] Advance the regression clock without a real sleep

Reviewed October 7, 2026, 7:26 PM ET / 23:26 UTC (Revision 3).

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 2, 2026
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Oct 7, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Closing as superseded: #171623 replaced the Claws plan/review/update/remove lifecycle with a one-way Add operation, and main no longer has the lifecycle modules this layer changes. Any hardening here that still matters should be redone against the new Add flow.

Closed by Roboclaw at the author's request after an audit of his open PRs. The branch is kept, so this can be reopened if needed.

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 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: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL 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.

2 participants