Skip to content

feat(claws): export reviewed native bootstrap - #115371

Merged
giodl73-repo merged 4 commits into
openclaw:mainfrom
giodl73-repo:user/giodl/claws-guided-export-v2
Aug 8, 2026
Merged

giodl73-repo merged 4 commits into
openclaw:mainfrom
giodl73-repo:user/giodl/claws-guided-export-v2

Conversation

@giodl73-repo

@giodl73-repo giodl73-repo commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

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.md after 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-root BOOTSTRAP.md.

The exporter:

  • uses the existing bounded safe-file reader and rejects symlinks, hardlinks, oversized content, invalid UTF-8, and empty instructions;
  • includes the exact bootstrap bytes in the derivative package version;
  • preserves a pending package bootstrap when no explicit author bootstrap is supplied;
  • treats an explicit --bootstrap file as the author-selected export value;
  • re-reads the completed output through the canonical Claw reader; and
  • removes the incomplete output directory if package validation fails.

This deliberately does not restore setup schema v2, questionnaires, templates, persisted answers, or a separate configure lifecycle. BOOTSTRAP.md remains 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

  • Exact signed head: 099a4409b2c735c4e4f9d07955799c085ee1929b
  • WSL2 Ubuntu 24.04, Node 24.15.0, pnpm 11.15.1
  • 54 focused tests pass across src/claws/export.test.ts and src/cli/claws-cli.test.ts
  • Export tests cover canonical package re-read, bootstrap integrity metadata, derivative-version changes, pending-bootstrap preservation, empty content, and invalid UTF-8
  • Core and root-test tsgo checks pass
  • Type-aware Oxlint passes all five changed TypeScript files with zero warnings/errors
  • Oxfmt and git diff --check pass for all six changed files
  • Final Codex review against feat(claws): apply schema-v1 profile requirements #115962 head d8195ee found no actionable correctness regression

Real 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 through readClawManifestFile, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes size: XL maintainer Maintainer-authored PR labels Jul 28, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P1 High-priority user-facing bug, regression, or broken workflow. 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. labels Jul 29, 2026
@clawsweeper

clawsweeper Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 8, 2026, 12:43 AM ET / 04:43 UTC.

ClawSweeper review

What this changes

The PR adds an experimental claws export --bootstrap &lt;path> option to place reviewed first-run instructions into a portable Claw package.

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
Reviewed head: e572545c3813eb7867a343af8c2312799f69853c
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The feature idea is concrete, but the merge-conflicted aggregate cannot be rated as a mergeable implementation.
Proof confidence 🌊 off-meta tidepool Not applicable: Repository state identifies this as member-authored, so the external-contributor proof gate does not apply; the body’s fixture description does not replace exact-head review.
Patch quality 🧂 unranked krab (1/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository state identifies this as member-authored, so the external-contributor proof gate does not apply; the body’s fixture description does not replace exact-head review.
Evidence reviewed 7 items Current CLI behavior: Current main registers export with only --out and --json; there is no author-selected bootstrap input.
Current export boundary: The exporter reuses only a pending, recorded package bootstrap, verifies its digest, version-binds it, and writes it; it has no explicit author-file input.
Existing lifecycle contract: The reader already rejects unsafe, oversized, invalid UTF-8, or empty package-root bootstrap content, establishing the boundary a narrow export slice should reuse.
Findings 1 actionable finding [P1] Restack this PR to the bootstrap-export slice
Security Needs attention Separate unrelated release automation changes: The supplied patch removes dedicated ClawSweeper commit-review dispatch from a workflow while the PR claims to add bootstrap export; that automation change needs independent ownership and proof.

How this fits together

Claws 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]
Loading

Decision needed

