test(admin): retain PDA batch gap until verified
This commit is contained in:
@@ -318,11 +318,12 @@ export async function run(context) {
|
||||
|
||||
const canonicalBatchReplay = await request(context, 'POST', batchPath, batchPayload,
|
||||
{ 'Idempotency-Key': batchKey })
|
||||
context.assert(MODULE, 'PDA 原子批次同参同键重放返回同一终态', canonicalBatchReplay,
|
||||
canonicalBatchReplay.http === 200 && codeOf(canonicalBatchReplay) === '200'
|
||||
const atomicBatchReplayVerified = canonicalBatchReplay.http === 200 && codeOf(canonicalBatchReplay) === '200'
|
||||
&& id(canonicalBatchReplay.body?.data?.id) === canonicalTaskId
|
||||
&& canonicalBatchReplay.body?.data?.taskStatus === 'COMPLETED'
|
||||
&& Number(canonicalBatchReplay.body?.data?.version) === Number(pickedCanonical?.version),
|
||||
&& Number(canonicalBatchReplay.body?.data?.version) === Number(pickedCanonical?.version)
|
||||
context.assert(MODULE, 'PDA 原子批次同参同键重放返回同一终态', canonicalBatchReplay,
|
||||
atomicBatchReplayVerified,
|
||||
`HTTP=${canonicalBatchReplay.http}, code=${codeOf(canonicalBatchReplay)}, taskVersion=${canonicalBatchReplay.body?.data?.version ?? 'missing'}`, OPTIONS)
|
||||
|
||||
// The deployed settlement contract completes a one-item task during pick. A
|
||||
@@ -493,6 +494,7 @@ export async function run(context) {
|
||||
voidedEvidenceId: id(voidTarget?.id), evidenceTypes,
|
||||
loadingPlanId, containerBookingId, containerNo, warehouseId, canonicalPdaTaskId: canonicalTaskId,
|
||||
pickingTaskId: canonicalTaskId, inboundVersion: loadingVersion,
|
||||
atomicBatchVerified: directPdaCompletion && atomicBatchReplayVerified,
|
||||
marker: context.marker, inboundStatus: 'LOADING', loadingPlanStatus: 'COMPLETED', finalStatus: 'COMPLETED',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,11 @@ export async function run(context) {
|
||||
context.addStep(MODULE, '入库兼容入口拒绝客户端伪造汇总数量', forged, failure(forged),
|
||||
`HTTP=${forged.http}, code=${codeOf(forged)}`, OPTIONS)
|
||||
|
||||
if (fixture?.atomicBatchVerified !== true) {
|
||||
context.addCoverageGap(MODULE, OPTIONS.scenario, 'PDA 原子批量成功与批次幂等闭环',
|
||||
'原子 batch 端点已部署,但本轮合法整批提交或同键重放未通过真实 HTTP 断言;保留真实失败证据',
|
||||
'deployment-blocker')
|
||||
}
|
||||
context.addCoverageGap(MODULE, OPTIONS.scenario, 'PDA 实时库存查询与提交前库存快照校验',
|
||||
'当前 PDA Controller/OpenAPI 未公开实时库存查询或库存版本快照端点,不能用智能装柜候选列表伪装库存契约',
|
||||
'contract-gap')
|
||||
|
||||
Reference in New Issue
Block a user