Repository navigation
refactor(plugin-sdk)!: retire deprecated compatibility facades - #162333
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 1, 2026, 6:45 AM ET / 10:45 UTC (Revision 3). ClawSweeper reviewWhat this changesRemoves five deprecated plugin SDK import paths, moves retained contracts and tests to focused entrypoints, and documents migration for affected plugins. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: the retirement remains absent from current main, and the prior unpublished-cleanup blocker is resolved. No blocking introduced defect was identified; the breaking compatibility tradeoff is explicitly accepted. Priority: P2 Review scores
Verification
How this fits togetherThe plugin SDK connects bundled and third-party plugins to OpenClaw’s channel, configuration, and infrastructure owners. Its package exports determine which contracts plugins can import when the host loads them. flowchart TD
A[Plugin imports] --> B[SDK package exports]
B --> C{Supported import path}
C -->|Focused path| D[Channel and configuration contracts]
C -->|Removed facade| E[Plugin migration required]
D --> F[Existing runtime owners]
F --> G[Messages and host operations]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Use the focused SDK contracts and documented caller adaptations while preserving the retained runtime owners and their behavior. Do we have a high-confidence way to reproduce the issue? Not applicable: this is an approved API retirement rather than a reported runtime bug; the removed paths and replacements are directly inspectable. Is this the best way to solve the issue? Yes: removing the forwarding facades and moving retained contracts to existing focused owners follows the accepted SDK direction without adding a competing implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d1dc3cd51104. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Retire the five public SDK facades approved for removal on September 30. Move remaining callers and useful exports to their focused owners, publish the system-event snapshot contract, and retain migration tombstones. Remove the now-unreachable draft-preview and reply-pipeline forwarding layers. BREAKING CHANGE: remove channel-lifecycle, channel-message, channel-reply-pipeline, config-runtime, and infra-runtime SDK imports. Use channel-outbound/channel-inbound, focused configuration subpaths, system-event-runtime, and the documented infrastructure/runtime replacements.
Remove compatibility-only export layers exposed by the facade retirement. Keep retained behavior at canonical owners and move tests to those entrypoints. Validation of this local follow-up remains pending; do not land until deadcode, focused tests, type checks, cycles, and API proof pass.
7ed9b74 to
e6f657a
Compare
|
|
Exact-head CI evidence for the coordinator-approved pre-existing-failure exception, pinned to The sole independent failure in CI 36850329173 is The identical assertion is independently reported by unrelated PR #160442's current-head CI, Main commit The final Testbox candidate passes Knip, caller/outbound and plugin-contract tests, scoped changed checks including core production and all core-test type graphs plus scripts/lint, both cycle checks (0), and the canonical SDK API comparison: exactly five removed entrypoints / 869 removed export paths, 35 focused additions, no retained-export signature changes (digest Landing uses the explicitly authorized REST squash route with the exact reviewed and tested head pinned. |
…law#162333) Retire the five SDK compatibility facades under the approved September 30 owner decision, and migrate in-repository callers onto their focused contracts. Keep implementations with their canonical owners and remove forwarding exports that become unused after the cutover. BREAKING CHANGE: remove openclaw/plugin-sdk/channel-lifecycle, channel-message, channel-reply-pipeline, config-runtime, and infra-runtime. Use channel-outbound/channel-inbound, config-contracts and focused configuration/infra entrypoints. The new system-event-runtime entrypoint supplies public snapshot inspection and consumption. Update affected external plugins before upgrading the host; this retirement does not certify universal external migration. Package exports, SDK entry inventories, compatibility tombstones, migration docs, and surface budgets move together. Canonical API comparison confirms exactly five removed entrypoints, 869 removed export paths, 35 focused additions, and no retained-export signature changes. Net production reduction: 1,320 lines.
…ce 2026.8.1 The preflight imported eight contract helpers from plugin-sdk/channel-message. OpenClaw stopped exporting seven of them in 2026.8.1 and later removed the channel-message subpath (openclaw/openclaw#162333), so the scenario that opens the smoke profile failed every row on current releases and builds. Use the verifiers plugin-sdk/channel-outbound has exported since 2026.5.27: verifyDurableFinalCapabilityProofs and the adapter-shaped live, live finalizer and receive ack verifiers. They walk the runtime's own capability lists and mark each entry verified or not_declared, so the verified entries are the declared list the removed listDeclared helpers returned, and the comparison with Kova's catalog is the same. Add a self-check that runs the preflight against a package exposing only channel-outbound, and move the transport boundary fixture to that subpath.
What Problem This Solves
Completes the SDK owner's approved September 30 retirement of five deprecated compatibility facades, so plugins use the focused contracts that own each operation.
User Impact
Breaking SDK change:
openclaw/plugin-sdk/channel-lifecycle,channel-message,channel-reply-pipeline,config-runtime, andinfra-runtimeare removed. Update affected plugins before upgrading; this decision does not claim that every external plugin has migrated.Use
channel-outbound/channel-inboundfor channel operations,config-contracts/runtime-config-snapshot/config-mutationfor configuration, and focused infrastructure subpaths or the injected runtime API.system-event-runtimenow provides the typed public snapshot/consume contract; lifecycle, reply, and config types retain their implementations on their focused entrypoints. The migration guide documents renamed helpers and operations without a drop-in replacement.Why This Change Was Made
The September 30 maintainer decision supersedes these facades' October 1 and external-migration retention gates. Package exports, entrypoint inventories, workspace facades, compatibility tombstones, docs, and all in-repository callers move together. The registry's subpath records now live in
plugin-sdk-subpath-records.ts, consumed byregistry-records.ts.Also removes the now-unreachable draft-preview compatibility wrapper, reply-pipeline forwarding barrel, and scaffolding-sanitizer re-export. The live-message owner retains the preview lifecycle assertions. Event reset helpers stay on the test-only fixture surface.
Release-note context: remove the five public compatibility subpaths and migrate plugins to the replacements above. No changelog edit, version bump, config/schema migration, or publication is included.
Evidence
Final candidate:
e6f657afbda47c97651a2f9f352fc5b903b653b2, rebased ontob3e5991d4a6dcaf06b0c3fa959258581d4795248. Net removal: 1,320 production lines (excluding test fixtures), 29 tooling lines, 119 test/support lines, and 35 configuration lines; docs grow by 11 lines (1,492 lines overall).The retired facades exposed unused forwarding exports. Those exports are removed, and tests now exercise the retained owners. Repeated repository-wide unused-export/file/dependency scans pass with zero entries. The caller selection covers core owners, agents, Gateway, extensions, tooling, the full plugin-contract directory, Gateway network E2E (7 tests), and the real Anthropic exec-approval live test (1 test). The final Gateway/tooling repair passed four shards in 259.68s; the subsequent contract/rebase pass passed three shards in 103.43s, including 48 contract files / 1,129 tests.
Blacksmith Testbox leases:
tbx_01m3tyznznn2j69krpmcm4w6r1(run): broad caller, deadcode, E2E/live, and initial API proof; later repaired focused tests passed. Its later full check disconnected at the lease cutoff during typechecking and is not counted as a full pass.tbx_01m3v68x2kyysrjfnn6wpcxmxf(run): zero cycles in both checks; all three deadcode commands passed; contract/rebase tests passed. Fullnode scripts/check-changed.mjspassed every stage except lint, including all core, extension, script, and root-test typechecks (1,618.08s), SDK export/budget checks, import boundaries, architecture guards, and dead-export scan. Its four migration lint errors are fixed in the final candidate.tbx_01m3vafgc5kk5d7vkn8chkmykg(run): final API comparison passes, both cycle checks report zero,pnpm deadcode:dependenciespasses, and the final focused selection passes five shards in 192.62s (including all plugin contracts). Scopedcheck-changedfor the five final test repairs passed: four TypeScript graphs, dead-export scan, all boundary/architecture guards, and lint (0 warnings/errors). The complete invocation passed in 16m14.8s.tbx_01m3vc3svsvmxmh9v3d0b97hzg(run): final rebased-head API comparison passes with the same intended surface delta; both cycles are zero; surface-budget test and all 48 plugin-contract files / 1,132 contract tests pass (two shards, 65.92s). The scoped budget-script check passed typechecking and surface guards, then identified one export newly orphaned by main's CLI alias removal.resolveLegacyOutboundSendDepKeysis now private; its implementation and same-module caller are unchanged. Final Knip dependency/export checks pass; the refreshed API comparison and both zero-cycle checks pass; outbound/surface/contract tests pass four shards in 84.65s. Final scopedcheck-changedforsrc/infra/outbound/send-deps.tsandscripts/plugin-sdk-surface-report.mtspassed, including core production and every core-test type graph, scripts, dead exports, lint, boundary/security guards, and runtime cycles. The complete final invocation passed in 34m20.2s.The remaining full-lint finding is pre-existing:
src/infra/update-candidate-canary.test.tshas 1,006 counted lines against a 1,000-line limit. The file is untouched by this PR and has the identical Git blob44459da05a81c0f9ca7c8fa860a9b61938773155on the tested branch and main. Scheduled main CI 36831897385 reports successful lint shards; that run is not claimed as hosted-red evidence. No lint rule, baseline, or assertion was weakened.API proof uses the repository's canonical
plugin-sdk:api:diff. The formerapi:genand checked-in SDK baseline were deliberately retired in d2afbd0. Final refreshed comparison confirms exactly the five approved removed entrypoints, 869 removed export paths, 35 focused additions (18 onchannel-outbound, 4 onconfig-contracts, and 13 onsystem-event-runtime), and zero retained-export signature changes. Acknowledgement digest:b3d35dc3. The only non-export-only named reachable declaration change is the required compatibility-registry tombstone metadata. Crabbox exports a synthetic snapshot commit, so final proof asserts the transferred tree matches the local candidate and compares its snapshotHEADwith the pinned base. Passing the local commit ID remotely fails revision lookup; a local low-priority fallback hit the managed-process wrapper and produced no API verdict.Earlier
pnpm buildpassed, including SDK declarations and all 154 public subpath checks; it predates the dead-export repair. Full typechecking covers that repair. Exact-head hosted CI attached; its sole independent failure is the pre-existing catalog expectation documented below. Owner-test cost: 79 system-event tests and 22 live-message lifecycle tests passed with one worker in 19.58s and 1.20s shard wall time. No retries, timeout increases, assertion weakening, or test skips were added.Independent Codex review of the final branch: no actionable P0–P2 findings. The requested subtree coverage is below.
Hosted CI exception
Exact-head CI evidence for the coordinator-approved pre-existing-failure exception, pinned to
e6f657afbda47c97651a2f9f352fc5b903b653b2.The sole independent failure in CI 36850329173 is
checks-node-changed-10:test/cli-json-stdout.models.e2e.test.ts/ “preserves model catalog refresh success payloads and persisted rows.” It expects “A running Gateway applies the updated catalog after its next restart.” but receives “A running Gateway applies the update on its next catalog check, without restarting.” Seven sibling cases pass. The remaining 111 CI jobs were cancelled by fail-fast; those are not reported as passing. The aggregate CI gate reflects this failure; no other independent failed or pending check remains.The identical assertion is independently reported by unrelated PR #160442's current-head CI,
checks-node-changed-7, head553cdb2337657cd70a8a1ae157f2c6996c2fc093. Its check-run annotation identifies the same test, line 173, and exact expected/received strings.Main commit
504d2905d69changed the CLI's catalog-refresh message and unit test but left this E2E expectation stale. This PR changes none of the formatter, its unit test, or the failing E2E file. Shared infrastructure imports overlap through export-only retirements; they do not produce or change this literal output. The coordinator already repaired the expectation in 9413ff9a063, verified as an ancestor of current main. No duplicate fix is included here.Fixes found along the way
The Gateway permissions fixture now awaits the canonical locked compare-and-swap approvals restore and asserts success. Type-only imports use top-level qualifiers so they do not preserve runtime side effects; duplicate config imports are consolidated. Rebase resolutions retain main's SDK budget correction and consolidated allow-always tests, migrating their three remaining obsolete-wrapper calls to the surviving entry owner. The final budget also includes main's four newly approved storage transport types: 3,757 exports, 2,186 callable exports, 154 entrypoints, 269 deprecated exports, and zero wildcard exports.
SDK coverage: every production file over 200 lines
l254 SDK facade retirement coverage
All 78 production TypeScript files over 200 lines in
src/plugin-sdk/were READ in full, largest first within independent file groups. This covers 31,871 pre-retirement lines. Counts below preserve the initial survey snapshot; approved source deletions and edits can change the final sizes. Test files andtest-helpers/are excluded from production counts. A separate 382-line channel contract helper was also read.This is the requested coverage deliverable, not runtime proof. The coverage workers made no source edits and ran no tests, builds, or checks. Additional deprecated APIs were retained where the accepted decision only covers the named five facades. The coherent structural reduction remains retirement of those facades with focused replacements, caller migration, and regenerated API evidence.
src/plugin-sdk/core.tssrc/plugin-sdk/approval-native-helpers.tssrc/plugin-sdk/approval-reaction-runtime.tssrc/plugin-sdk/provider-stream-shared.tssrc/plugin-sdk/qa-runner-runtime.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/plugin-sdk/session-store-runtime.tssrc/plugin-sdk/api-baseline-declaration-closure.tssrc/plugin-sdk/channel-entry-contract.tssrc/plugin-sdk/outbound-media.tsdeletingEntriesset and its try/finally;deferredDeletesalready covers every asynchronous deletion interval and failed cleanup.src/plugin-sdk/persistent-dedupe.tssrc/plugin-sdk/reply-payload.tsisNumericTargetIdcan directly test/^\d{3,}$/againstraw.trim()because the regex already rejects empty input; public sending wrappers preserve distinct caption/fallback/result contracts.src/plugin-sdk/provider-entry.tssrc/plugin-sdk/channel-config-helpers.tsresolveChannelConfigWritesnarrows the public config type relative to its internal owner.src/plugin-sdk/provider-tools.tssrc/plugin-sdk/runtime-doctor-migrations.tssrc/plugin-sdk/provider-catalog-live-runtime.tssrc/plugin-sdk/api-baseline.tssrc/plugin-sdk/api-diff.tssrc/plugin-sdk/status-helpers.tssrc/plugin-sdk/provider-catalog-live-normalize.internal.tsreadLiveModelCatalogRecordforwarding function and use canonicalasOptionalRecorddirectly in this file and acquisition sibling; model admission and upstream origin checks remain substantive policy.src/plugin-sdk/memory-host-core.tssrc/plugin-sdk/migration-runtime.tssrc/plugin-sdk/approval-delivery-helpers.tssrc/plugin-sdk/qa-runtime.tssrc/plugin-sdk/allowlist-config-edit.tssrc/plugin-sdk/provider-catalog-live-acquisition.internal.tsasOptionalRecorddirectly with the normalization sibling; retain bounded reads, pagination completion, redirect credential scrubbing, and auth-scoped cache keys.src/plugin-sdk/windows-spawn.tssrc/plugin-sdk/provider-model-shared.tssrc/plugin-sdk/channel-policy.tssrc/plugin-sdk/infra-runtime.tssrc/plugin-sdk/migration.tssrc/plugin-sdk/secret-ref-runtime.tssrc/plugin-sdk/session-visibility.tssrc/plugin-sdk/qa-channel-protocol.tssrc/plugin-sdk/webhook-request-guards.tssrc/plugin-sdk/provider-auth.tssrc/plugin-sdk/session-visibility-internal.tssrc/plugin-sdk/channel-ingress-runtime.tssrc/plugin-sdk/discord.tssrc/plugin-sdk/provider-auth-claude-compat.tssrc/plugin-sdk/provider-catalog-shared.tssrc/plugin-sdk/provider-auth-runtime.tssrc/plugin-sdk/api-baseline-declaration-print.tssrc/plugin-sdk/channel-inbound.tsdispatchAssembledChannelTurnasdispatchChannelInboundReplyinstead of its pure async forwarding wrapper, only if generated API diff stays equivalent; no broad removal is justified.src/plugin-sdk/webhook-targets.tssrc/plugin-sdk/facade-loader.tssrc/plugin-sdk/file-lock.tssrc/plugin-sdk/channel-outbound.tsReplyPayloadto omit core-onlytrustedLocalMediaand must not become a raw internal re-export.src/plugin-sdk/control-ui.tssrc/plugin-sdk/provider-oauth-runtime.tssrc/plugin-sdk/channel-replay-guard.tssrc/plugin-sdk/command-auth.tssrc/plugin-sdk/feature-plugin.tssrc/plugin-sdk/pair-loop-guard-runtime.tssrc/plugin-sdk/extension-shared.tssrc/plugin-sdk/facade-resolution-shared.tssrc/plugin-sdk/tool-plugin.tssrc/plugin-sdk/plugin-entry.tssrc/plugin-sdk/provider-selection-runtime.tssrc/plugin-sdk/channel-config-ui-hints.tssrc/plugin-sdk/channel-route.tssrc/plugin-sdk/realtime-voice.tssrc/plugin-sdk/webhook-memory-guards.tssrc/plugin-sdk/agent-harness-completion.tssrc/plugin-sdk/memory-host-event-export.tssrc/plugin-sdk/session-catalog-paging.tssrc/plugin-sdk/provider-stream.tssrc/plugin-sdk/ssrf-policy.tssrc/plugin-sdk/access-groups.tssrc/plugin-sdk/facade-runtime.tssrc/plugin-sdk/facade-activation-check.runtime.tssrc/plugin-sdk/approval-client-helpers.tssrc/plugin-sdk/channel-lifecycle.core.tssrc/plugin-sdk/approval-auth-helpers.tsAdditional small-file sweep: 346 production files of at most 200 lines / 14,392 lines READ. Whole-subtree total: 424 files / 46,263 lines inspected. No additional public retirements are included.