Repository navigation
Create Claw agent and root install record - #101755
Conversation
a868821 to
26b2ceb
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 20, 2026, 5:09 PM ET / 21:09 UTC. Summary PR surface: Source +763, Tests +868, Docs +10, Generated +45. Total +1686 across 15 files. Reproducibility: not applicable. as a bug report: this PR proposes a new experimental lifecycle. A concrete current-head behavior proof is still needed for the proposed apply and retry paths. 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: Obtain sponsorship for the ordered Claws stack, then retain the consent-bound root-record design only after a redacted current-head CLI transcript proves preview, apply, ledger creation, and resumable recovery in one isolated state directory. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug report: this PR proposes a new experimental lifecycle. A concrete current-head behavior proof is still needed for the proposed apply and retry paths. Is this the best way to solve the issue? Unclear: the consent and durable-ledger design is coherent for the requested feature, but whether this persistent lifecycle belongs in core requires maintainer product approval before it can be called the best solution. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 21bfc75648d1. Label changesLabel justifications:
Evidence reviewedPR surface: Source +763, Tests +868, Docs +10, Generated +45. Total +1686 across 15 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 (33 earlier review cycles; latest 8 shown)
|
26b2ceb to
4896f53
Compare
|
feat PR,根据项目贡献策略不接受 |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
Validation stack update: this draft is superseded by the consolidated non-mutating Claws validation PR #101328. Keeping this PR number/branch available to repurpose for the later mutating Claws apply/status/update/remove series. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Updated after the restack cleanup at Follow-up fix:
Additional validation on
Direct CLI proof on the exact head: @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
The main consumer blocker here is interrupted-install recovery. The root ledger row is inserted first, but a later workspace or config failure leaves pending/partial state, and retrying the same add collides with that existing row rather than resuming. For Scout Crews, installing several specialist roles will inevitably produce partial failures. Please make add a resumable, idempotent state machine with durable phases, or compensate fully. Every failure after the pending insert, including parent-directory creation, should leave a state that status/doctor can reconcile and a subsequent identical request can safely continue. |
|
Updated #101755 at The add path is now a resumable, consent-bound state machine: pending records can be reused only when package identity, manifest identity, plan integrity, agent config digest, workspace, and owned paths match; parent-directory failures are recorded as partial; workspace creation advances to Real behavior proofBehavior or issue addressed: Real environment tested: Exact steps or command run after this patch:
Evidence after fix:
Observed result after fix: What was not tested: @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Real behavior proofBehavior or issue addressed: Real environment tested: Exact steps or command run after this patch:
Evidence after fix: Observed result after fix: What was not tested: |
|
@clawsweeper please re-review current head 31caeb09e7f5f4f93bbdbef4275030942028def9f. The prior CI failures were fixed and proof is updated above. |
|
🦞👀 I queued a lightweight read-only assist pass. It will post a separate answer comment and will not edit the durable ClawSweeper review comment or trigger close, merge, repair, label, or branch changes. Request: please re-review current head 31caeb09e7f5f4f93bbdbef4275030942028def9f. The prior CI failures were fixed and proof is updated above. |
|
ClawSweeper assist: A full correctness re-review is needed, but the requested SHA does not match the current PR head in the supplied metadata. Evidence:
Suggested next action: Confirm the intended current SHA, then comment Source: #101755 (comment) |
|
Correction: current #101755 head is |
Real behavior proofBehavior or issue addressed: Real environment tested: Exact steps or command run after this patch:
Evidence after fix: Focused validation also passed 71 Claws tests. Final-head provenance validation passed 19/19 tests, Kysely guardrails passed, and GitHub CI finished with 82 passed checks, 42 skipped, 0 failed, and 0 pending. Observed result after fix: What was not tested: |
|
@clawsweeper review exact current head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
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: Create Claw agent and root install record 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: Create Claw agent and root install record 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: Create Claw agent and root install record 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 > Signing-history note (2026-07-19): signed-history head
ed152be79577is a commit-history-only rewrite of previously tested head540a7f439143; both resolve to treebad6d4081558. Existing behavior evidence remains source-equivalent. This note does not claim a new runtime execution. Implements the second RFC #27 slice, stacked on #101328: - Creates exactly one new agent and one new workspace after a complete dry-run plan. - Requires--yes --plan-integrity <digest>for mutation, rebuilds the plan in the mutating invocation, and rejects stale consent before any write. - Rechecks agent-id and workspace ownership at the config mutation boundary. - Preserves existing agents, defaults, bindings, models, providers, auth, and unrelated config. - Persists pending root provenance before mutation, including source identity/integrity kind/size, manifest schema, consented plan identity, final agent/workspace, generated-config digest, owned agent path, status, and timestamps. - Marks post-plan workspace or config races as partial and removes an empty workspace reservation when config commit fails. - Returns versionedopenclaw.clawAddResult.v1results with the consented plan identity. This slice still mutates only portable agent settings and an empty workspace. Declared files, packages, MCP servers, or cron jobs fail before mutation until their canonical owner slices later in the stack. No declared component is skipped. ## Lifecycletext openclaw claws add <source> --dry-run --json # copy planIntegrity from the reviewed plan openclaw claws add <source> --yes --plan-integrity <digest> --jsonChanging the source snapshot, final agent id, workspace, action set, or expected owner state changes the plan digest and invalidates consent. ## Stack - RFC: openclaw/rfcs#27 - Depends on: #101328 schema/source identity/read-only plan - This PR: consented agent/workspace creation and root provenance - Next: #101973 confined workspace files and managed hashes ## Validationtext pnpm exec vitest run src/claws/schema.test.ts src/claws/schema-conformance.test.ts \ src/claws/provenance.test.ts src/cli/claws-cli.test.ts # passed node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts \ src/claws/lifecycle.e2e.test.ts # 5 lifecycle E2E tests passed pnpm exec oxlint src/claws/add.ts src/claws/provenance.ts \ src/claws/provenance.test.ts src/cli/claws-cli.ts \ src/cli/claws-cli.runtime.ts src/cli/claws-cli.test.ts \ src/claws/lifecycle.e2e.test.ts # 0 warnings, 0 errors pnpm tsgo:core pnpm tsgo:test:src git diff --check # passedThe real CLI E2E previews a minimal Claw, applies that exact plan in the same isolated state directory, verifies one created agent and root install record, rejects unsupported component mutation, and fails closed without consent. Codex review of the final uncommitted patch completed with no actionable findings. ## Documentation Extends/cli/clawswith exactplanIntegrityconsent, agent/workspace creation, and root provenance. The guide still excludes workspace-file and capability mutation owned by later stages.