Skip to content

Transportation, Yard And Equipment Lifecycle — Current Source Reconciliation

  • Status: SOURCE_RECONCILED CURRENT CTC ADAPTERS / EXTERNAL LEG SOURCE_MAPPED / TARGET APPROVAL BLOCKED
  • Parent Task: NS0-003
  • Reviewed source revision: qa/master@1529bce22ae39c7c2c11e1b9b07e457e1e4c4355
  • Profiles: ctc-execution, mk-order
  • Restriction delta: RD-000 / NONE
  • Effects: source/document/catalog reconstruction only

1. Reconciliation Result

The current codebase has detailed CTC Delivery and Yard execution, but no first-class shared Shipment / TransportLeg aggregate was located.

Current source families must remain independent:

Ocean Booking
!= outbound execution order
!= Delivery assignment/execution
!= Yard move
!= equipment/load state
!= container return
!= provider notification

Target direction:

Shipment
-> TransportLeg[]
   -> executionOwner = INTERNAL | EXTERNAL_CARRIER | CUSTOMER

ContainerLifecycle
-> independent equipment/yard/return state

2. Current CTC Internal Delivery

Current principal records:

Record Current responsibility
T_DELIVERY assignment, delivery status, arrival and parking state
T_DRIVER_LOG Truck Operator workday/check-in authority
T_EQUIPMENT container/chassis identity and compatibility status/mirrors
T_EQUIPMENT_LOAD load/equipment bridge and execution/terminal status
T_FILE delivery/closing photo evidence
T_OPERATION_EVENT supporting location/operation event, not continuous tracking or completion

Current Delivery states include:

SCHEDULED
DISPATCHED
DELIVERED
TROUBLE

Current Undo commands reset selected Delivery fields but do not fully compensate Equipment, Yard, File or provider effects.

Target candidate split:

Shipment
TransportLeg
InternalDispatch
DriverAssignment
VehicleAssignment
TransportProof

3. Current Yard Authority

T_YARD_DISPATCH_QUEUE
= planned/assigned/claimed Yard work

T_YARD_LOCATION
= physical-system Yard occupancy

T_EQUIPMENT.YARD_*
= derived compatibility mirrors

Current queue statuses:

QUEUED
SCHEDULED
CLAIMED
COMPLETED
CANCELLED

Supported current entity types include:

CTN
TRL
CHS

Current dispatch types include:

BRING
PULL_OUT
RELOCATE

Planned Area/Stack Group is not actual occupancy. Completion must preserve the selected actual spot and occupancy readback.

4. Pull-Out And Queue-After-Clear

Current Pull-Out closing is client-orchestrated across two owners:

BMS closing/scale save
-> YMS queue completion

Possible partial state:

closing evidence committed
+ Yard queue still CLAIMED

Queue-after-clear can also produce:

Delivery/business child complete
+ physical Yard placement pending

Target must use either an explicit saga/checkpoint contract or preserve separate commands with a first-class partial state. It must not imply a distributed transaction.

5. Returning Empty And Parking

Current returning-empty/parking paths correlate Delivery, Equipment Load, Container and Yard queue.

Examples:

export empty pickup returning to tenant yard
import pickup/relocate parking
assigned Driver
EMPTY/FULL equipment state depending variant
BRING queue or direct/queued Yard placement

Parking request, parking assignment, physical placement and Delivery completion are separate facts.

Arrival acknowledged
!= parking location assigned
!= container parked
!= Delivery completed

6. Container Return Current Adapter

Current Return delivery completion can:

T_EQUIPMENT_LOAD.STATUS = RETURNED
clear CTN Yard occupancy
T_EQUIPMENT.STATUS = INACTIVE
record terminal return time

This is a current adapter, not approval that Delivery owns the target Container Lifecycle.

Target independent lifecycle candidate:

Assigned
-> Empty Received / Picked Up
-> Available
-> Loading
-> Loaded
-> Dispatched
-> Port Returned
-> Closed

Exact state names and transitions remain open.

Policy/fact separation:

container.return_policy
= REQUIRED | CONDITIONAL | OFF

requiresContainerReturn
= persisted record fact

A profile change must not rewrite prior record facts.

7. Chassis And Equipment

