Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c0473c5e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 'SW1A garbage', | ||
| 'SW1A 0AA extra', | ||
| 'SW 1A 0AA', | ||
| 'JE1 1AA', |
There was a problem hiding this comment.
Remove the supported Jersey postcode from rejection cases
JE1 1AA resolves to ['-2.1049', '49.1880'], as explicitly required by the acceptance test on line 11, so including the identical input here makes this test fail unconditionally once dependencies are installed. The implementation and documentation intentionally retain Crown dependency districts for compatibility. Remove this supported postcode from the rejection cases or replace it with a genuinely malformed input so that npm test, including the test job in .github/workflows/test.yml, can pass.
Useful? React with 👍 / 👎.
Superseded by consolidated postal geocoding PR #124. This PR's head commit is retained in the combined branch. Combined CI passes on Node.js 24/26 and static checks.
Summary
GBR compact and lowercase full postcodes currently miss the district lookup. Repeated district rows also make the selected coordinate depend on source order.
Refresh GBR from GeoNames GB.zip, retrieved 2026-11-04 (export index: 2026-11-04). CC BY 4.0, with GeoNames attribution and changes documented in
docs/geocode-GBR.md. Convert 27,450 source rows to 3,002 unique district records, adding 17 districts and removing no existing district codes. Include a scoped generator with assertion checks.Preserve
[longitude, latitude]strings, exports, and other countries. Accept district, spaced/compact full postcode, lowercase, and surrounding whitespace for GBR. Reject malformed suffixes. Keep the source's legacy Crown dependency grouping explicit.Evidence
SW1A0AAand lowercasesw1a 0aamiss; repeated codes select the first locality.After: 3,002 rows / unique districts; supported formats return
['-0.1328', '51.5018']. All district lookups and coordinate ranges are checked offline.npm test: 100 tests pass.npm run lint,npm run format:check, andnpm run validate:datapass. Data validation retains two existing AUT/BEL warnings. Generator rebuild is byte-for-byte identical.Merge Danger
Door: two-way
Revert the country change to restore the previous data and normalization. No merge, publication, or deployment is part of this task.
Blast Radius: GBR
District representative points change from first-locality selection to a mean of distinct source points. These are not postal centroids. Large rural/island districts can have errors of tens of kilometres; within-district distances collapse to zero. Coverage and current full-postcode validity are not guaranteed. Do not use these points as proof of physical location or for fraud decisions. Shared overlap with concurrent country PRs is limited to the normalization block in
lib/geocode.js.