Remove dead climate region code from suggestion engine

Suggestion engine now purely uses home profile features (heating,
cooling, pool, etc.) for template matching. Climate region field
and matching block removed — ZIP code is no longer collected.
This commit is contained in:
Trey T
2026-03-30 11:19:04 -05:00
parent cb7080c460
commit 00fd674b56

View File

@@ -42,7 +42,6 @@ type templateConditions struct {
HasGarage *bool `json:"has_garage,omitempty"`
HasBasement *bool `json:"has_basement,omitempty"`
HasAttic *bool `json:"has_attic,omitempty"`
ClimateRegion *string `json:"climate_region,omitempty"`
PropertyType *string `json:"property_type,omitempty"`
}
@@ -52,7 +51,7 @@ func (c *templateConditions) isEmpty() bool {
c.RoofType == nil && c.ExteriorType == nil && c.FlooringPrimary == nil &&
c.LandscapingType == nil && c.HasPool == nil && c.HasSprinkler == nil &&
c.HasSeptic == nil && c.HasFireplace == nil && c.HasGarage == nil &&
c.HasBasement == nil && c.HasAttic == nil && c.ClimateRegion == nil &&
c.HasBasement == nil && c.HasAttic == nil &&
c.PropertyType == nil
}
@@ -61,7 +60,7 @@ const (
baseUniversalScore = 0.3
stringMatchBonus = 0.25
boolMatchBonus = 0.3
climateRegionBonus = 0.2
// climateRegionBonus removed — suggestions now based on home features only
propertyTypeBonus = 0.15
totalProfileFields = 14
)
@@ -300,15 +299,6 @@ func (s *SuggestionService) scoreTemplate(tmpl *models.TaskTemplate, residence *
}
}
// Climate region match - compare condition against template's associated regions
// (residence climate region is determined by ZIP code; template regions are preloaded)
if cond.ClimateRegion != nil {
conditionCount++
// Match if any of the template's regions matches the condition
// In practice, the residence's climate region would be looked up from ZIP,
// but since templates already carry their regions, we score based on region presence
}
// Property type match
if cond.PropertyType != nil {
conditionCount++