Files
cursor/rules/slot-sdk-webman-restart.mdc
ray zhou 2dd9f17da9 ok
2026-06-29 14:51:55 +08:00

28 lines
1.3 KiB
Plaintext
Raw Permalink 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.

---
description: 修改 slot-sdk 后自动重启依赖它的 Webman 服务worker 不会热加载 SDK
globs: "**/slot-sdk/**"
alwaysApply: false
---
# slot-sdk 变更后重启 Webman
`slot/sdk` 通过 composer path 仓库 symlink 到 `ray/slot-sdk`,目录在业务项目**之外**。Webman 文件监控只监听业务仓库,**不会**因 SDK 变更重载 worker不重启会出现 `Call to undefined method ...NotificationService::...` 等旧类缓存问题。
## Agent 必须做
本次对话若改动了 `ray/slot-sdk`(含 `src/`、`composer.json` 等),在相关任务收尾前**主动执行**对应服务的 `php webman restart`Docker 内,勿用宿主机 `php`)。
## 当前已知依赖path 仓库)
| 消费方 | 容器内工作目录 | 重启命令 |
| --- | --- | --- |
| saas6.x 管理中台 | `/app/www/tenant/saas6.x/server` | `docker exec -w /app/www/tenant/saas6.x/server php82 php webman restart` |
新增其它项目引用 `../../../ray/slot-sdk` 时,在本表补上 `-w` 路径与重启命令。
## 执行注意
- 在**同一轮**改完 SDK 并完成验证后再重启,避免半成品代码被加载。
- `webman restart` 可能常驻前台;用足够长的 `block_until_ms`,或确认进程已 `Start success` 后再继续。
- 收尾回复中简短说明已重启(或说明跳过原因:本次未改 SDK