Repository navigation
Manage Claw MCP server ownership - #102406
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs real behavior proof before merge. Reviewed July 20, 2026, 5:34 PM ET / 21:34 UTC. Summary PR surface: Source +907, Tests +846, Docs +24, Generated +30. Total +1807 across 26 files. Reproducibility: yes. source-reproducible with medium confidence: a Claw manifest can declare a non-package-manager stdio command, and a second Claw can present an exact global MCP declaration for reuse. A live runtime reproduction was not supplied or executed in this review. Review metrics: 2 noteworthy metrics.
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 findings
Review detailsBest possible solution: Define one host-authorized MCP contract before merge: broker or allowlist stdio launches with an explicit environment policy, and require an explicit host-approved sharing mechanism or per-install namespace for global MCP declarations; then demonstrate the complete lifecycle against a controlled real server. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible with medium confidence: a Claw manifest can declare a non-package-manager stdio command, and a second Claw can present an exact global MCP declaration for reuse. A live runtime reproduction was not supplied or executed in this review. Is this the best way to solve the issue? No: the lifecycle implementation is substantial, but it is not the best safe solution until maintainers choose the process broker and global-sharing boundary; implementing those policy seams first is narrower and more maintainable than relying on provenance after registration. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0d3cbae6a16a. Label changesLabel justifications:
Evidence reviewedPR surface: Source +907, Tests +846, Docs +24, Generated +30. Total +1807 across 26 files. View PR surface stats
Security concerns:
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 (25 earlier review cycles; latest 8 shown)
|
71fbfbc to
09744d1
Compare
430b524 to
24c0e32
Compare
09744d1 to
1549403
Compare
24c0e32 to
794cbe6
Compare
1549403 to
d8d91d4
Compare
794cbe6 to
6c61f3c
Compare
d8d91d4 to
63334bf
Compare
6c61f3c to
76caf2c
Compare
|
Independent review refresh applied at |
7510998 to
8156de4
Compare
4707dda to
9bce748
Compare
8156de4 to
d8fe5a5
Compare
a137587 to
f84e697
Compare
|
CI follow-up: exact head 84e6975f29a fixes all three owned failures from the prior run: non-complete root installs again count as partial, cron removal tests supply the required canonical cron.get live recheck, and removal result types moved into the existing contract module so lifecycle-state.ts is within the 700-line limit. This restores the RFC/spec policy rather than changing it. Fresh CI is running. |
e1c3219 to
efbc8a3
Compare
f84e697 to
3e13899
Compare
efbc8a3 to
2fe8f27
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: Manage Claw MCP server ownership 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: Manage Claw MCP server ownership 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
${ENV_VAR}references and credential-free OAuth intent without storing server configuration in provenance.relationship(managedorreferenced),origin(claw-introducedorpre-existing), and currentindependentOwnerevidence.Contract
remove-if-unusedor an explicitmcp:<name>cleanup, with conflict override required when another owner remains.Verification
Exact head:
608362d9bfd75a591cb933bc3ec21182e5aac88cgit diff --check origin/main...HEAD: passednode scripts/report-test-temp-creations.mjs --base origin/main --head HEAD --no-merge-base: passedpnpm db:kysely:check: passedpnpm tsgo:core: passednode scripts/run-oxlint.mjs ...: passed with 0 warnings/errorssrc/claws/mcp.test.ts,src/claws/lifecycle-state-mcp.test.ts,src/claws/lifecycle-state.test.ts,src/claws/export.test.ts,src/claws/schema.test.ts,src/cli/claws-cli.test.ts, andsrc/config/mcp-config.test.tsReal behavior proof
Behavior or issue addressed:
Claws can preview, apply, track, export, status-check, and remove source-config-owned MCP server declarations without storing server secrets in provenance or claiming ordinary MCP ownership.
Real environment tested:
WSL Ubuntu checkout at exact head
608362d9bfd75a591cb933bc3ec21182e5aac88c, using OpenClaw's real Claws source harness, SQLite state schema, config MCP helpers, CLI runtime, and Vitest fixtures. The tests use mocked config writer call sites where needed to assert write intent and failure recovery.Exact steps or command run after this patch:
pnpm db:kysely:checkpnpm tsgo:corepnpm exec vitest run src/claws/mcp.test.ts src/claws/lifecycle-state-mcp.test.ts src/claws/lifecycle-state.test.ts src/claws/export.test.ts src/claws/schema.test.ts src/cli/claws-cli.test.ts src/config/mcp-config.test.ts --reporter=dotnode scripts/run-oxlint.mjs src/claws/add.ts src/claws/export.test.ts src/claws/export.ts src/claws/lifecycle-mcp-removal.ts src/claws/lifecycle-remove-contract.ts src/claws/lifecycle-state-mcp.test.ts src/claws/lifecycle-state.test.ts src/claws/lifecycle-state.ts src/claws/lifecycle-status.ts src/claws/lifecycle.ts src/claws/mcp.test.ts src/claws/mcp.ts src/claws/schema.test.ts src/claws/types.ts src/cli/claws-cli.runtime.ts src/cli/claws-cli.test.ts src/cli/claws-cli.ts src/config/mcp-config.test.ts src/config/mcp-config.ts src/state/claw-mcp-adoption.ts src/state/openclaw-state-schema.generated.tsEvidence after fix:
Terminal output showed generated Kysely verification passed, core typecheck passed, changed-file Oxlint finished with
Found 0 warnings and 0 errors, and Vitest reportedTest Files 7 passed (7)/Tests 121 passed (121).Observed result after fix:
The source harness stored digest-only MCP refs, preserved
${ENV_VAR}references, redacted credential-bearing remote URLs in previews, reconciled uncertain config writes, surfaced MCP drift/status/export state, and removed only unchanged managed or explicitly selected referenced declarations.What was not tested:
A live external MCP server process startup was not exercised in this slice; this PR mutates and verifies OpenClaw source configuration and Claw provenance only.
Stack
MCP remains a separate stage because OpenClaw config, rather than the agent entry or Gateway scheduler, owns these declarations. The experimental CLI remains gated by
OPENCLAW_EXPERIMENTAL_CLAWS=1.Documentation
Extends
/cli/clawswith MCP declarations, source-preserving environment references, ownership classification, and lifecycle behavior.