feat(i7): async webhook delivery queue, OPS RBAC, UI role routing; docs and runbook

- Architect: I7_DESIGN.md, I7_IMPLEMENTATION_REVIEW.md; parallel index + track B
- Backend: @EnableMethodSecurity; OPS login; CallbackInbox PreAuthorize; IntegrationCatalog triple role
- Webhook: V2 webhook_platform_delivery; planner + scheduler + single-shot forwarder; tests
- Frontend: Pinia hasAnyRole; MainLayout/HomeView/router for OPS vs dev
- Runbook §10.5 delivery config

Made-with: Cursor
This commit is contained in:
2026-04-06 23:01:10 +08:00
parent ce49fe143c
commit 5fe7181b35
33 changed files with 936 additions and 200 deletions
@@ -0,0 +1,44 @@
# I7 实现复盘 — 对照 [I7_DESIGN.md](./I7_DESIGN.md)
> **方法**:三任务闭环——架构设计 → 前后端实现 → 本复盘。
> **日期**2026-04-06。
---
## 1. 总评
| 主题 | 设计意图 | 实现结论 |
|------|----------|----------|
| Webhook 异步投递 | 对比特快速 2xx;平台 POST 后台重试;可观测 `PENDING/SENT/DEAD` | **已落地**`webhook_platform_delivery` + `PlatformDeliveryService` + `PlatformDeliveryScheduler`;配置见 `craftlabs.platform.delivery.*` 与 [RUNBOOK §10.5](../../services/RUNBOOK.md)。 |
| OPS 与 Inbox | `CallbackInboxController``OPS`/`SYS_ADMIN` | **已落地**`@PreAuthorize` + 演示账号 `ops/ops`。 |
| M6 只读 | `IntegrationCatalogController` 三者可读 | **已落地**`OPS`+`SYS_ADMIN`+`DEVELOPER`。 |
| 前端 | 路由 `meta.roles` 与侧栏一致 | **已落地**`HomeView` 过滤链接;`MainLayout` `v-if`;首页含 `OPS`。 |
---
## 2. 偏差与已知局限
| 项 | 说明 |
|----|------|
| **DEAD 行运维** | 仅 DB 字段 `last_error`/`status`;无 UI 重放按钮(I7.1 可选)。 |
| **`v-permission` 指令** | 设计可选组件级指令;当前以 **路由 + 菜单 `hasAnyRole`** 为主,足够覆盖 I7 DoD。 |
| **Playwright** | 仍未进 CI;与 [I6_CLOSEOUT](./I6_CLOSEOUT.md) 一致列为后续。 |
| **内部 mTLS** | 未在本次范围;仍共享 `X-Platform-Internal-Token`。 |
---
## 3. 验证清单(走查)
- [x] `mvn -f services/pom.xml verify`
- [x] `web/delivery-platform-ui` `npm run build`
- [x] `AuthControllerTest` ops 登录
- [x] `CallbackInboxControllerTest``dev` → Inbox **403**
- [x] `PlatformDeliveryEnqueueTest`:首单 Callback → 队列 **+1**
---
## 4. 修订记录
| 日期 | 说明 |
|------|------|
| 2026-04-06 | 初版:I7 闭环复盘。 |