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

推荐订阅源

Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog
T
The Blog of Author Tim Ferriss
量子位
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
小众软件
小众软件
Recent Announcements
Recent Announcements
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
I
InfoQ
美团技术团队
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
博客园 - 【当耐特】
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
博客园 - 聂微东
Last Week in AI
Last Week in AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Help Net Security

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 agent cache auth tests · openclaw/openclaw...
steipete · 2026-06-05 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

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

1+

/** Tests diagnostic cache-trace event writing, redaction, and stream wrapping. */

12

import crypto from "node:crypto";

23

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

34

import type { OpenClawConfig } from "../config/config.js";

@@ -7,6 +8,8 @@ import { createCacheTrace } from "./cache-trace.js";

78

describe("createCacheTrace", () => {

89

function createMemoryTraceForTest() {

910

const lines: string[] = [];

11+

// In-memory writer keeps cache trace assertions deterministic without

12+

// touching real diagnostic log paths.

1013

const trace = createCacheTrace({

1114

cfg: {

1215

diagnostics: {

@@ -266,7 +269,8 @@ describe("createCacheTrace", () => {

266269
267270

const parent: Record<string, unknown> = { role: "user", content: "hello" };

268271

const child: Record<string, unknown> = { ref: parent };

269-

parent.child = child; // circular reference

272+

// Cache tracing must fingerprint cyclic prompt payloads instead of recursing forever.

273+

parent.child = child;

270274
271275

trace?.recordStage("prompt:images", {

272276

messages: [parent] as unknown as [],

Original file line numberDiff line numberDiff line change

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

1+

/** Tests SQLite-backed scoped agent cache entries and adapter ownership. */

12

import fs from "node:fs";

23

import os from "node:os";

34

import path from "node:path";

@@ -24,6 +25,8 @@ function createTempStateDir(): string {

2425

}

2526
2627

afterEach(() => {

28+

// SQLite handles are shared by state dir/agent id; close them so temp dirs can

29+

// be removed and tests cannot leak rows across cases.

2730

closeOpenClawAgentDatabasesForTest();

2831

closeOpenClawStateDatabaseForTest();

2932

});

@@ -231,6 +234,7 @@ describe("SQLite agent cache store", () => {

231234

database.db

232235

.prepare("update cache_entries set expires_at = ? where scope = ? and key = ?")

233236

.run(Number.MAX_SAFE_INTEGER, "runtime", "invalid");

237+

// Simulate a corrupted persisted timestamp that the public writer rejects.

234238
235239

expect(

236240

readSqliteAgentCacheEntry({

Original file line numberDiff line numberDiff line change

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

1+

/** Tests channel action discovery from plugin message-tool descriptors. */

12

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

23

import type { ChannelPlugin } from "../channels/plugins/types.js";

34

import type { OpenClawConfig } from "../config/config.js";

@@ -14,6 +15,8 @@ describe("channel tools", () => {

1415

const errorSpy = vi.spyOn(defaultRuntime, "error").mockImplementation(() => undefined);

1516
1617

beforeEach(() => {

18+

// A throwing plugin verifies discovery degrades and logs once instead of

19+

// making all channel tooling unavailable.

1720

const plugin: ChannelPlugin = {

1821

id: "test",

1922

meta: {

Original file line numberDiff line numberDiff line change

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

1+

/** Tests Chutes OAuth token exchange and refresh HTTP flows. */

12

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

23

import { withFetchPreconnect } from "../test-utils/fetch-mock.js";

34

import {

@@ -30,6 +31,8 @@ function expectRefreshedCredential(

3031

refreshed: Awaited<ReturnType<typeof refreshChutesTokens>>,

3132

now: number,

3233

) {

34+

// Refresh responses may omit refresh_token; the stored token remains valid and

35+

// expiry keeps the safety skew applied.

3336

expect(refreshed.access).toBe("at_new");

3437

expect(refreshed.refresh).toBe("rt_old");

3538

expect(refreshed.expires).toBe(now + 1800 * 1000 - 5 * 60 * 1000);

Original file line numberDiff line numberDiff line change

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

1+

/** Tests Chutes OAuth callback parsing and PKCE generation. */

12

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

23

import { generateChutesPkce, parseOAuthCallbackInput } from "./chutes-oauth.js";

34
Original file line numberDiff line numberDiff line change

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

1+

/** Tests CLI auth epoch stability across token refreshes and identity changes. */

12

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

23

import type { AuthProfileStore } from "./auth-profiles/types.js";

34

import {

@@ -15,6 +16,8 @@ describe("resolveCliAuthEpoch", () => {

1516

epoch: Awaited<ReturnType<typeof resolveCliAuthEpoch>>,

1617

label = "auth epoch",

1718

): asserts epoch is string {

19+

// Epochs are cache/session keys, so tests assert hash shape without caring

20+

// about the exact digest value.

1821

expect(typeof epoch, label).toBe("string");

1922

expect(epoch, label).toMatch(/^[a-f0-9]{64}$/);

2023

}