MK Trade / Cost / Rate / Document Outputs — Current Lineage And Source Refresh — 2026-08-08¶
- Status:
CURRENT STATIC SOURCE REFRESH COMPLETE / ENVIRONMENT, ROLE, DATA AND WIKI EVIDENCE REQUIRED - Operating profile:
mk-order - Original current-source ancestor:
4f6165bc4c53a7d98b0c246392dd9ed5bd75c21c - Misapplied candidate label:
d96498360bb9c3541a1b5f862284596a7ed217b9 - Current review ref:
qa/master@a71386e3baf176534939a42397249bcd2b535c49 - Existing authority:
MK_TRADE_COST_RATE_DOCUMENT_OUTPUTS_SOURCE_AUTHORITY.md - Existing rebuild packet:
MK_TRADE_COST_RATE_DOCUMENT_OUTPUTS_CAPABILITY_REBUILD_PACKET.md - Current caller/effect matrix:
MK_TRADE_CURRENT_CALLER_AND_EFFECT_MATRIX_2026-08-08.md - Read-only evidence package:
RBR-TRADE-001-READONLY-CURRENT-SURFACE-PREFLIGHT.md - Phase implementation:
USER HOLD - Effects: repository source inspection and documentation only
1. Purpose¶
The existing Trade-family packet contains detailed business, data, interface, recovery and migration input. A later cross-family drift register classified the family as a diverged candidate baseline because several companion documents had been labeled with d964983....
This refresh resolves that lineage question before any current-source claim is reused.
It answers:
Did the candidate-only commit contain Trade-family implementation facts?
Which exact current source revision owns the reviewed behavior?
Which core owner files changed after the original ancestor?
Which changed shared files are adjacent rather than Trade-contract changes?
Which current callers expose each capability?
Which facts still require current DB, role, browser, accounting or Wiki evidence?
It does not authorize a Runtime change, accounting policy, role expansion, provider action, document delivery effect or migration.
2. Git Lineage Result¶
Current relation:
merge base:
4f6165bc4c53a7d98b0c246392dd9ed5bd75c21c
candidate-only commit:
d96498360bb9c3541a1b5f862284596a7ed217b9
current review:
a71386e3baf176534939a42397249bcd2b535c49
current ahead of merge base:
73 commits
candidate-only history not in current:
1 commit
The candidate-only commit is:
feat(tms): add loader assignment work and final clock out
Its source changes are limited to Loader/Staff Time/Transload assignment behavior and related documentation/config notes. It does not change the following Trade-family owner sets:
OMS Trade Summary
OMS Export Brokerage
OMS Outbound Cost
TMS Packing Rate
MK report query helpers
MK document pages
Therefore:
d964983 candidate-only facts
= Loader historical evidence
Trade-family source facts
= independently anchored at 4f6165 and revalidated at a71386e
No Trade-family statement needs to be retained merely because it appeared under the candidate label.
3. Core Blob Comparison¶
| Owner | Original ancestor blob | Current blob | Result |
|---|---|---|---|
app/systems/OMS/trade-summary/api_routes.php |
3558cfda285dc79604bfbe21659a6a5e4235db85 |
3558cfda285dc79604bfbe21659a6a5e4235db85 |
unchanged |
app/systems/OMS/trade-summary/trade_summary_query_helper.php |
df837379d71864f35a5fe117031aa2fb3b94c198 |
df837379d71864f35a5fe117031aa2fb3b94c198 |
unchanged |
app/systems/OMS/export-brokerage/api_routes.php |
fdf1c52cc8d67ee9fb8b147376720df71e824b03 |
fdf1c52cc8d67ee9fb8b147376720df71e824b03 |
unchanged |
app/systems/OMS/outbound-order/cost_helper.php |
cde06e9aab2df8dcf4265fb8339a7004dab3c596 |
cde06e9aab2df8dcf4265fb8339a7004dab3c596 |
unchanged |
app/systems/OMS/outbound-order/api_routes.php |
a62091e97aa2b8639ea1e311642181aa4b732c27 |
a62091e97aa2b8639ea1e311642181aa4b732c27 |
unchanged |
app/addons/reports/query_helper.php |
0548e9feb4367006927f2720c0bec30926cc35bc |
0548e9feb4367006927f2720c0bec30926cc35bc |
unchanged |
app/systems/OMS/inbound-order/mk_post_helper.php |
cf05b7096ef46b8215c2a8c9f9d13e4dba9bae00 |
cf05b7096ef46b8215c2a8c9f9d13e4dba9bae00 |
unchanged |
app/systems/TMS/booking/api_routes.php |
2858fd2ef47f44feac8e52b4917ae87307476eaf |
fe3cd37710d570273c7c8d4a2b95236196f308c8 |
shared file changed; Trade-owned rate block revalidated |
3.1 TMS Booking file disposition¶
The Booking route file changed after the original ancestor. The added/changed areas concern:
Street Turn Booking search filters
Street Turn guarded revert route
Booking inquiry email
adjacent Booking behavior
The reviewed Packing Rate implementation remains materially the same:
function tmsBookingApiUpdatePackingListRates(...)
PATCH /tms/bookings/{id}/packing-list/rates
Booking-linked active Sales/Outbound item check
RATE update
invalid/nonmatching IDs skipped
updated count returned
The shared-file blob change is therefore:
ADJACENT BOOKING DRIFT
NOT MATERIAL PACKING-RATE CONTRACT DRIFT
3.2 BMS transaction helper disposition¶
app/systems/BMS/transaction/post_helper.php changed after the original ancestor because Street Turn revert became a guarded exact generated-load compensation. The Scale-ticket and transaction blocks reviewed by the Trade family remain separate. The shared-file change is not evidence that Trade Summary, Outbound Cost or browser document formulas changed.
4. Current Family Disposition¶
| Capability | Current source status | Current-source disposition |
|---|---|---|
| Trade Summary / Deal Ledger | core API/query blobs unchanged | current static source description remains valid |
| Export Brokerage | orchestration route blob unchanged | current static source description remains valid |
| Outbound Cost | cost helper/API blobs unchanged | current static source description remains valid |
| Packing Rate Correction | shared route file changed outside reviewed function | current function/route behavior revalidated |
| Packing Document | report helper unchanged; page/source callers retained | current static source description remains valid |
| Purchase Local Invoice | report helper unchanged; direct page retained | current static source description remains valid |
| Booking Confirmation | report helper unchanged; direct page retained | current static source description remains valid |
| Sales Weight Ticket | report helper unchanged; direct page retained | current static source description remains valid |
Current result:
DIVERGED LABEL PROBLEM:
RESOLVED
CANDIDATE-ONLY TRADE FACTS:
NONE LOCATED
CORE OWNER DRIFT:
NO MATERIAL DRIFT LOCATED
ADJACENT SHARED-FILE DRIFT:
DOCUMENTED
CURRENT DB / ROLE / ACCOUNTING / WIKI EVIDENCE:
REQUIRED
5. Current Caller Inventory¶
5.1 Trade Summary / Deal Ledger¶
Page¶
frontend/pages/system/BMS/reports/mk-trade-summary.php
Current page aliases:
mk-trade-summary
mk-deal-ledger
API¶
GET /api/oms/trade-summary
GET /api/oms/trade-summary/{equipmentId}
GET /api/oms/deal-ledger
GET /api/oms/deal-ledger/{equipmentId}
Read owner¶
trade_summary_query_helper.php
V_EQUIPMENT_DEAL_LINK
T_EQUIPMENT
T_LOAD / T_LOAD_ITEM
T_BOOKING
T_TRANSACTION / T_TRANSACTION_LIST
Current effect¶
read projection
browser CSV download
No business close, settlement, file-retention or provider effect is created.
5.2 Export Brokerage¶
Page/API owner¶
frontend/pages/system/OMS/export-brokerage/mk-export-brokerage.php
app/systems/OMS/export-brokerage/api_routes.php
Current actions¶
feature/config read
Booking/source lookup
AI extraction proposal
multi-child create
bounded compensating cancel
Current child owners¶
Purchase / Inbound
Transload
Inventory Lot
Outbound Sales
Booking
Equipment / Equipment Load
Allocation
Current effect¶
One local multi-child transaction per create/cancel request. There is no durable Export Brokerage Job identity, immutable child manifest or request-token result query.
5.3 Outbound Cost¶
UI/API owner¶
Outbound order detail UI
GET /api/oms/outbound-orders/{id}/costs
POST /api/oms/outbound-orders/{id}/costs
PATCH /api/oms/outbound-orders/{id}/costs/{transactionId}
DELETE /api/oms/outbound-orders/{id}/costs/{transactionId}
Data owner¶
T_TRANSACTION
T_TRANSACTION_LIST
RELATED_TABLE_NAME / RELATED_TABLE_ID
Current effect¶
Local AP transaction and line mutation only. Files, QBO, Trade close and external delivery remain independent.
5.4 Packing Rate Correction¶
Page/API owner¶
frontend/pages/system/TMS/booking/mkPackingList.php
PATCH /api/tms/bookings/{id}/packing-list/rates
Data owner¶
T_LOAD_ITEM.RATE
Current effect¶
One request can update multiple Sales item rates. Partial matching is possible; browser amount calculation remains transient.
5.5 Browser Outputs¶
| Output | Current page | Read helper | Durable effect |
|---|---|---|---|
| Packing Document | mkPackingList.php |
packing_list() |
none |
| Purchase Local Invoice | localInvoice.php |
purchase_local_invoice() |
none |
| Booking Confirmation | bookingConfirmation.php |
booking_confirmation() |
none |
| Sales Weight Ticket | scaleticket.php?ORDER_ID=... |
sales_weight_ticket() |
none |
The physical Scale ticket IDS[] path is a separate Scale capability.
6. Current Contract Risks Retained¶
The source refresh does not resolve the following existing risks.
Trade Summary¶
- derived
CLOSEDcan be mistaken for accounting close; - header totals and detail source breakdown differ;
- AP/AR source classes can use different status/deleted-row predicates;
- browser CSV is not a durable evidence artifact.
Export Brokerage¶
- no durable Job/request identity;
- lost create/cancel response can lead to unsafe replay;
- generated markers are compatibility provenance, not an immutable child manifest;
- child progression can make compensation partial or forbidden.
Outbound Cost¶
- no explicit Outbound-Cost subtype;
- omitted transaction ID can select latest AP;
- update replaces lines;
- no optimistic version or request token;
- local file links are independent.
Packing Rate¶
- invalid target IDs can be silently skipped;
- success can represent partial intent;
- no accepted range/zero/negative policy;
- no old-value/version/reason lineage;
- autosave can race with print.
Document Outputs¶
rendered
!= approved
!= confirmed
!= filed
!= emailed
!= provider delivered
Template constants, numeric tenant compatibility and source fallback still require accepted policy.
7. Required Current Evidence¶
Evidence owner:
RBR-TRADE-001
Required evidence classes:
Source / route¶
- exact deployed source SHA;
- page/API route mapping;
- module/menu/role decision;
- current alias behavior;
- direct-page behavior.
Schema/data¶
- view and source table existence;
- Trade source-class totals;
- Outbound Cost candidate rows;
- allocation/export child provenance;
- Booking-linked Sales-rate rows;
- document source completeness.
Role/UI¶
- intended Office/Finance/MK roles;
- denied role/direct URL behavior;
- mobile/keyboard behavior;
- current labels that distinguish derived/read/output states.
Recovery¶
- lost Trade detail/CSV response;
- Export Brokerage create/cancel unknown result;
- Outbound Cost stale/latest-row ambiguity;
- partial Packing Rate update;
- print before rate persistence;
- document missing-source fallback.
Wiki¶
- current Trade/Cost/Rate/Document rows;
- rendered content;
- role findability;
- current versus target wording.
8. Current Source Header Rule¶
For this family, future documents must state both:
Original source ancestor:
4f6165bc4c53a7d98b0c246392dd9ed5bd75c21c
Current reviewed source:
a71386e3baf176534939a42397249bcd2b535c49
Do not use d964983... as a Trade-family source baseline. It may remain only as Loader historical evidence.
9. Migration Boundary¶
The current refresh does not select target policy or activate migration.
Target order remains:
current source/read evidence
-> accepted process policy
-> typed query/command contracts
-> React/Next.js read parity
-> one selected writer
-> rollback
-> caller-zero
-> later database migration
Do not migrate all eight capabilities as one module or one transaction.
10. Current Conclusion¶
Trade candidate-lineage issue:
RESOLVED
Candidate-only Trade implementation:
NONE LOCATED
Current core owner source:
REVALIDATED
Current caller inventory:
REFRESHED
Read-only evidence package:
DEFINED
Current DB/role/browser/accounting/Wiki evidence:
NOT RUN
Policy acceptance:
OPEN / PARTIAL
M3:
NO
M4:
NO
Phase progress:
NONE
---¶
Source:
docs/reconstruction/MK_TRADE_CURRENT_LINEAGE_AND_SOURCE_REFRESH_2026-08-08.md— ctc repository · This page is an English translation of the source document. Identifiers, file paths and code symbols are unchanged.