mirror of
https://github.com/hanzoai/commerce.git
synced 2026-10-30 15:08:42 +00:00
fail() checked for a credit, then wrote the row failed in a separate swap. A credit marked owed between the two ended on a failed row, which nothing looks at again: money credited and never taken back. The last write now refuses while a credit is owed and not reversed, so the row stays open and the reconciler reverses it on its next pass. Adds the three race regressions Red's second pass wrote against the rail. Claude-Session: https://claude.ai/code/session_015XYKLoQYzUebNbaqKWPw2C