Current chassis data appears in Equipment/Delivery/Yard compatibility sources and master references. A first-class Chassis lifecycle, assignment cardinality and detach/return policy were not source-confirmed.

Target equipment-lifecycle owns:

ContainerLifecycle
ChassisAssignment
YardPosition
Availability
PortReturn
Correction/Reconciliation

Transportation may reference assigned equipment but must not own physical equipment lifecycle.

8. MK External Carrier Boundary

Current MK source has outbound order, Booking, carrier/company/reference and equipment bridge facts. No first-class external TransportLeg milestone ledger or complete external-carrier state machine was located.

Disposition:

current external-carrier lifecycle = SOURCE_MAPPED / INCOMPLETE
target external Carrier Leg        = CANDIDATE

Target candidate facts:

carrierParty
carrierReference
scheduledPickup
scheduledDelivery
milestones
freight evidence
proof
responsibility

MK must not inherit detailed internal Driver/Truck execution unless the corresponding capability/policy is enabled.

9. Target Commands

Transportation candidates:

CreateShipment
AddTransportLeg
PlanInternalDispatch
AssignDriverVehicle
StartTransportLeg
RecordArrival
CompleteTransportLeg
RecordExternalCarrierReference
RecordExternalMilestone
CorrectTransportLeg
ReconcileTransportLeg

Equipment candidates:

AssignContainer
AssignChassis
PlaceInYard
ReserveYardMove
ClaimYardMove
CompleteYardMove
RecordContainerLoaded
RecordContainerDispatched
RecordPortReturn
CorrectContainerLifecycle
ReconcileEquipmentState

All remain TARGET_CANDIDATE.

10. Independent State Rules

Transport Leg delivered
!= Container returned

Delivery marked DELIVERED
!= Yard placement complete

Yard queue COMPLETED
!= provider notification delivered

Container RETURNED
!= Shipment settlement complete

Telegram sent
!= Delivery or Yard completion

Equipment mirror updated
!= mirror is movement authority

11. Recovery

Unknown/partial result requires owner-specific readback:

Delivery     -> exact T_DELIVERY + equipment/load
Yard         -> queue + T_YARD_LOCATION
Equipment    -> T_EQUIPMENT + T_EQUIPMENT_LOAD + booking refs
Return       -> terminal time + load status + Yard absence
File/proof   -> T_FILE/object
Provider     -> provider attempt/result

Never repeat physical work solely because one UI response is missing.

12. Current Risks And Open Decisions

  • Shipment/Leg identity and creation trigger;
  • internal/external/hybrid/customer leg policy;
  • Delivery-to-TransportLeg mapping;
  • Yard queue correlation to Delivery/Leg;
  • queue-after-clear idempotency and duplicate completion evidence;
  • Pull-Out partial-result orchestration;
  • parking/arrival/location terminology and ownership;
  • Driver/Vehicle/Chassis assignment cardinality;
  • Container Return completion evidence;
  • Undo/compensation across Delivery/Yard/Equipment/File;
  • external milestone set and proof policy;
  • hardcoded Yard Driver roster compatibility;
  • target role/action matrix;
  • live schema/index/status evidence;
  • physical/system mismatch correction owner.

13. CTC / MK Composition

Concern CTC MK Representation
transport execution internal/detailed common external common typed policy
tracking full milestone/reference typed policy
Driver/Vehicle core optional capability
Yard core conditional capability
Container Return required/conditional common conditional policy + record fact
external carrier supported as reference/variant core candidate capability
source fork prohibited prohibited invariant

14. Page And Wiki Boundary

No Runtime screen changed.

page-specific browser script = NOT_APPLICABLE
runtime screenshot            = NOT_APPLICABLE
in-app User Wiki              = NOT_APPLICABLE
page CHANGELOG                = NOT_APPLICABLE

Future Dispatch, Driver, Yard, Equipment and Return pages must satisfy the page-runtime-test/User-Wiki/change-history standard.

---

Source: new-system/docs/reconstruction/TRANSPORTATION_YARD_EQUIPMENT_SOURCE_RECONCILED.md — ctc repository · This page is an English translation of the source document. Identifiers, file paths and code symbols are unchanged.