From d4590fbb86d513bfb4e1c468b61f859fd29ce3e3 Mon Sep 17 00:00:00 2001 From: dongzi Date: Tue, 14 Jul 2026 17:44:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=87=E6=A1=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/实施方案.md | 16 ++++++++-------- docs/配置说明.md | 24 ++---------------------- 2 files changed, 10 insertions(+), 30 deletions(-) diff --git a/docs/实施方案.md b/docs/实施方案.md index 2786f6f..1c4237b 100644 --- a/docs/实施方案.md +++ b/docs/实施方案.md @@ -282,8 +282,8 @@ git diff --name-only {old-sha} {new-sha} -- '*.java' | W01 | `redisUtil.insert(key, JSON.toJSONString(expr), ttl)` | key 表达式、value 表达式 | ✅ | | W02 | `redisTemplate.opsForValue().set(key, JSON.toJSONString(expr), ...)` | 同上 | ✅ | | W03 | `stringRedisTemplate.opsForValue().set(key, JsonUtil.getObjectToString(expr), ...)` | 同上 | ✅ | -| W04 | `redisTemplate.opsForValue().set(key, expr, ...)` 且 expr 非字面量 | 直写对象类型 | ✅ Phase 2 | -| W05 | `redisTemplate.opsForHash().put(key, field, expr)` | Hash 写出 value 类型 | ✅ Phase 2 | +| W04 | `redisTemplate.opsForValue().set(key, expr, ...)` 且 expr 非字面量 | 直写对象类型 | ✅| +| W05 | `redisTemplate.opsForHash().put(key, field, expr)` | Hash 写出 value 类型 | ✅ | | W06 | `JSON.parseObject(cacheValue, Xxx.class)` | 辅助反向确认读取类型 | 未做 | **忽略规则**(自动): @@ -320,7 +320,7 @@ redisUtil.insert(buildCacheKey(encode), JSON.toJSONString(envelope), ttl); | `@JSONField(name = "xxx")` | 字段名映射 | ✅ | | `@JsonIgnore` | 排除字段 | ✅ | | `@JsonProperty("xxx")` | 字段名映射 | ✅ | -| `@JsonIgnoreProperties({...})` | 类级忽略字段 | ✅ Phase 2 | +| `@JsonIgnoreProperties({...})` | 类级忽略字段 | ✅ | | `@Schema` | 忽略(不影响序列化) | ✅ | #### Step 6:生成 JSON Schema @@ -481,7 +481,7 @@ notify: ## 10. 分阶段交付计划 -### Phase 1 — MVP(约 1.5 周)✅ +### Phase 1 — MVP✅ **目标**:跑通端到端链路,覆盖租户缓存典型场景。 @@ -491,7 +491,7 @@ notify: | Git diff 扫描 | 变更文件列表 | ✅ | | W01~W03 写入点检测 | 覆盖 JSON 字符串写入 | ✅ | | 基础 Schema 提取 | 支持普通类、内部类、List、嵌套 | ✅ | -| Schema Diff P0/P1 | 字段增删、包装、路径迁移 | ✅ | +| Schema Diff | 字段增删、包装、路径迁移 | ✅ | | 企微通知 | 按 Key 骨架 Markdown | ✅ | | notify/block / enabled | 配置驱动 | ✅ | | 夹具测试 | TenantVO/CacheEnvelope 样本 | ✅ | @@ -502,7 +502,7 @@ notify: - 流水线 push 后能收到企微通知 - `mode=block` 时任意结构变更导致 exit 1 -### Phase 2 — 增强(约 1 周)✅ +### Phase 2 — 增强✅ | 任务 | 说明 | 状态 | |------|------|------| @@ -513,7 +513,7 @@ notify: | 多模块性能 | 并行读文件、索引批量装载、`manual_mappings` | ✅ | | 企微高亮 | 删除橙 `warning` / 新增绿 `info`;位置+类型通用项 | ✅ | -### Phase 3 — 运营(约 0.5 周) +### Phase 3 — 运营 | 任务 | 说明 | |------|------| @@ -569,7 +569,7 @@ notify: | 1 | 阻断范围 | `block` 模式下 **任意结构变更均阻断**(exit 1) | | 2 | 发布坐标 | 独立产物 `com.codechecker:cache-schema-checker:1.0.0` | | 3 | 配置归属 | **双层配置**:jar 内 `default-config.yaml` + 业务仓覆盖合并 | -| 4 | 上线策略 | 先 `notify` 观察 **1 周**,稳定后手动切 `block` | +| 4 | 上线策略 | 先 `notify` ,稳定后手动切 `block` | | 5 | 检测范围 | **仅 `src/main/java`**,不扫描测试代码 | 以上决策已纳入实施方案;**Phase 1 / Phase 2 已交付**,可进入 Phase 3 或业务仓全量观察。 diff --git a/docs/配置说明.md b/docs/配置说明.md index 33750ad..872603f 100644 --- a/docs/配置说明.md +++ b/docs/配置说明.md @@ -315,8 +315,6 @@ suppressions: ## 6. 推荐上线配置 -### 6.1 观察期(第 1 周) - 业务仓默认配置: ```yaml @@ -327,23 +325,5 @@ notify: enabled: true webhook_url: "" # 由流水线写入真实 Webhook -include_modules: - - jnpf-tenant -``` - -观察满 1 周、确认误报可接受后,手动切换: - -```yaml -mode: block -include_modules: [] # 扩至全仓 -``` - -### 6.2 全量启用(观察期结束后) - -```yaml -enabled: true -mode: block -include_modules: [] # 空表示全部模块 -detection: - patterns: [W01, W02, W03, W04, W05] -``` +include_modules: [] # 全仓 +``` \ No newline at end of file