同步前后端联调与文档更新

This commit is contained in:
2026-04-02 09:25:05 +08:00
parent af43beadb0
commit 6964e26ec9
113 changed files with 4317 additions and 293 deletions

132
b2f.md
View File

@@ -1,6 +1,6 @@
# b2f
> 文档版本v1.0
> 最后更新2026-04-02
> 最后更新2026-04-02 09:01:17
说明:
@@ -54,21 +54,23 @@
- frontend 是否确认正式流程只消费上述字段,不再自行推断 release URL
- 是否已解决:否
### B2F-003
- 时间2026-04-01
- 谁提的backend
- 当前事实:
- backend 准备把“放弃恢复”收口为 `finish(cancelled)` 语义
- 当前语义尚未最终拍板
- 需要对方确认什么:
- frontend 是否可以先预埋“放弃恢复”调用位,但在语义确认前不默认启用
- 是否已解决:否
---
## 已确认
### B2F-003
- 时间2026-04-02
- 谁提的backend
- 当前事实:
- backend 已确认 session 三态正式语义:
- 正常完成 -> `finished`
- 超时或规则失败 -> `failed`
- 主动退出 / 放弃恢复 -> `cancelled`
- 需要对方确认什么:
- frontend 按这套语义继续联调
- 是否已解决:是
### B2F-004
- 时间2026-04-01
@@ -92,11 +94,38 @@
-
- 是否已解决:是
### B2F-006
- 时间2026-04-02
- 谁提的backend
- 当前事实:
- backend 已确认“放弃恢复”官方语义为 `POST /sessions/{sessionPublicID}/finish``status=cancelled`
- 同一局的旧 `sessionToken` 在该场景允许继续用于 `finish(cancelled)`
- `cancelled``failed` 后都不会再作为 `ongoingSession` 返回
- 需要对方确认什么:
- frontend 可正式把“放弃恢复”接到 `finish(cancelled)`
- 是否已解决:是
### B2F-007
- 时间2026-04-02
- 谁提的backend
- 当前事实:
- backend 已把 `start / finish` 收口成幂等处理
- 重复 `start`
- `launched` -> 推进到 `running`
- `running` / 终态 -> 直接返回当前 session
- 重复 `finish`
- 已终态 -> 直接返回当前 session / result
- 需要对方确认什么:
- frontend 继续按当前补报 / 重试逻辑联调
- 是否已解决:是
---
## 阻塞
### B2F-006
### B2F-008
- 时间2026-04-01
- 谁提的backend
@@ -116,7 +145,7 @@
## 已完成
### B2F-007
### B2F-009
- 时间2026-04-01
- 谁提的backend
@@ -131,7 +160,7 @@
-
- 是否已解决:是
### B2F-008
### B2F-010
- 时间2026-04-01
- 谁提的backend
@@ -144,23 +173,78 @@
-
- 是否已解决:是
### B2F-011
- 时间2026-04-02
- 谁提的backend
- 当前事实:
- backend 已新增后台第一版资源对象接口:
- `/admin/maps`
- `/admin/playfields`
- `/admin/resource-packs`
- backend 已新增后台 `event` 组装接口:
- `/admin/events`
- `/admin/events/{eventPublicID}/source`
- 这批接口主要服务后续后台配置运营,不影响当前小程序主链联调
- 需要对方确认什么:
-
- 是否已解决:是
### B2F-012
- 时间2026-04-02
- 谁提的backend
- 当前事实:
- backend 已补后台运营闭环接口:
- `GET /admin/events/{eventPublicID}/pipeline`
- `POST /admin/sources/{sourceID}/build`
- `GET /admin/builds/{buildID}`
- `POST /admin/builds/{buildID}/publish`
- 当前后台侧已经可以完成:
- 资源对象录入
- event source 组装
- preview build
- publish release
- 需要对方确认什么:
-
- 是否已解决:是
### B2F-013
- 时间2026-04-02
- 谁提的backend
- 当前事实:
- backend 已补后台 `rollback` 接口:
- `POST /admin/events/{eventPublicID}/rollback`
- 当前后台侧已具备完整最小闭环:
- 资源对象
- event source 组装
- build
- publish
- rollback
- 需要对方确认什么:
-
- 是否已解决:是
---
## 下一步
### B2F-009
### B2F-014
- 时间2026-04-01
- 时间2026-04-02
- 谁提的backend
- 当前事实:
- backend 下一步会优先处理 P0
- 固定 `finished / failed / cancelled`
- 明确“放弃恢复”是否落 `cancelled`
- 收稳 `start / finish` 幂等
- session P0 已完成一轮收口
- 当前最值得继续联调确认的是:
- 放弃恢复 -> `finish(cancelled)`
- `failed / cancelled` 后 ongoing 消失
- 重复 `start / finish` 不再打断主链
- 需要对方确认什么:
- frontend 当前优先配合:
-最新 demo release 回归 `play -> launch -> map load`
- 确认正式流程只认 launch 返回的 `manifestUrl`
- 预埋“放弃恢复”调用位
-当前 demo release 回归 `play -> launch -> map load`
- 回归“继续恢复 / 放弃恢复”两条路径
- 如发现状态口径不一致,直接在 `f2b.md` 标具体接口和返回值
- 是否已解决:否