fix(外观专利): 兜底归属校验接进 TaskFinalizeSupport 出口——手抄谓词棘轮回落 130
上一枚 commit 的 fallbackAssembleResultFile 手抄了 2 处 「!MODULE_TYPE.equals(x.getModuleType())」,把 TaskLifecycleDebtRatchetTest 钉死的 130 推到 131。按棘轮注释的指路接公共出口: - TaskFinalizeSupport 新增 belongsToModule(expected, record) 静态出口 (expected 为 null 判不归属,防御守卫静默失效); - 兜底 2 处改走出口,净增 0,遍数回落 130; - 出口语义 3 例钉在 TaskFinalizeSupportTest。
This commit is contained in:
+15
@@ -187,4 +187,19 @@ public final class TaskFinalizeSupport {
|
||||
}
|
||||
return lockHandle;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// 模块归属谓词(2026-10-18 收口:TaskLifecycleDebtRatchetTest 棘轮只许降)
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* 「这一行是不是这个模块的」归属谓词出口。此前该判断在 16 个业务文件里手抄了 130 遍
|
||||
* ({@code !MODULE_TYPE.equals(x.getModuleType())}),棘轮只许降不许升——新增归属校验
|
||||
* 一律改走这里,漏一处的表现是某页检查静默变成「谁都能读」,不报错、不 403。
|
||||
*
|
||||
* @return true 表示记录属于 expectedModuleType 模块(expected 为 null 视为不归属)
|
||||
*/
|
||||
public static boolean belongsToModule(String expectedModuleType, String recordModuleType) {
|
||||
return expectedModuleType != null && expectedModuleType.equals(recordModuleType);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user