Claim chat autosend periods as list_ready:chat:YYYY-MM-DD (F20-01)
CI / ci (push) Successful in 7m36s
CI / ci (pull_request) Successful in 7m21s

The shopping_chat_autosend schedule now claims its schedule_runs period
under AutosendKey of the coming week's Monday instead of the ISO week key.
Schedule gains an optional PeriodKey hook that replaces the rule's key;
Register rejects a schedule setting both Key and PeriodKey. The fake-clock
tests assert the stored period keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-10 16:11:51 -04:00
co-authored by Claude Opus 5.5
parent 7f48a67ad4
commit 9ff50fd558
4 changed files with 30 additions and 13 deletions
+1
View File
@@ -722,6 +722,7 @@ func TestRegister(t *testing.T) {
{Name: "hourly", Rule: reminder(&rec).Rule, Run: rec.run},
{Name: scheduler.DayOfReminder, Run: rec.run},
{Name: scheduler.DayOfReminder, Rule: reminder(&rec).Rule},
{Name: scheduler.DayOfReminder, Key: "start", PeriodKey: func(p scheduler.Period) string { return p.Key }, Rule: reminder(&rec).Rule, Run: rec.run},
}
for _, sch := range bad {
if err := s.Register(sch); err == nil {