Question Recommendation
Should OpenClaw sponsor an experimental author-selected claws export --bootstrap &lt;path> contract now, and require it to return as a clean main-based PR? Sponsor a narrow replacement: Recreate the export-only slice on current main, retaining the existing package-reader and seed-once lifecycle invariants.

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

  • Restack this PR to the bootstrap-export slice (P1) - This branch removes the dedicated commit-review dispatch while also carrying release, UI, i18n, and other unrelated changes. That makes a dirty 2,007-file PR unsafe to merge for a CLI export feature; recreate the focused export commits on current main and review workflow changes separately.
  • Resolve security concern: Separate unrelated release automation changes - The supplied patch removes dedicated ClawSweeper commit-review dispatch from a workflow while the PR claims to add bootstrap export; that automation change needs independent ownership and proof.
  • Resolve merge risk (P1) - The current head is merge-conflicted and its supplied 2,007-file aggregate includes unrelated release, UI, i18n, and CI changes, so its three-way merge cannot be safely attributed to bootstrap export.
  • Resolve merge risk (P1) - The proposed CLI flag is a new experimental public contract; it needs fresh main-based lifecycle and package-validation proof.
  • Resolve merge risk (P1) - Exact PR-head source was unavailable in the local partial clone and could not be fetched because DNS resolution for GitHub failed.
  • Improve patch quality - Recreate the export-only branch from current main.
  • Improve patch quality - Provide a redacted real CLI export transcript covering accepted reviewed input and rejected unsafe or empty input.

Findings

  • [P1] Restack this PR to the bootstrap-export slice — .github/workflows/clawsweeper-dispatch.yml:318
  • [medium] Separate unrelated release automation changes — .github/workflows/clawsweeper-dispatch.yml:318
Agent review details

Security

Needs 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

Metric Value Why it matters
CLI contract 1 proposed option --bootstrap would add an authoring input to the experimental export command and needs an explicit contract review.
Reviewable scope 2,007 files; +94,095/-68,952; merge-conflicted The aggregate contains unrelated product and workflow changes, so it cannot be assessed as one bootstrap-export change.

Stored data model

Persistent data-model change detected: migration/backfill/repair: .agents/skills/clawsweeper/SKILL.md, serialized state: ui/src/pages/skill-workshop/history-scan.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Rebuild the focused export change (recommended)
    Use current main as the base and retain only the bootstrap-export implementation, tests, and docs before another review.
  2. Pause the feature contract
    Keep the draft paused if maintainers do not yet want an author-selected bootstrap input on the experimental CLI.

Technical review

Best 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:

  • [P1] Restack this PR to the bootstrap-export slice — .github/workflows/clawsweeper-dispatch.yml:318
    This branch removes the dedicated commit-review dispatch while also carrying release, UI, i18n, and other unrelated changes. That makes a dirty 2,007-file PR unsafe to merge for a CLI export feature; recreate the focused export commits on current main and review workflow changes separately.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b855934ee41e.

Labels

Label changes:

  • add merge-risk: 🚨 automation: The submitted aggregate includes unrelated CI and release-workflow changes, including removal of dedicated commit-review dispatch coverage.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Repository state identifies this as member-authored, so the external-contributor proof gate does not apply; the body’s fixture description does not replace exact-head review.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.
  • remove merge-risk: 🚨 session-state: Current PR review merge-risk labels are merge-risk: 🚨 compatibility, merge-risk: 🚨 automation.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: This is an experimental authoring feature blocked by merge scope and product direction, not a regression on a shipped default.
  • merge-risk: 🚨 compatibility: The proposed public export option changes how portable packages acquire first-run bootstrap content.
  • merge-risk: 🚨 automation: The submitted aggregate includes unrelated CI and release-workflow changes, including removal of dedicated commit-review dispatch coverage.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Repository state identifies this as member-authored, so the external-contributor proof gate does not apply; the body’s fixture description does not replace exact-head review.

Evidence

Security concerns:

  • [medium] Separate unrelated release automation changes — .github/workflows/clawsweeper-dispatch.yml:318
    The supplied patch removes dedicated ClawSweeper commit-review dispatch from a workflow while the PR claims to add bootstrap export; that automation change needs independent ownership and proof.
    Confidence: 0.98

What I checked:

  • Current CLI behavior: Current main registers export with only --out and --json; there is no author-selected bootstrap input. (src/cli/claws-cli.ts:126, b855934ee41e)
  • Current export boundary: The exporter reuses only a pending, recorded package bootstrap, verifies its digest, version-binds it, and writes it; it has no explicit author-file input. (src/claws/export.ts:374, b855934ee41e)
  • Existing lifecycle contract: The reader already rejects unsafe, oversized, invalid UTF-8, or empty package-root bootstrap content, establishing the boundary a narrow export slice should reuse. (src/claws/reader.ts:132, b855934ee41e)
  • Current regression coverage: Tests deliberately omit an unowned operator-authored workspace bootstrap while preserving a pending package-owned bootstrap, confirming the requested behavior is still distinct. (src/claws/export.test.ts:424, b855934ee41e)
  • Merged prerequisite provenance: The schema-v1 lifecycle prerequisite merged as this commit; the relevant CLI/export/test blobs are identical between it and current main, so it did not add --bootstrap. (src/claws/export.ts:374, 7774f9a36c12)
  • Release provenance: No release tag contains the prerequisite commit; it is current-main-only work after v2026.7.1-2. (7774f9a36c12)

