Skip to content

Read a one-case one-letter numeral as its capital does (#721) - #722

Merged
derek73 merged 9 commits into
masterfrom
fix/issue-721-one-case-v-counts
Oct 19, 2026
Merged

derek73 merged 9 commits into
masterfrom
fix/issue-721-one-case-v-counts

Conversation

@derek73

@derek73 derek73 commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Closes #721.

What changes

A name written entirely in lower case now reads exactly as the same name in capitals does.

input master now capitals twin
john v suffix v, no family family v, reports suffix-or-name JOHN V → family V
john smith v suffix v, silent suffix v, reports JOHN SMITH V reports
john j v family j, suffix v middle j, family v JOHN J V → middle J, family V
john i conjunction-or-initial suffix-or-name JOHN I (same)
doe, jane v phd do suffix v phd do middle v, suffix phd do DOE, JANE V PHD DO
john i phd / John Smith V PhD silent or conjunction-or-initial same fields, reports suffix-or-name JOHN I, PHD reports
  • The tag. In a one-case name, classify tags a one-letter roman numeral as an initial, the same way its capital is tagged. Every reader that already treats V as an initial now treats v the same way. The numeral fork's test of the word in front counts a bare letter as an initial in a one-case name, as its capital would be.
  • Your issue comment, and the PR discussion. A connective letter with no name word after it in its part connects nothing, so it no longer reports conjunction-or-initial (rules/P3 now states the exception). "No name word" means nothing at all, or only credentials and titles: john i phd, john i dr., jose e jr. Where the letter is a roman numeral ending the name, it reports suffix-or-name. That holds before a credential too, with the fields unchanged: John Smith V PhD keeps family V and now reports. A marked letter that isn't a numeral is silent (john e, and jones, john e, a corpus name).
  • Should "John V" and "Malcolm X" read V and X as the family name rather than a generational suffix? #718's two-word count stands. Two stricter rules you weighed are declined in decisions/S10, with evidence. V and DVM #36's Hardie Leannon V and Problem parsing name with , V #136's John W. Ingram V both write the generation without a comma. The sheriff's own spellings, John W Ingram V and John Ingram V, are now case rows.
  • One withdrawal, over final roles. Assemble removes classify's connective report from a marked letter when no given, middle or family word follows it in its segment. Assemble already withdrew this report kind where the letter ends up a suffix or title. It covers the no-comma name, a particle chain (john van e phd), the given part after a family comma (smith, john e phd) and an empty head. The numeral's report is emitted first, so one token never carries both, and Should "John V" and "Malcolm X" read V and X as the family name rather than a generational suffix? #718's stand-down is gone. The maiden clause reports a numeral it keeps before a credential (Jane Doe nee Smith V PhD), as the main name does.

Invariant

test_a_one_case_name_reads_as_its_capitals in tests/v2/test_properties.py runs a 1,872-pair grid. It covers every comma shape, all three orders, a maiden clause, a particle chain, a bare ASCII or non-ASCII letter in front, a trailing title, a doubled numeral, a trailing period and a shape-only three-letter numeral. It checks that each lowercase name matches its capitals twin in fields and report kinds.

  • Master: 315 pairs disagree.
  • This branch: none.
  • Controls: one recorded negative control per guard: 225 pairs disagree with the tag off, 117 with the letter-in-front change off.
  • Blind spot: a lower-vs-upper grid can't see a change that moves both spellings alike. The non-ASCII letter in front is therefore pinned by case rows, and the mutation that broke it fails them.

What moved (snapshot)

Six pre-existing corpus names:

  • john v and doe, jane v phd do change fields.
  • john smith v and larry james edward johnson v gain a report.
  • john i changes its report kind.
  • jones, john e loses its report.

One former rules example moves too: john nee smith i now reads maiden smith i. Docs updated:

  • S10 (the trailing roman numeral): the lowercase-v Accepted clause is gone; the clause on a letter in front is extended; the stand-down's precedence over P3 is stated.
  • P3 (connectives): a letter ending its part is not reported.
  • S7: its example input is kept, with the new reading.
  • decisions/S10 and decisions/P3 record all of this.
  • AGENTS.md, plus the release-log bullet extended with :issue:721.

For Derek

  1. The Catalan off switch (removing i from the conjunctions) no longer restores 2.3.0's three one-case readings (rovira, i and two others). With i no longer a conjunction, it's a one-letter numeral and reads as I does. The switch still unjoins Josep Carod i Rovira.
  2. Two comma rows go silent rather than gaining suffix-or-name: rovira, i and maier, amy i, jr.. The comma path has never reported the numeral (decisions/C1).

Follow-up

Review

  • Design-docs and code reviews ran on 5a6b7bb and agreed on two real defects:
    • The stand-down I had removed as dead wasn't: the trailing-title shape still reaches it.
    • The fork's test of the word in front was case-dependent (john j v).
  • Fixed in ba7b25e: both of those defects, five record corrections, and two cost cleanups (a lazily built end-of-part set, and a C-level _ROMAN test), so ordinary names pay no extra frames. The reference row reads 366 frames on both master and the branch.
  • PR review (a fix-commit re-review, comment accuracy, and test coverage by mutation). Fixed in 1f37d0a and 3d3b447:
    • The letter-in-front test overreached on non-ASCII and NFD letters. It now asks whether the letter's capital is initial-shaped.
    • Ten comment and docstring inaccuracies.
    • Rows for every unpinned decision the mutation run found.
    • The facade off-switch test is renamed for what it now pins.
    • Each new guard was then mutated on the final tree, and every mutant fails at least one test.
  • Last review (code and design-docs, on 1f37d0a and 3d3b447). It found P3's broadened exception implemented only for a one-token piece on the no-comma path, with the stand-down still reachable. Fixed in 6e84cb1, together with the record corrections:
  • Rationale updated: decisions/S10 now says Should "John V" and "Malcolm X" read V and X as the family name rather than a generational suffix? #718's lone-numeral reading rests on the count, not on the generation being rare. Your searches showed generational markers are common, written without a comma unless a credential follows.
  • Frames: every frame-check name matches master, including one-case names with a suffix.

Checks

  • /simplify (reuse, simplification, efficiency, altitude), in 053f0e7. The "connects nothing" check had been answered in two places: classify's end-of-part set and an end pass in assign. It's now one check in assemble, with the same readings everywhere except one: jose e nee and smith, e nee smith report again, as master did, because the marker there is read as a name word. Removing the check fails 20 tests, and frames match master.
  • Tests: the full suite (21,312 passed), mypy, ruff and the Sphinx doctests are clean.
  • Snapshot: matches.

🤖 Generated with Claude Code

derek73 and others added 3 commits October 18, 2026 13:32
…at a part's end (#721)

'john v' read suffix 'v' with no family while 'JOHN V' read family V:
the capital carries the initial tag every trailing reader honors, and a
lowercase 'v' was a plain suffix word. In a name written wholly in one
case, classify now tags a one-letter roman numeral an initial as its
capital is tagged (the name-level one-case fact, so a maiden clause's
'v' is one too). A lower/upper invariant over 1,197 one-case pairs
(comma shapes, orders, clause, chain, credential) disagreed on 171 on
master and on none now; it is a property test, control recorded.

And, per Derek on the issue, a connective letter that ends its part is
not reported conjunction-or-initial (rules/P3: it connects nothing);
'john i' reports suffix-or-name from the numeral fork instead, which
retires #718's stand-down for a letter already reported as an initial.

Docs: S10's Accepted clause for 'v' goes; P3 gains its exception and a
boundary; S7's 'doe, jane v phd do' example reads middle 'v' as its
capital twin does; decisions/S10 and decisions/P3 (the off switch no
longer restores 2.3.0's one-case readings) record it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ront (#721)

Both reviews found the stand-down this branch had removed as dead was
not: a trailing period-marked title leaves a marked letter its part's
last own word to classify but not the walk's, so 'john i dr.' carried
conjunction-or-initial and suffix-or-name on one token. Restored, with
S10's sentence and its precedence (P3's report is the one).

The numeral fork's test of the word in front was case-dependent: a
bare lowercase letter is never initial-shaped, so 'john j v' read
suffix 'v' where 'JOHN J V' reads family 'V'. In a one-case name a bare
cased letter in front now counts as written as an initial. The
one-case grid gains the shapes both reviews found missing (a bare
letter in front, a trailing title, a doubled numeral, a trailing
period): master disagrees on 288 of 1,575 pairs, the branch on none,
with a recorded control per guard.

Also: classify builds `ends` only when a marked letter reaches the
emitter, and asks `_ROMAN` at C level for the one-case initial, so no
ordinary name pays a frame; the stale reasoning in classify, the
public `initial` tag and CONJUNCTION_OR_INITIAL docstrings, P3's
pointer, decisions/P3's exemption claim and pointer, and decisions/S10
(unreproducible figures replaced, `john nee smith i` recorded) are
corrected.

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.04%. Comparing base (2bfa953) to head (f199dd3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #722   +/-   ##
=======================================
  Coverage   99.03%   99.04%           
=======================================
  Files          46       46           
  Lines        4575     4585   +10     
=======================================
+ Hits         4531     4541   +10     
  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.

derek73 and others added 5 commits October 18, 2026 14:53
Derek on the PR: 'john i phd' reports suffix-or-name as 'john i, phd'
does, and 'John Smith V PhD' keeps family V with the report. Assign,
once the trailing read is known, withdraws classify's connective
report on the part's last name word when only post-nominals or titles
follow it (rules/P3: "unless no name word of its part stands to its
right"), and reports a roman numeral there. Fields do not move.

Two stricter rules Derek weighed are declined with evidence:
'Hardie Leannon V' (#36) and John W. Ingram V (#136; also written
'John W Ingram V' and 'John Ingram V') write the generation without
a comma. Both spellings are now case rows.

The review's other defect: the one-case test of the word in front
took any cased letter, moving 'IVAN Ж V' and splitting NFD from
composed; it now asks whether the letter's capital is initial-shaped.
The grid gains a non-ASCII letter in front and 'vii' (master 315 of
1,872 pairs; controls 225 and 117). Comment-review fixes: classify's
honorific-peel and own-words claims, the public `initial` tag and
CONJUNCTION_OR_INITIAL docstrings, Lexicon and config wording, the
predicate's stale caller list, a case note, and the facade test's name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot see (#721 review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The last review found P3's broadened exception honored only where the
part's last name word was one token on the no-comma path: a letter
ending a particle chain ('john van e phd'), the given part after a
family comma ('smith, john e phd') and an empty head kept their
connective report, and 'freiherr von i dr.' reached #718's stand-down
and lost the numeral's report. One role-based pass at the end of
assign now withdraws classify's report on a marked letter that is its
segment's last name-role word with only suffixes and titles after it;
the numeral's report is emitted before, so the stand-down is gone.
The maiden clause gains the numeral report's twin ('Jane Doe nee Smith
V PhD').

Records: option B moves 19, not 18 (recipe stated); #36/#136 are not
shown to be real people (the sheriff is); 1.4.0 parity holds for the
capital spellings only; AGENTS.md's count names its commit; P3 no
longer says such a letter "is read as an initial"; S10 records the
split 'Ph. D.' reading. And Derek's correction that generational
markers are common, so #718's lone-numeral reading rests on the count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ays no frame (#722 review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lify)

/simplify pass over PR #722. Reuse, simplification and altitude reviews
agreed: rules/P3's exception was answered twice, by classify's
positional end-of-part set and by assign's end-of-stage pass. Both
go; assemble, which already withdrew this report kind where the letter
was roled SUFFIX or TITLE, withdraws it where no given, middle or
family word follows the letter in its segment. Same readings, and the
position cut's one wrong silence goes: 'jose e nee' and 'smith, e nee
smith', where the marker is a name word, report again as master did.

The two reports on a numeral a post-nominal follows share
`_vocab.reads_as_a_reported_numeral`; `is_trailing_numeral_suffix`'s
`one_case` is required, the superset passing None explicitly. History
moved out of comments, case notes and test docstrings; the facade
off-switch rows collapse to one field set; the v/j asymmetry is an
S10 Open question.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… at #723

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit 16ee285 into master Oct 19, 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 read V as the family name, as JOHN V and john x do?

1 participant