MK Trade / Allocation / Physical Scale — Current Refresh Validation — 2026-08-08¶
- Status:
STATIC VALIDATION PASS / CURRENT ENVIRONMENT EVIDENCE NOT RUN - Current review ref:
qa/master@a71386e3baf176534939a42397249bcd2b535c49 - Trade refresh:
MK_TRADE_CURRENT_LINEAGE_AND_SOURCE_REFRESH_2026-08-08.md - Allocation refresh:
MK_INVENTORY_ALLOCATION_CURRENT_BASELINE_AND_CALLER_REFRESH_2026-08-08.md - Scale refresh:
MK_PHYSICAL_SCALE_CURRENT_BASELINE_AND_CALLER_REFRESH_2026-08-08.md - Effects: static source and documentation review only
- Phase implementation:
USER HOLD
1. Validation Purpose¶
This document verifies that:
- the Trade candidate-lineage classification was corrected using actual Git history;
- Allocation now has an exact source baseline and current caller map;
- Physical Scale's already-existing baseline is recognized and current source revalidated;
- current source facts are separated from policy and environment evidence;
- each read-only preflight uses current relation/column names and bounded evidence rules;
- no packet claims Runtime verification, M3 or M4.
2. Git Lineage Validation¶
Trade¶
misapplied candidate label:
d96498360bb9c3541a1b5f862284596a7ed217b9
merge base with current:
4f6165bc4c53a7d98b0c246392dd9ed5bd75c21c
candidate-only commit:
Loader Assignment / Final Clock Out only
The candidate-only commit does not modify Trade Summary, Export Brokerage, Outbound Cost, Packing Rate or output-document owner files.
Result:
candidate-only Trade implementation facts: NONE LOCATED
Trade lineage issue: RESOLVED
Allocation¶
The prior source authority lacked an exact source SHA. The current refresh pins:
qa/master@a71386e3baf176534939a42397249bcd2b535c49
and records exact owner blob identities.
Result: PASS.
Physical Scale¶
The existing source authority already declared:
qa@4f6165bc4c53a7d98b0c246392dd9ed5bd75c21c
The previous BASELINE MISSING classification was therefore incorrect. The current refresh revalidates at a71386e....
Result: PASS.
3. Source Blob Validation¶
3.1 Trade¶
Unchanged core owners:
Trade API
Trade query helper
Export Brokerage API
Outbound Cost helper/API
report query helper
shared MK post helper
Shared Booking route changed, but the reviewed Packing Rate block remains materially unchanged. Added changes are adjacent Street Turn and Booking Inquiry behavior.
Result:
CORE OWNER SOURCE CURRENT
ADJACENT SHARED-FILE DRIFT DOCUMENTED
3.2 Allocation¶
Pinned current owners include:
Workbench page/JS
Allocation API/query/post handlers
Allocation query helper
shared MK post helper
Current query facts validated from source:
LOT_STATUS IN ('OPEN', 'PARTIAL')
RECEIVED_DATE IS NOT NULL
REMAIN_NET_WEIGHT > 0
current source-item status exclusions
Current relation fields validated from source:
OUTBOUND_ORDER_ID
OUTBOUND_ORDER_ITEM_ID
INVENTORY_LOT_ID
ALLOCATED_QUANTITY
ALLOCATED_NET_WEIGHT
ALLOCATED_RATE
Result: PASS.
3.3 Physical Scale¶
Core YMS route and Scale Portal JS blobs are unchanged from the original baseline. Current integrated Check-in still forces:
WEIGHT_PREFIX = GROSS
for Purchase, Doortrade, Sales and Export, while the browser schema still expects Tare-first for Sales/Export.
Result:
STATIC CONTRADICTION CURRENT
RUNTIME OCCURRENCE NOT RUN
The BMS transaction helper drift reviewed in this interval belongs to Street Turn compensation; Scale update/delete behavior remains materially unchanged in targeted review.
4. Caller And Authority Separation¶
The refresh preserves the following separations.
Trade family¶
Trade query != accounting close
Export Brokerage orchestration != child-owner completion
Outbound Cost != generic AP authority
Packing Rate update != print readiness
render/print != durable document/file/email/provider result
Allocation¶
source/target query != Apply authorization
browser basket != authoritative command
allocated target item != complete allocation proof
remaining weight != remaining quantity policy
ordinary Outbound Save != Allocation authority
Scale¶
YMS Scale != BMS generic Scale writer
Check-in != Check-out
Scale-out != downstream finalization
order projection != physical ticket
live-weight placeholder != device evidence
Result: PASS.
5. Read-Only Preflight Validation¶
5.1 Inventory¶
| Package | SQL templates | Browser/host scope |
|---|---|---|
RBR-TRADE-001 |
42 | GET/render only |
RBR-ALLOC-001 |
34 | GET only |
RBR-SCALE-001 |
31 | GET plus separately authorized host/device metadata only |
Total SQL templates: 107.
5.2 Allowed statement forms¶
SELECT
SHOW
information_schema read
No template intentionally contains a mutating statement, row/table lock or mutating procedure.
Result: PASS.
5.3 Schema-first behavior¶
All packages begin with:
DB identity
table inventory
column inventory
index/constraint inventory
precision/relationship inventory
Optional or variant columns must be confirmed before dependent blocks run.
Result: PASS.
5.4 Tenant scope¶
Every business-row query requires a verified <CLIENT_ID>. Bounded detail queries additionally require approved record IDs.
Result: PASS.
5.5 Placeholder expansion¶
List placeholders such as:
<APPROVED_ORDER_ID_LIST>
<APPROVED_ITEM_ID_LIST>
<APPROVED_EQUIPMENT_LOAD_ID_LIST>
must be expanded only from preapproved, tenant-verified numeric IDs. Empty lists stop the block; they are not replaced with a broad predicate.
Result: PASS.
5.6 Sensitive-data boundary¶
The packages exclude:
- credentials/tokens;
- signatures;
- broad contact directories;
- full remarks and document bodies;
- foreign-tenant records;
- session/authorization payloads.
Result: PASS.
5.7 Effect boundary¶
The packages prohibit:
- Trade/Export/Cost/Rate writes;
- Allocation Apply/repair/reversal;
- Scale Check-in/Check-out/finalize/reweigh/reversal;
- provider/file/device effects;
- role/menu/config changes;
- Wiki publication.
Result: PASS.
6. SQL Contract Review¶
Trade¶
Current corrections validated:
T_LOAD.ORDER_STATUS, not an assumed genericSTATUS;T_BOOKING.NOT_IN_USE, not an assumed Booking lifecycle status;- Allocation relation uses current
OUTBOUND_ORDER_ITEM_IDandALLOCATED_NET_WEIGHT; - generated provenance is identified through marker presence without returning full remarks;
- source tables and output projections remain independent.
Result: PASS.
Allocation¶
Current query/write contract validated:
- source lot can be
OPENorPARTIAL; - source must be received and have positive remaining net weight;
- immediate Apply balance update is weight-based;
- quantity mismatch is evidence requiring classification, not automatic repair;
- relation integrity uses current allocation columns.
Result: PASS.
Scale¶
The Scale preflight deliberately treats flow identity as a relation-derived fact. Where an environment lacks an assumed bridge column, the schema-first stop condition applies.
The package does not resolve the Gross/Tare contradiction by changing data or interpreting a missing flow.
Result: PASS WITH ENVIRONMENT ADAPTATION REQUIRED.
7. Overclaim Review¶
The documents do not claim:
- current DB rows were read;
- current pages were opened under target roles;
- an actual duplicate, over-allocation or field incident exists;
- a Scale device is connected;
- Trade
CLOSEDis accounting close; - Allocation is full-lot or partial by accepted policy;
- Sales/Export Gross-first behavior is accepted;
- BMS Scale writes are approved;
- any family reached M3/M4.
Result: PASS.
8. Open Policy And Evidence¶
Trade¶
- accounting/source-class semantics;
- Export Brokerage durable identity and compensation;
- Outbound Cost subtype/version/line semantics;
- Rate range/partial-result policy;
- durable document/file/email boundaries;
- current role and Wiki evidence.
Allocation¶
- full-lot versus partial allocation;
- remaining quantity ownership;
- UOM/rounding/rate policy;
- correction/reversal authority;
- concurrent/unknown-result behavior;
- current role and Wiki evidence.
Scale¶
- four-flow first-stage policy;
- YMS/BMS writer authority;
- device integration;
- reweigh/reversal roles;
- partial Check-out recovery;
- current role, DB, physical and Wiki evidence.
9. Final Validation Result¶
Trade lineage correction:
PASS
Trade current source refresh:
PASS
Allocation baseline/caller refresh:
PASS
Scale baseline/caller refresh:
PASS
Read-only package construction:
PASS
Environment execution:
NOT RUN
Authenticated role evidence:
NOT RUN
Business/provider/physical effects:
NONE
M3:
NO
M4:
NO
Phase progress:
NONE
---¶
Source:
docs/reconstruction/MK_TRADE_ALLOCATION_SCALE_CURRENT_REFRESH_VALIDATION_2026-08-08.md— ctc repository · This page is an English translation of the source document. Identifiers, file paths and code symbols are unchanged.