This is an internal working record, not an everyday instruction. It was written while the system was being rebuilt, for whoever maintains it. If you are here to do today's work, use the everyday documents instead: Procedures · Processes · Runbooks · The working day, step by step
MK Trade / Allocation / Physical Scale — Release And QA Delta Matrix — 2026-08-09¶
- Status:
CURRENT SOURCE COMPARISON MATRIX / DOCUMENTATION ONLY - Release source:
master@baff406d964b9f785bf98d2ae84cfb262e26f4b2 - Integration source:
qa@1dfed7d5c827f992e763c63bfca95324a60af387 - Parent authority:
MK_TRADE_ALLOCATION_SCALE_POST_REFRESH_BRANCH_DELTA_2026-08-09.md - Phase implementation:
USER HOLD
1. Matrix Semantics¶
RELEASED
= present in master source
QA CANDIDATE
= present only in qa integration source
SHARED
= materially equivalent in both reviewed refs
EVIDENCE REQUIRED
= source alone does not establish current environment behavior
A row can be RELEASED and still require Runtime, DB, role or policy evidence.
2. Trade / Cost / Rate / Document Matrix¶
| Capability | Release | QA | Current authority | Evidence / policy gap |
|---|---|---|---|---|
| Trade Summary AP/AR/Margin derivation | released | candidate may include adjacent owner changes | release for current operation | same-row parity and accounting acceptance |
| Date From/To filtering | undated rows retained | expected to inherit release unless candidate differs | release | whether undated rows belong in bounded reports |
Derived OPEN/SHIPPED/CLOSED |
released | expected to inherit | release | labels can imply more than formula proves |
Derived CLAIMED filter |
released | expected to inherit | release | accounting meaning and negative-margin handling |
mk-deal-ledger alias |
URL preserved | integration mapping may differ by module data | environment data | migration applied-state and menu/module parity |
| Outbound Cost read | released | candidate helper changed | branch-specific | same transaction owner and status semantics |
| Outbound Cost create/update/delete | prior advanced helper guard removed | candidate further changes possible | release for master, QA for candidate | accepted actor/action matrix |
| Packing Rate correction | released baseline | candidate Booking route changed | branch-specific | per-item disposition and print race |
| Packing document render | released baseline | candidate UI/Booking changes possible | branch-specific | rendered source and persisted-rate readback |
| Local Invoice | released baseline | candidate page label delta | branch-specific presentation | invoice identity and lifecycle |
| Booking Confirmation | released baseline | candidate Booking route changes | branch-specific | source priority and current template |
| Sales Weight Ticket | released baseline | Scale candidate may alter source timing | branch-specific | physical vs derived evidence boundary |
| Export Brokerage create/cancel | released baseline | candidate route changed | branch-specific | child manifest and response-loss recovery |
3. Order And Reference Handoff Matrix¶
| Operation | Release behavior | QA consideration | Required readback |
|---|---|---|---|
| Existing Sales Order Booking update | valid new link, unlink, or ignored request preserving current link | shared helper is further changed in QA | stored T_LOAD.BOOKING_ID, Booking projection, execution bridge |
| Existing Sales Order Commercial Order update | valid relink, unlink, or ignored invalid request | QA shared writer differs | stored COMMERCIAL_ORDER_ID, relation type, downstream projection |
| Existing Purchase Commercial Order update | valid relink, unlink, or ignored invalid request | QA shared writer differs | stored relation and item compatibility |
| Non-ocean locked execution bridge update | existing booking/container/size can be preserved | QA may synchronize through additional service | bridge row, source order, equipment/load relation |
| Ocean locked bridge update | booking equality remains significant | QA relationship rules must be compared | Booking, Equipment, Equipment Load and Order |
| Empty item atomic Save | released shared path permits empty item array | QA tests explicitly cover empty Outbound create behavior | active item count and child relation state |
| Line-item deletion | prior advanced-operation guard removed | QA role/capability changes may alter entry gate | exact item existence, Allocation relation, balances |
| Generic Booking form | selected source restrictions removed | QA Booking routes differ | Booking, Equipment Load and Outbound reference readback |
| Advanced Booking UI | Super Admin or role 1 | QA UI/source may differ | visible control and API allow/deny |
4. Inventory Allocation Matrix¶
| Capability | Release | QA | Current authority | Gap |
|---|---|---|---|---|
| Source Lot eligibility | previous current packet | expected same dedicated logic | release until proven otherwise | DB population and exact predicate |
| Target Outbound eligibility | previous packet plus shared order changes | candidate OrderSync/shared writer changes | branch-specific | zero-item and synchronized-target behavior |
| Apply command | no direct post-refresh release change identified | dedicated route may be same, shared owners differ | release for master | target item/relation/balance readback |
| Remaining quantity | existing open policy | candidate sync can affect source projection | open | authoritative quantity formula |
| Remaining net weight | existing conditional decrement | candidate shared writer changes | branch-specific evidence | overdraw, rounding and reversal |
| Allocated target item | released current contract | candidate OrderSync may update projection | branch-specific | identity stability |
| Item delete after Allocation | broader released write scope | candidate role/capability may differ | undefined policy | relation and balance recovery |
| Order reference change after Allocation | preserve/ignore semantics possible | candidate shared writer differs | branch-specific | allocation remains attached to intended target |
| Correction/reversal | not a general current command | same unless separately changed | open | reason, audit, compensation and owner |
5. Physical Scale Matrix¶
5.1 Check-in¶
| Dimension | Release master@baff |
QA qa@1dfed |
Disposition |
|---|---|---|---|
| Integrated route | /yms/scale/check-in/execute |
same | shared route identity |
| Purchase entry stage | Gross | Gross | shared direction |
| Doortrade entry stage | Gross | Gross | shared direction |
| Sales entry stage | Tare | Tare | old contradiction closed |
| Export entry stage | Tare | Tare | old contradiction closed |
| Inbound ticket value source | commodity Gross aggregate | commodity Gross aggregate | shared candidate pattern |
| Sales ticket Tare source | commodity Gross aggregate | caller ticket Tare retained | release semantic gap / QA candidate correction |
| Export ticket Tare source | commodity Gross aggregate | caller ticket Tare retained | release semantic gap / QA candidate correction |
| Commodity weight requirement | positive coherent weights for every flow | Export can omit; non-Export validates when provided | branch-specific policy |
| Persisted item-count assertion | absent | present | QA-only readback |
| Order/item save | integrated | integrated | shared high-level boundary |
| Ticket save | integrated | integrated | shared high-level boundary |
5.2 Check-out¶
| Dimension | Release master@baff |
QA qa@1dfed |
Disposition |
|---|---|---|---|
| Legacy route | /yms/scale/check-out |
present | shared compatibility route |
| Integrated route | absent | /yms/scale/check-out/execute |
QA-only candidate |
| Order-ticket relation assertion | not in integrated route because route absent | present | QA-only candidate |
| Order header/item save inside integrated command | absent | present | QA-only candidate |
| Scale Out inside integrated command | absent | present | QA-only candidate |
| Purchase Finalize | separate route | separate route | not universally absorbed |
| Outbound close | separate owner | separate owner | not universally absorbed |
| Release smoke expectation | waits for integrated route | matches candidate route | release source/test mismatch |
| One-writer status | legacy | legacy plus integrated | unresolved candidate cutover |
5.3 Other Scale commands¶
| Capability | Release | QA | Gap |
|---|---|---|---|
| Ticket list/detail/events | menu/module scoped | shared plus candidate infrastructure | current role/data evidence |
| Reweigh correction | existing YMS helper | candidate expected to retain | exact route/caller and event readback |
| Void/Reversal | existing YMS helper | candidate expected to retain | competing BMS writer and downstream blockers |
| Purchase walk-in | released | candidate | role/input and owner relationship |
| Physical device | not established | not established by reviewed delta | device evidence / optional future adapter |
| released menu-role compatibility | candidate infrastructure may differ | role/page/record evidence |
6. Route And Caller Matrix¶
| Surface | Release | QA | Notes |
|---|---|---|---|
| Scale Portal Check-in UI | integrated Check-in | integrated Check-in | payload semantics differ by branch source |
| Scale Portal Check-out UI | release source must be verified against legacy route | candidate expected integrated route | browser network evidence required |
| Scale workflow smoke | expects integrated Check-out | aligns with candidate route | not proof of release route |
| Booking advanced controls | role-scoped UI | candidate may differ | backend parity separate |
| Trade Summary pages | released | candidate | module alias data separate |
| Allocation Workbench | released packet | candidate shared writers differ | dedicated page alone does not prove child parity |
7. Recovery Matrix¶
| Condition | Unsafe response | Required response |
|---|---|---|
| Trade date filter includes unexpected undated row | delete or edit row to fit report | identify missing date owner and classify separately |
| Reference request appears ignored | repeat Save | reread stored link and classify preserved/applied/rejected |
| Allocation target has zero items | force Apply | stop and verify target eligibility and item identity |
| Allocation relation remains after item delete | manually edit balance | preserve evidence and use approved correction owner |
| Scale Check-in response missing | create another Order/Ticket | reread Order, Items, Ticket and bridge |
| Release Check-out UI waits for absent route | call another write route blindly | record source/deployed SHA and network route; stop mutation |
| QA integrated Check-out response missing | replay entire command | reread Order, Items, Ticket, bridge and downstream child |
| Outbound Tare equals commodity Gross | overwrite Ticket directly | trace payload and stage provenance; classify source/runtime result |
| Purchase Finalize failed after Scale Out | repeat Scale Out | resume Purchase Finalize only |
| Legacy and integrated routes both active | choose one ad hoc | identify caller/cohort authority before execution |
8. Migration Consequences¶
The target React + Next.js migration must not collapse the two current refs into one assumed contract.
Required order:
release behavior capture
-> QA candidate delta capture
-> accepted target decision
-> read parity
-> one selected writer per cohort
-> controlled cutover
-> rollback
-> old caller-zero
Specific Scale rule:
legacy Check-out
and integrated Check-out
must never both be authoritative for the same user/cohort
Specific Order/Trade rule:
UI role restriction
!= backend command authorization
Specific Allocation rule:
shared Order synchronization
must not silently change Allocation identity or balance authority
9. Current Status¶
release delta mapped: COMPLETE
QA candidate delta mapped: COMPLETE FOR NAMED SURFACES
current environment evidence: NOT RUN
accepted target policy: OPEN / PARTIAL
M3: NO
M4: NO
Phase progress: NONE
---¶
Source:
docs/processes/MK_TRADE_ALLOCATION_SCALE_RELEASE_QA_DELTA_MATRIX_2026-08-09.md— ctc repository · This page is an English translation of the source document. Identifiers, file paths and code symbols are unchanged.