Skip to content

data: city-slug convention violations in the dataset ("厦门", "new delhi", "philadephia") + validator doesn't enforce slugs #160

Description

@shauryagangrade

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

  1. Correct the records to canonical slugs (xiamen, new_delhi, philadelphia)
  2. Extend scripts/validate-places.mjs to enforce the slug pattern /^[a-z0-9]+(_[a-z0-9]+)*$/ so these can't regress
  3. Check for any other non-conforming values while in there (jq -r '.[].city' data/places/*.json | sort -u)

Acceptance criteria

  • All cities conform; npm run validate enforces it

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions