Read the plan service's today from the scheduler's clock
The plan service read "today" from time.Now, so the plan-draft schedule tests could not pin the plan_ready title on the fake clock. NewService now takes a clock; the server passes the scheduler's Now. The plan-draft tests read the started scheduler's fake clock and assert each plan_ready row's title and channel alongside the existing key assertions. Maestro task ece60217-04d0-43a4-9690-4aba2a00d420 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -96,7 +96,7 @@ func (s *Service) revision(ctx context.Context, weekStart store.LocalDate) (int6
|
||||
// the household context, the pool, last week's dinners and the dinner
|
||||
// time.
|
||||
func (s *Service) request(ctx context.Context, weekStart store.LocalDate) (skills.WeekRequest, error) {
|
||||
hctx, err := harness.BuildContext(ctx, s.st, time.Now(), ContextBudget)
|
||||
hctx, err := harness.BuildContext(ctx, s.st, s.now(), ContextBudget)
|
||||
if err != nil {
|
||||
return skills.WeekRequest{}, fmt.Errorf("plan: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user