MDCS平台发布流程
概述 / Overview
本页是 MDCS 平台 内核 + 一方插件 + 客户端的发布流程。客户端单插件发布见 插件测试与发布。
This page covers MDCS kernel + first-party plugin + client release flow. Single-plugin release: see insert plugin testing & release.
0. 准备 / Pre-flight
- 所有目标变更已合并到主分支
- 单元测试通过(特别是 `D:\src\Fundamentals\Test\`)
- 仿真车集成测试通过
- DEV_LOG.md 已记录本期所有 发现 / 注意 / 灵感
- 已确认变更不破坏向后兼容(或明确标注 break)
1. 版本号 / Version bumping
按 SemVer + 助记词 : SemVer + mnemonic:
- Major (`X.0.0+...`):破坏性 API 变更 / breaking API change
- Minor (`x.X.0+...`):新功能 / new features
- Patch (`x.x.X+...`):bug 修复 / bug fix
- Mnemonic (`+lantern`):每次构建唯一单词,便于现场区分
更新位置 : Update locations:
- 各仓库根 `Directory.Build.props` 中的 `<Version>`
- 各 csproj 中的 `<AssemblyInformationalVersion>`(含助记词)
- `CHANGELOG.md`(如果有)
- DEV_LOG.md 加一条发布条目
2. 构建顺序 / Build order
按依赖自底向上 : Bottom-up:
- `LessokajiWeaver` — `dotnet build -c Release`
- `Fundamentals` — 同
- `CycleGUI` —— C++ libVRender 先构建 + 复制 .dll 到 Windows / Linux 输出
- `M2` —— MedullaCore 先,OfficialPlugins 后
- `Detour` —— DetourCore,然后 Detour.exe(.NET 4.8)+ DetourLite.exe(.NET 8)
- `Clumsy` —— ClumsyCore,然后 ClumsyDance
- `Simple` —— SimpleCore,然后 SimpleComposer
每个仓库构建后 : After each:
- 验证 `Ref<Name>.dll` 已重新生成(如果公共 API 变了)
- 把新 Ref 复制到下游仓库的 `tools/` 目录
- 提交 Ref 到下游仓库的 git
3. 烟雾测试 / Smoke tests
单元 / Unit
dotnet test D:\src\Fundamentals\Test\
特别盯 DObject 测试 —— IPC bug 灾难性。 Watch DObject tests especially — IPC bugs are catastrophic.
集成 / Integration
仿真车 SimpleComposer : SimpleComposer with virtual car:
- 启动 Medulla + 仿真 `Lidar + Cart` 插件
- 启动 DetourLite
- 启动 SimpleComposer,加载场景
- 派 5–10 个混合任务
- 观察 Hedingben 是否有红色 toast
- 检查任务完成率 100%
现场冒烟 / Site smoke
(可选 / 大改动时必做)在 一辆真车上跑核心场景 : (For major changes) run the core scenarios on one real vehicle:
- 巡线行走
- 自动识别工位并取放货
- 充电流程
- 异常停 + 恢复
4. 一方插件重建 / Rebuild first-party plugins
所有 `D:\src\M2\OfficialPlugins\*` 都引用核心 Ref。任何核心 API 变更都要求 : All first-party plugins reference core Refs. Any core API change requires:
- 拉取最新核心仓库
- `dotnet build -c Release` 各插件
- 在干净 Medulla 控制台测试加载(确保 Costura 内嵌没问题)
- 把生成的 `<plugin>.dll` 复制到发布 staging
5. 打包 / Bundle
Medulla bundle
medulla-<version>.zip ├── MedullaConsole.exe ├── MedullaCore.dll ├── plugins/ │ ├── LidarController/LidarController.dll │ ├── CartActivator/CartActivator.dll │ ├── Camera/Camera.dll │ └── ... ├── tools/ │ └── (运行时工具) ├── README.md ├── CHANGELOG.md └── startup.iocmd.sample
Detour bundle
detour-<version>.zip ├── Detour.exe (or DetourLite.exe) ├── DetourCore.dll ├── CycleGUI.dll ├── libVRender.dll ├── README.md └── CHANGELOG.md
SimpleComposer bundle
simplecomposer-<version>.zip ├── SimpleComposer.exe ├── SimpleCore.dll ├── plugins/ (空,客户填一方/三方车型 plugin) ├── README.md └── CHANGELOG.md
6. 发布到 dl.lessokaji.com
- 上传 3 个 bundle 到 `dl.lessokaji.com`(内部 SFTP / S3)
- 路径 :`releases/<component>/<version>/`
- 在 `auth.lessokaji.com` 注册新版本(用于授权门控)
7. 文档更新 / Documentation update
- Wiki 发布说明 :`wiki/Detour版本发布记录`,Medulla / Simple 各自的发布说明页
- 主页 `首页` 更新版本徽章(如有)
- HOW_TO_USE.md / HOW_TO_CUSTOMIZE.md / HOW_TO_DEV_CORE.md(在 `D:\src\cookbook\`)
8. 通知 / Notify
- 内部团队 :邮件 + Slack / 微信 群通知
- 客户 :按其升级合约的节奏;major 变更要预约升级窗口
- CHANGELOG 高亮 行为变更(不只是 "fix bug")
9. 回滚预案 / Rollback plan
每个 bundle 至少保留 前一版本可下载。客户回滚 : Keep at least the prior version available. Client rollback:
- 停服务
- 替换为旧 bundle
- 启动;验证关键场景
数据兼容 : Data compatibility:
- DObject 协议(FundamentalLib 版本哈希)必须兼容;否则需重启全套
- SLAM 地图文件 :通常向后兼容
- SimpleComposer 场景 JSON:通常向后兼容
- Plugin 接口(Ref assembly):major 变更不兼容;minor 兼容
10. 发布后 / Post-release
- 在 新版本 Medulla 控制台跑一遍 `io load` + `cart Init` + 核心场景,做最后冒烟。
- 收集第一周客户反馈到 发布后看板。
- DEV_LOG.md 加 "release N+0day notes"。
11. 紧急补丁 / Emergency patch
- 直接在 `release/<X.Y>` 分支上 fix
- Patch 版本号 + 助记词
- 通过 快速通道跳过部分 smoke(在 hot incident 时)
- 但 必须跑 DObject 单元测试
12. 大版本规划 / Major version planning
- Pre-release alpha / beta先给 友好客户
- Beta 周期 ≥ 2 周
- Public release 必须有 迁移文档(旧 → 新 API)