浏览代码

Merge branch 'task/S-cfc-301' into cfclub

Sisyphus 1 周之前
父节点
当前提交
7f0b89ad9

+ 5 - 5
cfc-backend/src/main/java/com/etotem/cfc/config/DatabaseInitializer.java

@@ -3670,7 +3670,7 @@ insertSysConfigSeed("gift_membership_pay_price", "198000", "送会员商品达
     }
 
     /**
-     * 迁移480: 多小程序配置表 miniapp_config + 播种 default 行。
+     * 迁移483: 多小程序配置表 miniapp_config + 播种 default 行。
      *
      * <p>多小程序对接架构方案 §2.1:密钥类字段只存「env 引用名」不存明文;
      * default 行为 NULL 引用名(回落 yml {@code wechat.*} 既有取值)。
@@ -3893,7 +3893,7 @@ insertSysConfigSeed("gift_membership_pay_price", "198000", "送会员商品达
         // 迁移482: 创建商品评价表 product_reviews(P0-A 普通商品评价域,独立于活动评价 review_orders)
         migrateProductReviewsTable();
 
-        // 迁移483: product_orders 补收货超时兜底列(P0-B 待收货超时自动完成/第9天收货提醒)
+        // 迁移485: product_orders 补收货超时兜底列(P0-B 待收货超时自动完成/第9天收货提醒)
         migrateProductOrderShippedColumns();
     }
 
@@ -16430,7 +16430,7 @@ log.info("迁移298: 已为无 openid 的 child 账号补齐 family_members 记
     }
 
     /**
-     * 迁移483: product_orders 补收货超时兜底列(P0-B)。
+     * 迁移485: product_orders 补收货超时兜底列(P0-B)。
      *
      * <p>{@code shipped_at}=发货时间(ship() 落库写,作为超时自动完成/收货提醒的基准时间);
      * {@code receipt_remind_at}=收货提醒推送时间(第9天推送成功后写,幂等防重复推送)。
@@ -16440,9 +16440,9 @@ log.info("迁移298: 已为无 openid 的 child 账号补齐 family_members 记
         try {
             ensureColumn("product_orders", "shipped_at", "DATETIME NULL COMMENT '发货时间'");
             ensureColumn("product_orders", "receipt_remind_at", "DATETIME NULL COMMENT '收货提醒推送时间'");
-            log.info("迁移483: product_orders.shipped_at / receipt_remind_at 列已就绪");
+            log.info("迁移485: product_orders.shipped_at / receipt_remind_at 列已就绪");
         } catch (Exception e) {
-            log.warn("迁移483: product_orders 收货超时兜底列失败(忽略): {}", e.getMessage());
+            log.warn("迁移485: product_orders 收货超时兜底列失败(忽略): {}", e.getMessage());
         }
     }
 }

+ 262 - 0
cfc-backend/src/test/java/com/etotem/cfc/unit/ArticleSearchContractTest.java

@@ -0,0 +1,262 @@
+package com.etotem.cfc.unit;
+
+import com.baomidou.mybatisplus.core.MybatisConfiguration;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.etotem.cfc.common.Result;
+import com.etotem.cfc.controller.content.ArticleController;
+import com.etotem.cfc.entity.Article;
+import com.etotem.cfc.mapper.ArticleMapper;
+import com.etotem.cfc.mapper.ArticleReadingRecordMapper;
+import com.etotem.cfc.mapper.UserMapper;
+import com.etotem.cfc.service.ArticlePermissionService;
+import com.etotem.cfc.service.ArticleService;
+import com.etotem.cfc.service.ContentDimensionThresholdService;
+import com.etotem.cfc.service.FiveDimensionScoreService;
+import org.apache.ibatis.builder.MapperBuilderAssistant;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mockito;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * 契约测试:能力键 {@code content.article.search}(规格 ARTICLE-SEARCH-2026-11-14-V1,契约 C1-C3 后端部分)。
+ *
+ * <p><b>契约锚点</b></p>
+ * <ul>
+ *   <li>需求:{@code docs/需求分析/2026-11-14-小程序知识分享页搜索功能需求变更.md} C1/C2/C3(C4-C6 为前端交互,本类不覆盖)</li>
+ *   <li>设计:{@code docs/design/2026-11-14-article-center-search-design.md} D1-D4</li>
+ *   <li>实现锚点:{@code ArticleController.list}(body.keyword 透传,:140)、{@code ArticleService.getPublicList}
+ *       (10 参,LIKE 于 title/summary/tags 且不含 content,:134-137;tag 内存过滤 :154-159;手动分页 total=visible.size() :183-192)</li>
+ * </ul>
+ *
+ * <p><b>各条款断言要点</b></p>
+ * <ul>
+ *   <li>C1:空 keyword 请求(body 仅 {page,size})→ Service 收到 keyword=null,返回 code=200</li>
+ *   <li>C2:keyword 非空 → wrapper 构造断言 LIKE 范围锁定 {@code title/summary/tags} 且不含 {@code content};
+ *       分页 {@code total} 为过滤后真实条数(非页大小)</li>
+ *   <li>C3:keyword 与 tag 同时提交 → 结果为「LIKE 命中 ∩ 内存 tag 过滤命中」交集,{@code total} 反映交集真实总数</li>
+ * </ul>
+ *
+ * <p><b>测试范围</b>:纯 Mockito + 反射注入(无 Spring / 无 DB / 无外部服务),与同批契约为同款式。</p>
+ *
+ * <p><b>已验证结果</b>:5 个契约测试全部通过(全绿)。LIKE 范围断言通过
+ * {@code @BeforeAll initMybatisPlusTableInfo()}({@code TableInfoHelper.initTableInfo})注册实体元数据,
+ * 使 {@code LambdaQueryWrapper.getSqlSegment()} 在无 Spring 上下文可解析(参照
+ * ChildBadgeViewContractTest / CfBalanceControllerTest 同款模式),断言 wrapper 含
+ * title/summary/tags LIKE 且不含 content。全绿即证明实现已满足契约;按执行纪律,
+ * 交编排侧核实能力键状态(转测试登记),不改 src/main 实现。</p>
+ *
+ * <p><b>RED 预期</b>:契约派发时为 TDD-RED 阶段;实测实现已在 cfclub 落地(C1/C2 设计预期可过,交集语义随 S-cfc-131 标签过滤合入),本类转绿则按执行纪律汇报「实现已存在,交测试登记」,不私改实现。</p>
+ */
+class ArticleSearchContractTest {
+
+    private static final String KEYWORD_SLEEP = "睡眠";
+    private static final String TAG_LOSE_FAT = "减脂";
+
+    private ArticleService articleService;
+    private ArticleController articleController;
+
+    private ArticleMapper articleMapper;
+    private ArticlePermissionService articlePermissionService;
+    private ArticleReadingRecordMapper articleReadingRecordMapper;
+    private FiveDimensionScoreService fiveDimensionScoreService;
+    private ContentDimensionThresholdService contentDimensionThresholdService;
+    private JdbcTemplate jdbcTemplate;
+    private UserMapper userMapper;
+
+    @BeforeAll
+    static void initMybatisPlusTableInfo() {
+        // 使 LambdaQueryWrapper.getSqlSegment() 在无 Spring 上下文中可用(校验 LIKE 范围契约 C2)
+        // 参照 ChildBadgeViewContractTest / CfBalanceControllerTest 同款模式
+        TableInfoHelper.initTableInfo(
+                new MapperBuilderAssistant(new MybatisConfiguration(), ""), Article.class);
+    }
+
+    @BeforeEach
+    void setUp() throws Exception {
+        articleService = new ArticleService();
+        articleController = new ArticleController();
+
+        articleMapper = mock(ArticleMapper.class);
+        articlePermissionService = mock(ArticlePermissionService.class);
+        articleReadingRecordMapper = mock(ArticleReadingRecordMapper.class);
+        fiveDimensionScoreService = mock(FiveDimensionScoreService.class);
+        contentDimensionThresholdService = mock(ContentDimensionThresholdService.class);
+        jdbcTemplate = mock(JdbcTemplate.class);
+        userMapper = mock(UserMapper.class);
+
+        injectService("articleMapper", articleMapper);
+        injectService("articlePermissionService", articlePermissionService);
+        injectService("articleReadingRecordMapper", articleReadingRecordMapper);
+        injectService("fiveDimensionScoreService", fiveDimensionScoreService);
+        injectService("contentDimensionThresholdService", contentDimensionThresholdService);
+        injectService("jdbcTemplate", jdbcTemplate);
+        injectService("userMapper", userMapper);
+        injectController("articleService", articleService);
+        injectController("userMapper", userMapper);
+
+        // 环境放行:权限过滤原样返回;无家庭得分(阈值 fail-open);无阅读时长;无已完成阅读记录
+        when(articlePermissionService.filterVisible(any(), any(), any(), any()))
+                .thenAnswer(inv -> inv.getArgument(0));
+        when(fiveDimensionScoreService.getFamilyAverageScores(any())).thenReturn(Collections.emptyMap());
+        when(contentDimensionThresholdService.listByContents(anyString(), any())).thenReturn(Collections.emptyMap());
+        when(jdbcTemplate.queryForList(anyString())).thenReturn(Collections.emptyList());
+        when(articleReadingRecordMapper.selectCompletedArticleIdsByChild(anyLong()))
+                .thenReturn(Collections.emptyList());
+    }
+
+    // ==================== C1:空 keyword → code=200 ====================
+
+    @Test
+    @DisplayName("C1: body 仅含 {page,size} 时返回 code=200")
+    void c1_空keyword请求返回code200() {
+        Map<String, Object> body = new HashMap<>();
+        body.put("page", 1);
+        body.put("size", 10);
+
+        Result<Page<Article>> result = articleController.list(body, null, null);
+
+        assertEquals(200, result.getCode(), "空 keyword 请求非搜索场景,列表接口必须正常返回 code=200");
+    }
+
+    // ==================== C2:LIKE 范围 title/summary/tags(不含 content)+ 真实 total ====================
+
+    @Test
+    @DisplayName("C2: keyword 非空时 LIKE 范围锁定 title/summary/tags,且不含 content")
+    void c2_like范围锁定titleSummaryTags_不含content() {
+        mockSelectList(Collections.singletonList(
+                article(1L, "睡眠指南", "[\"减脂\",\"睡眠\"]")));
+
+        articleService.getPublicList(null, KEYWORD_SLEEP, null, null,
+                1, 10, null, null, null, null);
+
+        String sql = captureWrapperSql();
+        assertTrue(sql.contains("title LIKE"), "LIKE 必须覆盖 title(契约 C2 / 设计 D2 字段范围)");
+        assertTrue(sql.contains("summary LIKE"), "LIKE 必须覆盖 summary(契约 C2 / 设计 D2 字段范围)");
+        assertTrue(sql.contains("tags LIKE"), "LIKE 必须覆盖 tags(契约 C2 / 设计 D2 字段范围)");
+        assertFalse(sql.contains("content"),
+                "LIKE 不得覆盖 content 正文(设计 D2:控制实现面,避免长文本 LIKE 性能与误命中)");
+    }
+
+    @Test
+    @DisplayName("C2: total 为 LIKE 命中后的真实条数,翻页切片不依赖 size")
+    void c2_命中集total为过滤后真实条数_翻页不依赖size() {
+        mockSelectList(Arrays.asList(
+                article(1L, "睡眠指南", "[\"减脂\",\"睡眠\"]"),
+                article(2L, "深度睡眠法", "[\"睡眠\"]"),
+                article(3L, "睡眠与记忆", "[\"睡眠\"]")));
+
+        Page<Article> page = articleService.getPublicList(null, KEYWORD_SLEEP, null, null,
+                2, 2, null, null, null, null);
+
+        assertEquals(3, page.getTotal(),
+                "第 2 页 total 必须是过滤后真实条数 3(不得 <=size,否则前端 noMore 恒真无法翻页)");
+        assertEquals(1, page.getRecords().size(), "第 2 页仅剩 1 条");
+        assertEquals(3L, page.getRecords().get(0).getId());
+    }
+
+    // ==================== C3:keyword ∩ tag 交集 + 真实 total ====================
+
+    @Test
+    @DisplayName("C3: keyword 与 tag 同时提交 → LIKE 命中 ∩ 标签命中 的交集")
+    void c3_keyword与tag交集_只含两者均命中的文章() {
+        mockSelectList(Arrays.asList(
+                article(1L, "睡眠指南", "[\"减脂\",\"睡眠\"]"),
+                article(2L, "深度睡眠法", "[\"减脂\"]"),
+                article(3L, "睡眠百科", "[\"免疫\"]")));
+
+        Page<Article> page = articleService.getPublicList(null, KEYWORD_SLEEP, null, TAG_LOSE_FAT,
+                1, 10, null, null, null, null);
+
+        assertEquals(2, page.getTotal(), "交集 = {1,2}(3 号含睡眠不含减脂,被 tag 过滤排除)");
+        assertEquals(2, page.getRecords().size());
+        assertTrue(page.getRecords().stream().allMatch(a ->
+                        a.getTitle().contains(KEYWORD_SLEEP)
+                                && String.valueOf(a.getTags()).contains(TAG_LOSE_FAT)),
+                "返回记录必须同时满足 keyword 与 tag,不允许并集混入");
+    }
+
+    @Test
+    @DisplayName("C3: 交集 total 反映真实总数,跨页翻页不失效")
+    void c3_交集total反映真实总数_跨页不失效() {
+        mockSelectList(Arrays.asList(
+                article(1L, "睡眠指南", "[\"减脂\"]"),
+                article(2L, "睡眠与免疫", "[\"减脂\"]"),
+                article(3L, "睡眠节律", "[\"减脂\"]"),
+                article(4L, "睡眠环境", "[\"减脂\"]"),
+                article(5L, "睡眠与情绪", "[\"减脂\"]")));
+
+        Page<Article> page = articleService.getPublicList(null, KEYWORD_SLEEP, null, TAG_LOSE_FAT,
+                2, 3, null, null, null, null);
+
+        assertEquals(5, page.getTotal(), "交集 total 必须是 5(真实总数),不得被页大小截断成 3");
+        assertEquals(2, page.getRecords().size(), "第 2 页应剩 2 条");
+    }
+
+    // ==================== 辅助构造 ====================
+
+    private void mockSelectList(List<Article> all) {
+        when(articleMapper.selectList(any())).thenReturn(new ArrayList<>(all));
+    }
+
+    private String captureWrapperSql() {
+        ArgumentCaptor<Wrapper<Article>> captor = ArgumentCaptor.forClass(Wrapper.class);
+        verify(articleMapper).selectList(captor.capture());
+        String sql = captor.getValue().getSqlSegment();
+        assertNotNull(sql, "wrapper SQL 段不应为空");
+        return sql;
+    }
+
+    private Article article(Long id, String title, String tags) {
+        Article a = new Article();
+        a.setId(id);
+        a.setStatus("published");
+        a.setAuditStatus("approved");
+        a.setTitle(title);
+        a.setSummary("摘要" + id);
+        a.setTags(tags);
+        a.setIsFeatured(0);
+        a.setSortOrder(0);
+        a.setPublishedAt(new Date());
+        return a;
+    }
+
+    private void injectService(String field, Object value) throws Exception {
+        Field f = ArticleService.class.getDeclaredField(field);
+        f.setAccessible(true);
+        f.set(articleService, value);
+    }
+
+    private void injectController(String field, Object value) throws Exception {
+        Field f = ArticleController.class.getDeclaredField(field);
+        f.setAccessible(true);
+        f.set(articleController, value);
+    }
+}

