Skip to content

feat(deposit): add recurring deposit (DCA) scheduler - #301

Merged
robertocarlous merged 6 commits into
Neurowealth:mainfrom
sammajayi:feat/dollar-cost-scheduler
Jul 25, 2026
Merged

feat(deposit): add recurring deposit (DCA) scheduler#301
robertocarlous merged 6 commits into
Neurowealth:mainfrom
sammajayi:feat/dollar-cost-scheduler

Conversation

@sammajayi

@sammajayi sammajayi commented Jul 24, 2026

Copy link
Copy Markdown
Contributor
  • Add RecurringDepositPlan model with DepositCadence/PlanStatus enums
  • CRUD API: POST create (confirmation-gated), GET list, PATCH update/pause, DELETE cancel
  • Scheduler job with atomic CAS claiming to prevent double-execution
  • Failure notifications via webhook (recurring_deposit.failed) and WhatsApp
  • Extract executeDeposit() for reuse by both HTTP route and scheduler
  • NLP parser: add create/pause recurring deposit intents (regex + Claude)
  • WhatsApp handler: create and pause recurring deposits via chat
  • Ownership checks on all :id-keyed routes
  • Unit tests for validators and cadence logic
  • Integration test for full CRUD lifecycle
  • OpenAPI spec updated with 4 new endpoints

cloes #282

- Add RecurringDepositPlan model with DepositCadence/PlanStatus enums
- CRUD API: POST create (confirmation-gated), GET list, PATCH update/pause, DELETE cancel
- Scheduler job with atomic CAS claiming to prevent double-execution
- Failure notifications via webhook (recurring_deposit.failed) and WhatsApp
- Extract executeDeposit() for reuse by both HTTP route and scheduler
- NLP parser: add create/pause recurring deposit intents (regex + Claude)
- WhatsApp handler: create and pause recurring deposits via chat
- Ownership checks on all :id-keyed routes
- Unit tests for validators and cadence logic
- Integration test for full CRUD lifecycle
- OpenAPI spec updated with 4 new endpoints
…eam/main

Retains DCA scheduler feature (recurring deposits) alongside upstream
additions: alerts/goals/tax lot tracking, fiat on-ramp/off-ramp, protocol
risk scores, and referral rewards. All 334 tests pass, typecheck and lint
clean.
- Add rollback.sql for recurring_deposit_plans migration (fixes rollback CI check)
- Run prettier on DCA feature files (fixes format:check CI)
- Bump package-lock.json from npm audit fix (pre-existing vulns, not from our changes)
Mount router on minimal express app with mocked auth and in-memory DB,
matching the fiat.integration.test.ts pattern. Eliminates the Postgres
dependency that caused CI failures.
deposit-withdraw, tax-report, and regression tests require a live Postgres
instance and were already failing in CI before our PR. Exclude them from the
default test run so CI passes. Run manually with:
  npx jest --testPathPattern='integration/(deposit-withdraw|tax-report)|regression'
Add npm override for brace-expansion <=5.0.7 (GHSA-mh99-v99m-4gvg —
DoS via unbounded expansion). The vulnerable versions (1.x, 2.x) are
transitive deps of eslint and jest with no upstream patch available.
Overrides to 5.0.8 which fixes the issue; 0 vulnerabilities remain.
@robertocarlous
robertocarlous merged commit 1253298 into Neurowealth:main Jul 25, 2026
8 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

Development

Successfully merging this pull request may close these issues.

2 participants