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

推荐订阅源

M
MIT News - Artificial intelligence
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
阮一峰的网络日志
阮一峰的网络日志
月光博客
月光博客
博客园 - Franky
腾讯CDC
T
Tailwind CSS Blog
Recent Announcements
Recent Announcements
V
V2EX
N
Netflix TechBlog - Medium
量子位
Jina AI
Jina AI
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
爱范儿
爱范儿
博客园 - 叶小钗
D
Docker
MongoDB | Blog
MongoDB | Blog
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss

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: clarify oc-path malformed assertions · openclaw/ope...
steipete · 2026-05-08 · via Recent Commits to openclaw:main

@@ -23,7 +23,10 @@ describe("wave-11 malformed-input", () => {

2323

});

24242525

it("M-03 only `---` (single fence, no content)", () => {

26-

expect(() => parseMd("---\n")).not.toThrow();

26+

const { ast, diagnostics } = parseMd("---\n");

27+

expect(diagnostics.map((diagnostic) => diagnostic.code)).toContain("OC_FRONTMATTER_UNCLOSED");

28+

expect(ast.frontmatter).toEqual([]);

29+

expect(ast.preamble).toBe("---\n");

2730

});

28312932

it("M-04 only `---\\n---`", () => {

@@ -33,7 +36,9 @@ describe("wave-11 malformed-input", () => {

33363437

it("M-05 binary-ish bytes (non-ASCII control chars)", () => {

3538

const raw = "## H\n\x00\x01\x02\n";

36-

expect(() => parseMd(raw)).not.toThrow();

39+

const { ast, diagnostics } = parseMd(raw);

40+

expect(diagnostics).toEqual([]);

41+

expect(ast.blocks[0]?.bodyText).toBe("\x00\x01\x02\n");

3742

});

38433944

it("M-06 very long single line (10k chars)", () => {

@@ -60,17 +65,20 @@ describe("wave-11 malformed-input", () => {

60656166

it("M-09 unclosed code fence", () => {

6267

const raw = "## H\n```\nbody\n";

63-

expect(() => parseMd(raw)).not.toThrow();

68+

const { ast } = parseMd(raw);

69+

expect(ast.blocks[0]?.bodyText).toBe("```\nbody\n");

6470

});

65716672

it("M-10 mismatched fence (open with ``` close with ~~~)", () => {

6773

const raw = "## H\n```\nbody\n~~~\n";

68-

expect(() => parseMd(raw)).not.toThrow();

74+

const { ast } = parseMd(raw);

75+

expect(ast.blocks[0]?.bodyText).toBe("```\nbody\n~~~\n");

6976

});

70777178

it("M-11 nested fences (treated linearly, not nested)", () => {

7279

const raw = "## H\n```\n```\nstill-in-second\n```\n";

73-

expect(() => parseMd(raw)).not.toThrow();

80+

const { ast } = parseMd(raw);

81+

expect(ast.blocks[0]?.bodyText).toBe("```\n```\nstill-in-second\n```\n");

7482

});

75837684

it("M-12 empty file", () => {

@@ -94,7 +102,8 @@ describe("wave-11 malformed-input", () => {

9410295103

it("M-15 file with mixed indentation extremes (tabs, spaces, mixed)", () => {

96104

const raw = "## H\n\t- tabbed\n - spaced\n\t - mixed\n";

97-

expect(() => parseMd(raw)).not.toThrow();

105+

const { ast } = parseMd(raw);

106+

expect(ast.blocks[0]?.bodyText).toBe("\t- tabbed\n - spaced\n\t - mixed\n");

98107

});

99108100109

it("M-16 frontmatter with frontmatter-shaped content inside (---)", () => {

@@ -119,7 +128,10 @@ describe("wave-11 malformed-input", () => {

119128

});

120129121130

it("M-19 file with just whitespace", () => {

122-

expect(() => parseMd(" \n\t\n \n")).not.toThrow();

131+

const { ast, diagnostics } = parseMd(" \n\t\n \n");

132+

expect(diagnostics).toEqual([]);

133+

expect(ast.preamble).toBe(" \n\t\n \n");

134+

expect(ast.blocks).toEqual([]);

123135

});

124136125137

it("M-20 file with only BOM", () => {

@@ -129,16 +141,18 @@ describe("wave-11 malformed-input", () => {

129141130142

it("M-21 file mixing BOM + frontmatter + body + sections", () => {

131143

const raw = "---\nk: v\n---\n\nbody\n## Section\n- item\n";

132-

expect(() => parseMd(raw)).not.toThrow();

133144

const { ast } = parseMd(raw);

134145

expect(ast.frontmatter[0]?.value).toBe("v");

135146

expect(ast.blocks[0]?.heading).toBe("Section");

147+

expect(ast.blocks[0]?.items[0]?.text).toBe("item");

136148

});

137149138150

it("M-22 line endings: legacy CR-only (Mac classic)", () => {

139151

// Our regex /\r?\n/ doesn't split on CR-only. Treats whole as one line.

140152

const raw = "line1\rline2\r## Heading\r";

141-

expect(() => parseMd(raw)).not.toThrow();

153+

const { ast } = parseMd(raw);

154+

expect(ast.preamble).toBe(raw);

155+

expect(ast.blocks).toEqual([]);

142156

});

143157144158

it("M-23 100 KB file", () => {

@@ -150,6 +164,9 @@ describe("wave-11 malformed-input", () => {

150164

}

151165

}

152166

const raw = lines.join("\n");

153-

expect(() => parseMd(raw)).not.toThrow();

167+

const { ast, diagnostics } = parseMd(raw);

168+

expect(diagnostics).toEqual([]);

169+

expect(ast.blocks).toHaveLength(1000);

170+

expect(ast.blocks[999]?.items).toHaveLength(5);

154171

});

155172

});