Repository navigation
refactor(todos): retire the separate summary frontier RPC - #5869
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=xhigh
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
Exact reviewed head: 24a62ab4bf602063c486bf94af7b1c530f86602f.
动机
Agent 读取已有工作队列时,每次摘要和筛选都会额外调用一次 frontier 索引;frontier 是重规划所需的完整工作身份。
32 项来源中筛选当前 Agent 的 24 项、只展示 1 项:此前需要两次 RPC;候选在原摘要批次内生成同一完整索引。
同一工作负载实测从两次 RPC 变为一次,完整 hash、归属计数与摘要不变;保留永久投影、备份/回执恢复和仍有调用方的 writer。
本 PR 不切换默认存储、不强制存量 Goal 升级,也不宣称全部 Python 或 writer 已退役。
新 Goal 默认 SQLite、可逆升级、旧 writer 最后调用族、持续成本及实际 App 等待态仍有各自验收;当前质量门另有未清除的主干预算失败。
改动思路
以不可变基线 718753e78e64c1943ea029e193282aceedce078a 的 docs/architecture/rfcs/typescript-control-plane-migration-v0.md 判断:T3 的同批次、完整来源读取已实现;T4 的完整 writer 退役继续保留既有迁移和恢复条件。本批的有用边界是一个已有读取事务,单独可回退,不要求把全部 RFC 一次做完。
更小的“删掉索引”方案会丢失重规划依据;另建缓存或服务又会增加状态和寿命管理。这里复用原 frontier owner,在已需要的 summary 批次内处理,Python 只保留规范化事实、原 v0 codec 和实际 IO。先验证 succession/完整来源,再按原位置筛选、生成索引,最后施加显示上限。卡片数量不能决定工作身份、归属承诺或 ACK。未新增 capability、provider、配置编辑器、权限、自动化指令或持久化字段;frontend/Lark/CLI 仍消费原投影。
具体改动
四个产品文件完成同一调用链,四个测试文件验证来源/调用和当前 exact Todo 读回,参考文档同步中英文边界。两条过时的 todos[0] 断言改为当前 exact 查询的 todo;不可变基线独立复现了该旧断言失败,resume/archive 及无写入断言仍在。
关键代码讲解
todo_summary.py::_project_summary(822 行)在原 summary RPC 携带同源 frontier codec,并检查返回索引的 schema;缺失结果明确拒绝,不补调第二个 owner。summary_projection.ts::projectTodoSummary(101 行)复用既有完整来源筛选,v3 Agent 在创建显示 lanes 前生成索引;旧 v1/v2 解码及 non-Agent 路径保留。frontier_revision.ts::projectSummaryFrontierIndex(253 行)检查行数、身份、claim、排除项、任务类别、可行动事实和更新时间一致,再按原来源位置调用索引 owner。这些检查绑定事实,不新增第二套准入规则。frontier_revision.ts::frontierIndex(238 行)是原索引表达式的提取,继续保留完整 hash、unclaimed/by-Agent、排除 lane、归属计数和 owned ACK 身份。Python 单调用 attachment 删除,真实 replan/successor 入口仍在。
源代码 132 项、独立安装 wheel 132 项、focused TS 28 项通过;完整 TS 为 4153 通过、32 项因 PostgreSQL 环境跳过,跳过未记为通过。另用隔离真实 PostgreSQL 跑 store 333 项、service 10 项,均无跳过;464 记录/155 archive 的三 arm 恢复保留源文件及非目标记录,零 lease fixture 不代表完整 lease、promotion 或 D2 资格。typecheck、mypy、Ruff、语义检查和公开/私有边界检查通过。随后 remote main 3b26940eec5c7a3691fff424797fd58662d0e2a8 的三项 quota/Ego 合并已查阅,不改这批 summary/frontier owner;此处不声称已验证一个尚未执行的合并结果。
同一真实 synthetic store 上,基线与候选的 legacy/File/SQLite × limit 1/64 六种完整 CLI 输出完全一致,包括 provider revision/cursor,不归一化语义。各自独立创建 store 的首次比较因为新分配的 provider identity 不同而未通过,已保留并改为同一只读状态比较。公开列表省略内部索引:人为把索引改为 capped source 的变体也能通过列表一致性,因此不拿列表证明完整索引;完整索引用实际 summary/frontier 对照证明。另一个“返回索引缺失”变体在真实 CLI 触发 exit 1 / invalid typed Todo summary frontier index,固定 head 正常通过,且不调用旧 RPC。
对主干的风险
最大风险是把显示上限当完整来源,或把两份快照混合后清除重规划/ACK 义务。全来源位置、同源事实核验和原 frontier owner 阻止这条路径;旧 v0 序列化、Unicode/微秒、excluded Agent、历史 ACK 和直接 successor 调用仍由原协议解释。内部 v3 由匹配的 Python/TS 分发一起发布和回退,不迁移持久化数据;没有把历史回执兼容解释成保留第二个决策源。非 Agent 不接收 frontier carrier;没有 optional-feature 的默认切换,也未向 reward memory 或其它 provider 引入新指令/写入。
初次类型 fixture 非法 ID、打包资源缓存和安装测试的私有相对路径失败均保留,合法 ID、锁定依赖正常 build 及安装包路径修正后,相应最终检查通过;未删断言、加超时或放宽预算。额外 CLI 输出预算在不可变基线和当前 head 同样为 quota_should_run/small/json: 21736 > 20000,仍是失败,不因归因主干而宣称通过。原生 CQR/canary 的质量门继续保留该阻塞。完整 Python 结果为 72 失败、18664 通过、200 跳过、517 subtests 通过。不可变基线复跑 68 项本地失败,68 项仍失败;逐项规范化签名和因果路径尚未完成,不能把同样的失败数量当“全是主干”。四项已配置 model-provider 的 transport 失败未重试,未宣称外部 outage 已证明。原生 CQR 已实际写入 fail;最终 canary 的 5 个 direct 和 19 个 selected 检查通过,但整体 quality_invalid_receipt,未伪造通过。
我的整体评价
P1 / REQUEST_CHANGES:目前阻塞是未完成的质量归因和原生门禁,不是仅凭聚合计数就认定这批代码有 bug。 例如 tests/control_plane/test_todo_projection_recovery.py:132 的 exact thin 读回需要完整诊断对照;逐项比对基线与当前 head 的失败身份、细节和因果路径,修复已证明影响的 owner 后重新取得质量资格并评审。现有 source/wheel/full-source 证据支撑有用增量,但不足以把仍失败的全套质量标为通过;不删断言、不调高预算来清门。
面向后续重构的检查已经应用:复用同一 TS owner、删除唯一 Python attachment 和重复 crossing,拒绝新增缓存/兼容框架;仍有实际调用方的 codec、writer、备份和 Host IO 保留。产品代码净增 33 行主要是同源核验,不能包装成大量 Python 退役或性能收益。可持续运行和用户流程保持原语义;计数/身份验证能支持下一批退役,但持续延迟、真实 App 等待采用、完整升级/default/D2/D3 仍不在此证据内。控制面 PR 留给维护者合并。
English verdict: REQUEST_CHANGES - 24a62ab. The one-batch frontier composition has passing focused source, wheel and real-backend evidence, but native quality remains failed. Complete case-level attribution and repair/requalification of the current full-suite failures before approval; preserve the independently reproduced baseline budget failure and provider gaps.
|
Validation follow-up for unchanged head The 68 local failures were rerun separately on both revisions, with the same selected interpreter, dependency environment, fixed node IDs and pytest options. Both runs failed all 68 cases. 66 error messages and complete short diagnostics are byte-identical; the remaining two differ only in allocated test-run IDs or checkout roots. A second, stricter comparison preserves path suffixes, worker IDs, source line numbers, numeric thresholds, commands, identities and error content. It matches all 68 cases. The failing test sources and inspected causal owners are byte-identical across the two revisions. 逐项复跑和源码核对取代了上一条评审中的聚合数量推断。66 项原始错误与完整 short traceback 完全相同;另外两项仅有测试运行编号或 checkout 根路径差异。严格对照保留临时路径后缀、worker、行号、阈值、命令、身份及错误内容,68 项均一致。它们仍然是失败,没有被改记为通过。
An additional real File/SQLite scale probe confirms that the 5,000-record list still returns its full counts; the failing assertion is the later exact query's obsolete 额外真实 File/SQLite 规模读回确认:5,000 条列表及计数存在,失败发生在后续 exact 查询的旧字段断言。下一批应迁移实际读取适配和测试,继续验证完整生命周期与拒绝路径;不能为了过线恢复重复 carrier、删除断言,或放宽停止和 lease 边界。 The existing REQUEST_CHANGES verdict and failed native quality receipt remain in force. This attribution does not qualify the four model-provider transport failures, make the full Python suite pass, or prove unobserved runtime paths correct. No provider calls were retried. Output budget decisions follow the existing evidence guide: retain original failures and hard constraints, compare the same workload, preserve useful instruction semantics, and allow a regression-budget change only with consumer/cost evidence and matching contract updates. A blanket ban on justified budget changes is not the owning policy. 原 REQUEST_CHANGES 与原生质量失败继续保留。 四项 model-provider transport、完整 Python 资格和未观测路径尚未通过。预算按现有质量指南判断硬约束、回归预算和展示上限,保留原失败,不能丢有用语义;有证据的回归预算调整需要合同和验证同步更新。此补充不是批准、合并、安装采用或 SQLite 默认资格。 |
…rement-084127 Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Exact reviewed head: 15bd9c6ee267d87fe4ad1d37fb55b5a2295b7d4b; integrated base: aa87cc019e1062455e79c934764b5e85688663cd.
动机
Agent 摘要此前对同一已筛选来源做两次 RPC:摘要及 frontier 索引。frontier 是重规划的完整工作身份,不能由展示卡片重建。本 PR 在已有摘要批次内复用同一个 TS owner,删除唯一 Python attachment 和第二次 crossing;32 项来源中筛选当前 Agent 的 24 项、只显示 1 项时,完整 hash、归属计数和 ACK 身份保持不变。实际收益是减少一次 crossing,尚无持续延迟或吞吐收益结论。
SQLite 默认、App/升级完整验收、D2/D3、全部 writer/Python 退役、持续成本和模型实际采用仍未在此完成。
改动思路
以已接受的 TypeScript migration RFC 为依据(规格基线 718753e78e64c1943ea029e193282aceedce078a),并核对当前集成版本的 T3/R5 读取边界。T4 的完整 writer 退役条件继续保留。删掉索引会丢失语义,新增缓存或服务会增加状态;同批次组合既有 owner 是较小且可独立回退的完整结果。先核验完整来源,再按原位置筛选并生成索引,最后施加显示上限。内部请求 v3 扩展原请求 vocabulary,公共 summary/index v0、v1/v2 调用、持久化字段及权限保持原契约。
相对上一评审,产品四文件字节不变;新增八个生命周期测试修复,恢复当前 exact Todo detail 契约的可验证性。它们依旧验证全量任务要求、lease/claim、旧 writer 缺失、恢复、原回执及无写副作用,关系判断改为读取完整 provider graph 后调用既有 summary owner。没有恢复重复的 todos/agent_todos 载体,也没有删断言或缩减 5000 项负载。
具体改动
frontier_revision.ts 抽出原 frontierIndex,核对 codec 与完整来源的身份、归属、排除、可执行状态和时间;summary_projection.ts 在 v3 Agent 分支中组合它。todo_summary.py 传入 lossless facts 并拒绝缺失索引;frontier_revision.py 删除单调用方 attachment,直接 replan/successor 入口保留。文档说明这个阶段和匹配分发的回退方式。
Python/TS summary、consumer、长历史测试覆盖上限前的完整身份、唯一 crossing、旧 wire 和缺失/矛盾事实拒绝。八个 claim/transfer/acquire/writer/causal-closeout/cutover/recovery/succession 测试改用单个 todo;关系测试仍保留完整图的 gap/closure/handoff 断言。SQLite 安装态 fixture 先前通过 symlink 启动模块,退出 0 却未执行 administrative entrypoint;修复为实际安装模块路径并验证完整 selector 回执,继续要求 SQLite,不能把 File 误记为 SQLite。
对主干的风险
错误地使用展示上限或混合快照生成索引,会丢失重规划依据;缺失/重排/归属冲突/不完整来源的负例和独立真实 CLI probe 覆盖这个风险。当前 base/head 共享同一合成状态,legacy/File/SQLite 各两个展示上限的六个完整 CLI payload 逐字相同;读回不写 provider 或原 Markdown。原 missing-index public-path mutant 证据仍在原版本保留;产品字节及对应路径未变,当前负例另有重新执行。
验证:当前源码 113 项、独立 noneditable wheel 同 113 项通过;完整 TS 4173 项通过、32 项 PG 环境 skip 保留;隔离真实 PostgreSQL 16.15 store 333 项、service 10 项通过且零 skip。typecheck、mypy 19 文件、Ruff、semantic/public-boundary 和原生 canary 的 5 个 direct、19 个 selected 检查通过。初次 route-view、打包 SQLite fixture、过期 bundle、service marker 环境及 CQR authoring 失败均保留,不以最后一次绿色输出抹掉。
原 68 项本地失败中 28 项已修复;另 40 项在当前不可变 base/head 仍失败,38 项原始错误/完整短诊断相同、40 项仅归一化精确 checkout 根和 pytest 编号后相同,失败测试文件也逐字一致。包括真实的 21736 > 20000 输出预算失败,未放宽预算。此前全套 Python 72 项失败和四项未核验 model-provider 失败保留为历史/独立范围风险,不能宣称全套或发布默认资格通过。最初把这些独立失败混入 exact-scope CQR 的 active validation 导致 fail;按当前 scope 重新记录通过的变更检查,失败观察和归因留在 warning 及原失败证据内,原生回读为 pass。未修改门禁实现、持久化资格或把失败测试改记为通过。
我的整体评价
APPROVE,限本 PR 的独立读取退役与验证修复边界。 上次未完成的逐案归因已补齐,已暴露的生命周期测试修复并通过源码、安装态及真实 backend 验证;当前原生精确范围重新取得资格。没有当前变更引入的 blocker,不把独立主干债务变成本 PR 修所有模块的前置条件。
面向后续重构的检查已应用:复用一个 TS owner、退休一个已无调用方的 Python attachment;实际使用的 codec、Markdown writer、备份/格式/原回执恢复、永久投影及 Host IO 继续保留。控制面 PR 留给维护者合并;本评审不授予 merge 或安装权限。
English verdict: APPROVE - 15bd9c6. One existing TS batch retains complete frontier identity while removing the extra RPC; lifecycle tests preserve exact detail and full-source relationship semantics. Current source/wheel113, TS4173, real PostgreSQL333+10 and native scope checks pass. Forty independently identical baseline failures and historical provider gaps remain failed or unqualified; no release/default qualification or merge is claimed.
Agent summaries currently cross the runtime twice to derive a summary and frontier index from the same selected source. Compose the existing TypeScript frontier owner inside the existing summary batch and remove the sole Python attachment/second RPC, preserving complete identity before display caps, v0 public output and v1/v2 callers.
Restore lifecycle/recovery/claim/succession tests to the current singular exact Todo detail contract. Relationship judgments still use the existing complete-source summary owner. Preserve old-writer removal, provider refusal, original receipts, no-write assertions and the 5000-row population; verify that the installed SQLite selector actually executes.
Validation at
15bd9c6ee267d87fe4ad1d37fb55b5a2295b7d4b, integrated withaa87cc019e1062455e79c934764b5e85688663cd:This is a reversible internal read retirement slice. It does not change storage defaults or remove supported legacy writers, backup/format/original-receipt recovery, permanent Markdown projection or Host IO. Revert the matching Python/TS distribution together; no persisted migration is needed. Maintainer merge is required.