Repository navigation
test(ci): require retained-history projection delivery - #6826
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=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
维护者需要确认长历史任务不仅在权威存储里完成,还能在工作区实际读到完整结果;否则通过的测试和计时会掩盖仍 pending 的投影。
原先合成记录有规范 priority 字段却缺少原生作者入口会生成的 [Pn] 文本,测试只检查 canonical 完成,Markdown 因往返校验失败仍未交付;当前补齐合成输入,并要求普通、feature-off、研究关闭和幂等重放都读回正确的投影状态。
独立完整历史与相邻投影恢复两模块共 26 项通过;实际 File/SQLite 两份 Markdown 均包含已关闭的两项任务和 20,000 个唯一归档 ID。把 fixture 恢复成实际基线输入,新增断言会以 pending / todo_projection_render_rejected 失败。
本次只纠正一份验证 fixture 和其完成条件,不改变生产投影或优先级规则,不缩减原 20,000 条历史,也不提供完整关闭提速或科学收益结论。
完整 Ruff 仍有实际基线已存在的 checkpoint Path import F401;当前公开说明已更正此前误报的 lint 通过,required lint/quality 合并限制保留。托管全量、跨平台与成本资格仍开放,本机26项不是作者报告55项的重复宣称。
改动思路
把测试成功落在真实用户可读取的交付上。权威事务成功和 Markdown 展示成功是两个事实:旧 fixture 不符合现有优先级文本编码,生产 owner 正确拒绝往返不一致的投影,测试却只看 completed。当前修正合成输入,并通过既有 outbox 结果要求 delivered、parse_render_parity 与完整 population;重放还要是 current,不能再次执行业务操作或悄悄重写 provider。
这不是为让 renderer 通过而修改活动 Todo。只有尚未写入的合成 fixture 改成原生作者入口本来就产生的显示形式;生产 owner、严格校验和所有真实记录没有改。复用一个既有 helper 是适当的同域改进,独立反例证明新增完成条件有价值,不需要新层、抽象、安装或用户准备步骤。
具体改动
完整一份测试文件 +12/-3,保留原 20,000 条归档、File/SQLite、typed result、stale result、feature-off 和容量边界。独立依据为 55d6337485d4924f1cbb8b41e51a8c02687c332a 的 docs/development/good-smokes.md,并核对同一基线的既有 active-state projection contract:往返保留完整文本和优先级,display pending 不能充当交付,重放不是另一份权威。
- Start With The Contract:以原生作者输入和真实投影交付为 oracle,不把 completed 当成完整旅程。
- Review Checklist:通过真实 File/SQLite、lease、完成事务和物理 Markdown 验证,不靠字段形状或日志存在。
- Prefer Semantic Pressure:同一当前断言使用实际基线的 todo helper 会失败,独立读回确认修正后的确包含每一项历史。
关键代码讲解
todo 用传入 priority 生成同一个 [Pn] 显示;P1 研究项和普通 P2 不再在 codec 往返时冲突。
complete 保留原 lease 与 complete_goal_todo,新增 delivered/parity 检查同时覆盖普通和 feature-off。研究关闭继续要求 exact typed evidence、拒绝缺失及 stale result,再检查20002项 population、同一证据以及 provider revision 不变的 current 重放。这些断言没有把“归档很多”误写成接受研究结果的授权。
对主干的风险
独立执行完整 test_research_history_capacity 与相邻 test_todo_projection_recovery:Python3.13、两个 worker、coverage,26 passed、0 skipped,146.31s。本轮选择的相邻模块与作者报告55项的组合不同,不把作者数字当独立结果。原20k的File/SQLite关闭、feature-off不读损坏图、typed/stale结果拒绝、容量错误和原投影恢复场景均在实际本机路径上。
再从物理 File/SQLite Markdown 冷读:两份不同的文件各20002个唯一ID,其中20000个归档ID各一次,todo_plain与todo_joint均done,原Goal标题保留。初始 glob 把 pytest 的 current 符号链接重复算成第三份文件,已按物理路径去重;没有删除真实记录或把重复ID排除后宣称完整。另将实际基线 55d6337485d4924f1cbb8b41e51a8c02687c332a 的 todo helper 注入当前测试模块,生产代码和新断言保持原样,File正例准确以 pending≠delivered / todo_projection_render_rejected 失败;修正后的输入通过。这证明旧通过包含失败投影,不能作为完整关闭的性能基线。
完整配置 Ruff 在实际基线与当前 head 都失败于同一个未改文件 tests/control_plane/test_checkpoint_retention.py:4:21 的 Path F401,完整诊断逐字节相同。当前唯一修改是另一份 history 测试,整个生产与文档树相对基线未变; changed invariant 又有独立正反与读回证据,因此这项 pre-existing red 不构成本差异的代码阻塞,但 required lint/quality 合并 hold 必须保留。作者当前正文已经更正此前错记的绿结果;#6820/#6825 的 import 修复仍是待整合的独立提案,不能提前当成本 head 已修。
标准 premerge 五项直接、三项选中检查通过,无 manual hold;这不能豁免完整 Ruff。初始错误的测试入口确实零收集/exit5,随后更正并保留原输出,不当成产品失败或通过。本轮没有查询或等待CI,没有基于本机时长声称提速、根因或完整 hosted/跨平台资格。
我的整体评价
APPROVE,精确 head d8c6bbb62f037bc2979db75d96bbc36471ce2f96。当前差异没有新增阻塞发现:这个小提案修复了会掩盖真实未交付结果的测试漏洞,保留原生权威、反例和20k规模。与代码评审分开,当前必需 Ruff/quality 仍未过,不能自动合并;真实托管、完整成本与长期结果仍由原有任务验证,不新增形式化跟进或扩大运行时范围。
English verdict: APPROVE — d8c6bbb. Independent native history/recovery26 and physical File/SQLite readback verify both closed tasks plus20,000 unique archived records; the exact-base fixture triggers pending/render-rejected under the new assertion. Full Ruff retains the byte-identical pre-existing F401 in an untouched file, so required lint/quality merge holds remain. No performance, installed or hosted qualification is inferred.
The retained-history fixture supplied canonical priority fields without their compatible
[Pn]text display. Its closeout assertions could pass while Markdown delivery stayed pending with a parse/render parity failure.Seed the existing native authoring display and require ordinary, feature-off and research closeout to deliver the readable projection. The research case also checks complete population and that an idempotent retry reads an already-current projection. The original 20,000 archived records, real File/SQLite backends, typed-result rejection and capacity checks remain covered.
Validation at
d8c6bbb62f037bc2979db75d96bbc36471ce2f96:pending/todo_projection_render_rejected.pathlib.Pathimport intests/control_plane/test_checkpoint_retention.py:4. The earlier passing lint/quality claim was incorrect: the preserved local log already contained this failure. The natural hosted kernel check independently reports the same failure (job). The existing separate proposal test(ci): repair disposable fixtures and stale contract assertions #6820 removes that import; it is still open. The exact-scope quality record now records a failing required validator, and local premerge does not waive this hold.This one-file test correction qualifies the actual local closeout journey. The earlier passing case included failed projection work and is not a valid complete-journey performance baseline. Full hosted CI and critical-path cost qualification remain open; the change makes no speedup claim.