U8: 复测总览 + Redisson 决策归档
Backend CI / Build & Test (push) Failing after 6s
Details
Backend CI / Build & Test (push) Failing after 6s
Details
全量复测通过: - ./gradlew compileJava: 全量编译通过(0 errors) - ./gradlew test: 全量测试通过(114+ tests, 0 failures) Redisson 决策归档:不引入 依据:现有 setIfAbsent 覆盖幂等+简单锁场景,无强烈竞争需求,与 lazy 原则一致。 重新评估触发条件:分布式锁竞争热点 / 分布式数据结构需求。 在 P1 计划文档追加执行结果表(U1-U8 commit hash + 复测状态)和 Redisson 决策归档。
This commit is contained in:
parent
e39da23976
commit
2e7f04f236
|
|
@ -423,3 +423,45 @@ pms-gateway 特殊处理:网关无数据库依赖,配置项较少,但仍
|
|||
| 横向-配置拆分 | 启动验证 dev/prod profile | prod 缺 INTERNAL_API_TOKEN 时 fail-fast |
|
||||
| 横向-敏感日志 | grep 扫描 + 各服务测试 | grep 零匹配,测试通过 |
|
||||
| pms-notify 重复代码 | grep `desensitizePhone` | pms-notify 内零匹配 |
|
||||
|
||||
---
|
||||
|
||||
## 执行结果(2026-07-04 完成)
|
||||
|
||||
分支:`fix/foundation-p0-security`(P0+P1 共用此分支)
|
||||
|
||||
| 单元 | 内容 | Commit | 复测 |
|
||||
|------|------|--------|------|
|
||||
| U1 | MapStruct 依赖清理 | `f5d4a06` | `./gradlew build` 通过 |
|
||||
| U2 | pms-notify desensitizePhone 清理(3 文件,统一到 SensitiveDataUtils.maskPhone) | `388e22f` | grep `desensitizePhone` 零匹配 |
|
||||
| U3 | 7 服务配置环境拆分(audit/base/charge/file/gateway/notify/operation) | `fdec682` | grep `profiles.active: dev` 零匹配 |
|
||||
| U4 | 敏感日志修复(charge/operation NotifyClient phone 脱敏) | `bdc0f71` | grep `log.*phone` 零匹配 |
|
||||
| U5 | pms-charge 7 controller @AuditLog + @PreAuthorize 全覆盖(29 端点) | `3bad88d` | `:pms-charge:compileJava` 通过 |
|
||||
| U6 | pms-auth controller 补齐(OrgController 3 GET + AuthController /password/reset) | `69d0be5` | `:pms-auth:test` 114 tests 通过 |
|
||||
| U7 | @Idempotent 落地 payment:pay 场景 | `ed6a929` | `:pms-charge:compileJava` 通过 |
|
||||
| U8 | 全量复测 + Redisson 决策归档 | — | `./gradlew compileJava` + `./gradlew test` 全量通过 |
|
||||
|
||||
### Redisson 决策归档
|
||||
|
||||
**决策:不引入 Redisson。**
|
||||
|
||||
**依据(lazy 原则):**
|
||||
1. 现有 `StringRedisTemplate.opsForValue().setIfAbsent(key, value, TTL)` 已覆盖幂等去重 + 简单锁场景
|
||||
2. 当前无强烈竞争需求(无分布式锁竞争热点、无复杂分布式数据结构需求)
|
||||
3. 引入 Redisson 会增加 1 个重量级依赖(~2MB),与 ponytail 原则"No new dependency if it can be avoided"冲突
|
||||
4. IdempotentAspect 已用 `setIfAbsent` + DB 兜底实现完整幂等机制,无需 Redisson
|
||||
|
||||
**重新评估触发条件:**
|
||||
- 出现分布式锁竞争热点(如秒杀场景)
|
||||
- 需要分布式数据结构(如 DistributedRateLimiter、DelayedQueue)
|
||||
- 需要读写锁或信号量
|
||||
|
||||
### 复测验证
|
||||
|
||||
- `./gradlew compileJava`:全量编译通过(0 errors)
|
||||
- `./gradlew test`:全量测试通过(114+ tests,0 failures)
|
||||
- grep 验证:
|
||||
- `grep "profiles.active: dev" backend/pms-*/src/main/resources/application.yml` → 零匹配
|
||||
- `grep "desensitizePhone" backend/pms-notify/` → 零匹配(已统一到 SensitiveDataUtils)
|
||||
- `grep "@PreAuthorize" backend/pms-charge/src/main/java/.../controller/` → 29 匹配(7 controller)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue