Repository navigation
fix(todos): align succession warnings with ordinary continuation - #5784
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=xhigh
English verdict: APPROVE - exact head 092d153743f4f8d60b7d892c870c4f8822cc1446; ordinary completion guidance is coherent, true succession diagnostics and terminal gates remain intact.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval). No blocking finding.
动机
运行普通 Todo 完成的用户和代理会在交付通过验证后读到相互冲突的继续与终结建议。 此前同一完成回执保留 Goal,却收到补建后继或终结的摘要;现在先复核剩余授权验收与可执行任务,继续已有工作或按当前契约重规划。 真实 File/SQLite 普通完成仍保留后继缺口,CLI 与 quota 读回共享新的继续引导,未产生额外任务或终态写入。 本 PR 不关闭 Goal、不改变重规划或结算门禁,也不证明本机 App 已采用等待退避或全部迁移退役完成。 实际 host 等待退避、默认迁移与最后调用族退役仍需各自独立验收。
Ordinary completion should let remaining authorized work continue. A missing lineage edge is useful evidence, but an unconditional terminal command is not the same decision. This fixes that reader-facing conflict through one existing owner.
改动思路
先保留真实缺口,再修正摘要把诊断翻译成终态操作的错误。只改 Python 一处字符串仍留下逐项提示和另一处构造;删除缺口或调整重规划门禁则会掩盖真实收尾风险。当前完整来源图先由既有 typed succession 校验,TS summary 在同一个 gap 分支生成已有 warning;Python 只 materialize 原索引、格式化 items 并复用 advice。没有新增 RPC、手动同步状态、配置、模块或决策 owner,legacy display fallback 仅指向当前契约。已检查原生 CLI 与打包入口,现有 Chat/Lark 操作身份及设置不需要伴随新增界面。
具体改动
关键代码讲解
projectTodoSummary 在177行之后保留完整来源 gap count、选取及 cap,生成同一个 todo_succession_warning_v0 的 schema/reason/count 与继续建议。_project_summary 在929行校验返回 advice,将它复用到 gap item,最后附上 materialized items;compact_evaluated_todo_group 的重复 Python payload 构造被删除。build_todo_succession_warning_lanes 保留传入提示及计数,仅把旧 display-only fallback 改为复核当前契约。三份现有测试覆盖 v1/v2、完整来源过滤/cap、实际 File/SQLite ordinary complete/list/quota、原 lease/validator 拒绝及同 Turn replay。
规范依据为 docs/reference/canonical-terminal-review.md,固定修订 ac2262a61d21cf89b7f737931e61f178e2bec12d。active_goal 要求普通完成不造虚假后继:基线真实 File/SQLite 均到达已验证普通完成后,独立新 oracle 恰在旧 terminal advice 上失败;候选源码和安装态通过。in_flight_continuation 保留未交付工作 open:本次没有改变它或伪造完成。completion_turn 要求 exact actor/lease/declaration/original receipt、写回与一次扣额:原重试、失败与终态验收都保留;lower bilingual docs 只把最终 no-follow-up 写为当前契约允许时的条件步骤。
对主干的风险
最强反例是新提示掩盖真实缺口或让普通完成绕过终态门禁。实际 base/head 用相同来源、空前沿、已有独立 open work、明确最终态和 cap0/1/12 比较,全部非 advice 字段相等;旧引用、缺失/self/archived/inferred successor、5000项实际 provider 读回及不完整来源仍守住计数与证明。原生完成/list/quota 读回未增加任务、重跑 validator 或重复 spend,非法 lease 和失败 validator 仍拒绝。三个生产文件中的机制仅为共享投影归属和 display materialization,现有图与 effect authority 未扩展。
142项源码 Python、26项源码目录外全新 wheel 检查通过,包内 Python/TS hash 与候选一致,真实 File/SQLite/CLI 没有 mock 掉被验收行为。TS typecheck、仓库配置 mypy19文件、语义 drift、公开边界及精确 diff CQR 通过。首轮 wheel 因陈旧 Chat 资产拒绝,按声明 build 后重构 wheel 通过;失败保留。首轮完整 TS 为4093通过、1个 NoKV读取子进程90秒超时、31跳过;原 oracle 独立 base/head 各2项通过,约3.5/3秒;相同并发及限时的最终完整套件4094通过、0失败、31跳过。没有提高限时、删除断言或把旧原因说成已修复;host contention 仅为未证明假设。31个 skip 不认证,live App waiting/backoff 不由 synthetic wheel 代替。当前契约 wait_for_ci=false,没有读取或等待远端 CI。
语义与 CI 对齐
既有 warning vocabulary、reason 和 typed graph owner 复用,没有新 enum、protocol 或 prose classifier;diff advisory 无支持的新词汇候选,不能据此推断动态语义等价,完整 drift 与真实路径仍已验证。warning 是复核引导,原空前沿 replan、lease、validator、写回及扣额义务没有被称为可忽略建议。默认提示调整已在双语文档及 PR 披露,未宣称 opt-in。#5768 的 replan guidance 与这次摘要 producer 不同;当前 main 新 manager-context 变更不触及该 owner。
我的整体评价
这是 justified_increment:long_horizon 为 improved,消除普通阶段完成后导致虚假 lineage 或提前终态的重复建议;user_experience 为 improved,保留最短合法普通命令与原验证证据,读回提示统一,无新增必填信息或操作。相邻的有界简化已落实为 TS 共享 owner 和 Python 重复构造退役;8个既有文件+106/-24,无新 module、生成资产或扩展框架。下一步由 maintainer 审核采用当前 runtime head;既有 scheduler owner 继续真实 host backoff 验收,retirement 工作按最后调用方独立推进。本评审不关闭 Goal,也不赋予合并权限。
The bounded change improves continuation without erasing genuine gaps. Current complete validation and independent baseline/head counterexamples support this exact head; skipped/live-host qualifications and the historical timeout remain explicit limitations.
Ordinary validated Todo completion retains
active_goal, but succession summaries still instructed callers to run terminal--no-follow-upor create a successor. That guidance can turn a legitimate lineage diagnostic into an unnecessary stop or fabricated task.The existing TypeScript summary owner now produces continuation-aware warning metadata and advice. Python materializes the same advice and items; duplicated warning assembly is removed. Review remaining authorized Goal acceptance and the runnable frontier, continue existing work or replan while scope remains, and reserve final closeout for the current settlement contract. Genuine gap counts, graph validation, empty-frontier replan, validator/lease gates and terminal proofs are unchanged. Bilingual terminal documentation makes final closeout conditional.
Validation: 142 source Python cases; 26 cases against a fresh wheel outside the checkout, including real File/SQLite completion, replay and negative lease/validator paths; TS typecheck and repository-configured mypy; semantic drift and public-boundary checks. Installed Python/TS module hashes match the candidate. The initial wheel build rejected stale Chat assets; rebuilding the declared Chat bundle and wheel passed. An initial full TS run had 4093 passes, one 90s NoKV consumer subprocess timeout and 31 skips. The unchanged original consumer oracle passes independently on both baseline and candidate (two cases each); the final complete run passed with 4094 passes, zero failures and 31 skips without parallel qualification workloads. The failure is retained and no timeout or expected result is relaxed.
This changes shared read guidance, with no new CLI operation, configuration, frontend/Lark action or persisted state. It does not settle the Goal, certify host backoff adoption, or complete provider/default/retirement qualification. Runtime/control-plane merge remains with the maintainer. Related #5768 addresses replan guidance; this PR fixes the separate summary warning producer and lower settlement documentation.