Skip to content

Create Claw agent and root install record - #101755

Merged
giodl73-repo merged 9 commits into
mainfrom
user/giodl/claws-pr3-feed-plan
Jul 22, 2026
Merged

giodl73-repo merged 9 commits into
mainfrom
user/giodl/claws-pr3-feed-plan

Conversation

@giodl73-repo

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

Copy link
Copy Markdown
Contributor

Summary > Signing-history note (2026-07-19): signed-history head ed152be79577 is a commit-history-only rewrite of previously tested head 540a7f439143; both resolve to tree bad6d4081558. 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 versioned openclaw.clawAddResult.v1 results 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. ## Lifecycle text openclaw claws add <source> --dry-run --json # copy planIntegrity from the reviewed plan openclaw claws add <source> --yes --plan-integrity <digest> --json Changing 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 ## Validation text 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 # passed The 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/claws with exact planIntegrity consent, agent/workspace creation, and root provenance. The guide still excludes workspace-file and capability mutation owned by later stages.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: L maintainer Maintainer-authored PR labels Jul 7, 2026
@giodl73-repo
giodl73-repo force-pushed the user/giodl/claws-pr3-feed-plan branch from a868821 to 26b2ceb Compare July 7, 2026 15:31
@clawsweeper

clawsweeper Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 20, 2026, 5:09 PM ET / 21:09 UTC.

Summary
The branch changes experimental claws add from preview-only behavior into consent-bound creation of one agent and workspace with a durable claw_installs provenance record.

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.

  • Public and persistent lifecycle surface: 2 CLI consent options added; 1 authoritative SQLite table added. The PR changes both the user command contract and retry-sensitive persisted state, so product sponsorship and upgrade safety matter before merge.

Stored data model
Persistent data-model change detected: database schema: src/claws/add.ts, database schema: src/claws/fixtures/minimal-agent.claw.json, database schema: src/claws/provenance.test.ts, database schema: src/claws/provenance.ts, database schema: src/cli/claws-cli.test.ts, database schema: src/state/openclaw-state-db.generated.d.ts, and 6 more. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦐 gold shrimp
Patch quality: 🐚 platinum hermit
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Post a redacted current-head terminal transcript showing dry-run output, matching --yes --plan-integrity apply, the completed claw_installs record, and an interrupted retry.
  • Get a maintainer decision on whether the ordered Claws stack and persistent root provenance belong in core.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR contains a credible redacted source-runtime recovery transcript for 39bd12cf12b, but the latest 6a0c7d581ad head lacks an equally direct current-head transcript for dry-run, consented apply, durable record creation, and retry; redact local paths and any private values before posting it. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] Merging this slice would establish a persistent experimental CLI and SQLite lifecycle before a maintainer confirms that the stacked Claws product direction belongs in core.
  • [P1] The branch persists retry-sensitive installation state and mutates agent/workspace configuration; an exact-current-head terminal proof should demonstrate preview, consented apply, durable record creation, and interrupted-retry recovery together.

Maintainer options:

  1. Sponsor and prove the stack before merge (recommended)
    Confirm the core lifecycle direction, land in dependency order, and require an exact-current-head terminal transcript covering consented apply plus durable retry recovery.
  2. Pause the mutation slice
    Keep the branch open but do not merge the persistent agent/workspace and ledger behavior until the maintainer product decision is recorded.

Next step before merge

  • [P1] A maintainer must first sponsor or reject the persistent core Claws lifecycle; contributor action is limited to supplying current-head real behavior proof.

