fix: serialize advertising spend cap checks - #11824
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
8e5b72f to
5c6f128
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Rebased #11824 onto current Validation:
Reviewed the money-path behavior: allocation/cap updates now serialize per account, serve debits lock the account row before the aggregate cap check, and provider-accepted budget/create operations refund and revert/delete the provider object if the final serialized local cap check loses a race. |
|
Local validation after rebase onto current
|
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Fixes #11800
Summary
Evidence
.github/issue-evidence/11800-ad-spend-cap/README.mdVerification
bun install- pass after rebase; artifact sync side effects removed from branchbun test packages/cloud/shared/src/lib/services/__tests__/ad-campaign-credit-reconciliation.test.ts- pass, 14 testsbun test packages/cloud/shared/src/lib/services/__tests__/ad-account-approval.test.ts- pass, 20 testsbun test packages/cloud/shared/src/lib/services/__tests__/ad-inventory.test.ts- passbun run --cwd packages/cloud/shared lint- passbun run --cwd packages/cloud/shared typecheck- passgit diff --check- passbun run verify- fails before workspace lint/typecheck on existingaudit:type-safety-ratchet:?? ""is616 / 615Evidence N/A