Skip to content

feat: add Lithuania postal geocoding - #110

Closed
jkrenge wants to merge 1 commit into
masterfrom
codex/ltu-postal-geocoding
Closed

jkrenge wants to merge 1 commit into
masterfrom
codex/ltu-postal-geocoding

Conversation

@jkrenge

@jkrenge jkrenge commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

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

Add approximate LTU postal locations for delivery-to-return distance analysis.

coordinates(LTU, postcode)
  normalize five digits or LT-NNNNN (case-insensitive, outer whitespace)
  look up one of 2,023 codes
  return [longitude, latitude] strings, or undefined

GeoNames LT.zip retrieved 2026-11-04 (export dated 2026-11-04), CC BY 4.0. Its 21,870 source rows produce 2,023 unique five-digit records. Average distinct coordinate pairs per code; repeated rows have no extra weight. These are representative points, not postal centroids. Coverage is partial and rural estimates can have substantial error. The upstream observation date is unknown. Source, attribution, checksums, UPU urban/rural/missing-code checks, and rebuild steps are in docs/geocode-LTU.md.

Evidence

  • Before: LTU is absent from the geocode allowlist and has no dataset; lookups return undefined.
    After: country-focused offline tests execute urban leading-zero and rural lookups, accepted formats, unknown/absent codes, coordinate validity, deterministic deduplication, and invalid-source rejection.
  • npm test: 99 passed.
  • npm run lint, npm run format:check, npm run validate:data: passed. Validation retains two existing AUT/BEL warnings.
  • Regeneration matches the committed JSON byte for byte. git diff --cached --check passed.

Merge Danger

Door: two-way

Revert this country addition to remove support. No merge, deployment or publication is part of this PR.

Blast Radius: LTU

Other country behavior, exports and types are unchanged. lib/geocode.js overlaps with concurrent country additions and can require conflict resolution. Source coverage and location accuracy are limited; missing codes stay undefined. The existing dependency install reports six moderate and one high audit finding; dependency changes are outside this country scope.

@jkrenge
jkrenge requested a review from a team as a code owner November 4, 2026 22:02
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T22:03:57.612524Z f07a74f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jkrenge jkrenge closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant