You need to sign in before continuing.

Commit 89482e7c2435ecd5eeb7bcec1c48fb4b1ed313fe

Authored by bboonnee
1 parent 82368fc6

docs: record 3 fresh real repros of the benchmark/test_script narration bug

Found during Phase 1 real end-to-end verification (2026-08-12): 3
independent real runs, 3 different goals, all hit the same known,
unrelated-to-Phase-1 issue -- a self-planned benchmark/test_script node's
own judgment rejecting narrative summaries, exhausting loop_back's
max_attempts. One of the three ran against the real production
backend_server after the FK migration fix (bd1404d), confirming the new
Phase 1 status machine routes the failure correctly (blocked_pending_human
with a real diagnostic trail) even when the underlying pre-existing bug
fires before planner_reviewer is ever reached.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
docs/todo/validator-test-script-narrative-output-issue.md
1 1 # test_script 节点偶发输出叙述文字而非代码——问题记录(Planner + Validator 都会中招)
2 2  
3   -**日期**: 2026-08-07(最后更新 2026-08-08)
  3 +**日期**: 2026-08-07(最后更新 2026-08-12)
4 4 **性质**: 问题记录——源于真实生产复现,根因已定位(§6),已落地两轮缓解(§7/§8),结构性修复推迟到另一份文档(见时间线第 6 轮)。
5 5 **状态**: 根因已定位。当前生产状态:test_script/validator_test_script 节点已禁用(§8),`_NARRATION_RETRY_HINT` 缓解代码保留但当前不会触发(§7)。**结构性修复不在本文档范围**——已并入 `docs/todo/org-graph-unification-and-universal-self-planning-requirements.md` Phase 2(FR-2/FR-3,Coder 接入自规划时一并处理,该文档非目标 §5.2 记录了这条已知复发风险)。
6 6  
... ... @@ -14,6 +14,7 @@
14 14 | 4 | 08-08 | 用户决策:`work-graph-self-planning-and-loop-back` 上线后 test_script 重新开放给 Planner 自由规划,**不等结构性修复**——复发风险已知且被接受。 |
15 15 | 5 | 08-08 | **真实复现,推翻第 3 轮判断**:任务 `2084590a` 的 `benchmark` 节点(不是 test_script)连续 4 次输出叙述文字(详见 §1 末尾),LLM judge 第 3 次已精确诊断出问题但未能强制拦住,第 4 次原样复现,`loop_back` 耗尽后 `blocked_pending_human`。触发条件改判为"这次任务需不需要模型先探索真实代码",不是"节点类型是不是 test_script"——benchmark 也没有类似 `check_script_compiles` 的机械拦截网,只能靠 LLM judge 自己识别,识别到不等于能强制拦住。 |
16 16 | 6 | 08-08 | 结构性修复的落脚点确定为 `org-graph-unification-and-universal-self-planning-requirements.md` Phase 2——该文档非目标 §5.2 已记录这条已知风险,要求 Phase 2 落地时专门验证是否复现。 |
  17 +| 7 | 08-12 | **Phase 1 真实端到端验证期间三次独立复现,进一步坐实第 5 轮的判断**:验证 `org-graph-unification-phase1-review-gate-design.md` 落地效果时,`run_end_to_end()` 走完整 Planner 自规划链路,连续 3 次真实运行、3 个不同 goal,全部撞上同一类失败——(a) "add(a,b) 求和" goal:`benchmark_add` 节点 `loop_back` 耗尽 `max_attempts=2`;(b) "shout(s) 转大写" goal:`test_script_shout` 节点同样耗尽 `max_attempts=2`;(c) 接入真实生产 backend_server(重启后,见 `bd1404d` 的 FK 迁移修复)、走真实 API 创建的 "reverse_words(s)" goal(task `b4892aae-8a44-4a33-a53e-7521838baef5`):`benchmark` 节点连续两轮被 judge 拒绝("material given is a narrative summary of scenario categories and counts... rather than actual scenario content with real input/expected-output pairs"),第二轮的 judge 反馈甚至精确指出"this same narrative-summary content class was already rejected once before for this goal",`loop_back` 仍然原样复现,最终 `task.status` correctly 落到 `blocked_pending_human`(`blocked_reason='prd_consistency_check_failed'`,走的是既有 `ConsistencyCheckFailedError` 路由,不是 Phase 1 新增的 `planner_review_loop_limit_reached`——因为失败发生在 `plan_documents()` 内部,`planner_reviewer` 本身根本没被触发到)。三次复现全部跟 Phase 1 本身的改动无关(`plan_documents()` 是既有代码,未改动),但确认了第 5 轮"触发条件是'任务需不需要模型先给出可判定的具体场景',不是'节点类型是不是 test_script'"的判断——即使是"实现一个纯函数+单测"这种几乎不需要探索真实代码的极简 goal,也会被诱导成"叙述场景类别和数量的总结"而不是"具体输入输出对"。3 个新任务里,(a)(b) 是本地临时仓库,(c) 是真实生产 task(保留在 `~/.graphlemon/graphlemon.db` 里未清理,供后续复核)。 |
17 18  
18 19 后续讨论方向记在 `docs/todo/org-graph-unification-and-universal-self-planning-requirements.md`(原草案 `org-graph-as-work-graph-unified-loop-requirements.md` 已并入此文档并删除)——包括要不要给 benchmark 也加一个类似的启发式机械检查、以及要不要在 Coder 开始实现之前对 Planner 产出多一道独立复核(后者已在该文档 Phase 1 SDD `docs/done/org-graph-unification-phase1-review-gate-design.md` 落地为具体设计)。
19 20  
... ...