Skip to content

Commit 51abd5b

Browse files
committed
Merge remote-tracking branch 'origin/main' into pr-110425-prep
2 parents 6a36664 + b6f8641 commit 51abd5b

41 files changed

Lines changed: 1887 additions & 822 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/android/wear/src/main/java/ai/openclaw/wear/WearScreens.kt‎

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,43 +1920,6 @@ private fun ActionButton(
19201920
)
19211921
}
19221922

1923-
@Composable
1924-
private fun CompactVoiceButton(
1925-
label: String,
1926-
enabled: Boolean,
1927-
onClick: () -> Unit,
1928-
modifier: Modifier = Modifier,
1929-
) {
1930-
val colors = OpenClawWearTheme.colors
1931-
Button(
1932-
onClick = onClick,
1933-
enabled = enabled,
1934-
colors =
1935-
ButtonDefaults.buttonColors(
1936-
containerColor = colors.surfaceRaised,
1937-
contentColor = colors.text,
1938-
disabledContainerColor = colors.surface,
1939-
disabledContentColor = colors.textMuted,
1940-
),
1941-
modifier =
1942-
modifier.border(
1943-
width = 1.dp,
1944-
color = if (enabled) colors.borderStrong else colors.border,
1945-
shape = RoundedCornerShape(24.dp),
1946-
),
1947-
label = {
1948-
Text(
1949-
text = label,
1950-
modifier = Modifier.fillMaxWidth(),
1951-
fontSize = 12.sp,
1952-
fontWeight = FontWeight.SemiBold,
1953-
textAlign = TextAlign.Center,
1954-
maxLines = 1,
1955-
)
1956-
},
1957-
)
1958-
}
1959-
19601923
@Composable
19611924
private fun SecondaryButton(
19621925
label: String,

‎extensions/browser/chrome-extension/modules/copilot-runtime.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎extensions/lmstudio/src/stream.test.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,22 @@ describe("lmstudio stream wrapper", () => {
490490
expect(ensureLmstudioModelLoadedMock).toHaveBeenCalledTimes(1);
491491
});
492492

493+
it("does not start model preload for an already-aborted inference", async () => {
494+
const baseStream = buildDoneStreamFn();
495+
const wrapped = createWrappedLmstudioStream(baseStream);
496+
const controller = new AbortController();
497+
const abortReason = new Error("inference already cancelled");
498+
controller.abort(abortReason);
499+
const options = { signal: controller.signal };
500+
const stream = Promise.resolve().then(() =>
501+
runWrappedLmstudioStream(wrapped, { contextWindow: 32_768 }, options),
502+
);
503+
504+
await expect(stream).rejects.toBe(abortReason);
505+
expect(ensureLmstudioModelLoadedMock).not.toHaveBeenCalled();
506+
expect(baseStream).not.toHaveBeenCalled();
507+
});
508+
493509
it("cancels one shared preload waiter without cancelling another inference", async () => {
494510
let resolvePreload: (() => void) | undefined;
495511
ensureLmstudioModelLoadedMock.mockImplementationOnce(

‎extensions/lmstudio/src/stream.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ export function wrapLmstudioInferencePreload(ctx: ProviderWrapStreamFnContext):
265265
if (!modelKey) {
266266
return underlying(model, context, options);
267267
}
268+
// Cancellation belongs to this caller; never start or join a shared load after abort.
269+
options?.signal?.throwIfAborted();
268270
const providerConfig = ctx.config?.models?.providers?.[LMSTUDIO_PROVIDER_ID];
269271
if (!shouldPreloadLmstudioModels(providerConfig)) {
270272
return streamWithThinkingLevel(withLmstudioUsageCompat(model), context, options);

‎extensions/qa-lab/src/cli.runtime.test.ts‎

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ vi.mock("./manual-lane.runtime.js", () => ({
3939
runQaManualLane,
4040
}));
4141

42-
vi.mock("./suite-launch.runtime.js", () => ({
42+
vi.mock("./suite-launch.runtime.js", async (importOriginal) => ({
43+
...(await importOriginal<typeof import("./suite-launch.runtime.js")>()),
4344
runQaFlowSuiteFromRuntime,
4445
runQaSuite,
4546
}));
@@ -1481,46 +1482,44 @@ describe("qa cli runtime", () => {
14811482
}
14821483
});
14831484

1484-
it("retries host suite runs once for retryable infra failures", async () => {
1485-
runQaSuite
1486-
.mockRejectedValueOnce(
1487-
new QaSuiteInfraError("agent_wait_failed", "agent.wait failed: gateway call timed out"),
1488-
)
1489-
.mockResolvedValueOnce(
1490-
flowSuiteRuntimeResult({
1491-
reportPath: suiteReportPath,
1492-
summaryPath: suiteSummaryPath,
1493-
}),
1494-
);
1485+
it("leaves host suite infrastructure retries inside the suite launcher", async () => {
1486+
runQaSuite.mockRejectedValueOnce(
1487+
new QaSuiteInfraError("agent_wait_failed", "agent.wait failed: gateway call timed out"),
1488+
);
14951489

1496-
await runQaSuiteCommand({
1497-
repoRoot: "/tmp/openclaw-repo",
1498-
});
1490+
await expect(
1491+
runQaSuiteCommand({
1492+
repoRoot: "/tmp/openclaw-repo",
1493+
}),
1494+
).rejects.toThrow("agent.wait failed: gateway call timed out");
14991495

1500-
expect(runQaSuite).toHaveBeenCalledTimes(2);
1501-
expectWriteContains(stderrWrite, "[qa-suite] infra retry 1/1: agent.wait failed");
1496+
expect(runQaSuite).toHaveBeenCalledTimes(1);
1497+
expect(stderrWrite.mock.calls.flat().join("")).not.toContain("[qa-suite] infra retry");
15021498
});
15031499

1504-
it("retries host suite runs once for qa-channel readiness timeouts", async () => {
1505-
runQaSuite
1500+
it("retries host parity preflight once for qa-channel readiness timeouts", async () => {
1501+
runQaFlowSuiteFromRuntime
15061502
.mockRejectedValueOnce(
15071503
new QaSuiteInfraError(
15081504
"transport_ready_timeout",
15091505
"timed out after 180000ms waiting for qa-channel ready; last status: no qa-channel accounts reported",
15101506
),
15111507
)
1512-
.mockResolvedValueOnce(
1513-
flowSuiteRuntimeResult({
1514-
reportPath: suiteReportPath,
1515-
summaryPath: suiteSummaryPath,
1516-
}),
1517-
);
1508+
.mockResolvedValueOnce({
1509+
outputDir: suiteArtifactsDir,
1510+
evidencePath: suiteEvidencePath,
1511+
watchUrl: "http://127.0.0.1:43124",
1512+
reportPath: suiteReportPath,
1513+
summaryPath: suiteSummaryPath,
1514+
scenarios: [],
1515+
});
15181516

15191517
await runQaSuiteCommand({
15201518
repoRoot: "/tmp/openclaw-repo",
1519+
preflight: true,
15211520
});
15221521

1523-
expect(runQaSuite).toHaveBeenCalledTimes(2);
1522+
expect(runQaFlowSuiteFromRuntime).toHaveBeenCalledTimes(2);
15241523
expectWriteContains(
15251524
stderrWrite,
15261525
"[qa-suite] infra retry 1/1: timed out after 180000ms waiting for qa-channel ready",

‎extensions/qa-lab/src/cli.runtime.ts‎

Lines changed: 41 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import {
3636
} from "./coverage-report.js";
3737
import { buildQaDockerHarnessImage, writeQaDockerHarnessFiles } from "./docker-harness.js";
3838
import { runQaDockerUp } from "./docker-up.runtime.js";
39-
import { QaSuiteArtifactError, QaSuiteInfraError } from "./errors.js";
4039
import type { QaCliBackendAuthMode } from "./gateway-child.js";
4140
import {
4241
createMockJsonlReplayCellRunner,
@@ -94,7 +93,11 @@ import {
9493
type QaScorecardEvidenceMode,
9594
} from "./scorecard-taxonomy.js";
9695
import { isQaSelfCheckSuccessful } from "./self-check.js";
97-
import { runQaFlowSuiteFromRuntime, runQaSuite } from "./suite-launch.runtime.js";
96+
import {
97+
runQaFlowSuiteFromRuntime,
98+
runQaSuite,
99+
runQaSuiteWithInfraRetry,
100+
} from "./suite-launch.runtime.js";
98101
import { resolveQaSuiteScenarioChannel, resolveQaSuiteScenarioChannels } from "./suite-planning.js";
99102
import { readQaSuiteFailedOrSkippedScenarioCountFromFile } from "./suite-summary.js";
100103
import {
@@ -108,16 +111,8 @@ import {
108111
type QaToolCoverageSuiteSummary,
109112
} from "./tool-coverage-report.js";
110113

111-
const QA_SUITE_INFRA_RETRY_LIMIT = 1;
112114
const QA_CREDENTIAL_PAYLOAD_MAX_BYTES_ENV = "OPENCLAW_QA_CREDENTIAL_PAYLOAD_MAX_BYTES";
113115
const DEFAULT_QA_CREDENTIAL_PAYLOAD_MAX_BYTES = 64 * 1024 * 1024;
114-
const QA_SUITE_INFRA_RETRY_NETWORK_ERROR_CODES = new Set([
115-
"ECONNRESET",
116-
"ECONNREFUSED",
117-
"EPIPE",
118-
"ETIMEDOUT",
119-
"UND_ERR_SOCKET",
120-
]);
121116
type InterruptibleServer = {
122117
baseUrl: string;
123118
stop(): Promise<void>;
@@ -345,51 +340,6 @@ function rejectNonFlowScenarioIds(params: {
345340
}
346341
}
347342

348-
function isQaSuiteInfraRetryableError(error: unknown) {
349-
if (error instanceof QaSuiteArtifactError || error instanceof QaSuiteInfraError) {
350-
return true;
351-
}
352-
return hasQaSuiteRetryableNetworkCode(error);
353-
}
354-
355-
function hasQaSuiteRetryableNetworkCode(error: unknown) {
356-
let current: unknown = error;
357-
for (let depth = 0; depth < 4 && current; depth += 1) {
358-
if (typeof current !== "object") {
359-
return false;
360-
}
361-
const record = current as { cause?: unknown; code?: unknown };
362-
if (
363-
typeof record.code === "string" &&
364-
QA_SUITE_INFRA_RETRY_NETWORK_ERROR_CODES.has(record.code.toUpperCase())
365-
) {
366-
return true;
367-
}
368-
current = record.cause;
369-
}
370-
return false;
371-
}
372-
373-
async function runQaSuiteWithInfraRetry<Result>(
374-
run: () => Promise<Result>,
375-
maxRetries = QA_SUITE_INFRA_RETRY_LIMIT,
376-
) {
377-
for (let attempt = 0; attempt <= maxRetries; attempt += 1) {
378-
try {
379-
return await run();
380-
} catch (error) {
381-
const retryable = isQaSuiteInfraRetryableError(error);
382-
if (!retryable || attempt >= maxRetries) {
383-
throw error;
384-
}
385-
process.stderr.write(
386-
`[qa-suite] infra retry ${attempt + 1}/${maxRetries}: ${formatErrorMessage(error)}\n`,
387-
);
388-
}
389-
}
390-
throw new Error("unreachable qa suite retry state");
391-
}
392-
393343
async function runQaParityPreflight(params: {
394344
repoRoot: string;
395345
transportId: QaTransportId;
@@ -1023,45 +973,43 @@ export async function runQaSuiteCommand(opts: QaSuiteCommandOptions) {
1023973
return undefined;
1024974
}
1025975
const thinkingDefault = parseQaThinkingLevel("--thinking", opts.thinking);
1026-
const runtimeResult = await runQaSuiteWithInfraRetry(() =>
1027-
runQaSuite({
1028-
repoRoot,
1029-
outputDir: resolveRepoRelativeOutputDir(repoRoot, opts.outputDir),
1030-
evidenceMode: opts.evidenceMode,
1031-
transportId,
1032-
channelDriver,
1033-
...(liveAdapterFactories
1034-
? {
1035-
adapterFactories: liveAdapterFactories,
1036-
...(liveChannelId ? { channelId: liveChannelId } : {}),
1037-
adapterOptions: {
1038-
repoRoot,
1039-
sutAccountId: opts.sutAccountId,
1040-
credentialSource: opts.credentialSource,
1041-
credentialRole: opts.credentialRole,
1042-
explicitScenarioSelection:
1043-
opts.explicitScenarioSelection ?? Boolean(opts.scenarioIds?.length),
1044-
},
1045-
}
976+
const runtimeResult = await runQaSuite({
977+
repoRoot,
978+
outputDir: resolveRepoRelativeOutputDir(repoRoot, opts.outputDir),
979+
evidenceMode: opts.evidenceMode,
980+
transportId,
981+
channelDriver,
982+
...(liveAdapterFactories
983+
? {
984+
adapterFactories: liveAdapterFactories,
985+
...(liveChannelId ? { channelId: liveChannelId } : {}),
986+
adapterOptions: {
987+
repoRoot,
988+
sutAccountId: opts.sutAccountId,
989+
credentialSource: opts.credentialSource,
990+
credentialRole: opts.credentialRole,
991+
explicitScenarioSelection:
992+
opts.explicitScenarioSelection ?? Boolean(opts.scenarioIds?.length),
993+
},
994+
}
995+
: {}),
996+
channelDriverSelection,
997+
...(opts.providerMode !== undefined ? { providerMode } : {}),
998+
primaryModel,
999+
alternateModel,
1000+
fastMode: opts.fastMode,
1001+
failFast: opts.failFast,
1002+
...(thinkingDefault ? { thinkingDefault } : {}),
1003+
...(claudeCliAuthMode ? { claudeCliAuthMode } : {}),
1004+
scenarioIds: liveChannelId ? scenarioIds : hostScenarioIds,
1005+
...(opts.enabledPluginIds !== undefined ? { enabledPluginIds: opts.enabledPluginIds } : {}),
1006+
...(liveChannelId
1007+
? { concurrency: 1 }
1008+
: opts.concurrency !== undefined
1009+
? { concurrency: parseQaPositiveIntegerOption("--concurrency", opts.concurrency) }
10461010
: {}),
1047-
channelDriverSelection,
1048-
...(opts.providerMode !== undefined ? { providerMode } : {}),
1049-
primaryModel,
1050-
alternateModel,
1051-
fastMode: opts.fastMode,
1052-
failFast: opts.failFast,
1053-
...(thinkingDefault ? { thinkingDefault } : {}),
1054-
...(claudeCliAuthMode ? { claudeCliAuthMode } : {}),
1055-
scenarioIds: liveChannelId ? scenarioIds : hostScenarioIds,
1056-
...(opts.enabledPluginIds !== undefined ? { enabledPluginIds: opts.enabledPluginIds } : {}),
1057-
...(liveChannelId
1058-
? { concurrency: 1 }
1059-
: opts.concurrency !== undefined
1060-
? { concurrency: parseQaPositiveIntegerOption("--concurrency", opts.concurrency) }
1061-
: {}),
1062-
...(runtimePair ? { runtimePair } : {}),
1063-
}),
1064-
);
1011+
...(runtimePair ? { runtimePair } : {}),
1012+
});
10651013
switch (runtimeResult.executionKind) {
10661014
case "suite": {
10671015
const result = runtimeResult.result;

0 commit comments

Comments
 (0)