0b2d7ac50d
脚本 exec 立即返回 running 并在后台跑批次;/ws/alerts 推送 script_progress/complete; 新增 ScriptRunsPage、Telegram 汇总通知与可配置的浏览器完成提示音。 Co-authored-by: Cursor <cursoragent@cursor.com>
1.7 KiB
1.7 KiB
脚本执行看板 — 本地验证报告(2026-06-08)
环境
- 主机:
127.0.0.1:8600(bash scripts/start-dev.sh) - MySQL / Redis:Docker
nexus-mysql-1/nexus-redis-1 - 凭据:
.env中NEXUS_TEST_ADMIN_*已与本地admins表对齐(用户提供的本地密码)
结果摘要
| 检查项 | 结果 |
|---|---|
bash scripts/local_verify.sh(完整) |
通过 |
| smoke:MySQL schema + 47 unit tests | 通过 |
tests/test_api.py |
26/26 |
| ruff F | 通过 |
| 脚本相关 pytest(15 条) | 通过 |
local_verify 明细
═══ All local checks passed ═══
GET /health→ 200POST /api/auth/login→ 200(JWT 获取成功)- Scripts CRUD:
POST/GET/DELETE /api/scripts/均通过 - 其余 Server / Schedules / Settings / Audit / Retries / Sync 端点均通过
脚本专项 pytest
.venv/bin/pytest tests/test_script_execution_progress_stats.py \
tests/test_script_execution_progress.py \
tests/test_exec_detail_grouping.py \
tests/test_script_dispatch.py -q
# 15 passed
异步执行(设计验收)
test_api 已覆盖 Scripts 创建/列表/删除;结合 P0 实现,POST /api/scripts/exec 在代码审查路径上为「创建记录后立即返回 running + 后台 asyncio 任务」。
建议终验(浏览器,需用户):
- 脚本库选多台子机执行 → 1s 内关对话框,顶栏进度条更新
#/script-runs/{id}查看失败明细与分组- 完成时 Alert + 提示音;Telegram 仅汇总(若已配置 bot)
未在本报告执行的项
- 生产
deploy/pre_deploy_check.sh+ 部署 - 366 台规模压测
- Playwright 浏览器自动化