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

推荐订阅源

Vercel News
Vercel News
博客园 - 司徒正美
C
Check Point Blog
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
P
Proofpoint News Feed
IT之家
IT之家
B
Blog
博客园_首页
量子位
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
J
Java Code Geeks
H
Help Net Security
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
D
DataBreaches.Net
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News

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 web search fetch 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+

// Cloudflare Markdown web_fetch tests cover direct markdown extraction,

2+

// provider bypass, and privacy-safe token logging.

13

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

24

import type { LookupFn } from "../../infra/net/ssrf.js";

35

import * as logger from "../../logger.js";

@@ -99,6 +101,8 @@ describe("web_fetch Cloudflare Markdown for Agents", () => {

99101

});

100102
101103

it("bypasses Firecrawl when runtime metadata marks Firecrawl inactive", async () => {

104+

// Runtime metadata is authoritative for the current credential snapshot; a

105+

// stale configured provider should not force provider fallback.

102106

const fetchSpy = vi

103107

.fn()

104108

.mockResolvedValue(

@@ -149,6 +153,8 @@ describe("web_fetch Cloudflare Markdown for Agents", () => {

149153

});

150154
151155

it("logs x-markdown-tokens when header is present", async () => {

156+

// Token diagnostics are useful, but the logged URL must be scrubbed before

157+

// query strings or private paths reach debug output.

152158

const logSpy = vi.spyOn(logger, "logDebug").mockImplementation(() => {});

153159

const fetchSpy = vi

154160

.fn()

Original file line numberDiff line numberDiff line change

@@ -1,7 +1,10 @@

1+

// Shared web_search provider tests cover module-local cache isolation.

12

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

23
34

describe("web_search shared cache", () => {

45

it("keeps cache entries module-local instead of exposing them on a global symbol", async () => {

6+

// Cache state should die with the module instance; a global symbol would

7+

// leak search payloads across tests, sessions, and plugin reloads.

58

vi.resetModules();

69

delete (globalThis as Record<PropertyKey, unknown>)[Symbol.for("openclaw.web-search.cache")];

710
Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

// web_search redirect tests cover SSRF-guarded citation URL resolution.

12

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

23
34

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

@@ -21,6 +22,8 @@ describe("web_search redirect resolution hardening", () => {

2122

});

2223
2324

it("resolves redirects via SSRF-guarded HEAD requests", async () => {

25+

// Citation redirect resolution still touches arbitrary URLs, so it must

26+

// route through the strict guarded fetch wrapper.

2427

withStrictWebToolsEndpointMock.mockImplementation(async (_params, run) => {

2528

return await run({

2629

response: new Response(null, { status: 200 }),

Original file line numberDiff line numberDiff line change

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

1+

// web_search signal tests cover abort propagation from the agent tool wrapper

2+

// into provider runtime execution.

13

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

24

import { createWebSearchTool } from "./web-search.js";

35

@@ -20,6 +22,8 @@ describe("web_search signal plumbing", () => {

2022

});

2123
2224

it("passes the agent abort signal into web search runtime execution", async () => {

25+

// Provider execution can be long-running; the outer agent cancellation

26+

// signal must reach the runtime path.

2327

const controller = new AbortController();

2428

const tool = createWebSearchTool({ config: {} });

2529