Files
Nexus/docs/reports/2026-06-12-watch-slot-monitoring-patrol.md
2026-07-08 22:31:31 +08:00

3.4 KiB
Raw Permalink Blame History

巡检 — 监测槽开关 / 8h·24h / 暂停占槽 / 探针修复

日期2026-06-12
范围:工作区未提交改动(监测槽增强 + parse_error 修复 + 中文错误)
生产https://api.synaglobal.vip尚未部署本批改动

进度条

步骤 状态
实现 工作区完成
本地验证 L2b 26/26 + ruff
单测 watch 23/23
类型检查 vue-tsc
门控 7/7 ⚠️ 6/7Gate 7 被 Agent 提示 并行改动阻塞,非 watch 本身)
部署 未执行
生产健康 /healthok
浏览器终验 待部署后

本地验证

单测

pytest tests/test_watch_*.py tests/test_watch_probe_errors.py
→ 23 passed

L2b API E2Elocal_verify.sh

26/26 passed
ruff F: All checks passed
═══ All local checks passed ═══

前端

npm run type-check → PASS

门控 pre_deploy_check.sh

Gate 结果
1 Changelog PASS2026-06-12-server-agent-action-hint.md
2 Audit PASS2026-06-12-files-watch-ui-fixes.md
3 Test PASS
4 Lint PASS
5 Import PASS
6 Security PASS
7 Review BLOCK — 以下文件有 diff 但未列入当日 audit

Gate 7 阻塞文件(Agent 版本提示,与监测槽无关):

  • frontend/src/components/servers/ServerAgentHint.vue
  • frontend/src/components/servers/ServerInlineDetail.vue
  • frontend/src/composables/servers/useServerFormDialog.ts
  • frontend/src/types/api.ts
  • server/api/servers.py
  • server/utils/agent_version.py
  • tests/test_agent_version.py

监测槽改动已有独立审计:docs/audit/2026-06-11-watch-slot-monitoring-enhancements.md

生产探针

检查 结果
GET /health 200 ok
GET /app/ 200
GET /api/watch/pins(无 JWT 401(预期)
PATCH /api/watch/pins/0/monitoring(无 JWT 401(端点存在性需部署后带 JWT 终验)

说明:生产当前运行的是已部署版本;监测槽开关 / TTL PATCH / 中文错误 / parse_error 修复均在工作区,线上行为未变

功能验收清单(部署后浏览器终验)

  1. 开关暂停:关实时监测 → 5s 探针停止,槽位仍占用,UI 显示暂停态
  2. 重新开启:开开关 → 若 session 已结束则自动开新 session,探针恢复
  3. 8h / 24h:默认 8h;点 24h 后 expires_at 延长;replace 槽位保留原 TTL
  4. TTL 到期:自动暂停(不删 pin),Agent 恢复 60s 智能心跳
  5. parse_errorAgent 有 CPU/内存时 SSH 失败不应整轮 parse_error
  6. 中文错误:探针失败状态与错误列显示中文

部署前待办

  1. Gate 7:为 Agent 提示改动补 audit,或与监测槽分两次提交/部署
  2. 迁移watch_pins.monitoring_enabled + ttl_hoursmigrations.py 已含)
  3. 部署:用户批准后 bash deploy/deploy-production.sh
  4. 前端构建Docker 内 vite build 或 deploy/deploy-frontend.sh

本次巡检修复

  • 删除 server/infrastructure/ssh/remote_probe.py 未使用的 import logginglocal_verify ruff F401

结论

代码质量就绪(单测 + L2b + lint + 类型检查均通过)。部署被 Gate 7 阻塞(并行 Agent 提示改动缺 audit)。监测槽功能本身审计完备,建议与 Agent 提示改动解耦提交,或补全 audit 后一并部署。