Repository navigation
fix(cp): drop a dangling trailing dash before deriving Long Name - #331
Merged
Merged
Conversation
registro.br cuts owner names at 50 characters, so a name like
"<COMPANY> SERVICOS DE COMUNICACAO MULTIMIDIA - ME" arrives as
"... MULTIMIDIA -" (net 25126 / org 45040, AS266063). The short Name
was already clean, but compactEntityNameWithLongNameFallback kept the
dash in the full name and wrote "... MULTIMIDIA -" to Long Name.
Changes:
- compactEntityNameWithLongNameFallback drops a trailing spaced "-",
en dash, em dash or "/" (also after a comma) along with the
dangling "," and ";" it already drops. An unspaced "Foo-" and a
real suffix after the dash ("... - ME") are unchanged.
- Bump CP to 2.0.237.
Security:
- N/A
Testing:
- New tests on placeholder data for the cut-off shape, each dash
form, and the unchanged suffix and unspaced cases.
- build_userscripts.py --check and node --check pass.
- node --test in user.js: 641 tests, 640 pass, 1 skipped, 0 fail.
- The 9 scratch name-normalization harnesses give identical output to
master.
Backwards Compatibility:
- Only names ending in a spaced dangling dash or slash change: their
Long Name loses the separator or is no longer written.
Assisted-by: Claude:claude-opus-5-5
netravnen
changed the base branch from
fix/cp-rdap-remark-joined-name
to
master
November 25, 2026 21:20
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.
Follows #330 (merged). Update Name no longer writes a cut-off name with a dangling dash into Long Name.
Why
Net 25126 / org 45040 (AS266063, BR) gets its RDAP data from registro.br, which cuts owner names at 50 characters. The org name is
<COMPANY> SERVICOS DE COMUNICACAO MULTIMIDIA -, exactly 50 characters. Comparable orgs end inMULTIMIDIA - MEorMULTIMIDIA - EIRELI, so the legal form after the dash was lost. The short Name already came out clean, butcompactEntityNameWithLongNameFallbackkept the dash in the full name and wrote... MULTIMIDIA -to Long Name.Change
compactEntityNameWithLongNameFallbackdrops a trailing spaced-,–,—or/, also after a comma, along with the dangling,and;it already drops.EXAMPLE SERVICOS DE COMUNICACAO MULTIMIDIA -EXAMPLE SERVICOS DE COMUNICACAO MULTIMIDIAExample Net, -Example NetExample Multimidia - MEFoo - BarThe lost legal form is not guessed. Set it by hand once the CNPJ is checked.
Testing
build_userscripts.py --checkandnode --checkpass.node --test: 641 tests, 640 pass, 1 skipped, 0 fail. The new tests use placeholder data.Notes
master.Assisted-by: Claude:claude-opus-5-5