Claim chat autosend periods as list_ready:chat:YYYY-MM-DD (F20-01)
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user