Repository navigation
feat(claws): export reviewed native bootstrap - #115371
Conversation
|
Codex review: found issues before merge. Reviewed August 8, 2026, 12:43 AM ET / 04:43 UTC. ClawSweeper reviewWhat this changesThe PR adds an experimental Merge readiness⛔ Blocked by patch quality or review findings - 8 items remain Keep open for maintainer direction. Current main has the merged bootstrap lifecycle prerequisite but not author-selected bootstrap export; this draft is merge-conflicted and aggregates unrelated work, so it is not a reviewable landing patch. Priority: P2 Review scores
Verification
How this fits togetherClaws export turns an installed agent and its owned workspace state into a portable package. The package reader validates a package-root bootstrap file, which the recipient lifecycle then seeds once into the new workspace. flowchart LR
A[Claw author] --> B[Export command]
B --> C[Installed Claw state]
C --> D[Package exporter]
D --> E[Portable package]
E --> F[Package reader]
F --> G[Recipient bootstrap lifecycle]
Decision needed
Why: The merged prerequisite removed the former dependency blocker, but this adds a public CLI surface and the submitted aggregate branch is not safely reviewable. Before merge
Findings
Agent review detailsSecurityNeeds attention: The intended export path inherits safe reader and digest checks, but the submitted aggregate also changes release automation outside its stated purpose. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: After maintainer sponsorship, recreate only the bootstrap-export commits on current main and prove the CLI’s safe-input, validation, and cleanup behavior with a redacted real export transcript. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a requested authoring capability, and source inspection confirms current main intentionally lacks the requested CLI input. Is this the best way to solve the issue? No: the desired capability belongs beside the existing exporter, but the current conflicted aggregate is not the maintainable way to add it; a narrow main-based slice is safer. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b855934ee41e. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (14 earlier review cycles; latest 8 shown)
|
|
Fixed the status privacy finding in signed commit |
4c79f09 to
e9b1860
Compare
|
@clawsweeper review Final three-model repair pass is complete at signed head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
e1cfd3f to
e572545
Compare
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
Co-authored-by: Copilot <[email protected]> Copilot-Session: 3cdcdb00-ade8-4e61-85a7-8151b35f216a
Export re-emitted BOOTSTRAP.md only while the seeded copy was still pending, so an agent whose bootstrap had been edited, flagged unsafe, or become unreadable exported a package with no bootstrap at all. That is the same class of silent loss the managed workspace files already guard against, so treat it the same way: drifted bootstrap state now fails with `bootstrap_drifted` unless the author supplies a reviewed `--bootstrap` replacement. A consumed bootstrap stays a completed lifecycle state and still exports without BOOTSTRAP.md. Co-authored-by: Copilot <[email protected]> Copilot-Session: 3cdcdb00-ade8-4e61-85a7-8151b35f216a
|
Merged via squash.
|
What Problem This Solves
An installed Claw can already be exported as a portable package, but authors had no bounded way to include the native first-run instructions that recipients need. Hand-copying
BOOTSTRAP.mdafter export bypasses the exporter's integrity-derived version and final package validation.This is the bootstrap-native export follow-up in RFC #52. It depends on #115962 and is restacked on its current signed requirements head.
Why This Change Was Made
openclaw claws export <agent> --out <directory> --bootstrap <path>accepts one explicitly reviewed Markdown file and emits it as package-rootBOOTSTRAP.md.The exporter:
--bootstrapfile as the author-selected export value;This deliberately does not restore setup schema v2, questionnaires, templates, persisted answers, or a separate configure lifecycle.
BOOTSTRAP.mdremains package-authored prompt content handled by OpenClaw's native seed-once bootstrap lifecycle. Authors are warned not to include credentials, tokens, private answers, or machine-specific paths.User Impact
With
OPENCLAW_EXPERIMENTAL_CLAWS=1, an author can export a working Claw together with reviewed first-run instructions. Recipients get the existing native bootstrap chat behavior when they add that package.Evidence
099a4409b2c735c4e4f9d07955799c085ee1929bsrc/claws/export.test.tsandsrc/cli/claws-cli.test.tsgit diff --checkpass for all six changed filesd8195eefound no actionable correctness regressionReal Behavior Proof
Behavior addressed: export a reviewed native bootstrap as part of the same validated package, rather than modifying the package after export.
Observed result: the focused integration fixture exports
BOOTSTRAP.md, re-reads the full output throughreadClawManifestFile, records the bootstrap source and byte length in the package snapshot, and changes the derivative package version when bootstrap content changes. Unsafe or empty input fails before a package is produced.What was not tested: no credentials, provider endpoints, ClawHub publication, or recipient model turn are involved in this authoring slice.