Skip to content

fix: resolve issues #676, #677, #678, #679#756

Merged
Devsol-01 merged 1 commit intoDevsol-01:mainfrom
Mathews-25:fix/issues-676-677-678-679
Apr 29, 2026
Merged

fix: resolve issues #676, #677, #678, #679#756
Devsol-01 merged 1 commit intoDevsol-01:mainfrom
Mathews-25:fix/issues-676-677-678-679

Conversation

@Mathews-25
Copy link
Copy Markdown
Contributor

closes #676
closes #677
closes #678
closes #679

#676 - Goal Milestone Detection Async Queue

  • Add MilestoneQueueService with in-process async queue (batches of 10, 500ms flush interval) replacing fire-and-forget loop in findMyGoals
  • Retry logic: up to 3 attempts with exponential backoff (2s * attempt)
  • Emits milestone.batch.achieved and milestone.detection.failed events
  • Register MilestoneQueueService in SavingsModule

#677 - Product Capacity Race Condition Fix

  • Wrap subscribe() in DataSource.transaction() with SELECT FOR UPDATE pessimistic write lock on the product row
  • All capacity checks (count, amount) run inside the locked transaction
  • Add @VersionColumn() to UserSubscription for optimistic locking
  • Add migration 1800000000000-AddVersionToUserSubscriptions

#678 - Withdrawal Fraud Detection

  • Add WithdrawalFraudService with velocity checks (5 req/hr, 50k/day), cooling-off period (30 days, max 5k), large-amount flagging (>=10k), and suspicious pattern detection (repeated similar amounts in 30min)
  • Emits withdrawal.fraud.flagged event for monitoring
  • Integrate into AdminWithdrawalService.approve(): HIGH risk blocks with ForbiddenException; MEDIUM+large routes to manual review queue
  • Register WithdrawalFraudService in AdminModule

#679 - Compound Interest Calculation Fix

  • Replace simple interest with compound interest formula A=P(1+r/n)^(nt)
  • Add CompoundingFrequency enum (DAILY/WEEKLY/MONTHLY/QUARTERLY/ANNUALLY/ CONTINUOUS) configurable via SAVINGS_COMPOUNDING_FREQUENCY env var
  • Support continuous compounding via e^(rt) when frequency=0
  • Register InterestCalculationService and InterestHistory in SavingsModule
  • Expose savings.compoundingFrequency in configuration.ts

…ol-01#679

Devsol-01#676 - Goal Milestone Detection Async Queue
- Add MilestoneQueueService with in-process async queue (batches of 10,
  500ms flush interval) replacing fire-and-forget loop in findMyGoals
- Retry logic: up to 3 attempts with exponential backoff (2s * attempt)
- Emits milestone.batch.achieved and milestone.detection.failed events
- Register MilestoneQueueService in SavingsModule

Devsol-01#677 - Product Capacity Race Condition Fix
- Wrap subscribe() in DataSource.transaction() with SELECT FOR UPDATE
  pessimistic write lock on the product row
- All capacity checks (count, amount) run inside the locked transaction
- Add @VersionColumn() to UserSubscription for optimistic locking
- Add migration 1800000000000-AddVersionToUserSubscriptions

Devsol-01#678 - Withdrawal Fraud Detection
- Add WithdrawalFraudService with velocity checks (5 req/hr, 50k/day),
  cooling-off period (30 days, max 5k), large-amount flagging (>=10k),
  and suspicious pattern detection (repeated similar amounts in 30min)
- Emits withdrawal.fraud.flagged event for monitoring
- Integrate into AdminWithdrawalService.approve(): HIGH risk blocks with
  ForbiddenException; MEDIUM+large routes to manual review queue
- Register WithdrawalFraudService in AdminModule

Devsol-01#679 - Compound Interest Calculation Fix
- Replace simple interest with compound interest formula A=P(1+r/n)^(nt)
- Add CompoundingFrequency enum (DAILY/WEEKLY/MONTHLY/QUARTERLY/ANNUALLY/
  CONTINUOUS) configurable via SAVINGS_COMPOUNDING_FREQUENCY env var
- Support continuous compounding via e^(rt) when frequency=0
- Register InterestCalculationService and InterestHistory in SavingsModule
- Expose savings.compoundingFrequency in configuration.ts
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
nestera Skipped Skipped Apr 29, 2026 8:51am

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 29, 2026

@Mathews-25 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Devsol-01 Devsol-01 merged commit 0bd5343 into Devsol-01:main Apr 29, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants