ReconcileLibraryJobs 不再把 completed capture queue 当成不存在,保留待核对 pending 封存作业;failed/cancelled/missing 仍按真实队列状态处置。管理员核对 入口只允许精确的启动误判形态,并要求 completed queue、export succeeded、 唯一 test_sealed 版本、来源身份与完整归档复核。新增 library_job_repairs 不可变审计表,在同一事务内 CAS 保存原 state/stage/error/recovery/finished_at 及本次 actor/原因/证据后修复;真实失败/取消不开放。 验证:真实隔离 PostgreSQL 启动收敛 RED/GREEN、启动→handler 纵向 pending 与 系统误判 failed、审计保留/幂等、负例;真实 Go 全量与 make verify 17 项通过。
This commit is contained in:
@@ -744,6 +744,32 @@ describe('ReleaseTargetsView(确认稿布局)', () => {
|
||||
expect(engineer).not.toContain('核对封存结果')
|
||||
})
|
||||
|
||||
it('系统误判的封存作业(已完成队列+成功导出)仍可由管理员核对;真实失败不显示', () => {
|
||||
const misclassified: LibraryJobRecord = {
|
||||
...persistedSeal,
|
||||
state: 'failed',
|
||||
stage: '',
|
||||
snapshot_id: '',
|
||||
error: '队列中已无对应作业,业务作业未收到结果',
|
||||
recovery: '封存作业由 agent 恢复来源;确认来源 healthy 后可重发',
|
||||
stages: [{ ...persistedSeal.stages[0], state: 'succeeded' }],
|
||||
}
|
||||
const admin = render({
|
||||
canReconcileCapture: true,
|
||||
overview: { ...overview, job: misclassified, jobs: [misclassified] },
|
||||
})
|
||||
expect(admin).toContain('核对封存结果')
|
||||
const realFailure = render({
|
||||
canReconcileCapture: true,
|
||||
overview: {
|
||||
...overview,
|
||||
job: { ...misclassified, error: '真实导出失败' },
|
||||
jobs: [{ ...misclassified, error: '真实导出失败' }],
|
||||
},
|
||||
})
|
||||
expect(realFailure).not.toContain('核对封存结果')
|
||||
})
|
||||
|
||||
it('封存作业只显示只读导出步骤,不冒充生产备份/同步/生效或目标维护', () => {
|
||||
const html = render({
|
||||
jobs: [runningJob],
|
||||
|
||||
Reference in New Issue
Block a user