test(fba): preserve verified fleet and fulfillment acceptance workflows
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { selectSessionPdaOperator } from './domestic-pda-operator.mjs'
|
||||
import { createHash } from 'node:crypto'
|
||||
const MODULE = 'phase3-order-splitting'
|
||||
const SCENARIO = 'source-loaded-single-remainder-chain'
|
||||
const OPTIONS = { scenario: SCENARIO, deploymentBlocker: true }
|
||||
@@ -47,6 +48,8 @@ function sameBookingTransport(left, right) {
|
||||
}
|
||||
|
||||
async function request(context, method, path, body, headers = {}, token = undefined) {
|
||||
// Shared reads retry transport failures; business rejections remain final evidence.
|
||||
if (method === 'GET') return context.request(method, path, body, token ?? context.token, headers)
|
||||
try {
|
||||
const response = await fetch(`${context.options.gateway}${path}`, {
|
||||
method,
|
||||
@@ -165,8 +168,9 @@ function snapshotMatches(tree, original, loaded, remaining, activeSuffix) {
|
||||
&& activeMatches && quantityConserved(tree)
|
||||
}
|
||||
|
||||
function bookingPayload(marker, sequence, source, agent, carrier) {
|
||||
const suffix = `${marker}-${sequence}`.replace(/[^A-Za-z0-9]/g, '').slice(-18)
|
||||
export function bookingPayload(marker, sequence, source, agent, carrier) {
|
||||
const suffix = createHash('sha256').update(JSON.stringify([marker, sequence, id(source.sourceOrderId)]))
|
||||
.digest('hex').slice(0, 18)
|
||||
return oceanBookingDraft({ marker }, suffix, {
|
||||
customerId: source.tenantId, customerName: source.customerName, channelCode: source.channelCode,
|
||||
warehouseId: source.warehouseId, warehouseName: source.warehouseName,
|
||||
|
||||
Reference in New Issue
Block a user