Repository navigation
refactor(runtime): deslop SDK, skills, and node host - #164058
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
|
Codex review: blocked before merge. Reviewed October 3, 2026, 2:00 AM ET / 06:00 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch simplifies shared plugin helpers, skill installation and loading, and node execution plumbing, while retiring the legacy QA runner loading fallback. Merge readiness⛔ Blocked before merge - 1 item remains This remains useful work with no concrete introduced defect identified. The previous generic migration blocker is unsupported by the pinned diff; the QA compatibility cutoff is explicitly accepted in the maintainer-authored description. Priority: P3 Review scores
Verification
How this fits togetherPlugin helpers connect integrations to OpenClaw’s configuration, providers, and delivery services. Skill lifecycle and node-host code prepare installed capabilities and execute work through existing storage and approval owners. flowchart TD
A[Plugin and skill inputs] --> B[Shared plugin helpers]
A --> C[Skill lifecycle]
C --> D[Canonical state and files]
B --> E[Provider and delivery services]
F[Node execution requests] --> G[Approval and execution policy]
G --> H[Node execution and results]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -863, Tests -54, Docs -1, Other -1. Total -919 across 67 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep shared owners and existing state contracts intact, with the accepted QA surface cutoff documented for plugin authors. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a refactor, and no concrete introduced failure was established by source review. Is this the best way to solve the issue? Yes: the diff consolidates existing owners while preserving their contracts; the deliberate QA cutoff has explicit maintainer acceptance and focused loader coverage. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c7c937abfea2. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Simplify internal SDK account operations, provider catalog handling, replay forwarding, hosted-media cleanup, memory export finalization. Remove single-use skill installation, discovery, and workshop forwarding layers, plus duplicated node-host execution types and invariant options. Preserve current configuration, data, protocol, CLI, prompt, and public SDK contracts. Retain the live Doctor proposal migration and lazy/authority boundaries. Retire only the approved June QA-runner fallback; the legacy ClawHub reader removal already landed independently. Remove 863 net production lines across the coherent subsystem batch. Complete coverage records all 169 production files above 200 lines. Retain focused runtime, plugin-contract, type, cycle, and SDK-surface proof in the PR evidence.
What Problem This Solves
The SDK, skill lifecycle, and node host carried duplicated internal plumbing and unused paths that made existing behavior harder to follow.
User Impact
Current config, persisted data, protocol, CLI output, prompts, and SDK exports/signatures stay unchanged. The approved pre-July 2026 retirement removes the June QA-runner
runtime-apifallback; current runners useqa-runner-api. The.clawdhubretirement landed independently on main and is excluded from this batch; archive fingerprint exclusions remain unchanged.Why This Change Was Made
BELOW-1000: this batch removes 857 net production lines landed (590 added / 1,447 deleted), without moving production code outside the monorepo. The complete coverage log below records all 169 production files over 200 lines, within an inventory of 713 production files. The reduction is 378 lines in SDK internals, 326 in skills, and 153 in node-host.
Evidence
Linux validation used one reused remote lease, with pinned repository Node/pnpm and frozen dependencies.
--maxWorkers=1.1742a1a0453cbe32b2ad009dbaa2650d1f71a124: runtime build passed in 69.7s; plugin contracts passed 48 files / 1,132 tests, and bundled-entry/lifecycle tests passed 2 files / 19 tests. That combined selection took 243.03s including preparation.Full core lint passed with zero warnings/errors (403.9s). Native-schema, database ownership, media-download, runtime-sidecar, webhook, and pairing guards all passed at
1742a1a0453cbe32b2ad009dbaa2650d1f71a124; the subsequent change restores three SDK session files exactly to the base.Final verification at
eb41aeb4fe3eda8ac9877cd32117c81893ae4035: both cycle checks pass. The canonicalplugin-sdk:api:diff --base 341fc112e1e83ea74aa55c7c71033760bd043741 --head eb41aeb4fe3eda8ac9877cd32117c81893ae4035 --require-acknowledgementreports no Plugin SDK API changes, without an acknowledgement or baseline edit. The initial parallel declaration render exhausted the Linux host's memory; sequential rendering completed successfully with the same canonical tool.Final rerun: 53 files / 1,164 tests passed (1,132 plugin contracts and 32 session-store cases), four shards in 204.61s with
--maxWorkers=1. Core production types passed again on this exact head. The tracked remote checkout remained clean.Hosted CI at
eb41aeb4fe3epassed every selected job exceptchecks-node-changed-compact-small-8: the linked-plugin integration test still expected the retired June fallback (run 37099791967). The test-only correction atc780106cca88391502081cd843143b2504399acarequires the dedicated QA surface and retains the current-surface success case. Its assertion demonstrably fails with the old fallback restored. Both QA runner files pass all 16 tests in 30.72s (node scripts/run-vitest.mjs src/plugin-sdk/qa-runner-runtime.integration.test.ts src/plugin-sdk/qa-runner-runtime.test.ts --maxWorkers=1); both cycle checks remain zero and focused lint passes. All production bytes match the API-verifiedeb41aeb4fe3ehead. No inherited-red exception is used.Hosted CI run 37101309737 passed on exact head
c780106cca88391502081cd843143b2504399aca. Squash mergef420c1d8ff5fb223eb4f536da86a314af651c65fis verified on main. The landed diff excludes six production lines independently removed while CI ran; the final reduction above is measured from the merge commit and its parent.Complete subsystem coverage (169 production files over 200 lines)
l337 production coverage
Complete baseline coverage for the SDK internals, skills, and node-host sweep. Every production file over 200 lines is listed below, sorted by size. Public SDK declarations, current authority/lifecycle boundaries, and July 2026 or newer migration contracts were retained. Test/support/generated files are excluded.
src/node-host/invoke-system-run.tssrc/plugin-sdk/approval-native-helpers.tssrc/plugin-sdk/core.tssrc/skills/security/scanner.tssrc/node-host/node-worker-launch-store.kernel.tssrc/skills/runtime/refresh.tssrc/node-host/invoke.tssrc/plugin-sdk/approval-reaction-runtime.tssrc/node-host/node-worker-workspace.tssrc/node-host/node-worker-supervisor.tssrc/plugin-sdk/provider-stream-shared.tssrc/skills/lifecycle/install.tssrc/skills/loading/skill-root-discovery.tssrc/plugin-sdk/qa-runner-runtime.tssrc/node-host/runtime.tssrc/node-host/node-worker-transfer-client.tssrc/node-host/node-worker-child-lifecycle.tssrc/plugin-sdk/provider-auth-login-flow-runtime.tssrc/plugin-sdk/agent-harness-runtime.tssrc/plugin-sdk/provider-onboard.tssrc/plugin-sdk/session-transcript-runtime.tssrc/node-host/mcp.tssrc/plugin-sdk/api-baseline-declaration-closure.tssrc/skills/runtime/remote.tssrc/plugin-sdk/channel-entry-contract.tssrc/skills/loading/workspace-skill-loader.tssrc/plugin-sdk/persistent-dedupe.tssrc/skills/lifecycle/clawhub-install-core.tssrc/plugin-sdk/outbound-media.tssrc/skills/workshop/apply-transition.tssrc/node-host/runner.tssrc/plugin-sdk/reply-payload.tssrc/plugin-sdk/provider-entry.tssrc/skills/workshop/store.tssrc/skills/lifecycle/clawhub-status.tssrc/plugin-sdk/provider-catalog-live-runtime.tssrc/plugin-sdk/runtime-doctor-migrations.tssrc/plugin-sdk/provider-tools.tssrc/plugin-sdk/channel-config-helpers.tssrc/plugin-sdk/api-baseline.tssrc/skills/lifecycle/clawhub-store.ts.clawdhubreader retirement landed independently on main and is excluded from this diff; current diagnostics, validation, publication and rollback authority remain.src/plugin-sdk/api-diff.tssrc/plugin-sdk/provider-catalog-live-normalize.internal.tssrc/plugin-sdk/memory-host-core.tssrc/node-host/node-worker-container-engine.tssrc/node-host/connection.tssrc/plugin-sdk/migration-runtime.tssrc/node-host/node-worker-bundle-installer.tssrc/skills/runtime/resources.tssrc/plugin-sdk/approval-delivery-helpers.tssrc/skills/library/service.tssrc/plugin-sdk/qa-runtime.tssrc/plugin-sdk/status-helpers.tssrc/skills/library/bundle.tssrc/plugin-sdk/allowlist-config-edit.tssrc/skills/discovery/status.tssrc/plugin-sdk/provider-catalog-live-acquisition.internal.tssrc/node-host/node-worker-workspace-processes.tssrc/plugin-sdk/windows-spawn.tssrc/plugin-sdk/provider-model-shared.tssrc/plugin-sdk/channel-policy.tssrc/skills/lifecycle/workspace-skill-write.tssrc/skills/runtime/workspace-worker.tssrc/skills/workshop/service.tssrc/plugin-sdk/session-store-runtime.tssrc/plugin-sdk/migration.tssrc/plugin-sdk/secret-ref-runtime.tssrc/skills/lifecycle/upload-store.tssrc/plugin-sdk/session-visibility.tssrc/plugin-sdk/qa-channel-protocol.tssrc/node-host/node-worker-workspace-quiescence.tssrc/skills/loading/plugin-skills.tssrc/plugin-sdk/webhook-request-guards.tssrc/plugin-sdk/session-visibility-internal.tssrc/skills/library/store.tssrc/skills/workshop/service-evaluation.tssrc/skills/workshop/service-propose.tssrc/plugin-sdk/channel-ingress-runtime.tssrc/node-host/node-worker-supervisor-recovery.tssrc/node-host/node-worker-workspace-identity.tssrc/plugin-sdk/provider-catalog-shared.tssrc/plugin-sdk/provider-auth-claude-compat.tssrc/skills/loading/workspace-skill-sync.runtime.tssrc/skills/library/selection.tssrc/node-host/plugin-node-host.tssrc/plugin-sdk/provider-auth-runtime.tssrc/skills/runtime/refresh-state.tssrc/node-host/invoke-agent-cli-claude-params.tssrc/skills/lifecycle/clawhub-uninstall.tssrc/plugin-sdk/api-baseline-declaration-print.tssrc/skills/lifecycle/install-download.tssrc/plugin-sdk/channel-inbound.tssrc/plugin-sdk/webhook-targets.tssrc/skills/workshop/experience-review.tssrc/plugin-sdk/channel-outbound.tssrc/skills/lifecycle/clawhub.tssrc/node-host/config.tssrc/skills/lifecycle/upload-store.kernel.tssrc/skills/loading/session.tssrc/node-host/auto-update-install.tssrc/plugin-sdk/facade-loader.tssrc/plugin-sdk/file-lock.tssrc/node-host/node-worker-supervisor-commands.tssrc/skills/lifecycle/archive-install.tssrc/skills/runtime/refresh-watch-registry.tssrc/node-host/node-stream-transport.tssrc/node-host/node-worker-capacity.tssrc/node-host/node-worker-transfer-http.tssrc/skills/loading/skill-root-loader.tssrc/skills/lifecycle/source-install.tssrc/node-host/invoke-agent-cli-claude.tssrc/plugin-sdk/control-ui.tssrc/skills/lifecycle/workspace-types.tssrc/node-host/node-worker-turn-store.kernel.tssrc/skills/runtime/refresh-watch-targets.tssrc/node-host/node-worker-prepared-workspace.tssrc/plugin-sdk/provider-oauth-runtime.tssrc/plugin-sdk/feature-plugin.tssrc/skills/runtime/remote-skills.tssrc/skills/workshop/experience-review-scheduler.tssrc/plugin-sdk/channel-replay-guard.tssrc/plugin-sdk/pair-loop-guard-runtime.tssrc/plugin-sdk/plugin-entry.tssrc/skills/discovery/chat-commands.tssrc/skills/runtime/session-snapshot.tssrc/node-host/invoke-system-run-allowlist.tssrc/plugin-sdk/extension-shared.tssrc/plugin-sdk/facade-resolution-shared.tssrc/plugin-sdk/tool-plugin.tssrc/plugin-sdk/provider-selection-runtime.tssrc/skills/workshop/reconcile-transition.tssrc/plugin-sdk/channel-config-ui-hints.tssrc/node-host/claude-skill-session.tssrc/plugin-sdk/channel-route.tssrc/skills/library/import.tssrc/skills/workshop/store-sqlite-event.tssrc/plugin-sdk/realtime-voice.tssrc/skills/discovery/chat-command-invocation.tssrc/node-host/node-worker-prepared-workspace-store.kernel.tssrc/node-host/node-worker-launch-observation.tssrc/plugin-sdk/webhook-memory-guards.tssrc/skills/workshop/service-query.tssrc/node-host/auto-update.tssrc/skills/workshop/tool-policy-diagnostic.tssrc/skills/runtime/tool-dispatch.tssrc/skills/lifecycle/upload-store.sqlite.tssrc/plugin-sdk/memory-host-event-export.tssrc/skills/runtime/env-overrides.tssrc/skills/discovery/command-specs.tssrc/node-host/desktop-stream-command.tssrc/plugin-sdk/session-catalog-paging.tssrc/skills/workshop/store.worker.tssrc/skills/workshop/store-record.tssrc/plugin-sdk/agent-harness-completion.tssrc/node-host/auto-update-compatibility.tssrc/plugin-sdk/ssrf-policy.tssrc/skills/workshop/proposal-bundle.tssrc/plugin-sdk/facade-runtime.tssrc/skills/loading/config.tssrc/node-host/invoke-system-run-plan.tssrc/node-host/node-worker-launch-transport.tssrc/plugin-sdk/facade-activation-check.runtime.tssrc/plugin-sdk/provider-stream.tssrc/node-host/pty-command.tssrc/skills/workshop/proposal-draft.tssrc/plugin-sdk/approval-client-helpers.tssrc/plugin-sdk/channel-lifecycle.core.tssrc/skills/workshop/types.tssrc/plugin-sdk/approval-auth-helpers.ts