Renaming a product's SKU seeds a fresh zero-stock inventory row for the new SKU and leaves the
old row orphaned, still holding the stock. The merchant's on-hand count silently drops to zero and
the old row is unreachable from the admin UI.
This is pre-existing — upsertProductCommerce has always behaved this way, and the
create-if-absent seedOnHand is doing exactly what it says. PR 1a does not introduce it, but it
does make it marginally more reachable: the admin console becomes the only SKU writer, and the
edit path now seeds too.
Not fixed in 1a on purpose: a correct fix is a rename operation on the inventory row (or a
policy decision that SKUs are immutable once stocked), which is its own change with its own
contract cases, not a rider on the seeding invariant.
Source: plans/one-home-per-field.md §3.5, §9.7.
Renaming a product's SKU seeds a fresh zero-stock inventory row for the new SKU and leaves the
old row orphaned, still holding the stock. The merchant's on-hand count silently drops to zero and
the old row is unreachable from the admin UI.
This is pre-existing —
upsertProductCommercehas always behaved this way, and thecreate-if-absent
seedOnHandis doing exactly what it says. PR 1a does not introduce it, but itdoes make it marginally more reachable: the admin console becomes the only SKU writer, and the
edit path now seeds too.
Not fixed in 1a on purpose: a correct fix is a rename operation on the inventory row (or a
policy decision that SKUs are immutable once stocked), which is its own change with its own
contract cases, not a rider on the seeding invariant.
Source:
plans/one-home-per-field.md§3.5, §9.7.