> Historical note from the supplied ZIP. Current findings: `142-REQUIREMENT-AUDIT.md` and `CONSOLIDATED-VERIFICATION.md`.

# Inventory synchronization update

This update introduces `App\Services\InventorySync` and integrates it with the non-variant COD checkout path, warehouse quick receipts, warehouse detailed receipts, and non-variant return restocking. All operations execute inside existing database transactions, lock the product and bucket rows, and reject negative available inventory. It creates an initial bucket lazily using the locked product stock if none exists.

## Important limitations
- Variant inventory is still tracked in `product_variants.stock` and is not bucket-synchronized. Do not claim variant-level bucket accuracy.
- Existing databases need all migrations executed, including migration 000013, before using the new service.
- The bucket's `reserved` and `damaged` counts are informationally separated from `available`; `products.stock` is still a legacy total and may differ from bucket available after manual reservations/damage.
- Existing historical stock movements are not backfilled automatically.
- Full MySQL integration, simultaneous-checkout concurrency, creator accounting, browser testing, gateway credentials, and production deployment remain unverified.
