Repository navigation
fix(claws): preserve ownership and recover partial installs - #163302
Patrick-Erichsen wants to merge 19 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesClaws are installable agent packages; this branch improves partial-install recovery, preserves resource ownership, checks removal authority, and exposes orphaned installations in the Agents UI. Review scores
Merge readiness⛔ Blocked before merge - 9 items remain This remains useful, distinct stack work. The prior Gateway-thread SQLite finding is still present, and final-effect authority and existing-state compatibility proof remain incomplete. Priority: P2 Before merge
Findings
Agent review detailsHow this fits togetherClaws lifecycle operations turn reviewed package plans into agent configuration, workspace files, plugins, and scheduled jobs. SQLite ownership records support subsequent status, recovery, updates, and removal through the CLI and Gateway. flowchart TD
A[Package and operator settings] --> B[Reviewed lifecycle plan]
B --> C[Live authority and ownership checks]
C --> D[CLI and worker operations]
D --> E[Agent resources]
D --> F[SQLite ownership records]
F --> G[Agents status and recovery]
Technical reviewBest possible solution: Keep one lifecycle owner that preserves operator-owned settings, reports recoverable partial state, and fences every removal effect with current request authority. Do we have a high-confidence way to reproduce the issue? Yes, from source: Gateway Update calls a synchronous policy getter that queries SQLite migration state on the serving thread. Runtime tests were not executed under this read-only review. Is this the best way to solve the issue? Partly: reusing lifecycle and ownership owners is appropriate, but the policy getter must use worker-prepared migration facts, and the composed removal boundary needs final-effect authority proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d794f3d9b248. Merge-risk optionsMaintainer options:
SecurityNeeds attention: No unrelated supply-chain execution change was found, but the cross-process removal authority boundary still needs final-effect verification. EvidenceSecurity concerns:
What I checked:
PR surfaceSource +853, Tests +2326, Docs 0. Total +3179 across 73 files. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (2 earlier review cycles)
Reviewed October 7, 2026, 7:25 PM ET / 23:25 UTC (Revision 3). |
4a683a0 to
1b933f4
Compare
|
Closing as superseded: #171623 replaced the Claws plan/review/update/remove lifecycle with a one-way Add operation, and 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. |
Publication Refresh: October 7
Layer 7/16. Previous: #163300 | Next: #163303. Published checkpoint:
1b933f4f4899.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 names6765a8741e4remains 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
Interrupted installs and adopted agents can lose clear package ownership, making status, retry, or cleanup misleading.
User Impact
Partial Add remains recoverable; installed and adopted Claws show accurate status, including orphaned records. Add opens the agent's setup chat, while Remove discloses retained files/plugins and avoids guessing user file origin.
Why This Change Was Made
Gateway Update/Remove recheck live policy and authority; provenance keeps direct plugin, workspace, and ClawHub ownership separate from host model or delegation settings. The UI reconciles cards by package identity rather than only current agent metadata.
Evidence
Gateway worker, adopted ownership, package-ref, plugin trust, and Agents-status tests are included;
pnpm check:changedpassed at final stack tip6765a8741e4. A source-host rehearsal added Research Briefing from local ClawHub, completed a real sourced chat task, then kept installed agents available with Labs off. Its reviewed Remove retained user-created files and Lobster while clearing the Claw-owned agent/resources. The installed-tarball host completed Add plus a real plugin-backed task, preserved chat/status with Labs off, and applied reviewed Remove; installed-CLI status then returned zero Claws. Inspected desktop/mobile Agents UI showed no Workflow card, while user-created task files and managed Lobster remained. A final packaged-host pass retained Project Manager after removing Workflow Operator and restarting the Gateway, with the Labs-off setting and user-file hashes unchanged.Release gate: Land the OpenClaw stack together only after ClawHub #3883 and local publish-to-real-task lifecycle proof.