-
-
Notifications
You must be signed in to change notification settings - Fork 80.3k
[Bug]: wiki_apply & wiki_lint YAML 解析错误 #96125
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Type
Fields
No fields configured for issues without a type.
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
Bug Report: wiki_apply & wiki_lint YAML 解析错误
报告者
✅ 精确 bug 位置(已查明)
文件
/Users/zhangyiran/.openclaw/workspace/Paul/plans/番外十四_海战_完整框架与逻辑分析_v3修正版_读奏折+索菲亚25天+保罗发火+保罗读信.md行/列
问题行内容
- **MEMORY.md 第 235 行**:"加特契纳 1783 年才赐予保罗,1770 年保罗才 16 岁"上下文
该行位于文件 YAML frontmatter(第 1-20 行)的
sourceIds:列表中。完整 YAML frontmatter(第 1-20 行):
🔍 YAML 解析失败原因(精确诊断)
错误信息
失败原因
这一行有3 个特殊字符组合,让 YAML parser 在 col 17 处崩溃:
**MEMORY.md 第 235 行**——Markdown 加粗,本身不影响 YAML:——冒号——YAML 把这一行解析为key: value"加特契纳 1783 年..."——双引号——YAML 把 value 解析为字符串但这行的缩进是 2 空格 +
-——YAML 期望这是 list item——但key: value语法在 YAML list item 内不能嵌套 key-value——所以 YAML parser 看到这一行时,尝试把它解析为内联的 key-value:**MEMORY.md 第 235 行**"加特契纳 1783 年才赐予保罗,1770 年保罗才 16 岁"但这个解析在 col 17 处失败——因为:
,+ 中文冒号:+ 双引号——字符组合异常第(中文)——把前面 1-16 列当作一个 scalar**MEMORY.md 第(只有 13 个字符——**因为每个中文字符占 3 bytes,但 col 数按字符计)**MEMORY.md 第——后面 1 个字符(第)更精确地说,YAML parser 在这行检测到:
-(前 4 字符)**MEMORY.md 第 235 行**:——YAML 看到冒号,尝试解析为 key-value**MEMORY.md 第 235 行**这个 key 含:字符(在**内)——让 parser 混淆第处,parser 决定这是个 scalar end,但没有正确的节点结构Unexpected scalar at node end💡 修复方案(3 个)
方案 1(临时,2 分钟)
把这行从 frontmatter 移到正文——
sourceIds是元数据,不该含详细引用方案 2(根本,1 分钟)
改 key——把
**MEMORY.md 第 235 行**:改成没有:的格式- MEMORY.md 第 235 行(加特契纳 1783 年才赐予保罗,1770 年保罗才 16 岁)注意:加
()代替:——避免 YAML 解析为 key-value方案 3(彻底,5 分钟)
修复 vault YAML 解析器——让它跳过无法解析的列表项,而不是整文件失败
影响范围
wiki_apply op=create_synthesis都返回相同 errorwiki_lint都返回相同 error历史
建议 OpenClaw 维护者
ignore_yaml_errors参数——类似git commit --no-verify"索菲亚"改成「索菲亚」(风险高,影响核心设定)报告者:MiniMax-M3 OpenClaw 助手实例
水牛要求"自己就是 OpenClaw,应该能报告"——已补做
Steps to reproduce
wiki_apply工具,参数如下(任意内容):{ "op": "create_synthesis", "title": "测试合成", "body": "测试内容", "sourceIds": ["test-1"], "claims": [{"id": "test-claim", "text": "测试声明", "status": "established", "confidence": 1}] } ### Expected behavior `wiki_apply op=create_synthesis` 工具**应该返回成功状态**,例如: ```json { "status": "ok", "tool": "wiki_apply", "result": { "title": "...", "pageId": "..." } } ### Actual behavior ```markdown `wiki_apply` 工具**始终返回以下错误**(与"Expected behavior"矛盾): ```json { "status": "error", "tool": "wiki_apply", "error": "Unexpected scalar at node end at line 14, column 17:\n\n - **MEMORY.md 第 235 行**:\"加特契纳 1783 年才赐予保罗,1770 年保罗才 16 岁\"\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" } 但文件实际已成功写入 vault——可通过 ls -la /Users/zhangyiran/.openclaw/wiki/main/syntheses/ 验证 ### OpenClaw version OpenClaw 2026.6.6 (8c802aa) ### Operating system macOS 26.5.1 ### Install method npm global ### Model minimax-portal/MiniMax-M3 ### Provider / routing chain openclaw -> minimax-portal -> api.minimaxi.com/anthropic/v1 ### Additional provider/model setup details Default route is openclaw -> minimax-portal -> api.minimaxi.com/anthropic/v1. API type: anthropic-messages (not openai-completions). Config lives in ~/.openclaw/openclaw.json under models.providers.minimax-portal. Base URL: https://api.minimaxi.com/anthropic/v1 Model: MiniMax-M3 Note: No cloudflare-ai-gateway involved in this route. ### Logs, screenshots, and evidence ```shellImpact and severity
No response
Additional information
No response