Skip to content

fix(tests): mark injected Lark fixtures for lint - #7991

Merged
huangruiteng merged 1 commit into
mainfrom
codex/fix-lint-language-server-20261103
Nov 3, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/fix-lint-language-server-20261103

Conversation

@cocolord

@cocolord cocolord commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

CI note

  • windows-powershell fails on tests/control_plane/test_sqlite_authority_cli.py with the pre-existing non-POSIX private-capture refusal; fix(quota): omit private capture budget on unqualified hosts #7993 fixes the generated settlement command for that platform.
  • chat-bundle-browser (1) hit a research-display-language.mjs:146 keyboard-expansion timeout after a slower-than-usual run; the same scenario passed on the older M1 baseline and this PR only annotates two test signatures. It will be rerun.

The native-retention journeys added in #7986 request the imported
`language_server` pytest fixture by name, which ruff reports as F811.
Keep the fixture injection and annotate both journeys, matching the
existing imported-fixture convention in the test suite.

Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=max

动机 / Motivation

运行仓库静态检查的维护者,会在两个使用导入 fixture 的 Lark 测试签名上遇到 F811 错误。 原来 pytest 需要通过同名参数注入 language_server,Ruff 却将它报告为导入名称的重定义;现在只给这两个签名加精确注释,测试继续使用原 fixture。 已验证的结果是完整模块 lint 从两处 F811 失败变为通过,原来的十个恢复与失败场景仍全部通过。 本 PR 只修复测试标记,不修改产品逻辑、pytest 断言或全局 lint 规则,也不修复其他平台或浏览器失败。

改动思路 / Approach

这里的同名参数是 pytest 的 fixture 注入接口。删除参数或导入会破坏已有测试,扩大忽略规则又会隐藏其他错误。当前采用同文件已有的签名局部注释模式,既保留静态检查的其他规则,也保留真实 HTTP 边界与 Core 状态读回。没有引入新的 fixture、测试框架、配置或生产分支。

具体改动 / Changes

规范依据 CONTRIBUTING.md,固定版本 1dc98eb8739777a65102e18553658dc70e0f0044,映射现有 Fast loop and full check:按风险运行改动相关测试、lint 和原生 canary。本次已执行;完整测试模块的 AST 对比也用于确认断言没有被悄悄移除。

关键内容讲解

完整 diff 只有一个文件两行替换。全模块112个顶层函数的 AST 在 base/head 完全相同;两处新增注释只针对 F811,没有修改断言、装饰器、调用次数、恢复条件或 fixture 导入。单条提交的 DCO sign-off 已核对。

对主干的风险 / Risks

最大风险是用 lint 修复掩盖真实重定义或顺手削弱恢复测试。独立复现的 base 恰好只有这两处 F811;head 完整模块 Ruff PASS。相同两个测试节点的十个场景在 base/head 均 PASS,仍通过本地实际 HTTP 服务和合成 provider/Core 工作,没有付费模型或真实飞书消息。当前 premerge 的5项直接检查 PASS,目录未选择额外 smoke;CQR PASS。当前同作者批次还包含独立运行时修复 #7993,此处没有新建重复覆盖或一次性测试工件。未查询、轮询或等待 CI;PR 描述中的平台/浏览器失败仅作为未独立核验的诊断,不称为本 PR 已修复。

我的整体评价 / Verdict

未发现阻塞问题,APPROVE。长期工作路径与用户体验均判定 preserved:执行语句和恢复断言未变,产品操作没有新增配置或确认步骤。局部注释足以解决已复现的静态检查问题,当前范围不需要额外重构。只有测试注释变化,视觉评审不适用;完整套件、真实 provider 和 Windows/浏览器未资格化。源码、lint、测试与 CQR 的通过不授予合并权限。

English verdict: APPROVE at 8d0dca615b0c9095668e680f0937ace0bc3c79fb. Two precise lint annotations preserve the complete test AST and all ten exercised recovery cases.

@huangruiteng
huangruiteng merged commit 119331e into main Nov 3, 2026
25 of 34 checks passed
@huangruiteng
huangruiteng deleted the codex/fix-lint-language-server-20261103 branch November 3, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants