Skip to content

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 / Cost / Rate / Document Outputs — Current Effect Matrix — 2026-08-09

  • Status: CURRENT STATIC ACTION / RECORD / EFFECT MATRIX
  • Current source refresh: MK_TRADE_COST_RATE_DOCUMENT_CURRENT_LINEAGE_REFRESH_2026-08-09.md
  • Existing Process reconciliation: MK_TRADE_COST_RATE_DOCUMENT_OUTPUTS_RECONCILIATION.md
  • Read-only preflight: RBR-MK-TRADE-001-READONLY-CURRENT-SURFACE-PREFLIGHT.md
  • Phase implementation: USER HOLD

1. Matrix Rule

Every row keeps the following independent:

page/menu availability
API/handler availability
actor authorization
tenant and record relation
record-state eligibility
local transaction result
provider/file/browser effect
unknown-result recovery
business completion

A green UI action or successful HTTP response does not collapse these checkpoints.


2. Read / Projection Actions

Action Surface / owner Actor/access evidence Record/source predicate Effect Completion Non-implication Recovery
List Trade rows Trade Summary page/report query page/menu/module and current role evidence required tenant-scoped current commercial/order/booking/transaction sources DB read bounded projection returned accounting close or source reconciliation rerun exact query and compare source breakdown
Read Trade detail Trade detail/report helper page/API/record access evidence required selected equipment/order/booking links DB read detail projection returned detail explains every header total request source-class breakdown and conflict list
Export Trade CSV browser/export helper same as Trade read current projection only browser file/download CSV generated from current rows durable snapshot, accounting export or immutable evidence record query timestamp and source fingerprint; regenerate only as a new projection
Render Packing Document Booking/report page page-role/module/current action evidence tenant Booking + outbound Sales items + equipment/load relations browser render/print current document rendered rate save, file storage, email or approval reread Booking/items/rates before print
Render Purchase Local Invoice invoice/report page direct-page/page-role evidence required tenant Purchase items, rates, fees and credits browser render/print current invoice projection rendered durable invoice lifecycle or accounting post rerun with exact source identity and formula inputs
Render Booking Confirmation Booking Confirmation page current page guard and role evidence tenant Booking and selected reference/template sources browser render/print confirmation projection rendered recipient delivery or retained file reread Booking/reference/template/date source
Render Sales Weight Ticket by Order Sales Weight Ticket order branch page/record evidence required tenant Sales order/item projection browser render/print sales-derived weight projection rendered physical scale event occurred compare with physical Scale-ticket evidence when required
Render Sales Weight Ticket by Scale IDs physical Scale-ticket branch page/role/tenant evidence required active tenant T_SCALE_TICKET IDs browser render/print physical-ticket projection rendered related Sales order fully reconciled reread scale tickets and owner process

3. Trade Derived-State Matrix

Derived result Current source inputs Stored? Safe interpretation Unsafe interpretation
OPEN no qualifying amount and no shipping indicator no report classification persisted business workflow state
SHIPPED shipping indicator such as ETA/ETD/SWB without qualifying amount no report indicates shipping evidence delivery/settlement complete
CLOSED qualifying AP or AR amount no report indicates monetary evidence accounting close, settlement or audit completion
CLAIMED filter negative margin plus AP/AR evidence no report attention filter claim record or approved dispute state

The query must expose derivation and source rows. UI color alone is insufficient evidence.


4. Export Brokerage Commands

Command Actor/access Preconditions Local transaction Child result Unknown-result rule Does not imply
Preview create current page/module/role evidence valid source selection and proposal no write proposed child set rerun preview after source change create approved or committed
Create explicit action authorization remains evidence-required validated source, tenant, eligible child inputs composite local write per-child identity must be read back search exact markers/relations before retry all child owners accepted or downstream work complete
Read create result read authorization known marker/source/child identifiers no write current child set and residual conflict classify complete/partial/duplicate/unknown original response was delivered
Preview cancel explicit action authorization exact child set and downstream blocker analysis no write compensation plan repeat preview after any source change compensation authorized
Cancel explicit action authorization exact generated children and allowed compensation boundary composite compensation per-child disposition required reread every child and balance before any replay Booking/Delivery/Scale/physical/provider effects universally reversed
Reconcile unknown support/owner authorization missing response or partial child state no blind replay classify existing/missing/conflict/residual resume only missing owner step direct data repair authorized

Required create result

source fingerprint
request identity if available
generated marker identity
child type
child ID/UUID
created / existing / skipped / failed / unknown
owner process

Required cancel result

child type
child identity
compensated / blocked / already absent / conflict / unknown
residual relationship
manual owner

5. Outbound Cost Commands

Command Actor/access Exact identity State/record rule Write behavior Required result Recovery
List candidates page/module/current role evidence Outbound Order ID same tenant, active order none every candidate AP and why it qualifies do not auto-select latest silently
Read detail record access exact Transaction ID transaction belongs to selected Outbound none header, lines, totals, status, version compare siblings and Trade projection
Create cost accepted cost action role required new request token + Outbound ID no conflicting equivalent cost according to accepted policy insert AP header/lines exact transaction and line IDs response loss -> query by request/source identity before retry
Update cost accepted cost action role required exact Transaction ID allowed status + expected version current source may replace submitted lines per-header and per-line disposition stale/conflict -> reload; never update latest AP by fallback
Delete cost accepted delete/correct role required exact Transaction ID allowed status and no downstream blocker soft delete/correction according to owner exact affected header/lines reread transaction, siblings and Trade projection
Correct cost separate correction authority original and correction identity immutable/accounting policy compensating record or approved patch reason, actor, before/after references never use generic mutation as a silent repair

