Repository navigation
Keep former German register courts distinct from their successors. - #535
amckittrick wants to merge 2 commits into
Conversation
Numbers are not reassigned when a court is absorbed, so a moved registration must keep both court names. Accept the former court names from the OpenRegister dump as courts in their own right. The dump spelled Wolmirstedt as Wormirstedt; return the real spelling and still accept the misspelling.
mjanthony819
left a comment
There was a problem hiding this comment.
Nice fix. I confirmed the old behavior against master: validate('Paderborn früher Höxter HRB 9') returned Paderborn HRB 9, collapsing two distinct registrations, and validate('Höxter HRB 9') raised InvalidComponent. This branch keeps both identities, and the full suite passes (413 passed, 9 skipped) with the project doctest flags.
One question, not a blocker: the old-court side of the früher split accepts any known court, including ones that still keep their register. For example validate('Stuttgart früher München HRB 1') and validate('Höxter früher Höxter HRB 1') both validate. If only former courts can legally appear after früher, restricting parts[1] to FORMER_COURTS would reject pairs that almost certainly never existed. If the permissive behavior is deliberate (the dump may not list every name), a one-line comment saying so would help future readers.
The new doctests cover the important folds (ASCII fruher/Hoxter, decomposed input, malformed halves, the Wormirstedt misspelling). Nothing blocking from me.
AI assistance covered the analysis and this review text.
…ps its register. A district change can leave both courts open, so the old court is looked up in the full court list. Co-authored-by: Cursor <cursoragent@cursor.com>
That's fair. It's deliberate. A district change can move a registration while both courts stay open, so the old court stays on the full court list. FORMER_COURTS is only the closed courts missing from GERMAN_COURTS. Stuttgart früher (formerly) München isn't in the OpenRegister dump. These are, and the old courts still keep a register: Chemnitz früher Leipzig HRB 101463 |
|
Thanks for the examples — Chemnitz frueher Leipzig HRB 101463 and Stralsund frueher Rostock HRA 1766 make the intent clear: pairing with the frueher court is deliberate, since those registrations are still filed under the old court's number series. With that, the permissive pairing stands and my earlier concern is resolved. I added both registrations as doctests in 8bb427e so the behaviour is pinned in the test suite. |
Fixes #534
A Handelsregisternummer is only unique per court. When a court is absorbed, the registration keeps both names: the current court, früher (formerly), and the old court. Paderborn früher Höxter HRB 9 is a different registration from Paderborn HRB 9.
The Paderborn früher Höxter alias rewrote that number to Paderborn and dropped the old court. This removes that alias. A number written as the current court, früher, and a known old court keeps both names. Former court names from the OpenRegister company dump (12 June 2017 through 31 January 2019) that are not already in GERMAN_COURTS are accepted as courts.
The dump spelled Wolmirstedt as Wormirstedt (Wolmirstedt). The stored name is Wolmirstedt, and the dump spelling still validates.