Files
Nexus/docs/changelog/2026-06-08-server-ids-batch-max-2000.md
T
Nexus Agent a401ea5a4d fix(servers): server_ids 批量上限 2000 并修复列表 422 中文
全选 101 台批量操作不再因 max_length=50 被拒;Pydantic 列表 too_long 错误显示完整中文。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 15:08:03 +08:00

28 lines
847 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 批量 server_ids 上限与 422 列表错误中文
**日期**2026-06-08
## 变更摘要
- `BatchAgentAction` / `ServerCheck` / `BatchCategoryUpdate``server_ids` 上限由 50/200 统一为 **2000**(与推送/脚本一致)。
- 修复 Pydantic `too_long` 列表错误翻译残缺(「最多 50 项s after validation, not 101」→「最多 50 项,当前 101 项」)。
## 动机
全选筛选 101 台批量操作时触发 422;错误文案中英混杂。
## 涉及文件
- `server/api/schemas.py``SERVER_IDS_BATCH_MAX`
- `server/utils/validation_errors_zh.py``too_long`/`too_short` + ctx
- `tests/test_validation_errors_zh.py` · `tests/test_security_unit.py`
## 迁移 / 重启
后端部署即可。
## 验证
- 101 台 `POST /servers/batch/detect-path` 应 200 入队
- 2001 台应 422 且 msg 为纯中文