Maintainer decision needed

  • Question: Should OpenClaw accept the stacked Claws initiative as a core experimental lifecycle, including persistent root install provenance and agent/workspace mutation, before this apply slice is considered for merge?
  • Rationale: The patch is a new core product and persistent-state boundary, not a bug fix with an established current-main contract; only maintainers can decide whether the lifecycle belongs in core and whether this stack order is the intended rollout.
  • Likely owner: steipete — The supplied timeline shows direct participation on this maintainer-labeled stack, though no stronger ownership record was available in the review context.
  • Options:
    • Sponsor the bounded experimental stack (recommended): Approve the read-only planning predecessor and this consented root-creation slice as the intended core experimental direction, contingent on current-head runtime proof.
    • Keep Claws planning-only: Decline persistent mutation and provenance in core for now, leaving the existing read-only proposal as the maximum accepted scope.
    • Move the lifecycle behind an external surface: Ask for a plugin or ClawHub-oriented design if the capability should not become a core-owned state and CLI lifecycle.

Security
Cleared: The supplied diff adds no dependency, workflow, secret, permission, or artifact-execution change; its filesystem and state safeguards were specifically reviewed in the PR discussion.

Review details

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

Label justifications:

  • P2: This is a substantial experimental product improvement, but no evidence shows an urgent regression affecting existing users.
  • merge-risk: 🚨 compatibility: The PR adds public claws add mutation semantics and consent flags on an experimental command path that must be accepted as a stable-enough product contract.
  • merge-risk: 🚨 session-state: The new authoritative install record controls resumable agent/workspace creation and can affect recovery behavior after interrupted mutations.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR contains a credible redacted source-runtime recovery transcript for 39bd12cf12b, but the latest 6a0c7d581ad head lacks an equally direct current-head transcript for dry-run, consented apply, durable record creation, and retry; redact local paths and any private values before posting it. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +763, Tests +868, Docs +10, Generated +45. Total +1686 across 15 files.

View PR surface stats
Area Files Added Removed Net
Source 8 798 35 +763
Tests 4 879 11 +868
Docs 1 20 10 +10
Config 0 0 0 0
Generated 2 45 0 +45
Other 0 0 0 0
Total 15 1742 56 +1686

What I checked:

  • Persistent core lifecycle: The proposed CLI accepts --yes and --plan-integrity, applies an agent/workspace plan, and returns a versioned add result; this is a new user-facing lifecycle rather than a narrow correction. (src/cli/claws-cli.ts:10, 6a0c7d581ad9)
  • Stored-state surface: The branch adds the authoritative claw_installs SQLite table and generated DB typing for install provenance, status, workspace identity, and consented plan identity. (src/state/openclaw-state-schema.sql:1929, 6a0c7d581ad9)
  • Stack dependency remains open: The PR base is the open read-only Claw planning PR at Add grouped Claw schema and read-only add plan #101328, so this branch is not an independently accepted mainline change. (087500a80942)
  • Latest direct runtime proof is stale relative to head: The posted recovery transcript explicitly ran at 39bd12cf12b, while the current head is 6a0c7d581ad; later comments carry forward source-equivalent proof for other rewrite heads but do not provide a directly observed current-head add/record/retry transcript. (src/claws/lifecycle.e2e.test.ts:108, 6a0c7d581ad9)
  • Prior collision concerns were addressed on the branch: Review discussion documents fixes for implicit main reservation, canonical workspace handling, pending ledger persistence, and canonical shared-schema ownership; the latest branch commits also add normalized-collision coverage. (src/claws/add.ts:1, 6a0c7d581ad9)

Likely related people:

  • Patrick-Erichsen: Authored the latest branch commits that correct and test normalized agent-collision handling, and supplied the concrete review feedback on default-agent, workspace, ledger, and schema invariants. (role: recent collision-safety contributor; confidence: high; commits: a9812625de20, f13a4c92af72, cba89ed25d71; files: src/claws/add.ts, src/claws/lifecycle.ts, src/claws/provenance.ts)
  • steipete: The timeline records an explicit mention and subscription on this maintainer-labeled multi-PR Claws stack; this is the strongest available maintainer-routing signal in the supplied context. (role: likely product-direction participant; confidence: low; files: src/claws/add.ts, src/cli/claws-cli.runtime.ts, src/state/openclaw-state-schema.sql)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • 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.
