Skip to content

chore: disable model download e2e tests in CI and freeze model command logic - #165

Merged
rsonghuster merged 1 commit into
masterfrom
chore/disable-model-download-e2e
Aug 12, 2026
Merged

chore: disable model download e2e tests in CI and freeze model command logic#165
rsonghuster merged 1 commit into
masterfrom
chore/disable-model-download-e2e

Conversation

@rsonghuster

@rsonghuster rsonghuster commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

背景

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.yamls model download / s deploy / s model remove 流程

cd modelcd .. 成对注释,保证后续 test go runtime 块的工作目录正确;bash -n 语法检查通过。

其余 CI 入口已确认无 model 相关测试:ci-windows.ps1ci.shci_trigger.shci_with_docker_linux.yaml

2. CLAUDE.md 新增 Constraints 章节

  • model 指令逻辑冻结src/subCommands/model/src/commands-help/model.ts 对后续迭代只读,禁止重构、重命名、调整结构(含纯样式与 lint 驱动的改动),也不得通过共享 helper 间接改变其行为。唯一例外是用户明确提出的针对性修改要求。
  • e2e 测试保持禁用:未经明确要求不得重新启用;__tests__/e2e/model/ 下的 fixture 保留以便手动执行,不要删除。

影响范围

  • __tests__/ut/commands/model_test.tsmodel_utils_test.tsmodelService_test.tsartModelService_test.ts 均为全 mock 单测,不走真实网络请求,继续在 npm test 中运行
  • __tests__/e2e/model/ 下的 fixture 现已不被 CI 引用,有意保留用于手动验证。

测试计划

  • bash -n __tests__/e2e/ci-mac-linux.sh 语法检查通过
  • npx prettier --check CLAUDE.md 格式检查通过
  • CI 通过(确认 e2e 跳过 model 段后剩余步骤正常,工作目录未错位)

Summary by CodeRabbit

  • Documentation

    • Added guidance describing protected model command logic and restrictions for related tests and fixtures.
  • Tests

    • Disabled model-download end-to-end tests in macOS and Linux CI.
    • Added a skip message while retaining the test logic for future use.

…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`.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

Model command protection

Layer / File(s) Summary
Constraints and CI workflow
CLAUDE.md, __tests__/e2e/ci-mac-linux.sh
The repository documents protected model command logic and related test policies. The CI script comments out model download operations and prints skip test model download.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes both main changes: disabling model download E2E tests in CI and freezing model command logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/disable-model-download-e2e

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.md

markdownlint-cli2 v0.23.2 (markdownlint v0.41.1)
[Error: ENOENT: no such file or directory, open '/markdownlint-config-ali'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/markdownlint-config-ali'
}


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
__tests__/e2e/ci-mac-linux.sh (1)

33-55: 🩺 Stability & Availability | 🔵 Trivial

Keep 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.yaml flow 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

📥 Commits

Reviewing files that changed from the base of the PR and between bdc911b and 76d56ec.

📒 Files selected for processing (2)
  • CLAUDE.md
  • __tests__/e2e/ci-mac-linux.sh

@rsonghuster
rsonghuster merged commit bac46d9 into master Aug 12, 2026
6 checks passed
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