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

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
量子位
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
爱范儿
爱范儿
博客园 - 【当耐特】
Vercel News
Vercel News
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
F
Fortinet All Blogs
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
博客园 - 叶小钗
博客园_首页
V
Visual Studio Blog
宝玉的分享
宝玉的分享
B
Blog
MyScale Blog
MyScale Blog
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
V
V2EX

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
test: tighten extension helper assertions · openclaw/open...
steipete · 2026-05-08 · via Recent Commits to openclaw:main

@@ -8,6 +8,8 @@ import {

88

resolveCodexTrajectoryPointerFlags,

99

} from "./trajectory.js";

101011+

type CodexTrajectoryRecorder = NonNullable<ReturnType<typeof createCodexTrajectoryRecorder>>;

12+1113

const tempDirs: string[] = [];

12141315

function makeTempDir(): string {

@@ -22,6 +24,16 @@ afterEach(() => {

2224

}

2325

});

242627+

function expectTrajectoryRecorder(

28+

recorder: ReturnType<typeof createCodexTrajectoryRecorder>,

29+

): CodexTrajectoryRecorder {

30+

expect(recorder).toEqual(expect.objectContaining({ recordEvent: expect.any(Function) }));

31+

if (recorder === null) {

32+

throw new Error("Expected Codex trajectory recorder");

33+

}

34+

return recorder;

35+

}

36+2537

describe("Codex trajectory recorder", () => {

2638

it("keeps write flags usable when O_NOFOLLOW is unavailable", () => {

2739

const constants = {

@@ -52,13 +64,13 @@ describe("Codex trajectory recorder", () => {

5264

env: {},

5365

});

546655-

expect(recorder).not.toBeNull();

56-

recorder?.recordEvent("session.started", {

67+

const trajectoryRecorder = expectTrajectoryRecorder(recorder);

68+

trajectoryRecorder.recordEvent("session.started", {

5769

apiKey: "secret",

5870

headers: [{ name: "Authorization", value: "Bearer sk-test-secret-token" }],

5971

command: "curl -H 'Authorization: Bearer sk-other-secret-token'",

6072

});

61-

await recorder?.flush();

73+

await trajectoryRecorder.flush();

62746375

const filePath = path.join(tmpDir, "session.trajectory.jsonl");

6476

const content = fs.readFileSync(filePath, "utf8");

@@ -82,8 +94,9 @@ describe("Codex trajectory recorder", () => {

8294

env: { OPENCLAW_TRAJECTORY_DIR: tmpDir },

8395

});

849685-

recorder?.recordEvent("session.started");

86-

await recorder?.flush();

97+

const trajectoryRecorder = expectTrajectoryRecorder(recorder);

98+

trajectoryRecorder.recordEvent("session.started");

99+

await trajectoryRecorder.flush();

8710088101

expect(fs.existsSync(path.join(tmpDir, "___evil_session.jsonl"))).toBe(true);

89102

});

@@ -119,8 +132,9 @@ describe("Codex trajectory recorder", () => {

119132

env: {},

120133

});

121134122-

recorder?.recordEvent("session.started");

123-

await recorder?.flush();

135+

const trajectoryRecorder = expectTrajectoryRecorder(recorder);

136+

trajectoryRecorder.recordEvent("session.started");

137+

await trajectoryRecorder.flush();

124138125139

expect(fs.existsSync(path.join(targetDir, "session.trajectory.jsonl"))).toBe(false);

126140

});

@@ -137,12 +151,13 @@ describe("Codex trajectory recorder", () => {

137151

env: {},

138152

});

139153140-

recorder?.recordEvent("context.compiled", {

154+

const trajectoryRecorder = expectTrajectoryRecorder(recorder);

155+

trajectoryRecorder.recordEvent("context.compiled", {

141156

fields: Object.fromEntries(

142157

Array.from({ length: 100 }, (_, index) => [`field-${index}`, "x".repeat(3_000)]),

143158

),

144159

});

145-

await recorder?.flush();

160+

await trajectoryRecorder.flush();

146161147162

const parsed = JSON.parse(

148163

fs.readFileSync(path.join(tmpDir, "session.trajectory.jsonl"), "utf8"),