Skip to content

Feature/5 geoloc valid - #19

Open
akhilapnuri wants to merge 8 commits into
mainfrom
feature/5-geoloc-valid
Open

akhilapnuri wants to merge 8 commits into
mainfrom
feature/5-geoloc-valid

Conversation

@akhilapnuri

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

isRockvilleResident(address) implemented in geocode.ts. Uses US Census Geocoder to check whether an address is inside Rockville city limits. Returns true if address is in Rockville, false if different place, and null if empty address, timeout, error response, etc. Matches on GEOID 2467675 so Rockville from different states don't count. Checks all address matches. 12 unit tests written.

Unit tests:
pnpm install
pnpm vitest run geocode
You should see 12 tests pass.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Other (please describe):

Related Issues (put task name here from notion)

Screenshots (If it is a front end feature screenshot is required)

Additional Notes

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0a74b52e-ab0e-42d5-8f3a-11bffae6aa18
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

amanuelabiy
amanuelabiy previously approved these changes Oct 26, 2026

@amanuelabiy amanuelabiy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked against the Census API with Rockville addresses outside city limits. Made one non-blocking nit for the isRockvilleResident function. Approving.

Comment thread packages/backend/src/lib/geocode.ts Outdated
export const isRockvilleResident = async (
address: string,
): Promise<boolean | null> => {
const trimmed = address.trim();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: This runs outside of the try. This means a non-string value from untyped data would throw. Moving it inside the try makes "never throws" fully true.

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.

3 participants