Skip to content

fix(cp): split RDAP remark-joined org names into Name, Long Name and AKA - #330

Merged
netravnen merged 1 commit into
masterfrom
fix/cp-rdap-remark-joined-name
Nov 25, 2026
Merged

netravnen merged 1 commit into
masterfrom
fix/cp-rdap-remark-joined-name

Conversation

@netravnen

Copy link
Copy Markdown
Contributor

Update Name now splits org names that PeeringDB's RDAP import built from two names, after confirming them against the RDAP record.

Why

PeeringDB creates orgs with 20c/rdap, which appends ", " plus the first RIPE or APNIC remark line to the registrant name. When that line is a brand, one org name holds two names. Net 44210 / org 45929 (AS50019, TR) is named <COMPANY> TELEKOM VE BILISIM TEKNOLOJILERI, <BRAND> NET Telekomunikasyon: the registrant ORG-TTVB1-RIPE plus the aut-num remark, which matches the as-name.

Change

RDAP-confirmed split.

  • extractRdapImportedOrgNameParts rebuilds the registrant name and remark line the way 20c/rdap does.
  • parseRdapRemarkJoinedIdentity splits only when the stored name is exactly <registrant>, <remark>, ignoring case, whitespace and trailing punctuation.
  • It does not split when the remark is a notice, banner, legal alias, URL, ASN, handle, longer than 64 characters, or a repeat of the registrant or its short Name.
  • Network pages check the net's ASN. Organization pages check the ASNs of the org's networks.
  • The split runs after the existing identity rules, so trading-as, Polish S.C., GT parenthesis, <Person>, <Trade name> and notice cutting keep their results.

Turkish descriptor trim.

  • stripTurkishSectorDescriptorTail trims trailing sector words such as TELEKOM VE BILISIM TEKNOLOJILERI from the short Name.
  • It applies only when the name has no legal form, the tail holds a Turkish-only word, and another word is left. Existing TR orgs (20558, 29104, 29427) already use this shape.
  • looksLikeShortPersonalName now rejects Turkish sector words, so a short Turkish company name is never read as a person.
Field Net 44210 / org 45929 after Update Name
Name <COMPANY>
Long Name <COMPANY> TELEKOM VE BILISIM TEKNOLOJILERI
AKA <BRAND> NET Telekomunikasyon

From the network page, the org is updated through the API with Name <COMPANY> TELEKOM VE BILISIM TEKNOLOJILERI and the brand as AKA.

Testing

  • build_userscripts.py --check and node --check pass.
  • node --test: 637 tests, 636 pass, 1 skipped, 0 fail. The new tests use placeholder data.
  • The scratch name-normalization harnesses give identical output to master.
  • Against the live RDAP records: AS50019 splits, AS218766 still takes the <Person>, <Trade name> rule, AS207858 does not split.
  • Reviewed with agy (gemini-4-argon-high) for three rounds. Round 1 raised 4 findings (3 fixed, 1 rejected: the registrant pick follows 20c/rdap). Round 2 raised 4 findings (all fixed). Round 3 raised none.

Notes

  • CP goes to 2.0.236.
  • The org PUT's read-back still reads the org-name cache before the API. That is pre-existing and not changed here.

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

PeeringDB's RDAP import (20c/rdap) appends ", " plus the first RIPE or
APNIC remark line to the registrant name. When that line is a brand,
one org name holds two names: net 44210 / org 45929 (AS50019) is named
"<COMPANY> TELEKOM VE BILISIM TEKNOLOJILERI, <BRAND> NET
Telekomunikasyon". Update Name now confirms the joined string against
the RDAP record and splits it.

Changes:
- Add extractRdapImportedOrgNameParts, mirroring 20c/rdap's registrant
  and remark choice, and parseRdapRemarkJoinedIdentity, which splits
  only an exact (case, whitespace, trailing punctuation) match and
  keeps notices, banners, legal aliases, URLs, ASNs, handles, long
  text and remarks that repeat the registrant or its short Name out
  of AKA.
- Add rdapAutnumClient.resolveImportedOrgNamePartsByAsn,
  resolveRdapRemarkJoinedIdentity and getOrganizationNetworkAsns, and
  try the split on network pages (net ASN) and organization pages
  (the org's network ASNs) after the existing identity rules. On
  network pages the org-name cache is updated so the org PUT verifies.
- looksLikeShortPersonalName rejects Turkish sector words, so a
  short Turkish company name is not split as "<Person>, <Trade name>".
- Add stripTurkishSectorDescriptorTail to the short-Name compaction:
  a name without a legal form loses a trailing Turkish sector
  descriptor when it holds a Turkish-only word and another word stays.
- Bump CP to 2.0.236.

Security:
- N/A

Testing:
- New tests for the RDAP parts (RIPE, APNIC, other RIRs), the split
  and its no-split cases, and the Turkish trim, all on placeholder
  data.
- build_userscripts.py --check and node --check pass.
- node --test in user.js: 637 tests, 636 pass, 1 skipped, 0 fail.
- The 9 scratch name-normalization harnesses give identical output to
  master.
- Reviewed with agy (gemini-4-argon-high), two rounds; confirmed
  findings fixed.

Backwards Compatibility:
- Only RDAP-confirmed joined names split. The short Name changes for
  Turkish names without a legal form that end in a sector descriptor.

Assisted-by: Claude:claude-opus-5-5
@netravnen netravnen added bug llm-built userscript Tampermonkey/Greasemonkey userscript changes labels Nov 25, 2026
@netravnen
netravnen merged commit 6b444c0 into master Nov 25, 2026
2 checks passed
@netravnen
netravnen deleted the fix/cp-rdap-remark-joined-name branch November 25, 2026 21:20
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