Repository navigation
Rethink the credential-run rule (S2): read a name's trailing run once, over name units, and bind it before any join #614
Description
Why. #611 asked whether S2, the suffix and credential run, grew by patching. It did. All 35 decisions.md#S2 entries date from 2026-09-14 on, and about 11 add a stop or an exception: the capitals lean twice, the roman-chunk retirement, two dotted-shape gates, #531's do, #544's anchor clause with its boundaries and second exception, #563's paired initials, #573's particle-led given part, and #602's run with its refusals. The pattern is M2's: each issue adds an exception to the count or the lean, then boundaries on the exception.
The decisive sign is there too, and it has one root. The words-to-spare count is taken over PIECES (_pieces.py, k >= 3), and group makes and merges pieces. So every stage that joins has to re-run S2 over the piece lists it is about to produce:
- Group's particle chain re-asks the peel after its own merges, and if the answer moved it rolls back and chains again. It restarts on
John van Mc,anh van do,Doe, John van DO,John Smith, PhD vd DOandPhD DO DO, among others. - P5's reserve builds the joined view and runs
tail_readingon both views to compare them. Sharing the function made this safe (abdul Smith Jr Maloses the family name — P5's reserve does not mirror S2's bare-acronym fork #425), but it is still a model of assign. - Group emits S2's own
suffix-or-namereport, because the piece assign would have reported on is gone after the merge. - Assign predicts post_rules twice: P1's fold (
attaches_the_lead, Why doesSMITH VD MA, JOHNread familySMITH MAwithVDas a suffix? #573) and P6's attachment (particle_tail(..., sticky_from)). trailing_candidatesis a hand-kept superset of the peel's and the chain's admissions, held in step by a grid test (Two stages hand-copy each other's trailing-word logic after #601/#602; share one predicate each #610).- The report comes from four stages: segment, group, assign and post_rules.
Measured over the 1,514 corpus names, the peel runs 0–5 times a parse: 590 names run it twice, 228 three times, 47 four or five times (abdul rahman MA runs it five times).
Proposed statement (sketch).
- Read once. At the head of group, after classify and before any merge, compute the tail reading over UNITS built from tags (the way
name_word_countalready counts), not over pieces. Units don't change when group joins, so one count answers whatever P2 and P5 later do. That one read covers the peel, the lean, the anchors, the trailing title chain to its fixed point, and Should a name word after a credential join the suffix?John Smith PhD Jonesreads middleSmith PhD#602's run. - Licensed by neighbor. A member of the ambiguous class, or a word that is both particle and suffix (
vd,mc,do), is a credential only where an unambiguous credential stands in front of it or its capitals say so. That one condition is meant to replace ShouldDoe, John MAreadMAas a credential, as 1.4.0 did, or at least report the fork? #531's stop, Should a credential run after a comma keep its comma when the last word is an ambiguous acronym?John Smith, PhD MEngreads firstPhD, lastJohn Smith#544's second exception and Why doesSMITH VD MA, JOHNread familySMITH MAwithVDas a suffix? #573's carve-out. - Bind. Group gives the tail's tokens their SUFFIX or TITLE role at the read, as Rethink the maiden-marker rule (M2): a marker stands after the current name and takes words up to the trailing suffix run #601's take does. P2, P5, M2 and P6 then can't reach them and don't need to predict them.
That would delete:
- the chain's re-ask and rollback;
- P5's two-view comparison;
- group's S2 emitter;
trailing_candidates;- the separate
credential_runstep each reader applies today.
segment keeps the comma decision, or hands it to the C1 rethink.
Order. After the C1 rethink (#613), which should build the unit-based count this one shares. Brought into 2.4 on 2026-10-05; it moves P2's chain stop, P5's reserve, P6's precedence and M2's boundary together, which is more than #601 moved.
Risky shapes, to pin before prototyping:
- the 11 chain-restart inputs, and
Freiherr von Berg Ma/Freiherr von Berg MA(rules.md#P2 examples); - P5's
abdul …shapes, where the 2026-09-15 accepted item and its Should a credential run after a comma keep its comma when the last word is an ambiguous acronym?John Smith, PhD MEngreads firstPhD, lastJohn Smith#544 reversal sit; - the particle/suffix duals that 1.4.0 read silently, which would need compatibility entries;
- the report inventory, since the emitters merge into one;
- the frame band (
_CALL_BASELINE). It should fall, but measure it.
Measure it the way #601 was measured:
- a prototype behind an environment switch;
- peel runs per parse, which should drop to one;
- the restart inputs and P5's two-view shapes;
- the invariant grids, the five differential baselines and the case table.
Not in scope: changing what any name reads. This is a mechanism rethink, and any move it makes has to be argued on its own.
Related: #611, #613 (the C1 rethink), #601, #602, #610, #531, #544, #573.
Activity
derek73 commentedon Oct 6, 2026
One reading for "how a run reads a word" (from PR #615's /simplify round).
Since #603, three places decide how a word inside a credential run reads, each written separately:
_pieces.credential_runhas_name_contentitself_assign.py, thesticky_fromloopnot is_suffix_piece(...) and is_title_piece(...)_pieces.segment_suffix_reading, theopenedbranchis_suffix_piecefirst, thenis_title_piece; the caller filtershas_name_contentA fourth reading sits beside them and decides the same kind of question: C2's tail, a part past the second comma (
assign's tail loop). There a piece holding any suffix word stays a suffix (not any("vocab:suffix" ...)).They already disagree on one shape. Take a title group made by a connective join that holds a suffix word:
Smith, John PhD Prof and PhDandSmith, PhD Prof and PhDread titleProf and PhD.Doe, John, Prof and PhDreads it as a suffix.It's junk input, so nothing user-facing needs fixing. But it is the drift mechanisms.md#ONE-PREDICATE-PER-QUESTION names, and unifying the readings isn't behavior-neutral: one of the two answers has to win.
This issue's read-once pass needs a single per-word verdict anyway. Adopt one shared function, title or suffix for a word inside the run, called from every reader, and decide the
Prof and PhDcase there on purpose. PR #615 left the copies as they are rather than factor them twice.Merge pull request #621 from derek73/feat/issue-614-s2-rethink
decisions.md: record derek73#611's outcome, the rethinks filed as der…
Read S2's trailing run once, at group's head, before any join (derek7…
Read S2's run after P3's joins, counting the chain's units (derek73#614…
Fix the counting view's index, unit reach and report hand-off (derek7…
Simplify derek73#614's read and its report hand-off (/simplify)
Correct #626's recipe and A1's interacts list (third review)
Finish derek73#620: units through the run start, report grouping, doc…
Count a weighed word as its own unit; fix derek73#620's review findings
Word a report's field from the word's final role (#626) (#628)
Read every citation shape the tree writes; fix what that exposes
Read the titles as written for the chain's lead; fix #624's review
Read every citation shape the tree writes; fix what that exposes
Check rule citations in every shape, ledgers included; fix the stale …
Fix #643's review: record the decline's limits, pin two mechanisms