Skip to content

fix: keep generated phone numbers well formed - #1137

Closed
andreatnvidia wants to merge 1 commit into
mainfrom
andreatnvidia/fix/phone-number-ranges
Closed

andreatnvidia wants to merge 1 commit into
mainfrom
andreatnvidia/fix/phone-number-ranges

Conversation

@andreatnvidia

@andreatnvidia andreatnvidia commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #1134, which now includes this fix and its regression tests.

Summary

Generated phone numbers could contain a four-digit exchange (1000) or a five-digit line number (10000) because randint includes its upper bound. Correct both ranges and resample N11 exchanges, which NANPA lists as unavailable for assignment.

Related Issue

Found during review of #1134. Kept separate from that data-provenance change.

Changes

  • Generate exchange codes from 200 through 999 and skip values ending in 11.
  • Generate line numbers from 0000 through 9999.
  • Add public-method regression tests for both range boundaries and all eight N11 exchanges.

Testing

  • Sampling suite: 263 passed.
  • Parameterized boundary and N11 tests added.
  • Changed Python files pass Ruff lint/format checks.
  • Full repository suite and E2E tests were not run.

Checklist

  • Follows commit message conventions.
  • Commit is signed off (DCO).
  • External contributor issue requirement: N/A.
  • Architecture docs: N/A.

Signed-off-by: Andre Manoel <amanoel@nvidia.com>
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