mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-06 22:13:04 +00:00
* feat: presence and cross-region event forwarding (PUT-1679) * fix: fan cache bumps to sibling nodes and stop the forward shed cascading (PUT-1679) `outer.events.generationBumped` and `outer.events.presenceBumped` rode `outer.*`, which the broadcast service only webhooks to peer regions; only `outer.pubsub.*` also fans over Redis to a region's other nodes. Both caches are per-process maps with no expiry, so a bump landing on one node left its siblings stale until that user's next transition. Renamed onto `outer.pubsub.events.*`; the listeners already accept the `from_outside` copy the Redis re-emit carries. `PeerForwardQueue.push` called `onOverflow` synchronously and the handler pushed markers straight back, each of which re-tripped the bound and shed the next item: one item over a 5000 bound recursed ~2200 deep, threw a RangeError, and turned ~2200 queued deliveries into gap markers. It also re-summed `bytes` over the whole queue per drop. The handler now returns its markers and the queue appends them past the bound check, sheds deliveries before markers, keeps one pending marker per (peer, subscription), and subtracts bytes per dropped item.