From c7cb45dfd5dbcf2098d7dd10efd4a64054a2662d Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 8 Sep 2026 17:40:44 -0700 Subject: [PATCH] fix: keep shipped SDK context aliases pending removal (#142708) --- docs/plugins/compatibility.md | 9 ++++++--- src/plugins/compat/registry-records.ts | 4 ++-- test/scripts/plugin-boundary-report.test.ts | 11 +++++++++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/plugins/compatibility.md b/docs/plugins/compatibility.md index d1a3ea7cb545..02fd3b80aa42 100644 --- a/docs/plugins/compatibility.md +++ b/docs/plugins/compatibility.md @@ -158,13 +158,16 @@ New channel plugins should use `MsgContext.ChannelPromptContext`, `SupplementalContextFacts.channelStructuredContext`. The older `UntrustedContext`, `UntrustedStructuredContext`, `UntrustedStructuredContextEntry`, and supplemental `untrustedContext` names -remain as deprecated SDK aliases until 2026-09-08 (registry record -`sdk-untrusted-context-identifier-aliases`). Inbound finalization folds those +remain as deprecated SDK aliases. Their 2026-09-08 removal review date is +unchanged, but registry record `sdk-untrusted-context-identifier-aliases` is now +`removal-pending`: removal still requires verified migration of published plugin +readers and explicit breaking-release approval. Inbound finalization folds those deprecated fields into the channel-named fields and removes the old keys from runtime context. The security runtime similarly exports `buildChannelMetadata`; the deprecated -`buildUntrustedChannelMetadata` alias remains available on the same schedule. +`buildUntrustedChannelMetadata` alias remains available under the same pending +removal conditions. ### WhatsApp inbound callback retirement diff --git a/src/plugins/compat/registry-records.ts b/src/plugins/compat/registry-records.ts index 9242c0ee7a8e..59d44f1f5de8 100644 --- a/src/plugins/compat/registry-records.ts +++ b/src/plugins/compat/registry-records.ts @@ -282,14 +282,14 @@ export const PLUGIN_COMPAT_RECORDS = [ }, { code: "sdk-untrusted-context-identifier-aliases", - status: "deprecated", + status: "removal-pending", owner: "sdk", introduced: "2026-07-22", deprecated: "2026-07-22", warningStarts: "2026-07-22", removeAfter: "2026-09-08", replacement: - "`MsgContext.ChannelPromptContext`, `MsgContext.ChannelStructuredContext`, `ChannelStructuredContextEntry`, `SupplementalContextFacts.channelStructuredContext`, and `buildChannelMetadata`", + "`MsgContext.ChannelPromptContext`, `MsgContext.ChannelStructuredContext`, `ChannelStructuredContextEntry`, `SupplementalContextFacts.channelStructuredContext`, and `buildChannelMetadata`; retain the aliases until migration of published plugin readers is verified and explicit breaking-release approval is granted", docsPath: "/plugins/compatibility", surfaces: [ "openclaw/plugin-sdk reply-runtime MsgContext.UntrustedContext and UntrustedStructuredContext", diff --git a/test/scripts/plugin-boundary-report.test.ts b/test/scripts/plugin-boundary-report.test.ts index a9773ff99ce8..da216d6da768 100644 --- a/test/scripts/plugin-boundary-report.test.ts +++ b/test/scripts/plugin-boundary-report.test.ts @@ -34,9 +34,10 @@ describe("plugin-boundary-report", () => { expect(summaryResult.exitCode).toBe(0); expect(summaryResult.stderr).toBe(""); - expect(summary.compat?.removalPendingCount).toBe(8); + expect(summary.compat?.removalPendingCount).toBe(9); expect(summary.compat?.removalPendingDueCount).toEqual(expect.any(Number)); expect(summary.compat?.removalPending?.map((record) => record.code)).toEqual([ + "sdk-untrusted-context-identifier-aliases", "plugin-sdk-media-understanding-public-demotion", "plugin-sdk-memory-host-core-public-demotion", "plugin-sdk-channel-lifecycle-subpath", @@ -46,6 +47,12 @@ describe("plugin-boundary-report", () => { "plugin-sdk-infra-runtime-subpath", "plugin-sdk-plugin-config-runtime-public-demotion", ]); + expect(summary.compat?.removalPending?.[0]).toMatchObject({ + removeAfter: "2026-09-08", + blocker: expect.stringContaining( + "migration of published plugin readers is verified and explicit breaking-release approval is granted", + ), + }); for (const record of summary.compat?.removalPending ?? []) { expect(record.removeAfter).toMatch(/^\d{4}-\d{2}-\d{2}$/u); expect(record.blocker).toEqual(expect.stringMatching(/retain|replacement/iu)); @@ -76,7 +83,7 @@ describe("plugin-boundary-report", () => { expect(result.exitCode).toBe(0); expect(result.stderr).toBe(""); - expect(result.stdout).toContain("removalPending=8"); + expect(result.stdout).toContain("removalPending=9"); expect(result.stdout).not.toContain("agent-harness-sdk-alias"); expect(result.stdout).toMatch(/blocker=.*retain the public/iu); expect(result.stdout).toMatch(/readerRefs=\d+ readers=/u);