Skip to content

fix(claws): preserve live authority through lifecycle changes - #166799

Closed
Patrick-Erichsen wants to merge 17 commits into
codex/claw-1093-publish-13-manifest-host-policyfrom
codex/claw-1093-publish-14-lifecycle-authority
Closed

Patrick-Erichsen wants to merge 17 commits into
codex/claw-1093-publish-13-manifest-host-policyfrom
codex/claw-1093-publish-14-lifecycle-authority

Conversation

@Patrick-Erichsen

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

Copy link
Copy Markdown
Contributor

Publication Refresh: October 7

Layer 14/16. Previous: #166798 | Next: #166800. Published checkpoint: 5b4b0c2311b0.

Full stack tip: #166801. Earlier local-ClawHub lifecycle evidence remains in #163307, tied to its recorded revision.

What Problem This Solves

A reviewed Claw operation could reach a later effect after plugin grants, scheduled work, or skill watcher ownership had changed.

User Impact

Changed permissions stop installation before the package is committed. Removal waits for managed skill work to retire, checks current scheduled-job revisions, and preserves resources it can no longer safely own. Default Update remains usable for recorded legacy local sources without restoring package control over models or delegates.

Why This Change Was Made

Recheck staged effective plugin grants at the managed installer boundary, delay the external-mutation marker until that review passes, carry live cron revisions, and use the existing watcher retirement and guarded skill-write owners.

Evidence

  • Combined stack at 9e653a8ed286: 100 focused backend tests passed on October 7 in 64.75 seconds. The real managed-installer integration covers grants revoked during download, rejection before persistence, and preservation of a previously accepted plugin during a denied Update.
  • Reviewed Remove cases reject changed cron targets and revoked authority before apply.
  • The prior full pnpm check:changed passed at the unchanged combined tip. Earlier real local-ClawHub recovery and cron-race runs are historical evidence; this publication does not claim a fresh production lifecycle canary.

Publication Scope

Related: #163946. This is a draft layer in the Claws Labs stack. The stack retains its previously tested base and currently conflicts with newer main; this publication does not resolve that drift or authorize a release. Production ClawHub support, the compatible published Lobster artifact, official catalog security review, and RFC acceptance remain release gates. The local-source CLI and official-only launch scope are unchanged.

@clawsweeper

clawsweeper Bot commented Oct 7, 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 7, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 7, 2026
@clawsweeper clawsweeper Bot added the status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. label Oct 7, 2026
@clawsweeper

clawsweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR rechecks plugin grants before installation, drains agent-owned skill watchers before removal, fences rollback writes, and preserves legacy local updates and fresh UI status.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The repair is coherent and has useful focused coverage, but the material authority claims lack sufficient final-effect proof.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep open: this layer provides distinct lifecycle hardening that is not established as implemented on main. No definite introduced defect was found, but authority-boundary proof remains incomplete.

Likely related people: Peter Steinberger and Kimi Yu are unverified routing candidates from current-main area history.

Priority: P2
Reviewed head: 5b4b0c2311b02fee5d94bd5cddf35f1f07c1678b

Before merge

  • Add real behavior proof - Authority-chain proof required: the managed installer, rollback worker, and watcher-removal owners need observed allowed and revoked or reassigned final-effect cases. The supplied tests use mocked downloads or subscriptions, while inspected screenshots prove an earlier lifecycle revision. Redacted terminal traces or logs are suitable; screenshots or recordings help when they directly expose the result. Preserve private-data redaction and update the PR body for automatic re-review, or ask a maintainer for @clawsweeper re-review. Stored-format compatibility is sufficient: this layer preserves the existing tracking formats and introduces no persisted schema.
  • Resolve merge risk - The changed authority boundaries lack observed final-effect proof that revoked plugin grants, a revoked removal caller, or a reassigned package lease cannot reach artifact, tracking, ownership-record, or cleanup effects after awaited work.
  • Resolve merge risk - This layer is clean against its preceding stack branch, but the recorded stack conflicts with newer main; coordinated reconciliation and validation of the resulting source remain outstanding.
  • Complete next step - The stack owner must provide final-effect authority evidence, reconcile the dependent landing base, and satisfy the already-recorded launch prerequisites before requesting merge readiness.

Findings

None.

Agent review details

How this fits together

Claws packages configure agents and their skill, plugin, and scheduled-work requirements. Reviewed lifecycle operations pass through Gateway and installer owners before changing installed artifacts, ownership records, or agent workspaces.

