Skip to content

fix(ci): 修复 CI 红灯(残留校验路径漂移 + eval mypy 缺注解)#5

Merged
GOSICK-Angel merged 1 commit into
mainfrom
fix/ci-green
Jun 2, 2026
Merged

fix(ci): 修复 CI 红灯(残留校验路径漂移 + eval mypy 缺注解)#5
GOSICK-Angel merged 1 commit into
mainfrom
fix/ci-green

Conversation

@GOSICK-Angel

Copy link
Copy Markdown
Owner

背景

main CI 的 test job 在 Unit tests 步失败(py3.11/3.12 均挂),web-build/eval-tier1 本就 success。

根因与修复

直接失败:

  • tests/unit/test_cleanup_residue.py 的 P5-6 --no-tui 排除路径仍指向旧位置 doc/web-ui-redesign-handoff.md,而该冻结历史文档已移至 doc/modules/ 下 → 误报。更新排除路径到新位置。

被掩盖的下游失败(unit 步骤先挂,其后的 eval mypy/测试等步骤在 CI 中从未运行):

  • scripts/eval/_ast_equiv.pyimport tree_sitter 的内联 # type: ignore[import-not-found] 因新增的全局 tree_sitter.* mypy override 变冗余 → unused-ignore。移除内联 ignore(保留 # noqa: F401)。
  • tests/eval/unit/test_r2_meta.py / test_r2_sha_lock.py:strict 模式下缺 fixture / 嵌套函数注解(mocker / tmp_path / capsys / fake_git_run)。补全。

验证(本地全跑 CI test job 各步骤)

  • ruff + ruff format(src & eval)✅
  • mypy src(182 files)/ mypy eval(45 files)✅
  • unit:3275 passed,coverage 87.21%
  • eval unit+integration:315 passed,coverage 93.16%
  • hermetic 集成:49 passed
  • dataset locks / fork-name purity ✅

🤖 Generated with Claude Code

主因(CI 直接失败):
- test_cleanup_residue 的 --no-tui 排除路径仍指向旧位置
  doc/web-ui-redesign-handoff.md,该冻结历史文档已移至
  doc/modules/ 下,导致 P5-6 文档校验误报。更新排除路径。

被掩盖的下游失败(unit 步骤先挂导致后续步骤从未运行):
- _ast_equiv.py 的 import tree_sitter 内联 # type: ignore[import-not-found]
  因 pyproject 新增的 tree_sitter.* 全局 override 而冗余,触发 unused-ignore。
- test_r2_meta.py / test_r2_sha_lock.py 在 strict 模式下缺 fixture 与
  嵌套函数类型注解(mocker / tmp_path / capsys / fake_git_run)。

验证:ruff/mypy(src+eval) 全绿;unit 3275 passed(87%);
eval 315 passed(93%);hermetic 集成 49 passed。
@GOSICK-Angel GOSICK-Angel merged commit 873fe46 into main Jun 2, 2026
5 checks passed
@GOSICK-Angel GOSICK-Angel deleted the fix/ci-green branch June 2, 2026 03:21
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.

1 participant