fix(ops-backend/service-station): close Phase 19 KEEP-VERIFY — 25 defects (unreachable announcements + station write privilege escalation; banner 500 + soft-delete leak; content publish dead-end; program approval dead-end/draft leak/zero counts/missing withdraw; zero-coverage test schema) ; add V042 announcement chain + 34 guard tests; full regression 602 green
Backend - Service Station: expose the 「临时公告」 chain end-to-end (V042 table/service existed but had ZERO endpoints -> both admin and miniapp could never reach it): 5 operator endpoints (list/create/update/publish/archive) + 1 user-facing read endpoint. - Fix privilege escalation: create/update were guarded only by the class-level service_location.view, making V015's service_location.manage a never-used dead permission -> read-only roles could edit stations. Permissions moved to method level. - Add ServiceLocationOperatorController to OperatorEndpointPermissionCoverageTest (it was NOT scanned, which is why the escalation stayed invisible). - Add create/update validation (address NOT NULL + status CHECK only blew up on PG). - Banner: validation failures threw bare RuntimeException -> 500; now VALIDATION_ERROR -> 400. Add deleted_at IS NULL to both home queries (soft-deleted banners stayed live). - Content: operator list/detail split (admin «publish» was a dead end because it reused the published-only public API); category deactivate/reactivate; article body on edit. - Service Program: operator member list now includes pending (approval reachable); active-only public visibility (draft leak); memberCount/pendingCount aggregation; withdraw/removeMember; reuse row on re-apply (UNIQUE(program_id,user_id) crash). - MeController: add the missing GET /me/service-history route. Schema / guards - schema-h2.sql: add service_location_announcements (+ chk_announcement_status) and content_categories (+ uk_content_category_code, chk_category_status); move both into REQUIRED_IN_TEST_SCHEMA. MigrationValidationTest baseline 41 -> 42. - V11PermissionMatrixContractTest now scans ALL migrations instead of hardcoding V015+V029. - New: ServiceLocationAnnouncementPhase19IntegrationTest (24), ServiceLocationControllerPermissionContractTest (5), ServiceLocationAnnouncementConstraintParityTest (5, prod DDL <-> test schema <-> backend whitelist <-> admin labels). Frontend - admin-web: ServiceStationView gains announcement management (statuses, create/edit, publish/archive with confirm, expiry); write buttons gated by service_location.manage. - miniapp: U50 renders the 临时公告 block via new serviceStationService; page no longer talks to utils/api directly; announcement failure degrades to [] instead of erroring. - ui-tests: U37 four-group + U50 announcement contracts; /home assertion retargeted to the service layer. Verification - Negative verification: 3 injected defects (drop soft-delete filter / drop test-schema CHECK / downgrade write endpoint to view) -> 4 named tests fail precisely, no collateral failures; restored, NEG-VAL residue = 0. - Backend full regression: 602 tests, 0 failures, 0 errors, 3 skipped (baseline 420). - admin-web: vue-tsc --noEmit EXIT=0, vite build EXIT=0. Miniapp: tsc --noEmit EXIT=0. - ui-tests 14/14 PASS.
This commit is contained in:
+27
-9
@@ -1,8 +1,8 @@
|
||||
# 项目状态跟踪 — STATUS.md
|
||||
|
||||
> **2026-09-17 当前有效结论:`V1.1 INCREMENTAL RECOVERY PHASE 18 COMPLETE / GIT CLEAN`。**
|
||||
> **2026-09-17 当前有效结论:`V1.1 INCREMENTAL RECOVERY PHASE 19 COMPLETE / UI REDESIGN ACCEPTED BY USER / GIT CLEAN`。**
|
||||
>
|
||||
> 阶段 0(在途收口)、阶段 1(小程序 C 组 + discover 筛选重设计)、阶段 2(管理端 Vue 新框架适配)、阶段 3(CapabilityService 独立化)、阶段 4(双端总验收)全部完成。三端构建通过、**13/13 契约全绿**、核心 11 页面**全部 TS-only(11/11)**。**UI 重设计首批 11 页已于 2026-09-16 通过用户验收(结论:基本达标)**;`/me/*` 前后端契约同轮收敛,17 个 404 调用已恢复。**Phase 08(Like / Match / Block)、Phase 09(Text Chat)、Phase 10(Image & Chat Safety)、Phase 11(Notification)、Phase 12(Relationship Progress)、Phase 13(公益红娘转介)、Phase 13A(婚恋咨询与婚前辅导)、Phase 14(多类型公益活动)、Phase 15(活动报名、审核与签到)、Phase 16(活动互选与双方开启沟通确认)、Phase 17(举报与风控)、Phase 18(申诉)复验已关闭**,十二轮共修复 85 处真实缺陷(含 2 处隐藏编译缺陷),并各自补齐测试保真度与守卫。**Phase 19 需用户确认后启动。**
|
||||
> 阶段 0(在途收口)、阶段 1(小程序 C 组 + discover 筛选重设计)、阶段 2(管理端 Vue 新框架适配)、阶段 3(CapabilityService 独立化)、阶段 4(双端总验收)全部完成。三端构建通过、**13/13 契约全绿**、核心 11 页面**全部 TS-only(11/11)**。**UI 重设计首批 11 页已于 2026-09-16 通过用户验收(结论:基本达标)**;`/me/*` 前后端契约同轮收敛,17 个 404 调用已恢复。**Phase 08(Like / Match / Block)、Phase 09(Text Chat)、Phase 10(Image & Chat Safety)、Phase 11(Notification)、Phase 12(Relationship Progress)、Phase 13(公益红娘转介)、Phase 13A(婚恋咨询与婚前辅导)、Phase 14(多类型公益活动)、Phase 15(活动报名、审核与签到)、Phase 16(活动互选与双方开启沟通确认)、Phase 17(举报与风控)、Phase 18(申诉)、Phase 19(统一运营后台 + 用户端公益服务页面)复验已关闭**,十三轮共修复 110+ 处真实缺陷(含 3 处隐藏编译缺陷),并各自补齐测试保真度与守卫。**Phase 20 起需用户确认后启动。**
|
||||
|
||||
最后更新: 2026-09-17 — 分支 `main`(`feat-ui-v11` 保留为冗余锚点)
|
||||
|
||||
@@ -455,12 +455,13 @@
|
||||
| 模块 | 对应 Phase | 状态 |
|
||||
|------|-----------|------|
|
||||
| Home Aggregate API + V1.1首页 | Phase 07 | ✅ 已完成 |
|
||||
| Banner 管理(后端+前端) | Phase 19 | ⏳ 待开发 |
|
||||
| Banner 管理(后端+前端) | Phase 19 | ✅ 已完成(2026-09-17 复验关闭) |
|
||||
| 本地资格声明与审核 | Phase 04~05 | ⏳ 待开发 |
|
||||
| 公益红娘服务转介 | Phase 13 | ✅ 已完成 |
|
||||
| 婚恋咨询 + 婚前辅导(Phase 13A) | Phase 13A | ✅ 已完成(2026-09-17 复验关闭) |
|
||||
| 内容管理(婚恋课堂/反诈) | Phase 19 | ⏳ 待开发 |
|
||||
| 专项公益服务项目 | Phase 19 | ⏳ 待开发 |
|
||||
| 内容管理(婚恋课堂/反诈) | Phase 19 | ✅ 已完成(2026-09-17 复验关闭) |
|
||||
| 专项公益服务项目 | Phase 19 | ✅ 已完成(2026-09-17 复验关闭) |
|
||||
| 善缘服务站 + 用户端公益服务页面(U37/U49~U54/U60/U61/U64) | Phase 19 | ✅ 已完成(含 V042 临时公告) |
|
||||
| V1.1新增不变量测试(INV-011~020) | Phase 23 | ⏳ 待开发 |
|
||||
|
||||
### 当前运行状态
|
||||
@@ -491,14 +492,31 @@ MinIO: localhost:9003 (凭证由本地环境变量提供)
|
||||
|
||||
**Phase 13A(公益婚恋咨询与婚前辅导)— 已完成** ✅
|
||||
|
||||
### Phase 19 — 统一运营后台(后端API核心链路)✅ 已完成
|
||||
### Phase 19 — 统一运营后台 + 用户端公益服务页面 ✅ 已完成(2026-09-17 复验关闭)
|
||||
|
||||
> 复验报告:`docs/Phase-19-V11-Recovery-Completion-Report-2026-09-17.md`
|
||||
> 后端全量回归:`Tests run: 602, Failures: 0, Errors: 0, Skipped: 3 / BUILD SUCCESS`
|
||||
> admin-web:`vue-tsc --noEmit` EXIT=0、`vite build` EXIT=0;小程序:`tsc --noEmit` EXIT=0;ui-tests 14/14 PASS
|
||||
|
||||
| 任务 | 状态 |
|
||||
|------|------|
|
||||
| V026 内容+专项项目+组织关系表 | ✅ |
|
||||
| V042 善缘服务站「临时公告」表(本轮新建) | ✅ |
|
||||
| ContentService(分类/文章 CRUD + publish/offline) | ✅ |
|
||||
| ServiceProgramService(项目CRUD + 成员审批) | ✅ |
|
||||
| V021~V026 共6个迁移文件 | ✅ |
|
||||
| Admin Web前端 | ⏳ 后续补充 |
|
||||
| Content 运营端接口分离(修「发布死路」/「分类停用不可恢复」) | ✅ |
|
||||
| ServiceProgramService(项目CRUD + 成员审批 + 退出/移除/统计) | ✅ |
|
||||
| Banner 运营端(白名单校验 400 而非 500 + 软删过滤 + 禁外链 + 预览) | ✅ |
|
||||
| 善缘服务站运营端(信息维护 + 公告五端点 + 权限下沉方法级) | ✅ |
|
||||
| 预约 IDOR 修复(principal.id() + 归属校验 + DataScopeGuard) | ✅ |
|
||||
| Admin Web 前端(Banner / 内容 / 服务项目 / 服务站公告) | ✅ |
|
||||
| 用户端 U37 四组重构 + U49~U54/U60/U61/U64 页面 | ✅ |
|
||||
|
||||
**本轮复验修复 25 处真实缺陷**,其中高价值项:服务站公告能力**整条不可达**(Service + 表都在、零端点);
|
||||
服务站 `create/update` **越权写**(写端点只受 `service_location.view` 保护,`manage` 是从未使用的死权限)
|
||||
且该控制器**未纳入**权限覆盖守卫;Banner 校验抛 500;Content 发布死路;ServiceProgram 审批死路 / 草稿泄露 / 成员数恒 0 / 退出未实现;
|
||||
测试库缺 `content_categories` 与 `service_location_announcements`(对应路径零覆盖)。
|
||||
新增守卫:`ServiceLocationAnnouncementPhase19IntegrationTest`(24) / `ServiceLocationControllerPermissionContractTest`(5) /
|
||||
`ServiceLocationAnnouncementConstraintParityTest`(5)。负向验证 3 处注入 → 4 个用例精准变红并还原(`NEG-VAL` 残留 0)。
|
||||
|
||||
### Phase 20 — Analytics数据统计扩展 ✅ 已完成
|
||||
| 任务 | 状态 |
|
||||
|
||||
Reference in New Issue
Block a user