flowchart TD
  A[CLI or Control UI] --> B[Reviewed lifecycle plan]
  B --> C[Gateway authority and ownership]
  C --> D[Plugin grant review]
  C --> E[Scheduled work and watcher drainage]
  D --> F[Guarded artifact and record writes]
  E --> G[Safe workspace cleanup]
  F --> H[Lifecycle result and status]
  G --> H
Loading

Technical review

Best possible solution:

Keep lifecycle effects under the existing installer, watcher, scheduler, and worker owners, with live authority checked at persistence and cleanup and existing operator state preserved.

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

No current-main runtime reproduction was established in this read-only review; source and focused regressions identify the stack's grant, rollback, and watcher races.

Is this the best way to solve the issue?

Yes, the owner-boundary approach is appropriate and avoids a competing lifecycle implementation; its final-effect authority claims still need direct proof.

AGENTS.md: found and applied where relevant.

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

Merge-risk options

Maintainer options:

  1. Prove the final authority boundaries (recommended)
    Add allowed and revoked or reassigned cases through the production lifecycle owners, recording rejection before final persistence or cleanup.

Security

None.

Evidence

What I checked:

  • Pinned introduction: Reviewed the introduced merge-base-to-head delta e05149e..5b4b0c2. The verified test merge targets the preceding stack layer, not fetched main; its clean status does not establish current-main readiness. (5b4b0c2311b0)
  • Final plugin review ordering: Managed installation now invokes the Claw owner check and staged-artifact review within capability consent, before the final declared-surface comparison. Package installation separately reads current source configuration and compares every staged plugin entry's effective grants against the reviewed plan. (src/plugins/management-install.ts:380, 5b4b0c2311b0)
  • Watcher retirement boundary: Gateway removal joins agent-owned skill watcher retirement before acknowledging drainage. The retirement owner tracks detached local closes, joins remote tasks, retains failed retirement results, and rejects reacquisition observed during drainage. (src/gateway/server-methods/claws-monitors.ts:416, 5b4b0c2311b0)
  • Worker rollback authority: Skill rollback carries the package lifecycle lease into the worker command. The worker checks its scope, workspace-derived key, current owner, and unexpired database lease inside the write transaction before replacing the ownership reference. (src/claws/update-state.worker.ts:23, 5b4b0c2311b0)
  • Relevant regression coverage and its limits: Introduced tests exercise denied plugin installation, preservation of an accepted plugin during denied Update, released worker leases, watcher close failure, surviving shared subscriptions, and reacquisition. Registry/download functions and physical or remote watchers are mocked in the relevant suites. The supplied body reports 100 combined-tip backend tests in 64.75 seconds at 9e653a8, not an observed production authority-race trace at this head. (src/plugins/claw-managed-capability-consent.integration.test.ts:19, 5b4b0c2311b0)
  • Historical live evidence inspected: Inspected all four prepared images in the media manifest. They show the earlier Labs setting, local catalog, plugin capability review, and a completed Lobster-backed task. The linked historical evidence at fix(claws): recover interrupted ownership and preserve safe removal #163307 is useful lifecycle context, but does not demonstrate this layer's revocation, reassignment, rollback fencing, or physical watcher-drain outcomes.

PR surface

Source +211, Tests +1182, Docs +5. Total +1398 across 36 files.

View PR surface stats
Area Files Added Removed Net
Source 20 278 67 +211
Tests 15 1260 78 +1182
Docs 1 5 0 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 36 1543 145 +1398

Review metrics

Metric Value Why it matters
Production versus test growth production +211, tests and test support +1181; docs +5, test routing +1 Production growth supports final grant review, worker lease fencing, and joined watcher retirement; most growth is regression coverage.

Root-cause cluster

Relationship: partial_overlap
Canonical: #163946
Summary: This PR supplies one lifecycle-hardening layer of the explicitly tracked Claws Labs launch; neighboring layers cover distinct contracts.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is bounded hardening of an experimental lifecycle stack, without evidence of an urgent shipped regression.
  • merge-risk: 🚨 security-boundary: The patch changes consumption of plugin grants and lifecycle authority, whose rejection before final effects is not yet established by production-path evidence.
  • 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.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

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

  • Prove allowed installation and removal, then revoke the reviewed plugin grant or removal caller during awaited work and show rejection before final effects.
  • Prove released or reassigned package authority cannot publish rollback ownership or tracking writes.
  • Reconcile the dependent stack onto its intended landing base and validate the resulting lifecycle paths.

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.

Reviewed October 7, 2026, 7:26 PM ET / 23:26 UTC.

@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: 🚨 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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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