完善财务全量验收链路

This commit is contained in:
2026-08-12 13:24:17 +08:00
parent 505e834536
commit d2704f68a6
11 changed files with 295 additions and 44 deletions
@@ -138,10 +138,40 @@ test('phase3 loading proves mixed-line rollback across task, all items and opera
'非法混合批次后回查 PDA 操作历史',
'合法明细加非法明细失败后任务、全部明细和操作历史零写入',
])
assert.match(loading, /itemSignature\(unchangedAfterInvalid\) === itemSignature\(beforeInvalidTask\)/)
assert.match(loading, /taskItemsSignature\(unchangedAfterInvalid\) === taskItemsSignature\(beforeInvalidTask\)/)
assert.match(loading, /operationsSignature\(afterInvalidOperations\) === operationsSignature\(beforeInvalidOperations\)/)
})
test('phase3 loading proves stale inventory zero-write for all items and completion audit', () => {
const loading = source('./phase3-loading.mjs')
assert.match(loading, /taskItemsSignature\(afterStaleTask\) === taskItemsSignature\(beforeMutationTask\)/)
assertOrder(loading, [
'旧 token 冲突对任务、明细、已拣数量和操作历史零写入',
'库存变化后刷新 PDA 实时库存快照',
'原子提交柜次 PDA 整批拣货',
'PDA 原子批次同参同键重放返回同一终态',
'回查原子 Batch 完成审计',
'合法 Batch 完成后保留 CLAIM/BATCH 操作者审计且无伪造 REVIEW',
])
})
test('phase3 loading fixture forces A0 through reversible public location status APIs', () => {
const entry = source('../admin-test-env-acceptance.mjs')
const measurement = source('./inbound-measurement.mjs')
const orders = source('./orders.mjs')
assertOrder(entry, [
'disableAvailableLocationsForA0(warehouseId)',
'this.context.phase3LoadingRequireSharedOverflow = true',
"executeModule('inbound-measurement-phase3-loading-fixture'",
'restoreAvailableLocationsAfterA0(warehouseId, disabledLocations)',
])
assert.match(entry, /\/locations\/\$\{encodeURIComponent\(location\.id\)\}\/status/)
assert.match(entry, /\{ status: 'DISABLED', version: Number\(location\.version\) \}/)
assert.match(entry, /\{ status: 'AVAILABLE', version: location\.version \}/)
assert.match(measurement, /phase3LoadingRequireSharedOverflow !== true/)
assert.match(orders, /receivingWarehouseId: id\(master\.receiving\.id\)/)
})
test('customs provisions released booking and completed truck for the selected loading container', () => {
const value = source('./phase3-customs.mjs')
assertOrder(value, [