You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ui-server: a refused checkout capture can lose its checkout-scoped cause #4450
Part of #4426 (follow-ups from #4278). Deferred from the review of PR #4447. Related to #4437, which covers the same single cause slot at startup.
Context
The captureCheckout failure path (packages/ui-server/src/brain/turn-journal.ts:365-375) records the cause in one of two ways:
With the receipt tables absent, it writes the single journal.cleanup.lastFailure setting (:369), so a second refused checkout overwrites the first.
With the tables present, it writes a turn_journal_code_failures row, and swallows a refusal of that write. On a store that has the tables but not the capacity guards, a pinned WAL refuses both guard admission and the row, and no checkout-scoped cause is stored.
Scope
Cause recording in the captureCheckout failure path only.
Acceptance criteria
Two refused checkouts in one server lifetime are both named after the journal reopens.
When the failure-row write is refused, an owner-visible cause naming the checkout is still stored.
Recording the cause never replaces the original capture error, and never fails the turn by itself.
Tests cover the tables-absent and tables-without-guards cases, each with a mutation receipt.
Activity