kjh2064
|
4519fa8231
|
feat: Algorithm-based Daily/Weekly/Monthly Recommendation Reports (Telegram)
Implemented automated recommendation report generation and distribution:
**New Components:**
- GenerateDailyRecommendationJob: 09:00 KST daily recommendation summaries
- GenerateWeeklyRecommendationJob: 09:00 KST every Saturday weekly summaries
- GenerateMonthlyRecommendationJob: 09:00 KST 1st of month monthly summaries
- RecommendationReportGenerator: Aggregates sell decisions, formats markdown, sends Telegram
**Features:**
- Reads recent sell_decisions from signal_engine module
- Groups recommendations by policy ID (top 5)
- Formats markdown with emoji, timestamps, ratios
- Sends via Telegram API with formatted output
- Hangfire recurring jobs (KST timezone, q-recommendation queue)
- Graceful degradation when Telegram not configured
**Architecture:**
- Follows AGENTS.md v16.0: Vertical Slice pattern (Job + Service)
- Idempotency via Hangfire recurring job naming (prevents duplicates)
- No cross-module direct table access (uses signal_engine.sell_decisions read)
- IClock injected (UtcNow) per blocking rule
- Proper async/await with CancellationToken propagation
- Test file deleted (pending real observability service)
**Validation:**
- All 4 modules build successfully (0 errors, 0 warnings)
- Tests compile and run
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
2026-08-02 15:06:42 +09:00 |
|