chore: disable model download e2e tests in CI and freeze model command logic - #165
Conversation
…d logic Comment out the model download e2e block in __tests__/e2e/ci-mac-linux.sh, which was the only place GitHub Actions exercised model downloads (invoked by ci_node16.yaml on the macOS and Linux jobs). It covered deploy_and_test_model.py across NAS and OSS storage, plus the `s model download` / `s model remove` flow via __tests__/e2e/model/s_file.yaml. The `cd model` / `cd ..` pair is commented together so the working directory stays correct for the `test go runtime` block that follows. Also record two constraints in CLAUDE.md: - The `model` command logic is frozen. src/subCommands/model/ and src/commands-help/model.ts are read-only for future iterations: no refactors, renames, or restructuring, and no indirect behavior changes through shared helpers. - The e2e block stays commented out, and the __tests__/e2e/model/ fixtures are kept in the repo for manual runs. Unit tests under __tests__/ut/commands/model*.ts and artModelService_test.ts are fully mocked (no real downloads) and remain enabled in `npm test`.
📝 WalkthroughWalkthroughThe repository now documents restrictions on model command changes and keeps model-download fixtures and mocked unit tests maintained. The macOS and Linux E2E script skips the model download workflow. ChangesModel command protection
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 markdownlint-cli2 (0.23.2)CLAUDE.mdmarkdownlint-cli2 v0.23.2 (markdownlint v0.41.1) 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)
__tests__/e2e/ci-mac-linux.sh (1)
33-55: 🩺 Stability & Availability | 🔵 TrivialKeep a manual or scheduled model E2E validation path.
The change correctly prevents this block from running in CI. It removes automated coverage for the NAS/OSS download and
s_file.yamlflow shown in__tests__/e2e/model/test.py. Keep a documented manual or scheduled validation path for this flow while the CI block remains disabled.This recommendation is based on the PR objective and the retained workflow in
__tests__/e2e/model/test.py.🤖 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 `@__tests__/e2e/ci-mac-linux.sh` around lines 33 - 55, The disabled model-download CI block removes automated coverage without preserving another validation path. Keep the block disabled, but add a documented manual or scheduled validation path that runs the NAS/OSS and s_file.yaml flows exercised by deploy_and_test_model.py and test.py, without modifying the model command logic.
🤖 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 `@__tests__/e2e/ci-mac-linux.sh`:
- Around line 33-55: The disabled model-download CI block removes automated
coverage without preserving another validation path. Keep the block disabled,
but add a documented manual or scheduled validation path that runs the NAS/OSS
and s_file.yaml flows exercised by deploy_and_test_model.py and test.py, without
modifying the model command logic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3f05c37f-9bb0-493e-bc0a-0b0cbac1b634
📒 Files selected for processing (2)
CLAUDE.md__tests__/e2e/ci-mac-linux.sh
背景
GitHub Actions 中的 model 下载测试耗时长且依赖云端资源,现予以禁用。同时明确
model指令逻辑在后续迭代中不得修改。改动内容
1. 禁用 CI 中的 model 下载 e2e 测试
注释掉
__tests__/e2e/ci-mac-linux.sh中的 model 下载测试块——这是 GitHub Actions 里唯一真正执行 model 下载的地方,由ci_node16.yaml的 macOS 和 Linux 两个 job 调用。覆盖范围包括:deploy_and_test_model.py(NAS 与 OSS 两种存储,各两个 model)__tests__/e2e/model/s_file.yaml的s model download/s deploy/s model remove流程cd model与cd ..成对注释,保证后续test go runtime块的工作目录正确;bash -n语法检查通过。其余 CI 入口已确认无 model 相关测试:
ci-windows.ps1、ci.sh、ci_trigger.sh、ci_with_docker_linux.yaml。2. CLAUDE.md 新增 Constraints 章节
model指令逻辑冻结:src/subCommands/model/与src/commands-help/model.ts对后续迭代只读,禁止重构、重命名、调整结构(含纯样式与 lint 驱动的改动),也不得通过共享 helper 间接改变其行为。唯一例外是用户明确提出的针对性修改要求。__tests__/e2e/model/下的 fixture 保留以便手动执行,不要删除。影响范围
__tests__/ut/commands/model_test.ts、model_utils_test.ts、modelService_test.ts、artModelService_test.ts均为全 mock 单测,不走真实网络请求,继续在npm test中运行。__tests__/e2e/model/下的 fixture 现已不被 CI 引用,有意保留用于手动验证。测试计划
bash -n __tests__/e2e/ci-mac-linux.sh语法检查通过npx prettier --check CLAUDE.md格式检查通过Summary by CodeRabbit
Documentation
Tests