test: fix rebased local gates

This commit is contained in:
Peter Steinberger
2026-04-18 01:49:54 +01:00
parent 27f34f0491
commit c8d722d093
13 changed files with 81 additions and 85 deletions

View File

@@ -2,13 +2,13 @@ import type { ClawdbotConfig, RuntimeEnv } from "../runtime-api.js";
import { resolveFeishuRuntimeAccount } from "./accounts.js";
import { handleFeishuMessage, type FeishuMessageEvent } from "./bot.js";
import { decodeFeishuCardAction, buildFeishuCardActionTextFallback } from "./card-interaction.js";
import { createFeishuClient } from "./client.js";
import {
createApprovalCard,
FEISHU_APPROVAL_CANCEL_ACTION,
FEISHU_APPROVAL_CONFIRM_ACTION,
FEISHU_APPROVAL_REQUEST_ACTION,
} from "./card-ux-approval.js";
import { createFeishuClient } from "./client.js";
import { sendCardFeishu, sendMessageFeishu } from "./send.js";
export type FeishuCardActionEvent = {
@@ -234,7 +234,10 @@ async function resolveCardActionChatType(params: {
normalizeResolvedCardActionChatType(response.data?.chat_mode) ??
normalizeResolvedCardActionChatType(response.data?.chat_type);
if (resolvedChatType) {
resolvedChatTypeCache.set(cacheKey, { value: resolvedChatType, expiresAt: now + CHAT_TYPE_CACHE_TTL_MS });
resolvedChatTypeCache.set(cacheKey, {
value: resolvedChatType,
expiresAt: now + CHAT_TYPE_CACHE_TTL_MS,
});
return resolvedChatType;
}
params.log(

View File

@@ -724,9 +724,7 @@ export function createTaskFlowWebhookRequestHandler(params: {
return false;
}
const resolvedSecret = await resolveTargetSecret(candidate);
return Boolean(
resolvedSecret && timingSafeEquals(resolvedSecret, presentedSecret),
);
return Boolean(resolvedSecret && timingSafeEquals(resolvedSecret, presentedSecret));
},
});
if (!target) {

View File

@@ -1,6 +1,6 @@
import { NON_ENV_SECRETREF_MARKER } from "openclaw/plugin-sdk/provider-auth-runtime";
import { createNonExitingRuntime } from "openclaw/plugin-sdk/runtime-env";
import { withEnv } from "openclaw/plugin-sdk/testing";
import { withEnv, withEnvAsync } from "openclaw/plugin-sdk/testing";
import { describe, expect, it, vi } from "vitest";
import { createWizardPrompter } from "../../test/helpers/wizard-prompter.js";
import { resolveXaiCatalogEntry } from "./model-definitions.js";
@@ -79,7 +79,7 @@ describe("xai web search config resolution", () => {
});
it("treats unresolved non-env SecretRefs as missing credentials instead of throwing", async () => {
await withEnv({ XAI_API_KEY: undefined }, async () => {
await withEnvAsync({ XAI_API_KEY: undefined }, async () => {
const provider = createXaiWebSearchProvider();
const maybeTool = provider.createTool({
config: {