Repository navigation
test(chat): keep the attached-conversation cases lint-clean - #7293
huangruiteng merged 1 commit into
Conversation
`kernel-static-checks` runs ruff over `tests`, and five one-line statements in this module trip E701/E702. Because `checks` requires that lane and `pytest`/`stage2c-correctness-e2e`/`merge-gate` require `checks`, the whole required set is red on main. Split the statements; fixtures, requests and assertions are unchanged. Verified with ruff 0.15.22 over the CI lint scope, the stage2c dependency lock and top-level module budget invariants, and this file (64 passed). Signed-off-by: Jiaqiiii523 <293262669+Jiaqiiii523@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 · max
APPROVE — 精确提交 cb2e4c67e10a7383ff07602fbe8fa4960722caae,未发现阻塞问题。
动机
维护测试和提交 PR 的开发者需要在不改变会话隔离、拒绝和重试断言的情况下通过仓库的静态检查。 原文件的五处单行复合语句使完整 Ruff 命令固定报 E701/E702;拆成多行后,该命令通过,原有测试行为保持。 完整静态检查恢复通过,原有会话身份、拒绝及重试断言保持。
本次只修测试代码格式,不改产品逻辑、权限、测试规则、fixture 或断言,也不据此声称其他 PR 的验证已经通过。 这是可以独立交付的维护修复,无需等待包含相同格式调整的较大功能 PR。
改动思路
继续使用已有 HTTP、SQLite/JSONL 和临时 Desktop 协议 peer 夹具,只把五处复合语句拆开。生产会话、权限及重试判断仍由原 owner 负责。直接改成多行已经足够,引入格式辅助函数或重写相关测试会增加无关风险。
具体改动
完整差异只有 tests/presentation/test_codex_attached_conversation.py,+10/-5。第48行开始的既有用例仍验证注册身份、原会话和 Goal 生命周期;第81行开始的既有用例仍逐一覆盖未注册、已停止、不同工作目录及外部 Goal 的拒绝路径。
同一基线 a9a720db5ef77f52ac9a3c1e59be7df324149aa6 与本 head 的整文件 AST 完全相同,包含 180 个断言节点;请求、fixture、字符串、分支和断言没有改变。没有新增 smoke、重复覆盖或产品代码。当前作者的30项上限 all-state PR 查询只返回这一个 PR,未发现同形批量提交。
规范依据是修改前的 CONTRIBUTING.md,版本 a9a720d:Find Work 允许具备具体缺口和验收的独立维护 PR;Fast loop and full check 要求采用受影响测试及仓库原生验证。本次两项均满足。
对主干的风险
主要风险是拆行时缩进错误,使某个身份变化不再受原条件控制。完整 AST 对照排除了这种变化,原有正反例也全部保留。独立执行结果如下:
- 相同完整 Ruff 命令:基线 5 项 E701/E702 失败,当前 head 通过,未修改 lint 规则或排除项。
- 原会话文件、依赖锁和根模块预算测试:71 passed。
- standard premerge:5 项直接检查通过,0 项选中 canary、0 个 manual hold;没有把“未选中”记成额外测试通过。
- 精确 scope 质量凭证:PASS
cqr_09fbcaf53ee06f5e615c。
这些结果证明这次格式修复,不证明所有其他改动或远端工作流均已通过;本轮按配置未查询、轮询或等待 CI。原有本地测试使用临时服务与合成会话,不代表真实账户或模型运行验收。
我的整体评价
相同不可变基线与当前提交的完整 AST 相同,180 个断言节点保留;71 项相关测试通过,完整 Ruff 由五项失败变为通过。 本次格式维护目标已完成,长期工作与用户交互语义保持;没有增加配置、确认或恢复步骤。没有需要清理的新状态、协议或兼容分支,进一步抽象没有收益。
改动仅在测试文件,已检查真实 HTTP 测试入口与其调用关系,没有修改渲染页面、控件或布局,因此视觉审阅不适用。 未验证范围:无新增视觉范围;未执行安装态 App。
English verdict: APPROVE — cb2e4c67e10a7383ff07602fbe8fa4960722caae. Five formatting violations are removed; the entire AST and180 assertions are unchanged. The full Ruff command,71 existing tests and the five direct premerge checks pass. No product behavior or authority change is introduced.
Summary
tests/presentation/test_codex_attached_conversation.py(E701/E702).Why
The required
kernel-static-checkslane runs:With the declared range
ruff>=0.12,<0.16(0.15.22 today), this file reports five E701/E702 errors, so the lane fails on every push tomain.checksrequires that lane, andpytest,stage2c-correctness-e2eandmerge-gaterequire those, so the whole required set is red for every PR based onmain.Formatting only: no fixture, request or assertion changes.
Verification
ruff check tests loopx/canary loopx/control_plane loopx/domain_packs loopx/presentation-> All checks passedpytest -q tests/test_stage2c_dependency_lock.py tests/architecture/test_top_level_module_budget.py-> 7 passedpytest -q tests/presentation/test_codex_attached_conversation.py-> 64 passedNotes
maincan go green independently; if perf(quota): compact shared packets and preserve replan context #7285 lands first this becomes a trivial no-op rebase.