Skip to content

Commit ad0530a

Browse files
committed
test(release): align package harness contracts
1 parent 1669bb5 commit ad0530a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎scripts/e2e/kitchen-sink-rpc-walk.mts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,8 @@ function isRetryableTransientNetworkError(error: unknown, seen = new Set<unknown
12081208
const message =
12091209
candidate instanceof Error ? candidate.message : typeof candidate === "string" ? candidate : "";
12101210
const code = asRecord(candidate).code;
1211-
const text = `${String(code ?? "")} ${message}`;
1211+
const normalizedCode = typeof code === "string" || typeof code === "number" ? String(code) : "";
1212+
const text = `${normalizedCode} ${message}`;
12121213
if (
12131214
/\b(?:ECONNRESET|ECONNREFUSED|ETIMEDOUT|EPIPE|EHOSTUNREACH|ENETUNREACH)\b/iu.test(text) ||
12141215
/\b(?:fetch failed|socket hang up|connection reset)\b/iu.test(text)
@@ -1971,7 +1972,7 @@ export async function assertOperatorRpcDenied(
19711972
} catch (error) {
19721973
const candidate = asRecord(error);
19731974
const gatewayCode = candidate.gatewayCode;
1974-
const message = String(candidate.message ?? "");
1975+
const message = typeof candidate.message === "string" ? candidate.message : "";
19751976
if (gatewayCode === "INVALID_REQUEST" && message.includes("unauthorized role: operator")) {
19761977
return;
19771978
}

‎test/scripts/plugin-prerelease-test-plan.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ describe("scripts/lib/plugin-prerelease-test-plan.mts", () => {
268268
expect(script).toContain("OPENCLAW_KITCHEN_SINK_COMMAND_MAX_RSS_MIB");
269269
expect(script).toContain("docker_e2e_sample_stats_until_exit");
270270
expect(script).toContain("scripts/e2e/lib/docker-stats/assert-resource-ceiling.mjs");
271-
expect(script).toContain("node --import tsx scripts/e2e/kitchen-sink-rpc-walk.mts");
271+
expect(script).toContain("tsx scripts/e2e/kitchen-sink-rpc-walk.mts");
272272
expect(walkScript).toContain("commands.list");
273273
expect(walkScript).toContain("tools.invoke");
274274
expect(walkScript).toContain("tts.providers");

0 commit comments

Comments
 (0)