refactor!: make addrkit a multi-city address normalizer
- remove the events/outages module, ArcGIS adapter, portal config and event statuses - add a configurable city dictionary/parser and make City part of StreetKey - seed: read city/city_name, namespace IDs by city, keep structures distinct - fix reliability: schema v2 with fail-closed load, deterministic ordering, input limits, config validation, atomic DB publish, LLM response caps - add read-only shadow mode comparing the old ES path with addrkit - breaking: registry.db must be re-seeded; config has no portal section
This commit is contained in:
@@ -86,3 +86,17 @@ func TestParseVariants(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseVariantsCapsCountAndLength(t *testing.T) {
|
||||
long := strings.Repeat("x", 600)
|
||||
content := `{"variants":["` + long + `","a","b","c","d"]}`
|
||||
out := parseVariants(content)
|
||||
if len(out) != 3 {
|
||||
t.Fatalf("variants = %v, want 3", out)
|
||||
}
|
||||
for _, v := range out {
|
||||
if len([]rune(v)) > 512 {
|
||||
t.Fatalf("oversized variant accepted: %d runes", len([]rune(v)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user