Repository navigation
Export installed agents as grouped Claw packages - #102306
Conversation
|
@clawsweeper re-review New stacked Claws PR for the creation/export experience. Please review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs real behavior proof before merge. Reviewed July 20, 2026, 5:18 PM ET / 21:18 UTC. Summary PR surface: Source +416, Tests +406, Docs +15. Total +837 across 8 files. Reproducibility: not applicable. as a bug reproduction: this PR adds new experimental behavior. The supplied transcript does provide a healthy CLI round trip, but it does not prove the intended degraded-state outcomes on the current head. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Keep the default export contract exact and fail closed for incomplete or drifted managed state, then add final-head redacted CLI proof for the healthy round trip and each selected degraded-state outcome before landing this stack slice. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this PR adds new experimental behavior. The supplied transcript does provide a healthy CLI round trip, but it does not prove the intended degraded-state outcomes on the current head. Is this the best way to solve the issue? Unclear. The exact-state, fail-closed design is the narrower maintainable default, but maintainers must decide whether that is the permanent product contract before the implementation can be considered the best solution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 21bfc75648d1. Label changesLabel justifications:
Evidence reviewedPR surface: Source +416, Tests +406, Docs +15. Total +837 across 8 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
Review history (23 earlier review cycles; latest 8 shown)
|
49eb30a to
5ada027
Compare
b3be1ee to
ed66eab
Compare
5ada027 to
d11434d
Compare
ed66eab to
06b1e17
Compare
d11434d to
93f5186
Compare
06b1e17 to
59f8ce3
Compare
dd16b2f to
f683f60
Compare
eb903fc to
d14318e
Compare
f683f60 to
047e33d
Compare
d14318e to
f1ff89e
Compare
047e33d to
fafa698
Compare
f1ff89e to
01179a6
Compare
fafa698 to
ebd50cb
Compare
01179a6 to
830f057
Compare
|
Signed-history proof carry-forward:
The rewrite only compacted iterative fix commits and replaced commit identity/signatures; the PR's source tree and diff are unchanged. The existing Real behavior proof remains applicable. This attestation does not claim a new runtime execution; fresh CI is validating the rewritten SHA. |
|
Independent review refresh applied at |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: Export installed agents as grouped Claw packages This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: Export installed agents as grouped Claw packages This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: Export installed agents as grouped Claw packages This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: Export installed agents as grouped Claw packages This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Merged via squash.
|
Summary - add experimental
claws export <agent-id> --out <new-directory>- project one installed agent into the grouped portable Claw schema - copy ledger-managed workspace files and safe workspace-relative avatars into package sidecars - always assign regenerated exports a derivative package identity and content-derived version - omit nonportable remote avatars, normalize empty optional arrays, and expand~in output paths ## Scope Export reads the provenance established by the add/status lifecycle and writes a new self-contained package without mutating the installed Claw. It accepts an exact agent id, explicitly projects portable agent fields, copies only ledger-managed workspace files plus a validated local avatar, emits exact recorded package references, and refuses unavailable managed files or an existing output directory. Image data avatars remain inline. A safe local avatar is read through the pinned workspace avatar boundary, copied underworkspace/, and rewritten to a workspace-relative manifest path. Remote, missing, or unsafe local avatars are omitted because they are not portable package state. Every regenerated package is emitted asopenclaw-claw-<agent-id>@0.0.0-export.<content-hash>, including an unchanged installation. Export never reuses an authenticated publisher's package name/version unless it can return the byte-for-byte original artifact, which this command intentionally does not do. This slice emits the schema's JSON-compatible representation. The later dedicated #111391 slice changes the canonical exported representation toCLAW.mdwhile preserving this package and round-trip behavior. ## Stack - RFC: openclaw/rfcs#27 - Depends on: #102296 status/remove and ownership-aware lifecycle state - This PR: portable creation/export experience - Next: #102383 gateway-owned cron lifecycle - CanonicalCLAW.md: #111391 ## Validation -node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.src.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-src.tsbuildinfo- Oxlint: 0 warnings, 0 errors across all 6 PR files - Oxfmt: all 6 PR files correctly formatted - 8 export unit tests - 15 Claws CLI tests - 8 full lifecycle E2E tests -git diff --check- Codex review: no accepted/actionable findings ## Real behavior proof > Signing-history note (2026-07-19): signed-history head830f057a4f46is a commit-history-only rewrite of previously tested head01179a6693e3; both resolve to treeb070e62df6bc. The behavior evidence below remains source-equivalent. This note does not claim a new runtime execution. The real CLI E2E passes consent-bound add preview/apply -> export -> inspect -> consent-bound add preview/apply from the exported package in isolated state. Export writespackage.json,openclaw.claw.json, managed workspace sidecars, and a portable agent manifest; the fresh add recreates the agent from the derivative package. ## Documentation Extends/cli/clawswith grouped JSON export and its portable-state boundary. CanonicalCLAW.mdexport remains in #111391.Independent review refresh (2026-07-19)
Current exact head:
4576fbf3ecb2382a5e020d4d6cdde43906ba18cc. Restacks unchanged export behavior on the corrected lifecycle parent. Fresh exact-head GitHub CI is authoritative for generated-package and SQLite-backed checks.