fix(firstleg): atomically finalize PDA completion

This commit is contained in:
2026-09-01 11:11:43 +08:00
parent de0eddeee8
commit b5bc77b153
10 changed files with 181 additions and 46 deletions
@@ -37,7 +37,7 @@ test('AWAITING_REVIEW derives zero client actions and never needs a repeated bat
test('pending backend contract derives workflow from task items instead of assignment alone', () => {
assert.match(openApi,
/PendingTask:[\s\S]*workflowStatus: \{type: string, enum: \[UNASSIGNED, IN_PROGRESS, AWAITING_REVIEW\][^\r\n]*}/)
/PendingTask:[\s\S]*workflowStatus: \{type: string, enum: \[UNASSIGNED, IN_PROGRESS, AWAITING_REVIEW, PROCESSING, COMPLETION_FAILED\][^\r\n]*}/)
assert.match(mapper,
/WHEN SUM\(CASE WHEN pick_item\.item_status IN \('PENDING', 'PICKING'\)[\s\S]*= 0[\s\S]*THEN 'AWAITING_REVIEW'/)
assert.doesNotMatch(mapper,