Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,33 @@ See `docs/architecture.md` for detailed diagrams.
- Logs command: multi-topic search (FCLogs + FCInstanceEvents) for --instance-id, SLS field-specific query syntax
- `skill` command: install/update the bundled `s-fc3` skill into agent tools (claude/codex/cursor/qoder/agents), global or project scope; local operation, no credentials

## Constraints

### `model` Command — Frozen Logic (DO NOT MODIFY)

**The logic of the `model` command must not be changed in any future iteration.**

Frozen scope (read-only for all subsequent work):

| Path | Contents |
| ---- | -------- |
| `src/subCommands/model/` | `model.ts`, `index.ts`, `fileManager.ts`, `constants.ts`, `utils/` |
| `src/commands-help/model.ts` | `model` command help text |

Rules:

- Do **not** refactor, rename, restructure, or "improve" anything under the frozen scope — not even style-only or lint-driven edits.
- Do **not** change `model` behavior indirectly via shared helpers it depends on. If a shared change is unavoidable, verify `model` behavior is bit-for-bit unchanged and call it out explicitly in the PR.
- Only exception: an explicit, targeted request from the user to change `model`. Absent that, treat the code as frozen.

### Model Download E2E Tests — Disabled in CI

The model download e2e block in `__tests__/e2e/ci-mac-linux.sh` is commented out, so GitHub Actions no longer runs it. It covered `deploy_and_test_model.py` (NAS + OSS storage) and the `s model download` / `s model remove` flow via `__tests__/e2e/model/s_file.yaml`.

- Keep it commented out. Do not re-enable it without an explicit request.
- The `__tests__/e2e/model/` fixtures stay in the repo for manual runs — do not delete them.
- Unit tests under `__tests__/ut/commands/model_test.ts`, `model_utils_test.ts`, `modelService_test.ts`, and `artModelService_test.ts` are fully mocked (no real downloads) and **remain enabled** in `npm test`.

## Development Workflow

1. Create branch from `master`
Expand Down
43 changes: 23 additions & 20 deletions __tests__/e2e/ci-mac-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,29 @@ else
fi


echo "test model download"
cd model
pip install -r requirements.txt
export fc_component_function_name=model-$(uname)-$(uname -m)-$RANDSTR-$RANDOM
python -u deploy_and_test_model.py --model-id iic/cv_LightweightEdge_ocr-recognitoin-general_damo --region cn-shanghai --auto-cleanup
sleep 10
python -u deploy_and_test_model.py --model-id Qwen/Qwen2.5-0.5B-Instruct --region cn-shanghai --auto-cleanup
sleep 10
python -u deploy_and_test_model.py --model-id iic/cv_LightweightEdge_ocr-recognitoin-general_damo --region cn-shanghai --storage oss --auto-cleanup
sleep 10
python -u deploy_and_test_model.py --model-id Qwen/Qwen2.5-0.5B-Instruct --region cn-shanghai --storage oss --auto-cleanup

sleep 10
echo "test model s_file.yaml"
# python -u test.py
s model download -t s_file.yaml
s deploy -y -t s_file.yaml --skip-push
s model remove -t s_file.yaml
s remove -y -t s_file.yaml
cd ..
# NOTE: model download e2e tests are temporarily disabled in CI (see CLAUDE.md).
# The `model` command logic itself MUST NOT be modified — only this CI invocation is commented out.
# echo "test model download"
# cd model
# pip install -r requirements.txt
# export fc_component_function_name=model-$(uname)-$(uname -m)-$RANDSTR-$RANDOM
# python -u deploy_and_test_model.py --model-id iic/cv_LightweightEdge_ocr-recognitoin-general_damo --region cn-shanghai --auto-cleanup
# sleep 10
# python -u deploy_and_test_model.py --model-id Qwen/Qwen2.5-0.5B-Instruct --region cn-shanghai --auto-cleanup
# sleep 10
# python -u deploy_and_test_model.py --model-id iic/cv_LightweightEdge_ocr-recognitoin-general_damo --region cn-shanghai --storage oss --auto-cleanup
# sleep 10
# python -u deploy_and_test_model.py --model-id Qwen/Qwen2.5-0.5B-Instruct --region cn-shanghai --storage oss --auto-cleanup
#
# sleep 10
# echo "test model s_file.yaml"
# # python -u test.py
# s model download -t s_file.yaml
# s deploy -y -t s_file.yaml --skip-push
# s model remove -t s_file.yaml
# s remove -y -t s_file.yaml
# cd ..
echo "skip test model download"

echo "test go runtime"
cd go
Expand Down
Loading