Skip to content

Read a comma part a credential opens as the postnominal part; titles past the second comma (#603, #611) - #615

Open
derek73 wants to merge 4 commits into
masterfrom
feat/issue-603-611-c1-rethink
Open

derek73 wants to merge 4 commits into
masterfrom
feat/issue-603-611-c1-rethink

Conversation

@derek73

@derek73 derek73 commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

#603, C1: a part after the comma whose first suffix word, with only titles in front of it, starts S2's run is the postnominal part, however it goes on.

  • A title word in it reads as a title and every other word as a suffix.
  • A name word the part takes in reports suffix-or-name, as Should a name word after a credential join the suffix? John Smith PhD Jones reads middle Smith PhD #602's run does.
  • John Smith, PhD Jones → given John, family Smith, suffix PhD Jones.
  • With one word before the comma, the whole part is suffixes (Derek's call): Doe, PhD Jones → family Doe, suffix PhD Jones.
  • A title/suffix dual (MD, Ms, Sr, ranks) opens nothing (Derek's call, after review). Smith, Ms Jane and García Márquez, Ms Gabriela keep their title and given name, and John Smith, MD Jones reads as in 2.3.
  • An undeclared delimiter is one more word of the part: Steven Hardman, RN - CRNA → given Steven, family Hardman, suffix RN - CRNA.
  • This extends Should parse("Smith, Jr.") put "Jr." in title rather than suffix? #296's no-name-word reading in segment_suffix_reading rather than adding a structure.

Spelling gap fixed: the merged Ph. D. now starts #602's run and this one, as PhD does (Smith, John Ph. D. Jones kept middle Jones). The no-comma John Smith Ph. D. Jones is still open; the peel's walk never holds the merged piece. AGENTS.md's spelling sweep records it.

#603, C2: a title word in a part past the second comma that is not also a suffix word is a title. Eric H. Holder, Jr., Attorney General → title Attorney General, and a part of title and suffix words (or a period-joined title like Lt.Gov.) is no longer flagged. A title joined by a connective (Secretary of State) keeps the flag, because the flag test asks word by word rather than modelling group's chain. 1.4.0 through 2.3.0 all read these words as suffixes.

usage.rst (Derek): form 3's part after the comma is Suffix or Title too, as it already read (Eric H. Holder, Attorney General), with a sentence on period-marked trailing titles.

#611: C1, S2 and P6 each show the decisive sign: a guard models what another stage will do. Rethinks are filed as #613 (C1, with P6 folded in) and #614 (S2), C1 first, neither for 2.4. The outcome is recorded in decisions.md under C1.

Measured against master at 97d36e0

  • Differential corpora: four names move, all intended: Steven Hardman, RN - CRNA, John, Smith, Dr., Andrew Perkins, Jr., Col. (Ret) and 1 & 2, 3 4 5, Mr..
  • Generated grid: 588 of 98,630 texts move, under three policies. 581 are the two intended shapes; the other 7 I read by hand. The recipe is in decisions.md#C1.
  • Frames: the reference name and plain comma names are unchanged. Smith, Jr. 163 → 156 and Smith, MD PhD 260 → 253; the opened part pays for what it reads.

Test Plan

  • uv run pytest: 11465 passed
  • uv run mypy, uv run ruff check
  • Differential gate at 1.4.0, 2.0.0, 2.1.0, 2.2.0 and 2.3.0, each exit 0. Both Should a comma part opening with a credential be a suffix comma? John Smith, PhD Jones reads family John Smith #603 rules are classified at every baseline; the 1.4.0 pair is declared precedes_narrower over the broad comma-family rule. Claims, watched shapes, the contest roster and the P7 control are re-recorded.
  • sphinx-build -b doctest and -b html clean; README doctest
  • Code review and design-docs review rounds; findings fixed in b7c56c4
  • /pr-review-toolkit:review-pr (code, tests with mutation checks, comments); findings fixed in ba6946e

Closes #603
Closes #611

🤖 Generated with Claude Code

derek73 and others added 3 commits October 4, 2026 14:27
…past the second comma (#603)

C1: where the first suffix word of the part after the comma, with only
titles in front of it, starts S2's run, every word after it reads as
that run reads -- a title word as a title, anything else as a suffix --
so 'John Smith, PhD Jones' is given John, family Smith, suffix
'PhD Jones', and with one word before the comma the whole part is
suffixes ('Doe, PhD Jones', Derek's call over a credential-then-given
reading). It extends #296's no-name-word reading in
segment_suffix_reading rather than adding a structure: a title/suffix
dual opens the part only behind two name words (assign's shared
full_name count) and never in front of paired initials, dotted or two
capitals. Absorbed name words report suffix-or-name, as #602's run's do.

starts_a_credential_run now accepts the merged 'Ph. D.' piece, so the
split spelling starts both runs ('Smith, John Ph. D. Jones' kept middle
'Jones'); AGENTS.md's spelling sweep records it.

C2: a title word in a part past the second comma that is not also a
suffix word is a title ('Eric H. Holder, Jr., Attorney General'), and a
part of title and suffix words is not flagged; asked word by word, so a
connective-joined title keeps the flag.

Seven corpus names move, all intended; 619 of 97,881 generated texts,
all in these shapes. Ledgers classify both rules at every baseline (the
1.4.0 pair declared ahead of the broad comma-family rule); claims,
watched shapes, contest roster and the P7 control re-recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A title/suffix dual (MD, Ms, Sr, the ranks) opens nothing (Derek): the
count before the comma cannot tell a two-word surname from a given
name and a family name, so 'García Márquez, Ms Gabriela', 'Dr. Smith,
Ms Jane' and 'García Márquez, Ms G. J.' lost their given names. The
dual branch, its full_name thunk and the paired-initials carve-out go;
the positional count is inline again with its one-piece early exit.

From the code review: run_start's merged-piece branch could never fire
(peel_walk drops the piece), so it is removed and the docstring no
longer implies the no-comma 'John Smith Ph. D. Jones' is fixed; C2's
flag test reads a period-joined title through period_joined_vocab
('John Smith, Jr., Lt.Gov.').

From the docs review: C1's strict sentence, run-start gloss and head
sentence, C2's ground (no name word past the second comma, not H5),
the #544 release bullet's "No field moves", AGENTS.md's tail and
bare-title passages, shapes.py's notation, and the decisions entry's
corpus label and grid, re-measured with the corpus read whole (four
corpus names move; 588 of 98,630 texts).

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


Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 self-assigned this Oct 4, 2026
@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.98%. Comparing base (97d36e0) to head (c6462e0).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #615   +/-   ##
=======================================
  Coverage   98.98%   98.98%           
=======================================
  Files          45       45           
  Lines        4227     4252   +25     
=======================================
+ Hits         4184     4209   +25     
  Misses         43       43           

☔ 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.

…ge.rst

- starts_a_credential_run accepts the merged 'suffix' piece only as the
  bare Ph./D. pair: a connective join keeps the tag on the wider piece,
  so 'John Smith, Ph. D. and Mary Jones' opened the part (taking 'Mary'
  in silence) where 'PhD and Mary' does not.
- All five ledgers said 1.4.0 read tail titles as titles; it read them
  as suffixes. The earlier correction never landed: its script asserted
  late and wrote nothing.
- Comments: C2's ground in assign (no name word past the second comma,
  not H5), classify (not group) tagging 'Lt.Gov.', the one-piece exit
  in assign's count stated as the decision it is, and dual-draft
  leftovers in test_pieces, a case note and segment_suffix_reading.
- Rows pinning what no test did: the one-piece exit ('Vega y Lopez, PhD
  Jones'), the first-suffix-word boundary ('Smith, MA PhD Jones'), the
  accepted 'Smith, Jr. John', and the connective spelling.
- usage.rst (Derek): form 3's part after the comma is "Suffix or Title"
  too, as it already read ('Eric H. Holder, Attorney General'), with a
  sentence on period-marked trailing titles; shapes.py follows.

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant