Problem
data/CONTRIBUTING.md explicitly documents an expiry window for the verified block:
A verification stays valid for 12 months — or 6 months for exam centres (sat_centre / foreign_lang_exam_centre)... After the window, the place should be verified again or the block removed.
data/competitions/CONTRIBUTING.md documents the same idea for competitions (6 months).
But nothing in the codebase actually enforces or checks this window:
-
src/components/pins/verified-badge.tsx:
export function VerifiedBadge({ place }: { place: Place }) {
if (!place.verified) return null;
return ( /* renders the badge unconditionally */ );
}
There is no comparison of place.verified.on against "now" — a verification from years ago renders the exact same green "Verified" badge as one from yesterday, forever.
-
scripts/check-data-freshness.mjs (the script that already flags expired valid_till dates and lapsed competition cycles) never reads the verified block at all:
$ grep -n "12.*month\|6.*month\|expir\|stale" src/lib src/components scripts -r --include="*.ts" --include="*.tsx" --include="*.mjs"
# (no hits outside comments/docs — nothing checks verified.on against an expiry window)
So the documented behavior ("badge disappears after 12/6 months") doesn't exist — it's aspirational text with no code backing it.
Fix
Pick one (or both):
VerifiedBadge (and the equivalent competition card badge) should stop rendering once verified.on is older than the documented window (6 months for sat_centre/foreign_lang_exam_centre and competitions, 12 months for everything else).
scripts/check-data-freshness.mjs should flag (warn or error) any record whose verified.on has passed its window, the same way it already flags an expired valid_till.
Acceptance criteria
Problem
data/CONTRIBUTING.mdexplicitly documents an expiry window for theverifiedblock:data/competitions/CONTRIBUTING.mddocuments the same idea for competitions (6 months).But nothing in the codebase actually enforces or checks this window:
src/components/pins/verified-badge.tsx:There is no comparison of
place.verified.onagainst "now" — a verification from years ago renders the exact same green "Verified" badge as one from yesterday, forever.scripts/check-data-freshness.mjs(the script that already flags expiredvalid_tilldates and lapsed competition cycles) never reads theverifiedblock at all:So the documented behavior ("badge disappears after 12/6 months") doesn't exist — it's aspirational text with no code backing it.
Fix
Pick one (or both):
VerifiedBadge(and the equivalent competition card badge) should stop rendering onceverified.onis older than the documented window (6 months forsat_centre/foreign_lang_exam_centreand competitions, 12 months for everything else).scripts/check-data-freshness.mjsshould flag (warn or error) any record whoseverified.onhas passed its window, the same way it already flags an expiredvalid_till.Acceptance criteria
data/CONTRIBUTING.md/data/competitions/CONTRIBUTING.mdis actually enforced somewhere in codeverifiedblock that's past its window