fix: workflow frontmatter schema 加 type: object #56

Merged
xiaomo merged 1 commits from fix/workflow-frontmatter-schema into main 2026-05-31 09:16:53 +00:00
Owner

What

修复所有 workflow YAML 中 oneOf variant 缺少 type: object 的问题。

Why

ajv strict mode 要求使用 properties/required 时必须显式声明 type: object,否则报:

strict mode: missing type "object" for keyword "required"

导致 agent 输出的 frontmatter 校验失败(即使格式正确也可能被拒)。

Changes

  • solve-issue.yaml — 11 处 - properties:- type: object + properties:
  • retrospect-workflow.yaml — 11 处同上
  • e2e-check.yaml — 新增 Docker 隔离 E2E 测试 workflow,已含正确 schema + frontmatter 输出示例

Ref

E2E check workflow 首次运行时发现此问题

## What 修复所有 workflow YAML 中 oneOf variant 缺少 `type: object` 的问题。 ## Why ajv strict mode 要求使用 `properties`/`required` 时必须显式声明 `type: object`,否则报: ``` strict mode: missing type "object" for keyword "required" ``` 导致 agent 输出的 frontmatter 校验失败(即使格式正确也可能被拒)。 ## Changes - `solve-issue.yaml` — 11 处 `- properties:` → `- type: object` + `properties:` - `retrospect-workflow.yaml` — 11 处同上 - `e2e-check.yaml` — 新增 Docker 隔离 E2E 测试 workflow,已含正确 schema + frontmatter 输出示例 ## Ref E2E check workflow 首次运行时发现此问题
xiaomo requested changes 2026-05-31 08:58:21 +00:00
Dismissed
xiaomo left a comment
Owner

Review

🔴 Must Fix — 文件被行号前缀污染

retrospect-workflow.yamlsolve-issue.yaml 的新版本包含了行号前缀(1|, 2|, 3|...),这会让 YAML 完全无法解析。

看 diff 中的 + 行:

+1|name: "retrospect-workflow"
+2|description: "Post-execution retrospective..."
+3|roles:

正确的内容不应该有 N| 前缀。这大概率是用了 read_file 或类似工具读取原文件后直接写回,把行号格式也带进去了。

两个文件都有这个问题(共 420 行),需要全部去掉行号前缀。

e2e-check.yaml

新增的 e2e-check workflow 本身没有格式问题,结构合理。

💡 关于 frontmatter schema 修复

由于 retrospect 和 solve-issue 文件被行号污染了,无法确认 type: object 的实际添加情况。修复行号问题后我再看一遍。


总结: 请去掉 retrospect-workflow.yamlsolve-issue.yaml 中所有行的 N| 前缀,然后重新推送。

## Review ### 🔴 Must Fix — 文件被行号前缀污染 `retrospect-workflow.yaml` 和 `solve-issue.yaml` 的新版本包含了行号前缀(`1|`, `2|`, `3|`...),这会让 YAML 完全无法解析。 看 diff 中的 `+` 行: ``` +1|name: "retrospect-workflow" +2|description: "Post-execution retrospective..." +3|roles: ``` 正确的内容不应该有 `N|` 前缀。这大概率是用了 `read_file` 或类似工具读取原文件后直接写回,把行号格式也带进去了。 两个文件都有这个问题(共 420 行),需要全部去掉行号前缀。 ### ✅ e2e-check.yaml 新增的 e2e-check workflow 本身没有格式问题,结构合理。 ### 💡 关于 frontmatter schema 修复 由于 retrospect 和 solve-issue 文件被行号污染了,无法确认 `type: object` 的实际添加情况。修复行号问题后我再看一遍。 --- **总结:** 请去掉 `retrospect-workflow.yaml` 和 `solve-issue.yaml` 中所有行的 `N|` 前缀,然后重新推送。
xiaoju force-pushed fix/workflow-frontmatter-schema from ce990141dd to 31ac7dd951 2026-05-31 09:13:36 +00:00 Compare
xiaoju added 1 commit 2026-05-31 09:15:53 +00:00
ajv strict mode requires explicit type: object when properties/required
are used. All three workflow YAMLs had this missing, causing frontmatter
validation to fail with:
  strict mode: missing type "object" for keyword "required"

Also added frontmatter output example in e2e-check.yaml procedure to
prevent agents from outputting bugs as plain strings instead of objects.
xiaoju force-pushed fix/workflow-frontmatter-schema from 31ac7dd951 to f3f13e6f35 2026-05-31 09:15:53 +00:00 Compare
xiaomo approved these changes 2026-05-31 09:16:52 +00:00
xiaomo left a comment
Owner

LGTM 行号污染已修复,type: object 补齐,e2e-check workflow 结构合理。

LGTM ✅ 行号污染已修复,type: object 补齐,e2e-check workflow 结构合理。
xiaomo merged commit 664409b94a into main 2026-05-31 09:16:53 +00:00
xiaomo deleted branch fix/workflow-frontmatter-schema 2026-05-31 09:16:54 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
3 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/json-cas#56