Problem
The documented convention (src/lib/types.ts:12-17, data/places.schema.json:24-27) is lowercase snake_case city slugs, but the dataset contains violations the validator never catches:
data/places/library.json — "city": "厦门" (non-CJK-unfriendly: becomes percent-encoded URLs via city-pages.ts:71-74)
data/places/sat_centre.json — "city": "new delhi" ×3 (literal space, breaks slug generation)
data/places/sat_centre.json — "philadephia" (misspelled Philadelphia → wrong city page)
Fix
- Correct the records to canonical slugs (
xiamen, new_delhi, philadelphia)
- Extend
scripts/validate-places.mjs to enforce the slug pattern /^[a-z0-9]+(_[a-z0-9]+)*$/ so these can't regress
- Check for any other non-conforming values while in there (
jq -r '.[].city' data/places/*.json | sort -u)
Acceptance criteria
Problem
The documented convention (
src/lib/types.ts:12-17,data/places.schema.json:24-27) is lowercasesnake_casecity slugs, but the dataset contains violations the validator never catches:data/places/library.json—"city": "厦门"(non-CJK-unfriendly: becomes percent-encoded URLs viacity-pages.ts:71-74)data/places/sat_centre.json—"city": "new delhi"×3 (literal space, breaks slug generation)data/places/sat_centre.json—"philadephia"(misspelled Philadelphia → wrong city page)Fix
xiamen,new_delhi,philadelphia)scripts/validate-places.mjsto enforce the slug pattern/^[a-z0-9]+(_[a-z0-9]+)*$/so these can't regressjq -r '.[].city' data/places/*.json | sort -u)Acceptance criteria
npm run validateenforces it