Likely related people:

  • giodl73-repo: Authored the merged schema-v1 Claws lifecycle commit that owns the present package-bootstrap export path. (role: introduced current Claws lifecycle behavior; confidence: high; commits: 7774f9a36c12; files: src/claws/export.ts, src/cli/claws-cli.ts)
  • joshavant: Appears in the retained history of the current exporter before the lifecycle prerequisite landed. (role: earlier export-area contributor; confidence: medium; commits: 7bcdb5823e6c; files: src/claws/export.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (14 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-31T15:36:54.369Z sha ce4fb74dce255cf2390d9aaf784cc33c695c5345 :: needs real behavior proof before merge. :: [P1] Split the prerequisite lifecycle changes from bootstrap export
  • reviewed 2026-07-31T15:42:49.315Z sha ce4fb74dce255cf2390d9aaf784cc33c695c5345 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T06:58:43.411Z sha ce4fb74dce255cf2390d9aaf784cc33c695c5345 :: needs real behavior proof before merge. :: [P1] Retarget this PR to the prerequisite branch
  • reviewed 2026-08-02T12:12:58.913Z sha ce4fb74dce255cf2390d9aaf784cc33c695c5345 :: needs real behavior proof before merge. :: [P1] Retarget this PR to the prerequisite branch
  • reviewed 2026-08-03T12:46:52.738Z sha ce4fb74dce255cf2390d9aaf784cc33c695c5345 :: needs real behavior proof before merge. :: [P1] Retarget the export slice to its prerequisite
  • reviewed 2026-08-07T00:51:01.756Z sha 2f1b292a8b3c9c0f7fbab9db0b439e85a3d24e65 :: found issues before merge. :: [P1] Seed the package bootstrap before publishing the agent | [P1] Reject drifted bootstrap content instead of omitting it | [P1] Preserve or migrate documented profile pointers | [P1] Retarget the export slice to its prerequisite
  • reviewed 2026-08-07T04:36:43.915Z sha e1cfd3f :: needs maintainer review before merge. :: none
  • reviewed 2026-08-07T04:46:02.632Z sha e1cfd3f :: needs maintainer review before merge. :: none

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Fixed the status privacy finding in signed commit 4c79f09f4d74. Public status now uses an explicit setup projection that omits answer values and the answer-derived digest; configure and update read full reconciliation state directly from the private state store. WSL2 Node 24.15 proof passes 51 focused lifecycle tests, core typecheck, type-aware lint, formatting, and diff hygiene. The PR body now records this evidence. @clawsweeper re-review

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 29, 2026
@giodl73-repo
giodl73-repo force-pushed the user/giodl/claws-guided-export-v2 branch from 4c79f09 to e9b1860 Compare July 29, 2026 22:13
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P1 High-priority user-facing bug, regression, or broken workflow. labels Jul 29, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

Final three-model repair pass is complete at signed head f1d0aff92dffa550113bf2237b3fd26f7c5601d6. The live extension-backed guided-export replay issue found during exact-head proof is fixed and covered by regression; 79 focused tests, core type checking, type-aware lint, formatting, ordinary inspect, and real ClawHub @openclaw/diffs add/export proof pass.

@clawsweeper

clawsweeper Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jul 29, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 7, 2026
@giodl73-repo giodl73-repo self-assigned this Aug 8, 2026
@giodl73-repo
giodl73-repo force-pushed the user/giodl/claws-guided-export-v2 branch from e1cfd3f to e572545 Compare August 8, 2026 04:10
@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: line Channel integration: line channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: nextcloud-talk Channel integration: nextcloud-talk channel: nostr Channel integration: nostr channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon labels Aug 8, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

giodl73-repo and others added 4 commits August 8, 2026 12:07
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
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant