From 7f6d90d2d4d0d0e67015ffcf1df66e5bcab549d9 Mon Sep 17 00:00:00 2001 From: Simon Kim Date: Sat, 21 Mar 2026 01:12:13 +0900 Subject: [PATCH] Fix PR #34942 follow-up CI regressions --- src/cli/plugin-registry.test.ts | 4 ++-- src/secrets/credential-matrix.ts | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/cli/plugin-registry.test.ts b/src/cli/plugin-registry.test.ts index 30714b8a023..5d0b9342fa5 100644 --- a/src/cli/plugin-registry.test.ts +++ b/src/cli/plugin-registry.test.ts @@ -59,7 +59,7 @@ describe("ensurePluginRegistryLoaded", () => { expect(mocks.loadOpenClawPlugins).toHaveBeenCalledWith( expect.objectContaining({ - onlyPluginIds: [], + onlyPluginIds: ["telegram"], throwOnLoadError: true, }), ); @@ -86,7 +86,7 @@ describe("ensurePluginRegistryLoaded", () => { expect(mocks.loadOpenClawPlugins).toHaveBeenCalledTimes(2); expect(mocks.loadOpenClawPlugins).toHaveBeenNthCalledWith( 1, - expect.objectContaining({ onlyPluginIds: [], throwOnLoadError: true }), + expect.objectContaining({ onlyPluginIds: ["telegram"], throwOnLoadError: true }), ); expect(mocks.loadOpenClawPlugins).toHaveBeenNthCalledWith( 2, diff --git a/src/secrets/credential-matrix.ts b/src/secrets/credential-matrix.ts index 05fa45f749e..89dfd0d1c32 100644 --- a/src/secrets/credential-matrix.ts +++ b/src/secrets/credential-matrix.ts @@ -32,6 +32,16 @@ const EXCLUDED_MUTABLE_OR_RUNTIME_MANAGED = [ "whatsapp.creds.json", ]; +function compareCredentialMatrixIds(left: string, right: string): number { + if (left < right) { + return -1; + } + if (left > right) { + return 1; + } + return 0; +} + export function buildSecretRefCredentialMatrix(): SecretRefCredentialMatrixDocument { const entries: CredentialMatrixEntry[] = listSecretTargetRegistryEntries() .map((entry) => ({ @@ -46,7 +56,7 @@ export function buildSecretRefCredentialMatrix(): SecretRefCredentialMatrixDocum ? { notes: "Google Chat compatibility exception: sibling ref field remains canonical." } : {}), })) - .toSorted((a, b) => a.id.localeCompare(b.id)); + .toSorted((a, b) => compareCredentialMatrixIds(a.id, b.id)); return { version: 1,