Skip to content

Read a lone V, I or X after a first name as the family name (#718) - #719

Merged
derek73 merged 7 commits into
masterfrom
fix/issue-718-lone-numeral-needs-words-to-spare
Oct 18, 2026
Merged

derek73 merged 7 commits into
masterfrom
fix/issue-718-lone-numeral-needs-words-to-spare

Conversation

@derek73

@derek73 derek73 commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Closes #718.

What changes

A single capital I, V or X ending a name written without a comma now needs a word to spare, counted exactly as rules/S4 (the ambiguous acronym needs words to spare) counts Ma: in name units, a particle chain counting as one word and a title as none.

input 2.4.2 now 1.4.0
John V given John, suffix V, no family given John, family V last V
Malcolm X suffix X, no family family X last X
Dr Smith V family Smith, suffix V given Smith, family V first Smith, last V
John Smith V suffix V suffix V (unchanged) suffix V
John W. Ingram V suffix V suffix V (unchanged) —
John Smith vi suffix vi, reports suffix vi, reports nothing suffix vi
  • Reports. Either reading reports suffix-or-name, both ways as Jack Ma does (Derek's call), from one site: the declined numeral stays one of the trailing read's picks. The one exception is a letter that classify already reported as an initial (HENRY I, one-case i), which reports nothing new.
  • Lower case. A lowercase numeral in a mixed-case name is settled by its writing: it reads as the generation and reports nothing.
  • Comma paths. The given part after a family comma is not counted, as S4 already says of the acronym.

Docs

  • New rules/S10 (the trailing roman numeral) and decisions/S10 record the decisions, what moved, what was declined and why, and the recompute recipes.
  • Amended rules:
    • P2 (the chain's stop, and its boundary example Freiherr von Richthofen V)
    • P3 ("the generation it also spells" now defers to S10)
    • P5 (the words-to-spare list)
    • M2 (examples)
    • O5 (its worked example is now John III, Dr.)
    • S2 and S4 (implemented:/interacts:)
  • Elsewhere: a release-log bullet, and two AGENTS.md amendments: the spelling sweep, and the group-side-predictor gotcha.

What moved (snapshot diff)

Four pre-existing corpus names:

  • John V → family V
  • Mohamad X → family X
  • John née Jones Smith V → maiden 'Jones Smith V', since the clause-free name John V no longer reads the V as a suffix
  • Freiherr von Richthofen V → family 'von Richthofen V': behind a title the chain is the one name word, the same reading Freiherr von Richthofen Ma already gets

The snapshot also gains S10's examples as new names. Re-pinned case rows are listed in decisions/S10; the two whose purpose needed a suffix kept their purpose on III spellings, and the old inputs became new rows.

Review

  • Design-docs review (eleven axes) found 8 issues, all fixed in 98f75f5. The main ones: S10's Accepted clause over-scoped to i; P3 and O5 were stale; the release bullet missed Dr. Smith V.
  • Code review found that the count leaked into a family comma's given part through the chain's bound: Smith, Freiherr von Berg V read given 'von Berg V', unreported, across 2,880 grid parses. Fixed in ede4d25. A second pass re-ran the same 558,423-parse grid over the fix commits: 0 unreported numeral moves remain (2,880 before), every reading ede4d25 changed equals master, and the flag introduced no new divergence.
  • PR review (comment accuracy and test coverage, which removed each emitter in a copy of the tree to see what failed). The fixes are in the latest commit:
    • Fewer report sites. The particle chain's numeral report only chose a wording, since assign reports the same kind from the final role, so it was deleted. The maiden clause's stand-down could never fire and was deleted too.
    • The clause now checks case. A mixed-case lowercase numeral given up by a maiden clause reported where every other path was silent (Jane Doe nee Smith vi). It now asks the case, as assign does.
    • Labels. Six classification labels were corrected against the 1.4.0 wheel, and five comments made stale by the change were fixed.
    • New rows pin each emitter, stand-down and gate. Each mutation now fails at least one test.
  • /simplify (reuse, simplification, efficiency, altitude): behavior-neutral cleanups in 4ac5a06. The lowercase case decision is now made once, in the walk; the one-letter test reuses is_single_letter_numeral; and reported_as_initial moved into _assign. Efficiency was measured: at most +1 frame, only on names ending in a numeral.
  • Follow-ups filed: Should Elizabeth II, Queen read Elizabeth as the given name, the way Queen Elizabeth II does? #720 (H1 behind a comma) and Should john v read V as the family name, as JOHN V and john x do? #721 (john v).

For Derek

  1. Freiherr von Richthofen V now reads family 'von Richthofen V'. That's consistent with S4 (... Ma), but it is a corpus name.
  2. john v (one-case, lowercase) still loses its family, while john x and JOHN V keep theirs. A lowercase v is a listed suffix word and never reaches the fork. This is recorded as Accepted in S10; closing it would mean touching the suffix-vocabulary path.
  3. H1 behind a comma is now unpinned. John V, Sir was the only spelling where a given-name title behind a comma kept the lone word as the given name (H1). John III, Sir, John Jr., Sir and John PhD, Sir read family on master already. The row is renamed for what it pins. A follow-up issue is worth drafting.
  4. Garbage-input observation: Berg nee MA V used to report the clause's kept MA; now the clause keeps MA V and reports only the V.

Checks

  • Tests: the full suite (21,126 passed), mypy and ruff are clean.
  • Frame budget: test_benchmark passes.
  • Snapshot: re-recorded.

🤖 Generated with Claude Code

derek73 and others added 5 commits October 18, 2026 02:38
A capital V, I or X ending a name with no word to spare for it is the
family name: 'John V' and 'Malcolm X' read family V and X, as 1.4.0
read them, where 2.0.0 through 2.4.2 gave suffix V and X and no family.
'John Smith V' keeps the suffix. A numeral in lower case in a mixed-case
name is settled by its writing: still the generation, and no longer
reported ('John Smith vi').

States the comma-less numeral as rules/S10 (the trailing roman
numeral), with its decisions entry; amends P2's chain stop, P5's
words-to-spare list and M2's examples, which the count moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
'John V' now reports suffix-or-name while reading family V, as
'Jack Ma' reports keeping its family. The declined numeral is a pick of
the trailing walk, and three sites take its branches, so three report
it: assign (a lone name word), the particle chain ('Freiherr von
Richthofen V'), and a maiden clause that keeps it ('abdul nee Smith V').

A letter classify already reported as an initial reports nothing new
(INV10 found 138 one-case rows, 'HENRY I', carrying both kinds).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
S10's Accepted clause named every listed lowercase letter where only
'v' bypasses the count ('john i' is counted, as P3's connective read as
an initial), and left out that 'john smith v' reports nothing. P3's
"is the generation it also spells" now defers to S10; O5's example is
'John III, Dr.', 'John V, Dr.' no longer being a lone word; the H3
contrast comment and the release bullet ('Dr. Smith V' moves the
surname into first) catch up. The case row that lost its H1 reading is
renamed for what it pins, and says that nothing pins H1 behind a comma.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code review found the chain's bound in a family comma's given part
asking the count through tail_reading, which assign's walk there never
asks (S4: "read without it"), so the chain took the V of 'Smith,
Freiherr von Berg V' into the given name, unreported. The bound now
reads with count_numeral=False and the four shapes read as on master.
Two case rows pin it; AGENTS.md's group-side-predictor gotcha records
the from-the-peel side of the class.

Also: assign uses the shared _AMBIGUOUS_CREDENTIAL_TAGS rather than a
second spelling of it, and group's Produces: line lists the chain's
and clause's reports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 2.5 milestone Oct 18, 2026
@derek73 derek73 added the bug label Oct 18, 2026
@derek73 derek73 self-assigned this Oct 18, 2026
@codecov

codecov Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.03%. Comparing base (958d252) to head (4ac5a06).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #719   +/-   ##
=======================================
  Coverage   99.03%   99.03%           
=======================================
  Files          46       46           
  Lines        4557     4575   +18     
=======================================
+ Hits         4513     4531   +18     
  Misses         44       44           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment review: fix labels that contradict 1.4.0 ('John III' is no
parity row, 'John III, Sir' is one, 'abdul Doe nee Smith V' is #274's),
and comments this change made stale (assign's deferral note and module
docstring, group's 'abdul V' reserve example, _vocab's claim that X is
suffix vocabulary).

Test review (mutation of each emitter in a copy): the particle chain's
numeral report only chose a sentence -- assign reports the same kind
from the final role -- so it is gone, as is the maiden clause's
stand-down, which could never fire. The clause's report on a numeral
it gives up now asks the case, so 'Jane Doe nee Smith vi' is silent as
every other path is. New rows pin the chain-taken numeral, its
already-an-initial stand-down, 'John VI', family-first 'John V', the
lowercase pair 'John x'/'john x' and the maiden-clause case contrast;
five rows restoring 1.4.0 field for field are relabelled parity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/simplify pass over PR #719, behavior-neutral (snapshot unchanged):
- a numeral its lower case settles is taken by the walk like any suffix
  word and recorded as no call, so assign and the maiden take stop
  re-asking numeral_settled_by_case -- the drift #718's review found
  in the clause can no longer recur
- the one-letter test asks is_single_letter_numeral rather than a hand
  `len(text) > 1`
- reported_as_initial moves into _assign, its one caller, and _pieces
  drops the two ambiguity imports it needed
- flatter control flow in assign's numeral pick; one duplicated
  comment sentence and a long case note trimmed; the given-slot bound's
  comment says only the numeral half is uncounted

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit 2bfa953 into master Oct 18, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should "John V" and "Malcolm X" read V and X as the family name rather than a generational suffix?

1 participant