mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-07 22:44:06 +00:00
A flush takes a counter's buffered amounts aside before writing them onward, and reads only looked at the live delta and the cached base. From the claim until the settle replaced the base, those amounts were missing from every read: one store write normally, up to the orphan sweep if the write failed. Balance checks, credit reservations among them, could see an account as having more than it does. Reads now add the counter's outstanding claim. A batch written onward leaves the claim and joins the cached base in one step, so it stays counted until the settle replaces the base with the store's view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>