Repository navigation
fix(cp): split "<Person>, <Trade name>" org names into Name and AKA - #328
Merged
Merged
Conversation
netravnen
force-pushed
the
fix/cp-comma-person-trade-name
branch
2 times, most recently
from
November 25, 2026 13:39
b5ae80f to
954eb94
Compare
PeeringDB's RDAP import appends the first RIPE remark line to the
registrant name with ", ". For a sole trader that line is often the
trade name, so net 43561 / org 45283 (AS218766) is named
"<GIVEN_NAME> <SURNAME>, <SURNAME> Digital Solutions". The RIPE org
describes it as "<GIVEN_NAME> <SURNAME> trading as <SURNAME> Digital
Solutions". Update Name now treats the comma form like trading-as.
Changes:
- Add parseCommaPersonTradeNameIdentity as the fourth rule in
parseOrganizationNameIdentity: exactly two comma parts, a
person-shaped left part (looksLikeShortPersonalName: 2 to 4
capitalized words, no digits, business words or legal form), and a
right part that shares a surname with the person (accents ignored)
or has a business word or legal form.
- Add isKnownAsFromLongNameIdentity and use it in both AKA cleanup
checks, so a second Update Name run keeps an AKA that the Long
Name's own split yields. Before this, a trading-as AKA was cleared on
the next run because the Long Name contains it.
- Bump CP to 2.0.234.
Security:
- N/A
Testing:
- New tests for the person-name shape, the comma split, its no-split
cases ("Acme Networks, Berlin", "John Smith, Jane Doe", "John Smith,
iFog", three parts) and the AKA guard.
- build_userscripts.py --check and node --check pass.
- node --test in user.js: 611 tests, 610 pass, 1 skipped, 0 fail.
- The 9 scratch name-normalization harnesses give identical output to
master.
Backwards Compatibility:
- Only names matching the guarded comma form change. Other comma names
keep the existing handling.
Assisted-by: Claude:claude-opus-5-5
netravnen
force-pushed
the
fix/cp-comma-person-trade-name
branch
from
November 25, 2026 13:44
954eb94 to
e2949be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update Name now splits org names of the form
<Person>, <Trade name>into Name and AKA, as it already does for<Person> trading as <Trade name>.Why
Net 43561 / org 45283 (AS218766, DE) is named
<GIVEN_NAME> <SURNAME>, <SURNAME> Digital Solutions. PeeringDB's RDAP import (20c/rdap, the RIPE remarks step) appends the first remark line to the registrant name with", ". Here that line is the trade name. The RIPE org's own descr is<GIVEN_NAME> <SURNAME> trading as <SURNAME> Digital Solutions.Rule
parseCommaPersonTradeNameIdentityruns after the trading-as, Polish S.C. and GT parenthesis rules. It splits only when:looksLikeShortPersonalName: 2 to 4 capitalized words, no digits, no business words, no legal form);<GIVEN_NAME> <SURNAME>, <SURNAME> Digital Solutions<SURNAME> Digital Solutions, AKA<GIVEN_NAME> <SURNAME>, Long Name the originalAcme Networks, BerlinJohn Smith, Jane DoeJohn Smith, iFog<GIVEN_NAME> <SURNAME>, BerlinAKA guard
After a split, Long Name keeps the full original and so contains the AKA. The AKA cleanup checks then cleared that AKA on the next Update Name run, for trading-as splits too.
isKnownAsFromLongNameIdentitynow keeps an AKA that the Long Name's own split yields, on both network and organization pages.Testing
build_userscripts.py --checkandnode --checkpass.node --test: 611 tests, 610 pass, 1 skipped, 0 fail.Notes
Assisted-by: Claude:claude-opus-5-5