Review history (33 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-17T19:30:21.518Z sha 39bd12c :: needs maintainer review before merge. :: none
  • reviewed 2026-07-19T14:11:07.518Z sha 540a7f4 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-19T14:53:14.022Z sha 540a7f4 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-19T17:54:43.216Z sha ed152be :: needs maintainer review before merge. :: none
  • reviewed 2026-07-19T18:14:21.218Z sha ed152be :: needs maintainer review before merge. :: none
  • reviewed 2026-07-19T21:22:02.297Z sha d1c3b80c448b9c91981d84eb64dc25d755b17ce9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-19T21:40:03.915Z sha d10d03d :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-19T22:23:10.990Z sha d10d03d :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. 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 7, 2026
@giodl73-repo
giodl73-repo force-pushed the user/giodl/claws-pr3-feed-plan branch from 26b2ceb to 4896f53 Compare July 7, 2026 15:41
@liuhao1024

Copy link
Copy Markdown
Contributor

feat PR,根据项目贡献策略不接受

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 7, 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: the existing ClawSweeper review comment will be edited in place when the review finishes.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 7, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

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.

@giodl73-repo giodl73-repo changed the title Add local Claw feed planning Persist Claw artifact provenance refs Jul 7, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 7, 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: the existing ClawSweeper review comment will be edited in place when the review finishes.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Updated after the restack cleanup at bea0e3f33ac6062561275f258fee49e4f4c9b5a3.

Follow-up fix:

  • Regenerated src/state/openclaw-state-schema.generated.ts so pnpm db:kysely:check / CI architecture no longer see schema drift.
  • Added narrow sqlite-allow-raw comments on the Claw provenance state writes so the raw SQLite boundary is explicit and checked.

Additional validation on bea0e3f33ac6062561275f258fee49e4f4c9b5a3:

  • pnpm check:architecture
  • node scripts/run-vitest.mjs src/claws/provenance.test.ts src/cli/claws-cli.test.ts src/claws/lifecycle.e2e.test.ts -- --reporter=dot
  • git diff --check

Direct CLI proof on the exact head:

HEAD=bea0e3f33ac6062561275f258fee49e4f4c9b5a3
--- enabled add help ---
--dry-run                  Preview all actions without mutating state
--plan-integrity <digest>  Bind consent to an exact dry-run plan
--yes                      Confirm creation of the new agent and workspace
--- dry-run minimal add summary ---
{"schemaVersion":"openclaw.clawAddPlan.v1","stability":"experimental","dryRun":true,"mutationAllowed":false,"planIntegrity":"sha256:4b4c4b3e6d6f2849d11f003d76e097b5cfd407dda7135267049fd86cc0150a16","totalActions":2,"blockedActions":0,"agent":"internal-triage"}
--- stale consent fails closed ---
{"status":1,"schemaVersion":"openclaw.clawAddResult.v1","resultStatus":"failed","code":"plan_integrity_mismatch"}
--- consented add result summary ---
{"schemaVersion":"openclaw.clawAddResult.v1","stability":"experimental","status":"complete","mutationAllowed":true,"workspaceCreated":true,"configCommitted":true,"installRecordStatus":"complete","agent":"internal-triage"}
--- persisted config summary ---
{"agents":[{"id":"internal-triage","name":"Internal Triage","workspace":true}]}

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 16, 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: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@omarshahine

Copy link
Copy Markdown
Contributor

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.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Updated #101755 at 6b9d9fd2b962626a25710e79f13ad7953eb40514 to address Omar's interrupted-install recovery blocker.

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 workspace_ready; config commit advances to config_committed; and a retry with the same dry-run plan can continue through existing matching workspace/config state instead of colliding with its own ledger row.

Real behavior proof

Behavior or issue addressed:
Interrupted claws add recovery for the create-agent slice. A failed install after the pending ledger insert no longer leaves retries blocked by the existing claw_installs row or by the in-flight agent/workspace state when the operator retries with the exact same consented plan.

Real environment tested:
WSL Ubuntu root checkout at /root/src/openclaw-workflow/.worktrees/pr-101755, source harness tests against local temp OpenClaw state/config files. No external services were required for this recovery slice.

Exact steps or command run after this patch:

  1. node scripts/run-vitest.mjs src/claws/provenance.test.ts src/cli/claws-cli.test.ts -- --reporter=verbose
  2. node scripts/run-vitest.mjs src/claws/lifecycle.e2e.test.ts -- --reporter=verbose
  3. pnpm tsgo:prod
  4. pnpm check:architecture
  5. pnpm deadcode:dependencies
  6. pnpm deadcode:exports
  7. pnpm deadcode:unused-files
  8. git diff --check

Evidence after fix:

  • Focused provenance/apply and CLI regression proof passed: 21 tests across src/claws/provenance.test.ts and src/cli/claws-cli.test.ts.
  • Lifecycle CLI E2E proof passed: 5 tests in src/claws/lifecycle.e2e.test.ts.
  • pnpm tsgo:prod passed.
  • pnpm check:architecture passed, including import cycles, deprecated API/JSDoc guards, Kysely guardrails, and database-first legacy-store guard.
  • Deadcode dependency/export/unused-file scans passed with 0 entries.
  • git diff --check passed.

Observed result after fix:
The new regression coverage proves matching non-complete install records are reused instead of reinserted, parent-directory creation failures leave a durable partial row, config failure with a non-empty created workspace leaves workspace_ready, the same add plan then retries to complete, and the CLI rebuilds its plan without self-blocking on the matching in-flight agent/workspace before calling apply.

What was not tested:
Full GitHub CI is still running on this new head. This was local source-harness proof, not a packaged/live install lane.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 17, 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: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Real behavior proof

Behavior or issue addressed:
Current-head Claw root add remains resumable after interrupted install phases, and the branch now clears the CI gates that failed on the prior head: Claws lint, test typecheck, and plugin SDK surface budget verification.

Real environment tested:
WSL2 Ubuntu root checkout at /root/src/openclaw-workflow/.worktrees/pr-101755, branch pr-101755-restacked, head 31caeb09e7f5f4f93bbdbef4275030942028def9f. Source harness tests use local filesystem/config/state harnesses; no live provider or external service was required.

Exact steps or command run after this patch:

  1. node scripts/run-vitest.mjs src/claws/provenance.test.ts src/cli/claws-cli.test.ts src/claws/lifecycle.e2e.test.ts test/scripts/plugin-sdk-surface-report.test.ts -- --reporter=dot
  2. node scripts/run-oxlint-shards.mjs --threads=8
  3. pnpm tsgo:test
  4. pnpm tsgo:prod
  5. pnpm check:architecture
  6. pnpm deadcode:dependencies
  7. pnpm deadcode:exports
  8. pnpm deadcode:unused-files
  9. git diff --check

Evidence after fix:
The focused Vitest command passed 4 shards covering 36 tests. Full oxlint passed core, extensions, and scripts with 0 warnings and 0 errors. pnpm tsgo:test and pnpm tsgo:prod both exited 0. Architecture and deadcode gates exited 0, including import-cycle, madge, deprecated API/JSDoc, Kysely, database-first legacy-store, unused export, and unused file checks. git diff --check exited 0.

Observed result after fix:
The previous CI diagnostics are addressed on the current head: src/claws/add.ts no longer has the unused assignment, src/claws/lifecycle.ts avoids the params shadowing, the package acceptance workflow test no longer has the unused workflow local, and the plugin SDK surface budget is pinned to the current source graph at 8011 public exports / 4477 callable exports.

What was not tested:
No live provider, packaged install, or external service path was exercised; this PR changes Claw add planning/apply/provenance behavior and CI/static-source gates only.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper please re-review current head 31caeb09e7f5f4f93bbdbef4275030942028def9f. The prior CI failures were fixed and proof is updated above.

@clawsweeper

clawsweeper Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper assist is taking a look at your question.

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

clawsweeper Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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:

  • Requested/proof SHA: 31caeb09e7f5f4f93bbdbef4275030942028def9f.
  • Current PR head and latest commit: 31caeb09e7db44945bfab10dd3f19e00caa7d5bd.
  • The prior ClawSweeper review covered older SHA bea0e3f33ac6062561275f258fee49e4f4c9b5a3.
  • Updated proof reports 36 focused tests, full oxlint, typechecks, architecture/deadcode gates, and git diff --check passing.

Suggested next action: Confirm the intended current SHA, then comment @clawsweeper review on #101755 for a full correctness review.


Source: #101755 (comment)
Assist reasoning: high.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Correction: current #101755 head is 31caeb09e7db44945bfab10dd3f19e00caa7d5bd (the proof comment above has a stale pasted full SHA, but the short SHA and branch state are correct). @clawsweeper review current head 31caeb0.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Real behavior proof

Behavior or issue addressed:
An interrupted claws add with a durable workspace phase can be retried using the identical consented plan without colliding with its own ledger row, workspace, or committed agent.

Real environment tested:
Windows 11 PowerShell, exact OpenClaw checkout 39bd12cf12b8f3fa1d10e1d99ad83f61ddd470e9, Node 24.15.0, isolated temporary OpenClaw state/config/workspace. The real runClawsAddCommand source runtime and state database were used without mocks. No external service was required.

Exact steps or command run after this patch:

  1. Invoke runClawsAddCommand in dry-run JSON mode for src/claws/fixtures/minimal-agent.claw.json.
  2. Fault-inject the durable post-interruption state by persisting the exact plan as workspace_ready, creating its workspace, and writing leftover.txt.
  3. Invoke runClawsAddCommand again with --yes, the identical workspace, and the exact dry-run planIntegrity.
  4. Read the final ledger, config, and leftover file from the isolated state directory.

Evidence after fix:

HEAD=39bd12cf12b PLAN=sha256:228b81ba68fe38146423916466373d9f6ffb6b474cd1a2b72ced0f0185f45a97
INTERRUPTED_STATUS=workspace_ready WORKSPACE_NONEMPTY=true
RETRY_STATUS=complete WORKSPACE_CREATED=true CONFIG_COMMITTED=true
FINAL_LEDGER=complete
CONFIG_AGENTS=main,internal-triage
LEFTOVER_PRESERVED=true

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:
The identical retry resumed the durable workspace phase, preserved the non-empty workspace, committed the agent alongside implicit main, and advanced the authoritative ledger to complete.

What was not tested:
This was an exact-head source-runtime fault-injection harness, not a packaged installation or external-service lane.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper review exact current head 39bd12cf12b8f3fa1d10e1d99ad83f61ddd470e9. The exact-head recovery proof is posted above, all four maintainer threads have been addressed, and CI is clean (82 passed, 0 failed/pending).

@clawsweeper

clawsweeper Bot commented Jul 17, 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: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Signed-history proof carry-forward:

  • previously tested head: 540a7f439143
  • current signed head: ed152be79577
  • identical Git tree: bad6d4081558969bbb29b65498696ed9a59f180b

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.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Independent review refresh applied at d1c3b80c448b. Restacked on the hardened preview contract; resumable add and explicit consent remain intact. Focused cumulative contract tests and git diff --check pass; fresh exact-head CI is running. No merge performed.

@clawsweeper

clawsweeper Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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

clawsweeper Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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

clawsweeper Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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.

@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 extensions: codex-supervisor Extension: codex-supervisor feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants