Codex/whe 15 bootstrap workspace (#1)

* feat(WHE-15): bootstrap bun workspace with app and package scaffolds

* chore(WHE-17): switch workspace typecheck to tsgo

* chore(WHE-16): configure oxlint and oxfmt no-semicolon style

* chore: address CodeRabbit review feedback

* chore: apply coderabbit fixes and add review script

* docs: add ADR decision metadata
This commit is contained in:
Stas
2026-03-05 00:56:24 +03:00
committed by GitHub
parent 768400214e
commit 4a26ac81d6
48 changed files with 1057 additions and 1 deletions

View File

@@ -1,22 +1,27 @@
# HOUSEBOT-004: Reminders and Scheduler
## Summary
Schedule and deliver household billing reminders to dedicated Telegram topics.
## Goals
- Automate utility and rent reminders on configured dates.
- Ensure idempotent sends and reliable retries.
- Keep scheduling externalized via Cloud Scheduler.
## Non-goals
- Dynamic natural-language reminder editing.
- Per-user DM reminders in v1.
## Scope
- In: scheduler endpoints, reminder generation, send guards.
- Out: full statement rendering details.
## Interfaces and Contracts
- HTTP endpoints triggered by Cloud Scheduler:
- `/jobs/reminder/utilities`
- `/jobs/reminder/rent-warning`
@@ -24,12 +29,14 @@ Schedule and deliver household billing reminders to dedicated Telegram topics.
- Job payload includes cycle and household references.
## Domain Rules
- Utilities reminder target: day 3 or 4 (configurable).
- Rent warning target: day 17.
- Rent due target: day 20.
- Duplicate-send guard keyed by household + cycle + reminder type.
## Data Model Changes
- `reminder_dispatch_log`:
- `household_id`
- `billing_cycle`
@@ -38,20 +45,24 @@ Schedule and deliver household billing reminders to dedicated Telegram topics.
- `telegram_message_id`
## Security and Privacy
- Scheduler endpoints protected by shared secret/auth header.
- No sensitive data in scheduler payloads.
## Observability
- Job execution logs with correlation IDs.
- Success/failure counters per reminder type.
- Alert on repeated send failures.
## Edge Cases and Failure Modes
- Telegram API temporary failure.
- Scheduler retry causes duplicate call.
- Missing household topic mapping.
## Test Plan
- Unit:
- date and reminder eligibility logic
- Integration:
@@ -60,10 +71,12 @@ Schedule and deliver household billing reminders to dedicated Telegram topics.
- simulated month schedule through all reminder events
## Acceptance Criteria
- [ ] Scheduler endpoints implemented and authenticated.
- [ ] Reminder sends are idempotent.
- [ ] Logs and counters available for each job run.
- [ ] Retry behavior validated.
## Rollout Plan
- Deploy with dry-run mode first, then enable live sends.