createOrderFromCart rejects a line whose product has no title — the same
PRODUCT_NOT_PRICED rejection it uses for a missing price
(packages/domain/src/orders/create-order-from-cart.ts). The price half of that guard is
covered by tests. The title half is not covered anywhere.
That matters because product_commerce.title is a derived cache written only by the CMS content
sync: a product can legitimately exist priced-but-untitled (created through a path that never
carried a title, or a sync that failed), and the guard rejecting it at checkout is the last line
of defence for the order-line snapshot. Nothing pins it, so a future refactor could turn the
rejection into a null title on an order line without a single test going red.
Add a case that places a checkout against a priced product whose title is NULL and asserts the
PRODUCT_NOT_PRICED rejection.
Source: plans/one-home-per-field.md §7.0, §9.5, §9.7.
createOrderFromCartrejects a line whose product has no title — the samePRODUCT_NOT_PRICEDrejection it uses for a missing price(
packages/domain/src/orders/create-order-from-cart.ts). The price half of that guard iscovered by tests. The title half is not covered anywhere.
That matters because
product_commerce.titleis a derived cache written only by the CMS contentsync: a product can legitimately exist priced-but-untitled (created through a path that never
carried a title, or a sync that failed), and the guard rejecting it at checkout is the last line
of defence for the order-line snapshot. Nothing pins it, so a future refactor could turn the
rejection into a null title on an order line without a single test going red.
Add a case that places a checkout against a priced product whose
titleisNULLand asserts thePRODUCT_NOT_PRICEDrejection.Source:
plans/one-home-per-field.md§7.0, §9.5, §9.7.