fix(test/requirement-review): 杜绝 review_mode 写出 single_agent_serial 等非法值#58
Closed
fix(test/requirement-review): 杜绝 review_mode 写出 single_agent_serial 等非法值#58
Conversation
PHASES.md 5.2 chat 输出文案 '单 Agent 串行' 与 schema enum ['multi_perspective', 'single_agent'] 不一致,AI 在写 rr_summary.json 时直译 '串行' → 'serial' 拼出 single_agent_serial, 触发 contracts/rr-summary.schema.json 校验违规(非阻断但污染 output_data._schema_violations)。 修复: 1. 5.2 文案从 '单 Agent 串行' 改为 '单 Agent'(与 enum 对齐) 2. 5.1.5 约束清单补一条 review_mode 枚举说明 + 黑名单 single_agent_serial/serial 变体,与 verdict 同样的强制写法 实测案例:ai-case session 248 完成时触发该违规,verdict + 49 issues 均正常,仅 review_mode 字段被污染。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
requirement-reviewskill 的PHASES.md5.2 chat 输出文案使用 "单 Agent 串行",与contracts/rr-summary.schema.json中review_modeenum['multi_perspective', 'single_agent']不一致。AI 在写rr_summary.json时会直译"串行" →serial,拼出非法值single_agent_serial,触发 schema 校验违规。实测案例(ai-case 平台 session 248):
verdict / issue_count 等核心字段均正常,仅
review_mode被污染,会一直进output_data._schema_violations让前端 banner 显示违规数。Fix
PHASES.mdline 373 5.2 chat 输出模板:单 Agent 串行→单 Agent,与 enum 对齐PHASES.mdline 357 5.1.5 约束清单:补一条review_mode强制约束(与verdict/ 字段名黑名单同样的写法),明确禁止single_agent_serial/serial等变体不动 line 195 / 216 / 218 那些"流程方法"描述("4.1b 单 Agent 串行评审"作为章节名是合理的),AI 不会把章节名当 enum 值。
测试
下游 ai-case 仓库会 bump submodule version 引用本 PR 合并后的 commit。