-
Extend
backend/src/modules/admin/circuit-breaker.controller.ts(done) -
Add endpoints:
GET /api/admin/circuit-breaker/dependency-failuresGET /api/admin/circuit-breaker/dependency-failures/:name
-
Data source:
CircuitBreakerService.getMetrics()
- Update
backend/src/modules/notifications/entities/notification.entity.ts- Add
DEPENDENCY_CIRCUIT_BREAKER_OPENED
- Add
- Update
backend/src/modules/notifications/entities/notification-preference.entity.ts- Add
dependencyFailureNotificationsboolean default true - Add
localecolumn default 'en'
- Add
- Update
backend/src/modules/notifications/dto/update-notification-preference.dto.ts- Add
dependencyFailureNotifications?: boolean - Add
locale?: string
- Add
- Update
backend/src/common/circuit-breaker/circuit-breaker.service.tsand/orcircuit-breaker.config.ts/CircuitBreakerimplementation:- Emit Nest event when a breaker transitions to OPEN (best-effort)
- Update
backend/src/modules/notifications/notifications.service.ts- Add
@OnEvent('dependency.circuit_breaker.opened')handler - Create notification based on user preference flag
- Add
- Add migration(s) under
backend/migrations/to add the new columns:notification_preferences.dependencyFailureNotificationsnotification_preferences.locale
- Run backend typecheck/build
- (Optional) run unit tests for touched modules
- Inspect
DataExportRequestentity + related DTOs for fields needed (userId, token, expiresAt, filePath) - Update
data-export.controller.tsdownload endpoint to include@CurrentUser()and verify token belongs to caller - Update
data-export.service.tsgetExportFile()to acceptuserIdand validate ownership - Validate resolved
filePathis withinEXPORT_DIRbefore sending - Add rate limiting/throttling for
GET /users/data/export/download/:token - Add/adjust tests for unauthorized access + expired link + path validation
- Implement controlled concurrency in
cache-warming.service.ts - Add per-endpoint timeout when calling
cacheStrategy.warmCache - Add anti-duplicate lock to prevent overlapping warming runs
- Ensure metrics remain accurate under parallel execution
- Run backend tests / lint