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
fix(purchase): bound the skipped-account saves and notifications by the run budget #1802
recordSkippedAccounts (internal/purchase/execution.go, #1798) runs after the run's context has ended. For each skipped account it does one detached save (up to terminalSaveTimeout) and one failure notification, one after another. The purchase run budget counts one terminal save and one email. In a large fan-out that skips many accounts, or with a slow database or mail service, the function can stop before the root's terminal save. The root then stays running until the reaper picks it up.
Proposal
Give the skip saves one shared detached deadline that fits inside the remaining budget. Send one batched notification, or notify after the root's terminal save. Add a test with more skipped accounts than the fan-out concurrency.
Fixed by #1798 (f18ec4f): skipped-account rows are saved after the root on its single terminal-save deadline, and announced in one batched email inside the failure-alert window, so the run stays within the 270s budget. Tests: TestSaveTerminalAndSkipped_SharedDeadline and TestSaveTerminalAndSkipped_RootFirstOneEmail.
Re-opened: the fix in #1798 at f18ec4f does not yet keep the run inside the Lambda budget when accounts are in flight at the deadline (review on #1798). It stays open until that is fixed.
Fixed by #1798 at b3dc23e: every save and email after the execution deadline sits in a bounded window. Account rows save by E+T/2, the root and skipped rows by E+T, and late and skipped accounts get one batched email, so the run ends by 270s. Verified in claude-darling's delta review.
Activity
cristim commentedon Nov 6, 2026
Fixed by #1798 (f18ec4f): skipped-account rows are saved after the root on its single terminal-save deadline, and announced in one batched email inside the failure-alert window, so the run stays within the 270s budget. Tests:
TestSaveTerminalAndSkipped_SharedDeadlineandTestSaveTerminalAndSkipped_RootFirstOneEmail.cristim commentedon Nov 6, 2026
Re-opened: the fix in #1798 at f18ec4f does not yet keep the run inside the Lambda budget when accounts are in flight at the deadline (review on #1798). It stays open until that is fixed.
cristim commentedon Nov 6, 2026
Fixed by #1798 at b3dc23e: every save and email after the execution deadline sits in a bounded window. Account rows save by E+T/2, the root and skipped rows by E+T, and late and skipped accounts get one batched email, so the run ends by 270s. Verified in claude-darling's delta review.