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

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
量子位
雷峰网
雷峰网
宝玉的分享
宝玉的分享
V
Visual Studio Blog
博客园_首页
小众软件
小众软件
The Cloudflare Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
S
SegmentFault 最新的问题
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学

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
docs: document media cron tool tests · openclaw/openclaw@...
steipete · 2026-06-05 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -1,3 +1,5 @@

1+

// Common parameter tests cover shared action gates and typed argument readers

2+

// used by channel/tool adapters.

13

import { describe, expect, it } from "vitest";

24

import {

35

createActionGate,

@@ -47,6 +49,8 @@ describe("readNumberParam", () => {

4749

});

4850
4951

it("keeps partial parse behavior by default", () => {

52+

// Some legacy channel tools pass identifiers with numeric prefixes; strict

53+

// parsing is opt-in for new bounded fields.

5054

const params = { messageId: "42abc" };

5155

expect(readNumberParam(params, "messageId")).toBe(42);

5256

});

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,5 @@

1+

// Cron flat-parameter tests cover model-friendly shorthand recovery before

2+

// gateway cron RPC dispatch.

13

import { beforeEach, describe, expect, it, vi } from "vitest";

24
35

const { callGatewayToolMock } = vi.hoisted(() => ({

@@ -93,6 +95,8 @@ describe("cron tool flat-params", () => {

9395

});

9496
9597

it("leaves out-of-range flat atMs for gateway validation", async () => {

98+

// The gateway owns final schedule validation; flat recovery should preserve

99+

// the supplied value instead of silently coercing an invalid date.

96100

const tool = createCronTool(undefined, { callGatewayTool: callGatewayToolMock });

97101

const invalidAtMs = 8_640_000_000_000_001;

98102
Original file line numberDiff line numberDiff line change

@@ -1,3 +1,5 @@

1+

// Cron tool schema tests cover the provider-facing parameter shape and runtime

2+

// validation compatibility for cron jobs.

13

import { Value } from "typebox/value";

24

import { describe, expect, it } from "vitest";

35

import { normalizeToolParameterSchema } from "../agent-tools.schema.js";

@@ -110,6 +112,8 @@ describe("CronToolSchema", () => {

110112

});

111113
112114

it("describes cron expressions as local wall-clock time in the supplied timezone", () => {

115+

// Cron expressions are interpreted by the gateway scheduler; model-facing

116+

// docs must not encourage UTC conversion by the agent.

113117

const jobExpr = propertyAt(schemaRecord, "job.schedule.expr");

114118

const patchExpr = propertyAt(schemaRecord, "patch.schedule.expr");

115119

const jobTz = propertyAt(schemaRecord, "job.schedule.tz");

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,5 @@

1+

// Goal tool tests cover goal accounting projection and correct session-store

2+

// routing for global and scoped sessions.

13

import fs from "node:fs/promises";

24

import os from "node:os";

35

import path from "node:path";

@@ -18,6 +20,8 @@ async function createStoreConfig(): Promise<{ config: OpenClawConfig; template:

1820
1921

describe("goal tools", () => {

2022

it("keeps get_goal read-only when accounting changes are projected", async () => {

23+

// Budget-limited status can be derived for display without mutating the

24+

// stored active goal record.

2125

const { config, template } = await createStoreConfig();

2226

const storePath = resolveStorePath(template, { agentId: "research" });

2327

await upsertSessionEntry({

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,5 @@

1+

// Background media generation tests cover detached task completion, requester

2+

// wake delivery, and direct media fallback behavior.

13

import { beforeEach, describe, expect, it, vi } from "vitest";

24
35

const subagentAnnounceDeliveryMocks = vi.hoisted(() => ({

@@ -32,6 +34,8 @@ describe("shouldDetachMediaGenerationTask", () => {

3234
3335

describe("scheduleMediaGenerationTaskCompletion", () => {

3436

it("keeps a generated media task active until completion delivery finishes", async () => {

37+

// Mark completion only after the requester wake has been attempted; otherwise

38+

// task status can say done before the visible media reaches the requester.

3539

const order: string[] = [];

3640

const scheduled: Array<() => Promise<void>> = [];

3741

const completeTaskRun = vi.fn(() => {

@@ -497,6 +501,8 @@ describe("createMediaGenerationTaskLifecycle", () => {

497501

});

498502
499503

it("does not direct-deliver generated media after requester abandonment", async () => {

504+

// Abandoned requester sessions are terminal; direct delivery would re-open a

505+

// conversation the task lifecycle already decided to stop.

500506

subagentAnnounceDeliveryMocks.deliverSubagentAnnouncement.mockResolvedValueOnce({

501507

delivered: false,

502508

path: "none",

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,5 @@

1+

// Shared media tool tests cover root separation, provider availability, and

2+

// model-registry normalization for generation/understanding tools.

13

import path from "node:path";

24

import { pathToFileURL } from "node:url";

35

import { afterEach, describe, expect, it, vi } from "vitest";

@@ -85,6 +87,8 @@ describe("resolveMediaToolLocalRoots", () => {

8587

});

8688
8789

it("keeps channel inbound attachment roots separate from local roots", () => {

90+

// Inbound channel roots may include broad chat attachment folders; keep them

91+

// out of local filesystem allowlists unless the channel context asks.

8892

const accountRoot = path.join("/tmp", "openclaw-imessage-work");

8993

const sharedRoot = path.join("/tmp", "openclaw-imessage-shared");

9094

const cfg = {

@@ -150,6 +154,8 @@ describe("resolveModelFromRegistry", () => {

150154

});

151155
152156

it("falls back to provider-prefixed custom model IDs", () => {

157+

// Custom providers can store ids with provider prefixes; try both forms so

158+

// callers can pass the short local model id.

153159

const foundModel = { provider: "kimchi", id: "kimchi/claude-opus-4-6" };

154160

const { calls, registry } = createModelRegistryStub((_, modelId) =>

155161

modelId === "kimchi/claude-opus-4-6" ? foundModel : null,

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,5 @@

1+

// Music generation status tests cover duplicate guards and explicit status

2+

// actions for background music tasks.

13

import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

24

import * as musicGenerationRuntime from "../../music-generation/runtime.js";

35

import {

@@ -45,6 +47,8 @@ describe("createMusicGenerateTool status actions", () => {

4547

});

4648
4749

it("returns active task status instead of starting a duplicate generation", () => {

50+

// Duplicate guard responses prevent agents from launching parallel provider

51+

// jobs while a matching request is still running.

4852

taskRuntimeInternalMocks.listTasksForOwnerKey.mockReturnValue([

4953

{

5054

taskId: "task-active",

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,5 @@

1+

// Video generation status tests cover duplicate guards and explicit status

2+

// actions for background video tasks.

13

import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

24

import * as videoGenerationRuntime from "../../video-generation/runtime.js";

35

import {

@@ -148,6 +150,8 @@ describe("createVideoGenerateTool status actions", () => {

148150

});

149151
150152

it("returns recent succeeded video status instead of starting a duplicate generation", () => {

153+

// A recently completed request is still a duplicate from the user's

154+

// perspective; report status instead of spending another provider call.

151155

const now = Date.now();

152156

recordRecentMediaGenerationTaskStartForSession({

153157

sessionKey: "agent:main:discord:direct:123",