Scope the season's plant lookup to the season
Build image / build-and-push (push) Successful in 4s

ListReferencedPlants(includeRemoved=true) returned every plant the garden has
ever held, so drawing one season loaded a decade of catalog on a decade-old
garden. It also meant the plant list and the plop list were selected by different
rules, which is the kind of near-miss that stays correct only by accident.

It now takes the same year the plops do, so the two selections always agree.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01H3zbym8Doka2d7D48maSgZ
This commit is contained in:
2026-07-21 01:47:14 -04:00
co-authored by Claude Opus 4.8
parent 1029aff2c7
commit 34ff4b99f5
3 changed files with 72 additions and 10 deletions
+1 -1
View File
@@ -271,7 +271,7 @@ func (s *Service) assembleFullFor(ctx context.Context, g *domain.Garden, year *i
if err != nil {
return nil, err
}
plants, err := s.store.ListReferencedPlants(ctx, g.ID, year != nil)
plants, err := s.store.ListReferencedPlants(ctx, g.ID, year)
if err != nil {
return nil, err
}