+ 1 - 1
cfc-web/.last_build_commit

@@ -1 +1 @@
-bc4f61379d33a1b256bf034575a15e6d17061864
+53810a091f7a5b053683183202b506fed7ec9cdb

+ 2 - 2
cfc-web/package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "cfc-web",
-  "version": "1.0.2504",
+  "version": "1.0.2507",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "cfc-web",
-      "version": "1.0.2504",
+      "version": "1.0.2507",
       "dependencies": {
         "@wangeditor/editor": "^5.1.23",
         "@wangeditor/editor-for-vue": "^1.0.2",

+ 1 - 1
cfc-web/package.json

@@ -1,6 +1,6 @@
 {
   "name": "cfc-web",
-  "version": "1.0.2505",
+  "version": "1.0.2508",
   "private": true,
   "scripts": {
     "dev": "vue-cli-service serve",

+ 42 - 0
cfc-web/public/CHANGELOG-v1.0.md

@@ -4,6 +4,48 @@
 
 ---
 
+## v1.0.2508 (2026-11-14)
+
+### 文档
+- 研发负责人第176轮闭环汇报 2026-11-15 0145
+
+
+## v1.0.2507 (2026-11-14)
+
+### 测试
+- S-cfc-389 content.article.search 知识分享页搜索契约测试(契约登记批次)
+
+### 其他
+- - C2: keyword LIKE 范围锁定 title/summary/tags 且不含 content(wrapper SQL 断言)+
+-   total 为 LIKE 命中后真实条数(手动分页不依赖 size)
+- - C3: keyword 与 tag 同传 → LIKE 命中 ∩ 内存 tag 过滤交集 + 跨页 total 不失效
+- - 纯 Mockito + 反射注入;@BeforeAll initTableInfo 使 getSqlSegment 在无 Spring 上下文可解析
+- - 实测实现已在 cfclub 落地(5 测试全绿),按执行纪律交编排侧转测试登记,不改 src/main
+- 
+
+
+## v1.0.2506 (2026-11-14)
+
+### 测试
+- RED 契约级单测 contact.group.import(SC-P-62 联系人分组/导入)
+
+### 其他
+- 溯源 需求 SC-P-62(建分组 → 导入 ContactImport,格式错误行跳过并报告,模块 ContactImport)
+-      设计 API_REFERENCE §4.63.7/§4.63.10 缺口 G-3(候选 ContactImportController 不存在;分组无端点)
+- 覆盖三流(纯 JUnit + 反射 + schema.sql 探测,无 Spring/DB/外部服务):
+- - 正常流-建分组:ContactGroup 实体 / ContactGroupMapper / contact_group 建表 / contacts.group_id 列
+- - 正常流-导入:ContactImportController / ContactImportService 批量导入入口 + ContactController 分组导入端点
+- - 边界流:导入结果载体 ContactImportResultVO 须含 successCount / skippedCount / skippedRows(格式错误行跳过并报告)
+- - 权限流:批量导入方法以 groupId+userId 双参数承载归属校验(防跨用户写入)
+- 实现现状:src/main 无 ContactGroup/ContactImport*,schema.sql 无 contact_group 建表、
+- contacts 无 group_id 列,现有 import-phone 仅单条无分组无错误行报告 → 11/11 红(预期 RED)。
+- 只新增 cfc-backend/src/test 契约测试,未改 src/main。GREEN 阶段按 javadoc 契约落地即可转绿。
+- 
+
+### 新功能
+- 多小程序配置 P0(T01 配置模型 MiniAppProperties/MiniAppStaticConfig/MiniAppConfig + T02 MiniAppInterceptor/上下文 + T03 User.appid/WxApiClient/WxPayClient/UserServiceOpenidIsolationTest)
+
+
 ## v1.0.2505 (2026-11-14)
 
 ### 文档

+ 43 - 1
cfc-web/public/CHANGELOG.md

@@ -1,6 +1,6 @@
 # 更新日志
 
-> 当前版本: v1.0.2505
+> 当前版本: v1.0.2508
 
 ## 历史版本
 
@@ -8,6 +8,48 @@
 
 ---
 
+## v1.0.2508 (2026-11-14)
+
+### 文档
+- 研发负责人第176轮闭环汇报 2026-11-15 0145
+
+
+## v1.0.2507 (2026-11-14)
+
+### 测试
+- S-cfc-389 content.article.search 知识分享页搜索契约测试(契约登记批次)
+
+### 其他
+- - C2: keyword LIKE 范围锁定 title/summary/tags 且不含 content(wrapper SQL 断言)+
+-   total 为 LIKE 命中后真实条数(手动分页不依赖 size)
+- - C3: keyword 与 tag 同传 → LIKE 命中 ∩ 内存 tag 过滤交集 + 跨页 total 不失效
+- - 纯 Mockito + 反射注入;@BeforeAll initTableInfo 使 getSqlSegment 在无 Spring 上下文可解析
+- - 实测实现已在 cfclub 落地(5 测试全绿),按执行纪律交编排侧转测试登记,不改 src/main
+- 
+
+
+## v1.0.2506 (2026-11-14)
+
+### 测试
+- RED 契约级单测 contact.group.import(SC-P-62 联系人分组/导入)
+
+### 其他
+- 溯源 需求 SC-P-62(建分组 → 导入 ContactImport,格式错误行跳过并报告,模块 ContactImport)
+-      设计 API_REFERENCE §4.63.7/§4.63.10 缺口 G-3(候选 ContactImportController 不存在;分组无端点)
+- 覆盖三流(纯 JUnit + 反射 + schema.sql 探测,无 Spring/DB/外部服务):
+- - 正常流-建分组:ContactGroup 实体 / ContactGroupMapper / contact_group 建表 / contacts.group_id 列
+- - 正常流-导入:ContactImportController / ContactImportService 批量导入入口 + ContactController 分组导入端点
+- - 边界流:导入结果载体 ContactImportResultVO 须含 successCount / skippedCount / skippedRows(格式错误行跳过并报告)
+- - 权限流:批量导入方法以 groupId+userId 双参数承载归属校验(防跨用户写入)
+- 实现现状:src/main 无 ContactGroup/ContactImport*,schema.sql 无 contact_group 建表、
+- contacts 无 group_id 列,现有 import-phone 仅单条无分组无错误行报告 → 11/11 红(预期 RED)。
+- 只新增 cfc-backend/src/test 契约测试,未改 src/main。GREEN 阶段按 javadoc 契约落地即可转绿。
+- 
+
+### 新功能
+- 多小程序配置 P0(T01 配置模型 MiniAppProperties/MiniAppStaticConfig/MiniAppConfig + T02 MiniAppInterceptor/上下文 + T03 User.appid/WxApiClient/WxPayClient/UserServiceOpenidIsolationTest)
+
+
 ## v1.0.2505 (2026-11-14)
 
 ### 文档

+ 193 - 0
docs/tdd/orchestration/report-dev-2026-11-15-0145.md

@@ -0,0 +1,193 @@
+# 研发负责人工作汇报 · 2026-11-15 01:45(定时自动化轮 · 第 176 轮)
+
+> 本轮为 CF 定时自动化(`5c32f42a-f237-4946-bedf-97dd1e2e0f66`)研发负责人标准闭环收割轮,无人值守执行。按 SKILL.md「负责人通用收割骨架」S1–S11 顺序,参数读取 `E:/cfc/.tdd/config.json#harvest`(mutex_minutes=5 / report_stale_hours=2 / status_top=12 / session_concurrency=2 / agent_session_limit=3 / auto_limit=2 / heartbeat.enabled=false / fill_capacity.enabled=false)。
+
+---
+
+## 基本信息
+
+| 项目 | 内容 |
+|------|------|
+| 汇报人 | 研发负责人(定时自动化编排侧) |
+| 汇报周期 | 2026-11-15 01:13 ~ 2026-11-15 01:45(第 176 轮) |
+| 负责模块/单元范围 | E:/cfc 全量(主线 `origin/cfclub`) |
+
+---
+
+## 一、本轮工作数据汇总
+
+### 1.0 场景覆盖矩阵(硬职责增列)
+
+> 唯一计数源:`docs/tdd/orchestration/sc-key-map.md`(241 SC 全量台账)。「跑通」三判据:① 三类流执行证据;② 实现/用例已 push `origin/cfclub`;③ `--clean-check` 退出码 0。
+
+| 指标 | 值 | 说明 |
+|------|-----|------|
+| 场景总数 | `241` | sc-key-map.md 全量台账 |
+| 累计已跑通 | `15` | O-3 收口 5(G-02/G-06/P-03/P-10/P-11)+ 游客域补证 10(G-01/03/04/05/07/08/09/10/11/12),证据 sha 见 sc-key-map 主表 |
+| 本轮新增跑通 | `0` | 本轮无 SC 满足三判据(派发中的 RED 任务仍待实现/校验/转正) |
+| 失败 | `0` | — |
+| 阻塞 | `0` | --inspect「当前无已登记阻塞」 |
+| 未跟踪 | `226` | = 241 − 15 − 0 − 0 |
+
+> ⚠️ 本轮派发 10 个 RED 任务 + 40+ 键自动置 YELLOW,属「任务推进」而非「场景已跑通」,不冲抵 1.0 计数。
+
+---
+
+### 1.1 问题接收与处置
+
+| 指标 | 数量 | 填写说明 |
+|------|------|----------|
+| **收到的测试反馈问题数*** | `0` 个 | 本轮 `docs/tdd/test/blockers.md` 无新增研发类阻塞登记;--inspect 显示无已登记阻塞 |
+| **已解决问题数*** | `0` 个 | 本轮无显式 BLOCKED 解除;RED→YELLOW 推进属阶段流转,计入 1.3 |
+| **待解决研发问题数** | `0` 个 | 无 P0 阻塞项 |
+
+---
+
+### 1.2 任务分发与会话管理
+
+| 指标 | 数量 | 填写说明 |
+|------|------|----------|
+| **分派任务数*** | `10` 个(开发类) + `~40` 键(部署验证自动派发) | S7 `--auto --role 开发 --limit 2`:开发任务成功派发 10 / 失败 0 / 跳过(超限)25;--auto 另对 40+ 个新置 YELLOW 键自动派发 testing 部署验证(每轮 `_MAX_DEPLOY_PER_RUN=10` 限流) |
+| **恢复智能体会话数*** | `0` 个 | --resume --dry-run 仅 1 个候选(lan-204「cmd输入法失灵复发」ses_e266d49c2ff,mid-work),非 TDD 命名会话、非本编排派发,按「他人 WIP 只报不动」不恢复 |
+| **当前在用会话数** | `5` 节点 | lan-189 / lan-204 / local-lan-4090 / mes-local-45278 / pub-iwintrue(CFC 白名单节点) |
+| **会话平均利用率** | — | 未精确统计;本轮派发后各节点 +2 负载 |
+
+**派发明细(10 个成功)**:每节点 2 个(--limit 2 = 每节点上限):
+- S-cfc-296 → pub-iwintrue(分支 task/S-cfc-296)
+- S-cfc-298 → lan-189(分支 task/S-cfc-298)
+- 其余 8 个派至 lan-204 / local-lan-4090 / mes-local-45278 等节点(各 2)
+
+**跳过(超限)25 个**:S-cfc-351 / S-cfc-365 / S-cfc-371~391 等,本轮各节点达 --limit 2 上限,留待下轮。
+
+### 1.2b 各会话当前工作状态列表
+
+> 快照来源:S3 `--inspect`(01:16,测试角色只读)。--auto 派发后各节点负载各 +2(本轮派发 `{'lan-189':2,'lan-204':2,'local-lan-4090':2,'pub-iwintrue':2,'mes-local-45278':2}`)。
+
+| 会话节点 | inspect 时配额 | inspect 时状态 | --auto 派发后 | 工作目录 | 备注 |
+|----------|---------------|---------------|--------------|---------|------|
+| lan-189 | 0/4(剩 4) | 50 idle | +2 负载(S-cfc-298 等) | 远端 | — |
+| lan-204 | 1/10(剩 9) | 1 busy(cmd输入法会话,非 TDD) + 49 idle | +2 负载 | 远端 | 「cmd输入法失灵复发」会话非本编排派发,未恢复 |
+| local-lan-4090 | 0/6(剩 6) | 50 idle | +2 负载 | 远端 | — |
+| mes-local-45278 | 5/6(剩 1) | 5 busy + 45 idle | +2 负载(本轮配额紧) | 远端 | — |
+| pub-iwintrue | 1/6(剩 5) | 1 busy + 49 idle | +2 负载(S-cfc-296 等) | 远端 | — |
+
+> 部署专用会话:production=`ses_f719c9326ffeMp0i4xZi6oNFFt`(cfc-prod)、testing=`ses_e4804838affeBHv6uKhYS4x7o7`(cfc-test),本轮自动部署验证复用。
+
+---
+
+### 1.3 变更感知与新任务建立
+
+| 指标 | 数量 | 填写说明 |
+|------|------|----------|
+| **感知需求/设计变更数*** | `0` 新增能力键 | --changes --days 7:多文件提交但**0 新增能力键**(全为既有键状态/内容变化)。变更集中在 2026-11-13 测试侧产物(automation-run-R182~R192 / blockers.md / discovery.md / inventory.md / automation-status.md)与 11-14 需求文档 `8d01d0dea`(article.search 需求变更+设计正本入库)等 |
+| **新增入池任务数*** | `0` 个 | S8:池非空(pending 45),--auto 未输出「池空」;0 新增能力键、无实际工作溯源(未跑通 SC / TR / B / CF-CR / CI 缺口)→ 按防假红纪律不 `--add-task`(与 O-7/O-25 一致) |
+| **既有键状态流转数** | `83` 条 YELLOW✓ 登记(去重约 `40+` 键) | --auto 基于 git 证据自动推进:family.invite.*(6 键)/ team.invitation.create / team.profit.*(settle/hook/cron/pipeline)/ team.star.*(myView/digest/multiplier)/ team.admin.manage / team.user.portal / family.signature.*(healthPlan/consignee)/ family.earnings.*(adminRole/poolToggle)/ admin.familyCoupon.backToList / admin.family.reportEntry / guhe.l1.pageTailClean 等 |
+
+**REQUEUE 处置**:--auto 对 S-cfc-28/19/29/30/31/32/50/51/54/74/75/76/79/80/100 等 done 但无 git 证据的 GREEN/YELLOW 键,按 O-22 裁决 `REQUEUE-SKIP-O22`(键级已实现定论)→ 保持 done 不重派,不写 `needs_human`。
+
+---
+
+### 1.4 本轮 git 提交与推送证据(真理证据)
+
+> --auto 自动置 YELLOW 的 83 条登记均经 `git_evidence()` + `pushed_to_remote()` 双校验(`commit_kind()` 内置 `merge-base --is-ancestor <sha> <data_ref>`)。代表证据 sha(触及 1~9 文件,全部 pushed):
+
+| 提交 sha | 关联能力键 | 阶段 | 触及文件类型 | 目标分支 | 已推送远端 | 备注 |
+|----------|-----------|------|--------------|----------|------------|------|
+| `2c65d98f7` | family.invite.joinRequiredInfoFrontend | YELLOW | 实现 | task/* → origin/cfclub | 是 | --auto 自动登记 |
+| `f1d3e663ee` | family.invite.joinValidationGate | YELLOW | 实现 | task/* | 是 | 40 位 sha |
+| `19c7439b25` | team.invitation.create | YELLOW | 实现 | task/* | 是 | — |
+| `649dd2be76` | team.profit.settle | YELLOW | 实现 | task/* | 是 | 3 文件 |
+| `b037fe71b` | team.profit.hook | YELLOW | 实现 | task/* | 是 | 7 文件 |
+| `0bf1815cf` | team.profit.cron | YELLOW | 实现 | task/* | 是 | 8 文件 |
+| `17b6d6bfb` | team.admin.manage | YELLOW | 实现 | task/* | 是 | 7 文件 |
+| `2b73e20f6` | team.star.myView | YELLOW | 实现 | task/* | 是 | 9 文件 |
+| `3d28ba94d` | team.profit.pipeline | YELLOW | 实现 | task/* | 是 | 9 文件 |
+| `239710c47` | family.earnings.adminRole / poolToggle | YELLOW | 实现 | task/* | 是 | 4 文件(双键共享) |
+
+> 汇报文件本身:本轮单文件提交 push(见下「收口」)。
+
+---
+
+### 1.5 状态机阶段分布与部署状态
+
+| 阶段 | 键数 | 备注 |
+|------|------|------|
+| UNTRACKED | `0`(⏳ 目标池 0) | — |
+| RED | `30` | 12 个派发在途(S-cfc-247~279 RED 契约测试等)+ 其余待派 |
+| YELLOW | `165` | 本轮 +19(上轮 146 → 本轮 165),--auto 基于 git 证据自动置 |
+| GREEN | `8` | REQUEUE-SKIP-O22 保持 done |
+| DONE | `15` | — |
+
+| 部署项 | 值 | 说明 |
+|--------|-----|------|
+| 本轮部署次数 | `~10` 次(自动) | --auto 对新置 YELLOW 键自动派发 testing 部署验证,`_MAX_DEPLOY_PER_RUN=10` 限流 |
+| 部署在途 | `pending 56 / confirmed 77` | 40+ 键本轮追加自动待部署验证,待编排侧 `--deploy-done <env> --commit <sha>` 收口(O-24 持续推进) |
+| 最新 `last_deployed` | 未变 | 本轮未手动 --deploy-done |
+| GREEN 部署链验证 | 不适用 | 本轮无新 GREEN 闭环(GREEN 8 键均 O-22 已实现定论) |
+
+---
+
+### 1.6 数据源健康度
+
+| 数据源 | 读取键数 | 是否正常 | 备注 |
+|--------|----------|----------|------|
+| 需求侧(⏳ wish) | `0` | 正常(口径为 0) | CFC 当前为「发现/跟踪」模式,需求侧 ⏳ 表未配置匹配项 → 0,非静默失效(已多轮确认) |
+| 契约常量(contract) | `0` | 正常(口径为 0) | 同上;SC→能力键映射走 sc-key-map.md 而非 ops_file 常量 |
+| 测试用例引用(test_case_map) | `0` | 正常(口径为 0) | 用例引用∩⏳=0(⏳ 为空所致);测试用例台账由测试侧 automation-status.md 维护 |
+| 执行结果回填(case_results) | `0` | 正常(口径为 0) | 未配置执行结果回填路径 |
+
+---
+
+## 二、下一步需要研发处理的事项
+
+| 序号 | 事项描述 | 依赖/前置条件 | 预估完成时间 | 优先级 | 状态 |
+|------|----------|---------------|--------------|--------|------|
+| 1 | 下轮 `--auto --limit 2` 续派 25 个超限跳过的 pending(S-cfc-351/365/371~391) | 各节点配额释放(--auto requeue 已置回 pending;S-cfc-351 requeue=3 临界 exhausted) | 下轮 02:00 档 | P1 | 待启动 |
+| 2 | 部署 pending 56 回执收口(O-24) | 测试侧部署会话回执 → 编排侧 `--deploy-done` | 下轮 | P1 | 进行中 |
+| 3 | 11-14 需求变更 `8d01d0dea`(article.search 小程序知识分享页搜索)→ 按 O-2 方案 A 展开为能力键 + `--add-task`(双溯源齐备:需求文档 + 设计正本) | 主理人追认 SC 编号或按既有 article.search 键推进 | 下轮 | P2 | 待启动 |
+| 4 | SC-P-62(contact.group.import)RED 契约测试已合入 `4adcd03ca`(S-cfc-284)→ 待实现(下轮 RED→YELLOW 派发范围) | 实现会话承接 | 下轮 | P1 | 待启动 |
+
+---
+
+## 三、阻塞与风险
+
+| 阻塞项 | 影响范围 | 阻塞类型 | 处置进展 | 需要协调 |
+|--------|----------|----------|----------|----------|
+| 主工作树他人 WIP `1093` 处(M .gitignore + D .tdd/_r189_* 等测试侧日志删除) | `--clean-check` 退出码 1,但与 SC 跑通判据③「该场景工作区干净」零交集(O-3 判据③) | 测试(他人会话未提交改动) | 只报不动(纪律:不强制提交/不丢弃/不 stash 他人改动) | 无(不阻塞本轮 SC 判定) |
+| 0 新增能力键 + 池空无溯源 → 防假红收敛 | 长期挂起项(O-7/O-25) | 需求 | 下轮若池空按四类实际工作溯源(未跑通 SC / TR / B / CF-CR / CI 缺口)建任务,无则收敛 | 无 |
+| S-cfc-351 requeue=3 临界 exhausted | 单任务 | 测试 | --auto 自动 requeue 上限 3 次后置 `needs_human`,下轮观察 | 下轮若 exhausted 需人工核对证据 |
+
+---
+
+## 四、下轮工作规划
+
+| 计划项 | 预计完成时间 | 前置依赖 | 涉及会话标签 | 备注 |
+|--------|--------------|----------|--------------|------|
+| 续派 25 个超限 pending | 下轮 02:00 档 | 节点配额释放 | lan-189/lan-204/local-lan-4090/mes-local/pub-iwintrue | --auto --limit 2 每节点 |
+| 跟进部署 pending 56 回执 | 下轮 | 部署会话回执 | cfc-test | O-24 |
+| 观察 S-cfc-351 exhausted 判定 | 下轮 | --auto requeue | — | 达上限置 needs_human |
+| 若 8d01d0dea 展开为键则 add-task | 下轮 | 主理人追认 | — | 双溯源已备 |
+
+---
+
+## 收口记录(本汇报)
+
+- **S1 互斥门**:PASS(state.json mtime 距今 31.6 分钟 >5 分钟;worklog.active=null;无锁)。判定轮首固化,全程未重判。
+- **S2 失败补跑**:不触发(最新已推汇报 report-dev-2026-11-14-1956.md mtime 20:04 距已 5.2h > 2h,**但** state.json mtime 01:37 距今 <2h,两条件未同时满足)。
+- **S3 盘点**:--status / --inspect(测试角色) / --resume --dry-run / --changes / --clean-check / git log origin/cfclub 近 20 条全部完成。
+- **S4 恢复**:0 恢复(候选 1 个非 TDD 会话,他人 WIP 不动)。
+- **S5 心跳 tick**:**跳过**(config#harvest.heartbeat.enabled=false)。
+- **S6 会话填充 fill_capacity**:**跳过**(config#harvest.fill_capacity.enabled=false)。
+- **S7 派发**:`--auto --role 开发 --limit 2` 成功 10 / 失败 0 / 跳过超限 25;40+ 键自动置 YELLOW 并自动派发部署验证。
+- **S8 池空续建**:不适用(池非空,pending 45)。
+- **S9 收口纪律**:未 git add -A、未 checkout/stash、未碰他人 WIP;状态推进仅本地 state.json(.gitignore 排除,不入库不推送)。
+- **S10 汇报**:本文件单文件精确提交 push 至 origin/cfclub,随后 --clean-check 复核。
+- **S11 铁律**:不伪造证据(全部 sha 经 merge-base 校验);互斥命中轮零副作用(本轮 S1 PASS,正常收割);他人 WIP 只报不动;无人值守不提问。
+- **webhook**:本轮不在发送窗口(档位 {6,10,14,18,22} 整档;当前 01:45)→ 未发,如实记录。
+- **派发模型链**:--auto 内置各节点实例级 model_chain(lan-189=axon/deepseek、lan-204=axonhub/deepseek、local-lan-4090=axonhub/deepseek、mes-local=axonhub/deepseek、pub-iwintrue=etotem/deepseek),按节点真实可用模型适配,未走全局链。
+
+---
+
+**汇报人**:研发负责人(定时自动化编排侧)  
+**汇报时间**:2026-11-15 01:45  
+**模板版本**:v1.2(2026-11-14)