惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
Vercel News
Vercel News
D
DataBreaches.Net
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
小众软件
小众软件
美团技术团队
T
The Blog of Author Tim Ferriss
爱范儿
爱范儿
D
Docker
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
Blog — PlanetScale
Blog — PlanetScale
H
Hackread – Cybersecurity News, Data Breaches, AI and More
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
S
SegmentFault 最新的问题
云风的 BLOG
云风的 BLOG
B
Blog
雷峰网
雷峰网
The Cloudflare Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
refactor(qa): share thrown value normalization · openclaw...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -3,6 +3,7 @@ import { execFile } from "node:child_process";

33

import { randomUUID } from "node:crypto";

44

import fs from "node:fs/promises";

55

import path from "node:path";

6+

import { toQaErrorObject } from "./errors.js";

67

import { seedQaAgentWorkspace } from "./qa-agent-workspace.js";

78

import {

89

createQaChannelGatewayConfig,

@@ -343,7 +344,7 @@ export async function buildQaDockerHarnessImage(

343344

return await new Promise<{ stdout: string; stderr: string }>((resolve, reject) => {

344345

execFile(command, args, { cwd }, (error, stdout, stderr) => {

345346

if (error) {

346-

reject(toLintErrorObject(error, "Non-Error rejection"));

347+

reject(toQaErrorObject(error, "Non-Error rejection"));

347348

return;

348349

}

349350

resolve({ stdout, stderr });

@@ -368,17 +369,3 @@ export async function buildQaDockerHarnessImage(

368369
369370

return { imageName };

370371

}

371-
372-

function toLintErrorObject(value: unknown, fallbackMessage: string): Error {

373-

if (value instanceof Error) {

374-

return value;

375-

}

376-

if (typeof value === "string") {

377-

return new Error(value);

378-

}

379-

const error = new Error(fallbackMessage, { cause: value });

380-

if ((typeof value === "object" && value !== null) || typeof value === "function") {

381-

Object.assign(error, value);

382-

}

383-

return error;

384-

}

Original file line numberDiff line numberDiff line change

@@ -34,3 +34,17 @@ export class QaSuiteInfraError extends Error {

3434

this.code = code;

3535

}

3636

}

37+
38+

export function toQaErrorObject(value: unknown, fallbackMessage: string): Error {

39+

if (value instanceof Error) {

40+

return value;

41+

}

42+

if (typeof value === "string") {

43+

return new Error(value);

44+

}

45+

const error = new Error(fallbackMessage, { cause: value });

46+

if ((typeof value === "object" && value !== null) || typeof value === "function") {

47+

Object.assign(error, value);

48+

}

49+

return error;

50+

}

Original file line numberDiff line numberDiff line change

@@ -25,7 +25,7 @@ import {

2525

resolveQaRuntimeHostVersion,

2626

} from "./bundled-plugin-staging.js";

2727

import { assertRepoBoundPath, ensureRepoBoundDirectory } from "./cli-paths.js";

28-

import { QaSuiteInfraError } from "./errors.js";

28+

import { QaSuiteInfraError, toQaErrorObject } from "./errors.js";

2929

import { formatQaGatewayLogsForError, redactQaGatewayDebugText } from "./gateway-log-redaction.js";

3030

import { startQaGatewayRpcClient } from "./gateway-rpc-client.js";

3131

import { splitQaModelRef, type QaProviderMode } from "./model-selection.js";

@@ -810,7 +810,7 @@ export async function startQaGatewayChild(params: {

810810

}

811811

}

812812

if (!rpcReady) {

813-

throw toLintErrorObject(

813+

throw toQaErrorObject(

814814

lastRpcStartupError ?? new Error("qa gateway rpc client failed to start"),

815815

"Non-Error thrown",

816816

);

@@ -913,7 +913,7 @@ export async function startQaGatewayChild(params: {

913913

}

914914

}

915915

if (!rpcReady) {

916-

throw toLintErrorObject(

916+

throw toQaErrorObject(

917917

lastRpcStartupError ?? new Error("qa gateway rpc client failed to start"),

918918

"Non-Error thrown",

919919

);

@@ -1067,17 +1067,3 @@ export async function startQaGatewayChild(params: {

10671067

}

10681068

}

10691069

export { testing as __testing };

1070-
1071-

function toLintErrorObject(value: unknown, fallbackMessage: string): Error {

1072-

if (value instanceof Error) {

1073-

return value;

1074-

}

1075-

if (typeof value === "string") {

1076-

return new Error(value);

1077-

}

1078-

const error = new Error(fallbackMessage, { cause: value });

1079-

if ((typeof value === "object" && value !== null) || typeof value === "function") {

1080-

Object.assign(error, value);

1081-

}

1082-

return error;

1083-

}

Original file line numberDiff line numberDiff line change

@@ -3,7 +3,7 @@ import { setTimeout as sleep } from "node:timers/promises";

33

import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";

44

import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";

55

import { isRecord as isPlainObject } from "openclaw/plugin-sdk/string-coerce-runtime";

6-

import { QaSuiteInfraError } from "./errors.js";

6+

import { QaSuiteInfraError, toQaErrorObject } from "./errors.js";

77

import { applyQaMergePatch } from "./suite-merge-patch.js";

88

import { liveTurnTimeoutMs } from "./suite-runtime-agent-common.js";

99

import type { QaConfigSnapshot, QaSuiteRuntimeEnv } from "./suite-runtime-types.js";

@@ -302,7 +302,7 @@ async function runConfigMutation(params: {

302302

continue;

303303

}

304304

}

305-

throw toLintErrorObject(

305+

throw toQaErrorObject(

306306

lastConflict ?? new Error(`${params.action} failed after retrying config hash conflicts`),

307307

"Non-Error thrown",

308308

);

@@ -372,17 +372,3 @@ export {

372372

waitForQaChannelReady,

373373

waitForTransportReady,

374374

};

375-
376-

function toLintErrorObject(value: unknown, fallbackMessage: string): Error {

377-

if (value instanceof Error) {

378-

return value;

379-

}

380-

if (typeof value === "string") {

381-

return new Error(value);

382-

}

383-

const error = new Error(fallbackMessage, { cause: value });

384-

if ((typeof value === "object" && value !== null) || typeof value === "function") {

385-

Object.assign(error, value);

386-

}

387-

return error;

388-

}