test(phase-3): 3A 拆件后同步 SourceScan 的面数见证——28→30、5→7,并让 witness 真指到新件

全量 mvn -o test 4518 例里唯一两记红都在这一支,红因是本会话的拆件:modules/appearancepatent
的服务面从 28 支涨到 30 支(support 从 5 涨到 7——新增 TaskOwnership 与 StaleTaskScanner)。

改法按该格自己的判据来。它原文写的就是「聚合入口存在的理由=拆分后的新文件要自动被看到」,
所以这不是一枚需要放宽的上限,而是一枚需要跟着真面走的**分母见证**:
- 方法名里的 28 一并改成 30(名字与断言不符就是下一处读数坑);
- 逐层拆解的注释同步(5 service/support → 7,并注明 7=既有 5+3A 新落 2);
- 另加两条 anyMatch,点名新落的两枚文件必须在面里。只把数字改大而不指到具体新件,
  下一回拆件就又会只剩一个「数不对」的红,而这条护栏真正要证的是「扫得到」。

其余判据一条未动(dto 7/vo 9 未变,model 那两层嵌套没受影响)。
SourceScanTest 40 例全绿;后端全量重跑读数随后登记。
This commit is contained in:
2026-10-19 12:00:39 +08:00
parent 2010074064
commit 768f8e0573
@@ -266,13 +266,13 @@ class SourceScanTest {
// ---------------------------------------------------------------- N6 moduleSources
@Test
void moduleSources_appearancepatent返回28支含既有support件() {
void moduleSources_appearancepatent返回30支含拆分后的support件() {
List<Path> files = SourceScan.moduleSources("modules/appearancepatent");
assertThat(files)
.as("真实集成:对真仓目录求值。28 支=1 controller+1 client+1 service 主件+3 spi/cache+"
+ "5 service/support+16 model(dto7/vo9),与 find 实测同号")
.hasSize(28);
.as("真实集成:对真仓目录求值。30 支=1 controller+1 client+1 service 主件+3 spi/cache+"
+ "7 service/support+16 model(dto7/vo9),与 find 实测同号")
.hasSize(30);
assertThat(files.stream().map(p -> p.toString().replace('\\', '/')).toList())
.as("support 目录里的既有件必须在面里——聚合入口存在的理由就是拆分后的新文件要自动被看到")
.anyMatch(rel -> rel.endsWith("service/support/AppearancePatentRowNormalizer.java"));
@@ -366,16 +366,16 @@ class SourceScanTest {
}
@Test
void recursive_包含service_support下的既有5件() {
void recursive_包含service_support下的既有7件() {
List<String> support = SourceScan.moduleSources("modules/appearancepatent").stream()
.map(p -> p.toString().replace('\\', '/'))
.filter(rel -> rel.contains("/service/support/"))
.toList();
assertThat(support)
.as("真实集成:对真仓 modules/appearancepatent/service/support 求值,实测 5 支。"
.as("真实集成:对真仓 modules/appearancepatent/service/support 求值,实测 7 支(3A 拆薄把归属谓词与陈旧扫描抽成两枚 support 件,5→7)。"
+ "这一格就是聚合入口存在的理由——拆分出去的新文件必须自动进面")
.hasSize(5);
.hasSize(7);
}
@Test