test: verify complete PDA batch history

This commit is contained in:
2026-08-25 13:59:58 +08:00
parent 98766e2b1a
commit 9093550615
5 changed files with 49 additions and 13 deletions
@@ -406,6 +406,7 @@ test('preload and loading versions use immediate operation baselines and exact p
})
test('PDA completion acceptance verifies immutable BATCH and COMPLETE_LOADING audit with operator metadata', () => {
const loading = source('./phase3-loading.mjs')
const container = source('./phase3-container-loading.mjs')
const convergence = source('./phase3-pda-convergence.mjs')
assertOrder(container, [
@@ -426,6 +427,13 @@ test('PDA completion acceptance verifies immutable BATCH and COMPLETE_LOADING au
assert.match(container, /Boolean\(item\.operatorId\) && Boolean\(item\.createdAt\)/)
assert.match(convergence, /PDA 原子批次完成审计包含 BATCH 操作/)
assert.match(convergence, /item\.actionType === 'BATCH'/)
for (const key of ['bridge-batch', 'exception-skip-batch', 'exception-partial-batch', 'dynamic-pick']) {
assert.match(loading, new RegExp(key))
}
assert.match(loading, /expectedBatchOperationIds = \[batchKey, skipBatchKey, partialBatchKey, dynamicBatchKey\]/)
assert.match(loading, /skipBatchVerified, partialBatchVerified, dynamicIncrementVerified/)
assert.match(convergence, /expectedBatchOperationIds\.length === 4/)
assert.doesNotMatch(convergence, /expectedBatchCount = fixture\?\.dynamicIncrementVerified/)
})
test('phase3 loading proves mixed-line rollback across task, all items and operations', () => {
@@ -493,6 +501,9 @@ test('phase3 loading resolves legal SKIP and PARTIAL exceptions before downstrea
assert.match(measurement, /detailBoxCode = `\$\{inboundCode\}#\$\{originalPackageCount\}-\$\{cartonIndex\}`/)
assert.match(measurement, /items: draftItems/)
assert.match(measurement, /expectedPackages === originalPackageCount/)
assert.match(loading, /skipBatchVerified = context\.assert/)
assert.match(loading, /partialBatchVerified = context\.assert/)
assert.doesNotMatch(loading, /if \(Number\(dynamicCandidate\?\.availablePackageCount\) < 2\) return/)
})
test('phase3 loading fixture forces A0 through reversible public location status APIs', () => {