onesvm-browser-server/.dsh/contracts/plan-20260901-04.md
chii eb972dfa93 feat: 落地 browser-server 控制面并打通 mgr1 海外订阅
单二进制三角色 + Dock 适配器 + Swarm stack 达到可部署态;mgr1 实测订阅经 central-proxy bootstrap,探活 alive=41/52。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 15:05:12 +08:00

39 lines
1.7 KiB
Markdown
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.

# Commander Plan: W6 热修 — 订阅 bootstrap 经 central-proxy
> 状态: done
> 创建: 2026-09-02(Asia/Shanghai)
> plan_id: plan-20260901-04
> run_id: run-20260901-browser-impl
> 用户拍板: 2026-09-02 AskQuestion — 路线 A(SUB-1 经 .53:7890)+ 立即更新 mgr1
## 目标
mgr1 上 ProxyManager 能拉到机场订阅并探活出 alive>0,海外通道不再因「订阅直连被墙」fail-closed。写 W6 回执。
## 背景与约束
- Fact:W6 stack 已在 mgr1(10 服务,9 healthy);PM 订阅超时/拉取异常 → alive=0
- Fact:mgr1 直连订阅域 8s 超时;mgr1→192.168.1.53:7890 github=200
- 代码已有 `BROWSER_SERVER_SUB_FETCH_PROXY`(subscription.go);stack / deploy.env 未接线
- 🟡 用户已确认立即 stack 更新;回滚 `docker stack rm browser-server`(卷保留)
- 指挥官 fallback:改动面窄(接线+重建+验收),不派 subagent
## 步骤表
| step_id | goal | status |
|---------|------|--------|
| W6a | 接线 stack / .env.example / deploy.env + 单测 | done |
| W6b | 重建 amd64 镜像 → save/load → stack deploy | done |
| W6c | 验收 PM 订阅成功 + alive>0 + 写回执 | done |
## 全局 acceptance
- [x] `BROWSER_SERVER_SUB_FETCH_PROXY` 注入 proxymanager(缺省空=直连,mgr1 显式 `.53:7890`)
- [x] `go test ./internal/proxymanager/` 绿
- [x] mgr1 PM 日志出现订阅刷新成功或探活 `alive>0`(脱敏,不记 URL)
- [x] W6 回执落 `.dsh/artifacts/run-20260901-browser-impl/deploy/w6-receipt.md`
## 风险与回滚
- overlay 容器到 `.53:7890` 若不通:回滚 env 为空并 `stack deploy`,海外仍断但不伤国内
- 镜像更新只动 `onesvm/browser-server:dev`,不重传第三方