mirror of
https://github.com/joelhooks/joelclaw.git
synced 2026-09-19 01:24:04 +08:00
1b7c2f0a8c
Approval workflow now enters a reminder loop after initial notification: sleep(interval) → peek promise → if pending, send escalating reminder. Four tiers: gentle → firm → urgent → critical with configurable intervals. Lab mode uses 15s/30s/45s/60s; production default 4h/12h/24h/48h. Uses DurablePromise.peek() to check resolution between sleeps without blocking — if decision arrived during sleep, skip remaining reminders. Fixed: resolver handles HTTP 409 (promise already completed) gracefully. Multiple Telegram messages with buttons for the same workflow is expected — user may tap any of them. Second resolve gets 409, logged as duplicate. Proven: initial notification sent, 1st reminder at +15s, Joel tapped approve on reminder, workflow completed with remindersCount=1 and durationMs=45995.