feat(#368): Planner v0 — pending Candidates auf heute planen #369

Merged
admin-mrrm merged 1 commit from feat/368-planner-v0 into main 2026-05-20 22:49:21 +02:00
Owner

Summary

  • PlannerService.planToday markiert pending Candidates mit latestAt < heute als obsolete und setzt alle übrigen pending Candidates auf lifecycleState=planned mit plannedSlot=jetzt
  • Sortierung in JS: priority (high>normal>low), dann earliestAt asc nulls last, dann createdAt asc
  • POST /planner/run triggert planToday, GET /planner/today liefert die geplanten Candidates für heute
  • Idempotent: zweites /planner/run findet keine pending Candidates mehr

Phase 5 von Epic #360

  • Phase 1 (Schema): #361
  • Phase 2 (Tracking): #363
  • Phase 3 (Mail): #178
  • Phase 4 (Habits): #366
  • Phase 5 (Planner v0): #368 ← hier

Test plan

  • Unit-Tests PlannerService (5 Tests): leere Liste, Sortierung, planned-Status, obsolete-Markierung, getToday
  • Integration-Tests (4 Tests): Sortierung mit 3 Sourcen, obsolete-Markierung, GET /today, Idempotenz
  • pnpm typecheck clean
  • pnpm lint clean

Closes #368

🤖 Generated with Claude Code

## Summary - `PlannerService.planToday` markiert pending Candidates mit `latestAt < heute` als `obsolete` und setzt alle übrigen pending Candidates auf `lifecycleState=planned` mit `plannedSlot=jetzt` - Sortierung in JS: `priority` (high>normal>low), dann `earliestAt asc nulls last`, dann `createdAt asc` - `POST /planner/run` triggert `planToday`, `GET /planner/today` liefert die geplanten Candidates für heute - Idempotent: zweites `/planner/run` findet keine pending Candidates mehr ## Phase 5 von Epic #360 - Phase 1 (Schema): #361 ✅ - Phase 2 (Tracking): #363 ✅ - Phase 3 (Mail): #178 ✅ - Phase 4 (Habits): #366 ✅ - **Phase 5 (Planner v0): #368 ← hier** ## Test plan - [x] Unit-Tests `PlannerService` (5 Tests): leere Liste, Sortierung, planned-Status, obsolete-Markierung, getToday - [x] Integration-Tests (4 Tests): Sortierung mit 3 Sourcen, obsolete-Markierung, GET /today, Idempotenz - [x] `pnpm typecheck` clean - [x] `pnpm lint` clean Closes #368 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(#368): Planner v0 - alle pending Candidates auf heute (Phase 5 von #360)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
ca5aa6070d
PlannerService.planToday markiert pending Candidates mit latestAt < heute
als obsolete und setzt alle verbleibenden pending Candidates auf
lifecycleState=planned mit plannedSlot=jetzt. Sortierung in JS:
priority desc, earliestAt asc (nulls last), createdAt asc. getToday liefert
die für heute geplanten Candidates.

POST /planner/run und GET /planner/today via PlannerController.
Idempotent: zweites /planner/run findet nichts mehr zum Planen.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
admin-mrrm/mrrmlabapp!369
No description provided.