FA-96704 / Phone number formatting / Member archive
Emergency and service code classifier: emergency codes are matched as prefixes · case 04
Service code "1331" is classified as emergency.
Case contract
Input [dialed, country] with toy tables AA (emergency 133/144, service = 4 digits starting 1, trunk 0, 9 national digits) and BB (emergency 755, service = 3 digits starting 7, no trunk, 7 national digits). Remove spaces; strip any number of leading "*NN" feature codes into tags. The rest must be digits. Classify in order: exact emergency code, service code, then a national number (trunk required and removed when the country has one). Return tags + [class].
Why this case matters
Emergency and short service codes must be recognized before any national formatting, or emergency calls are rewritten or blocked.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| service code sharing the emergency prefix | ["emergency"] | ["service"] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