test: 归一测试树(主仓 tests/ -> zzz-od-test/test/)+ entry 文档告知 - #2439
Conversation
…入 path Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…I 删 PYTHONPATH env(用 pyproject pythonpath) Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…sts->test 笔误 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
📝 WalkthroughWalkthrough该 PR 将测试代码统一迁移至独立仓库 zzz-od-test/test/,删除主仓多个测试文件(含 GPU 推理、屏幕匹配、后端 HTTP/MCP、Git 同步进度等测试),通过 pyproject.toml 新增 pytest pythonpath 配置取代 CI 环境变量方式,并更新相关文档说明。 Changes测试仓迁移与配置
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
AGENTS.md (1)
17-17: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win把这条测试仓说明收敛到工具专属文档。
AGENTS.md作为跨工具统一源,最好只保留各工具都适用的硬约束;这里的Read/grep和.gitignore说明更偏 Claude Code 行为,放在docs/develop/setup/ai_coding.md就够了,避免共享入口里混入工具细节。Based on learnings:AGENTS.md需要保持“纯指令、单一信息源”,工具特有内容应留在对应入口文件。♻️ 建议调整
- 所有测试统一在独立仓 `zzz-od-test/test/`(`.gitignore`,须 clone 到仓库根目录才能读/改;clone 见 [quickstart §②](docs/develop/setup/quickstart.md),测试规范见 [agent_guidelines](docs/develop/spec/agent_guidelines.md))。主仓不保留测试。AI 查测试用 `Read`/`grep` 显式指定 `zzz-od-test/`(默认搜索会跳过 .gitignore)。 + 所有测试统一在独立仓 `zzz-od-test/test/`;主仓不保留测试。更细的工具发现规则放到 `docs/develop/setup/ai_coding.md`。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@AGENTS.md` at line 17, Move the testing-repo and tool-specific lookup guidance out of AGENTS.md and into the tool-specific documentation entry in docs/develop/setup/ai_coding.md. Keep AGENTS.md as a shared, tool-agnostic source of hard requirements only, and preserve any references to zzz-od-test/test, clone/setup, and test rules in the dedicated ai_coding.md document instead.Source: Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@AGENTS.md`:
- Line 17: Move the testing-repo and tool-specific lookup guidance out of
AGENTS.md and into the tool-specific documentation entry in
docs/develop/setup/ai_coding.md. Keep AGENTS.md as a shared, tool-agnostic
source of hard requirements only, and preserve any references to
zzz-od-test/test, clone/setup, and test rules in the dedicated ai_coding.md
document instead.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d5e38e4f-0d75-439d-b7ec-3197d53b0f12
📒 Files selected for processing (17)
.github/workflows/test-check.ymlAGENTS.mddocs/develop/setup/ai_coding.mddocs/develop/spec/agent_guidelines.mdpyproject.tomltests/one_dragon/base/matcher/ocr/ocr_utilss/test_match_word_list_by_priority.pytests/one_dragon/base/screen/test_screen_match.pytests/one_dragon/envs/test_git_service.pytests/one_dragon/test_code_sync_progress.pytests/one_dragon/test_gpu_inference_serialization.pytests/zzz_od/auto_battle/test_cv_timeout_control.pytests/zzz_od/backend/test_backend_context.pytests/zzz_od/backend/test_entry_server.pytests/zzz_od/backend/test_http_routes.pytests/zzz_od/backend/test_mcp_app.pytests/zzz_od/backend/test_schemas.pytools/manual_verification.py
💤 Files with no reviewable changes (12)
- tests/one_dragon/base/matcher/ocr/ocr_utilss/test_match_word_list_by_priority.py
- tests/one_dragon/test_gpu_inference_serialization.py
- tests/zzz_od/backend/test_entry_server.py
- tests/zzz_od/backend/test_schemas.py
- tests/zzz_od/backend/test_http_routes.py
- tests/one_dragon/envs/test_git_service.py
- .github/workflows/test-check.yml
- tests/one_dragon/test_code_sync_progress.py
- tests/zzz_od/auto_battle/test_cv_timeout_control.py
- tests/zzz_od/backend/test_backend_context.py
- tests/zzz_od/backend/test_mcp_app.py
- tests/one_dragon/base/screen/test_screen_match.py
背景
两痛点:① 主仓
tests/+zzz-od-test/test/两套测试树,放哪说不清;② gitignore 的zzz-od-test被 AI 工具默认忽略。放弃 submodule(破坏 fork-aware CI),改归一测试树 + entry 文档告知。改动(主仓)
pyproject加[tool.pytest.ini_options] pythonpath=['src'](@a71b42fa)tests/整目录 + CI 删PYTHONPATHenv(pythonpath 接管) +manual_verification移tools/(@df22146d)AGENTS/ai_coding/agent_guidelines告知测试仓 + 修tests/->test/笔误(@3bf05508)配套
zzz-od-test同名分支unify-test-tree含搬迁的 11 测试 + 修 7 预存失败(git_service/code_sync API 漂移) + 合并本地backend/run-status-schema的 backend 用例。fork-aware CI(test-check.yml:38)拉同名分支。验证
uv run pytest zzz-od-test/collect 145 无 ImportError;backend 72 passed🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores
pytest自动识别src/路径。