feat: add recurring card scheduler#39
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 15, 2026, 5:19 AM ET / 09:19 UTC. Summary Reproducibility: yes. from source inspection: POST /api/cards with a schedule such as {"kind":"interval","everyMs":60000,"startAt":0} reaches nextRecurringRunAt(schedule, now, null) and loops forward interval by interval. I did not execute it to keep the checkout read-only. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep the card/run-level recurrence model only after next-run computation is bounded, the D1 upgrade path is proven, and create/tick behavior is demonstrated in a real Worker/D1 setup. Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: POST /api/cards with a schedule such as {"kind":"interval","everyMs":60000,"startAt":0} reaches nextRecurringRunAt(schedule, now, null) and loops forward interval by interval. I did not execute it to keep the checkout read-only. Is this the best way to solve the issue? No: modeling recurrence at the card/run layer is plausible, but the proposed next-run computation must be bounded and the schema/runtime path needs real upgrade proof before this is the best maintainable solution. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning high; reviewed against 3849a6234c41. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Summary
Adds first-class recurring cards so operational work can run on a cadence through the existing card/run scheduler instead of through long-running loops or ad-hoc cron jobs.
What changed
schedule_json,next_run_at, andlast_scheduled_run_atcard columns.POST /api/cardsto accept a schedule, for example{ "kind": "interval", "everyMs": 86400000 }.scheduled()handler./api/admin/scheduler/tickendpoint for manual scheduler ticks.Validation
pnpm run buildpnpm testpnpm run lintpnpm run format