拒绝接管不只要"分类对",还要三处落库都对:library_jobs 终态 failed + 保留预备份 基线 + 恢复指引里带得上那个基线;library_maintenance 的 released_at 仍为 NULL、 state=needs_restore(目标可能半写,释放等于谎称已恢复)。 用一次性库 kg_takeover_foreign_test 实跑: - TestFailLibraryTakeoverKeepsMaintenanceAndNamesBackup PASS (1.35s) - 负例:把恢复指引改成"无需恢复" ⇒ 同一用例红(library_takeover_integration_test.go:117) - TestTakeoverRefusesSameSnapshotRegisteredByAnotherJob / 超出历史窗口那条仍 PASS
This commit is contained in:
@@ -237,6 +237,11 @@
|
||||
"package": "knowledge-governance/cmd/worker",
|
||||
"test": "TestTakeoverRefusesSameSnapshotRegisteredByAnotherJob",
|
||||
"reason": "必须在真实 PostgreSQL(TEST_DATABASE_URL 指向可销毁测试库)上跑:要证明的是『同一个快照由别的作业登记成生效版本』不能当成本作业的完成证据——版本行 id 由 (kind, scope, 快照) 决定且写入是 upsert(会改写 source_job_id),这个形状只有存储层能造;默认 CI 无库 ⇒ 跳过,本机一次性库已实跑(含负例:撤掉身份判定后判成 pending_final)"
|
||||
},
|
||||
{
|
||||
"package": "knowledge-governance/cmd/worker",
|
||||
"test": "TestFailLibraryTakeoverKeepsMaintenanceAndNamesBackup",
|
||||
"reason": "必须在真实 PostgreSQL 上跑:断言『拒绝接管』的三处落库效果(作业 failed + 留预备份基线 + 维护 released_at 仍为 NULL/state=needs_restore),假 store 只能证明调用了函数;默认 CI 无库 ⇒ 跳过,本机一次性库已实跑(负例:把恢复指引改成\"无需恢复\"即红)"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user