Found during LEGACY-1 (PR #725) review.
Evidence: the only writer of SalesOrderLine.shipped_quantity in backend/app/services/ is the new legacy close-out path (resolve_legacy_fulfillment). The normal ship_order flow never sets it.
Impact:
fulfillment_status.py computes per-line fulfillment from line.shipped_quantity (lines 53, 171) — a field nothing writes during organic shipping, so line-level fulfillment math is always zero.
- Line-removal guard at
sales_order_service.py:1646 ("units have already been shipped") can never trigger.
- LEGACY-1's shipment-evidence check tolerates this (it also accepts
shipped_at + order fulfillment_status, which the ship flow does write), but per-line partial-shipment tracking is effectively unimplemented.
Suggested fix: ship_order (and the fulfillment_shipping path if separate) should set line.shipped_quantity for shipped lines — full qty for full shipments, per-line amounts when partial shipment support lands.
Logged as Aeonyx observation #171 by agent session claude-legacy1-order-health-20260611.
🤖 Generated with Claude Code
Found during LEGACY-1 (PR #725) review.
Evidence: the only writer of
SalesOrderLine.shipped_quantityinbackend/app/services/is the new legacy close-out path (resolve_legacy_fulfillment). The normalship_orderflow never sets it.Impact:
fulfillment_status.pycomputes per-line fulfillment fromline.shipped_quantity(lines 53, 171) — a field nothing writes during organic shipping, so line-level fulfillment math is always zero.sales_order_service.py:1646("units have already been shipped") can never trigger.shipped_at+ orderfulfillment_status, which the ship flow does write), but per-line partial-shipment tracking is effectively unimplemented.Suggested fix:
ship_order(and the fulfillment_shipping path if separate) should setline.shipped_quantityfor shipped lines — full qty for full shipments, per-line amounts when partial shipment support lands.Logged as Aeonyx observation #171 by agent session claude-legacy1-order-health-20260611.
🤖 Generated with Claude Code