Skip to content

fix(cp): split "<Person>, <Trade name>" org names into Name and AKA - #328

Merged
netravnen merged 1 commit into
masterfrom
fix/cp-comma-person-trade-name
Nov 25, 2026
Merged

netravnen merged 1 commit into
masterfrom
fix/cp-comma-person-trade-name

Conversation

@netravnen

@netravnen netravnen commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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

parseCommaPersonTradeNameIdentity runs after the trading-as, Polish S.C. and GT parenthesis rules. It splits only when:

  • there are exactly two comma parts;
  • the left part looks like a person (looksLikeShortPersonalName: 2 to 4 capitalized words, no digits, no business words, no legal form);
  • the right part shares a surname with the person (accents ignored), or has a business word or legal form.
Input Result
<GIVEN_NAME> <SURNAME>, <SURNAME> Digital Solutions Name <SURNAME> Digital Solutions, AKA <GIVEN_NAME> <SURNAME>, Long Name the original
Acme Networks, Berlin unchanged
John Smith, Jane Doe unchanged
John Smith, iFog unchanged
<GIVEN_NAME> <SURNAME>, Berlin unchanged

AKA 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. isKnownAsFromLongNameIdentity now keeps an AKA that the Long Name's own split yields, on both network and organization pages.

Testing

  • build_userscripts.py --check and node --check pass.
  • node --test: 611 tests, 610 pass, 1 skipped, 0 fail.
  • The scratch name-normalization harnesses give identical output to master.

Notes

Assisted-by: Claude:claude-opus-5-5

@netravnen netravnen added bug llm-built userscript Tampermonkey/Greasemonkey userscript changes labels Nov 25, 2026
@netravnen
netravnen force-pushed the fix/cp-comma-person-trade-name branch 2 times, most recently from b5ae80f to 954eb94 Compare November 25, 2026 13:39
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
netravnen force-pushed the fix/cp-comma-person-trade-name branch from 954eb94 to e2949be Compare November 25, 2026 13:44
@netravnen
netravnen merged commit e2949be into master Nov 25, 2026
2 checks passed
@netravnen
netravnen deleted the fix/cp-comma-person-trade-name branch November 25, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug llm-built userscript Tampermonkey/Greasemonkey userscript changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant