When attempting to update holdings and their items concurrently the holdings updates will ever so often interfere with the item updates, effectively nullifying the latter.
Update: The module with the code that surfaced/illustrated the problem in mod-inventory-storage now exists under a new name: mod-inventory-update. The example code to reveal the problem in mod-inventory-storage no longer exists, except for in this somewhat historic commit to the module under its previous name. The mod-inventory-match/mod-inventory-update has worked around the issue in mod-inventory-storage ever since this ticket was filed, simply by refraining from updating holdings and items concurrently (and instead update first holdings, then items, sequentially that is).
The dis-enabled code here would show that
Where as the currently enabled code works:
With mod-inventory-match (branch `hrid-upsert`) and inventory storage running in a FOLIO installation and executing this curl command
to push this record set:
followed by this record set
then the second PUT attempts to update the Item status for all items created in the first but often only 2 or 3 items appear to update: