The PAR-523 hopper worker refreshes sign counters only. /find stock (chestshop_shop.current_stock / estimated_capacity) changes only on trades, chest close, creation and resync, so hopper-fed or drained shops show stale stock. Prod has the same symptom.
- The refresh worker also measures each non-admin, non-wildcard shop it refreshes and writes changed stock through
MarketApi.updateShopStock.
- Writes are coalesced per sign, skipped when unchanged, and run as a single ordered async batch (no DB on the main thread).
- Trade, chest-close and creation writes supersede queued hopper writes, so an in-flight batch can't put back an older value.
- The worker runs for the registry even when
USE_STOCK_COUNTER is off.
- Chunk loads no longer queue a whole-chunk recount. Work dropped at unload is kept and re-queued when that chunk loads, so player exploration can't build a recovery backlog.