Current identity hazard

Outbound Order has AP A and AP B
request omits Transaction ID
compatibility chooses latest AP B
operator intended AP A

Target and evidence packages must reject this ambiguity.


6. Packing Rate Commands

Command Actor/access Record predicate Validation Result Unknown/partial recovery
Read rates Booking/document access tenant active outbound Sales items linked to Booking none item ID, rate, UOM/currency source, version if available compare document projection
Correct rates accepted rate-correction action exact item IDs and Booking relation accepted range/precision/UOM; expected current rate/version per-item outcome reread every intended item; retry only NOT_UPDATED after conflict resolution
Render after save document access same source fingerprint all intended save results confirmed print-ready projection block or warn when save/readback pending

Per-item outcome:

UPDATED
UNCHANGED
STALE
DENIED
NOT_FOUND
INVALID

A single aggregate updated=3 is not sufficient when five item IDs were intended.


7. Document Output Effect Matrix

Output Current source Browser-local inputs Local durable effect External effect Current completion Separate future capability
Packing Document Booking/Sales/Equipment/rates optional text/amount edits none established by render print dialog rendered current projection durable snapshot/file/email/approval
Purchase Local Invoice Purchase items/rates/fees/credit print options none established by render print dialog formula projection rendered invoice lifecycle/file/accounting delivery
Booking Confirmation Booking/reference/template/date print options none established by render print dialog confirmation rendered recipient delivery/file retention
Sales Weight Ticket Sales projection or physical Scale ticket print options none established by render print dialog selected branch rendered certified ticket lifecycle/file/email

8. Formula / Provenance Matrix

Local Invoice

UOM Formula Required provenance
MT NET_WEIGHT * RATE / 2204.590 weight unit is pounds; rate basis is accepted metric ton
LT NET_WEIGHT * RATE / 2240.000 weight unit is pounds; rate basis is accepted long ton
ST NET_WEIGHT * RATE / 2000.000 weight unit is pounds; rate basis is accepted short ton
EACH QUANTITY * RATE quantity identity and integer/decimal policy
other NET_WEIGHT * RATE explicit owner-approved UOM semantics required

Total:

sum(item amount)
+ trucking fee
- credit

Packing fallback

If Equipment Commodity coverage is incomplete, current report behavior may fall back to outbound-item data. The query result must state which source branch was used rather than silently presenting a mixed document.


9. Failure / Partial / Unknown Matrix

Scenario Classification First reread Prohibited replay Safe next step
Trade totals do not match detail PROJECTION_CONFLICT source-class rows and filters editing report totals correct source owner or query policy
Export create response missing UNKNOWN_COMPOSITE_RESULT markers, children, relations full Create classify existing/missing/duplicate
Export cancel partially applied PARTIAL_COMPENSATION every child and balance full Cancel compensate only residual approved child
Cost save response missing UNKNOWN_LOCAL_WRITE exact Transaction/source identity create another AP link existing result or prove absence
Cost update stale STALE current transaction/version/lines overwrite latest blindly reload and resubmit explicit intent
Rate update partially matched PARTIAL every intended item repeat all IDs retry only eligible missing IDs
Print starts before rate save READ_AFTER_WRITE_GAP server rates and document source fingerprint treating print as save wait for authoritative reread and rerender
Document source missing/conflicting SOURCE_CONFLICT owning order/booking/equipment/scale records manual browser text as durable correction correct source owner
Browser crashes after print UNKNOWN_BROWSER_EFFECT local source only; print evidence if required mark document approved rerender or create approved durable-output capability

10. Access Matrix Inputs

Each current surface must be verified independently.

menu/page
initial query
write action control
write API
record tenant predicate
record-state predicate
direct URL
print/export route

Suggested semantic actions are target inputs only:

mk.trade.read
mk.trade.export
mk.export-brokerage.preview
mk.export-brokerage.create
mk.export-brokerage.cancel
mk.outbound-cost.read
mk.outbound-cost.manage
mk.packing-rate.correct
mk.documents.render
mk.documents.deliver

Do not infer these actions from numeric roles or module access alone.


11. Evidence Classification

STATIC_CURRENT
= current source/caller/record/effect mapping established

ENVIRONMENT_REQUIRED
= schema/rows/config/role/current Wiki not read

WRITE_EVIDENCE_REQUIRED
= a later exact fixture and effect authorization is needed

OPEN_POLICY
= product/accounting/UOM/retention decision missing

HISTORICAL_CANDIDATE
= fact exists only in the detached candidate lineage

Current matrix status:

static mapping: COMPLETE FOR NAMED FAMILY
current environment: NOT RUN
write/provider/print evidence: NOT RUN
policy acceptance: OPEN/PARTIAL
M3: NO
M4: NO

---

Source: docs/processes/MK_TRADE_COST_RATE_DOCUMENT_CURRENT_EFFECT_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.