Skip to content

fix(group): the chain and the maiden walk stop where assign's peel begins (#424) - #427

Merged
derek73 merged 4 commits into
masterfrom
fix/424-chain-and-walk-ask-the-peel
Aug 23, 2026
Merged

fix(group): the chain and the maiden walk stop where assign's peel begins (#424)#427
derek73 merged 4 commits into
masterfrom
fix/424-chain-and-walk-ask-the-peel

Conversation

@derek73

@derek73 derek73 commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Closes #424

The last of bundle 1: the two other sites that asked "is this a suffix?" with the initial-vetoed test now ask the shared S2 peel from #425 — over the name as they would leave it — and the sites that asked "where does the name begin?" with group's own title test now ask assign's.

The change

input before after
John van der Berg V family van der Berg V (since 1.x) family van der Berg, suffix V — as John Smith V
John van der Berg Ma family van der Berg Ma (2.0 regression) family van der Berg, suffix Ma — as 1.4.0 and John Smith Ma
John née Jones Smith V maiden Jones Smith V maiden Jones Smith, suffix V
Jane Smith née V maiden V the marker stays a word, suffix V — as … née PhD, and as 1.4.0
Xyz. van Johnson, Esq. van Gogh family van Johnson / van Gogh given van, family Johnson / Gogh — as Dr. van Johnson since #367
Xyz. van Berg MA, Xyz. abdul John Smith family van Berg MA; given abdul, middle John as their Dr. twins: suffix MA; given abdul John
John Smith Mc V family Mc V (every baseline) family Smith, suffix Mc, V — the particle-and-suffix word opens the trailing run
Freiherr von Richthofen V family von Richthofen V (every baseline) given von Richthofen, suffix V — the chain is the one name piece, as Dr. Smith V · boundary
Freiherr von Berg MA, J. née Jones Smith V, Dr. née Jones Smith V, Jane née Jones J. V, John van der J. V, John van der Berg V Jr, John née Jones Smith Ma, John van Mc unchanged unchanged — the peel re-read over what the chain or the take leaves says no; the fork reads the piece before as written; a numeral with a suffix behind it isn't last; the walk keeps the acronym; a particle-and-suffix word continuing a prefix run stays the chain's

Mechanism. _trailing_start(start, …) returns the index of the first piece the peel takes. The chain computes it once per segment before its merges and keeps it as a tail length (invariant across merges ahead of it); it takes both forks, and — since its merges can change the acronym fork's count behind a title-and-particle word (#367's scan stops where assign's title peel does not) — it asks the peel again over the pieces it built and re-runs without the stop if assign would not peel there. The maiden walk takes the numeral only, reads from the marker itself, and re-asks the peel over the view the take would leave (pieces before the marker + the numeral on), the way P5's reserve builds its view. _leading_titles — assign's leading-title peel, moved into group with _is_leading_title and the period-abbreviation pattern — is the one definition of where the name begins: the chain's walk, the bound join's first piece, and (through the predicate) P4's scan and the PARTICLE_OR_GIVEN report. _peel_walk learned to skip a tail segment's delimiter cores.

Also in this PR: corrections to the merged #425 docs from its late review — the P5↔P6 precedence for title-and-particle words (Berg, abdul do) stated in both rules, with its exception for the unambiguous-suffix particles (Berg, abdul vd → family vd Berg); a "behind" that meant "before"; a witness claim that wasn't one; the sweep pools named and one pool's arithmetic corrected.

Review rounds

Two rounds: design-docs-reviewer + code-reviewer on the draft, then /review-pr (code, tests, comments, design-docs) on the pushed PR. Everything found is fixed in the commits, not deferred:

  • Walk's verdict not surviving the takeJ. née Jones Smith V (round 1: preceding-piece re-ask) and Dr. née Jones Smith V (round 2: the preceding-piece re-ask was one condition of the peel; now the peel over the view).
  • Chain's start / scan not assign'sXyz. van Berg MA, Xyz. van Johnson (round 1), the bound join's fk (round 2).
  • Chain's acronym count collapsing behind Freiherr/St/Do (round 2, all four reviewers) — the chain re-asks over what it built; 1.4.0 happened to read the draft's answer.
  • P2's vd/mc clause claimed the opposite of the behaviour (round 2) — John Smith Mc V → suffix Mc, V is now recorded, with a rule at every baseline.
  • Five mutation-surviving branches pinned (tail length across two chains, numeral_only, _peel_walk's skip, a title needing a following piece, the title-led chain).
  • Doc/comment corrections: P6 "never sees it", M2 "both as written and as left", J. V not J. Smith V, "unambiguous" not "suffix vocabulary" (do), pool sizes, ledger "above/below", Xyz. van Berg MA's master reading, release-log universals, _assign back on the regex-sync roster.

Verification

  • Suite: 5315 passed, 212 skipped, 10 xfailed; ruff, mypy, benchmark clean. Every behaviour test written RED first.
  • Differential gate exits 0 at 1.4.0, 2.0.0, 2.1.0 at each code commit alone (verified from git archive copies) and at the head. 1.4.0 catch-all stays at 15 — it flagged John van der Berg V and Esq. van Gogh on the way. Corpus 195 names (+11 rules examples). Berg, abdul vd is reached by the comma-precomma-family rule at 1.4.0.

Commits

  1. fix(group)_trailing_start, the two stops, the walk's re-ask, _leading_titles shared with assign, _peel_walk's skip, tests, the Esq. van Gogh rule.
  2. docs(design) — P2/P4/M2/P5/P6, decisions, the abdul Smith Jr Ma loses the family name — P5's reserve does not mirror S2's bare-acronym fork #425 corrections, corpus, ledgers, guards, release bullet.
  3. fix(group) — the chain's second ask, the walk's view re-ask, the bound join's fk, the review pins, comment corrections.
  4. docs(design) — the review round's rules, decisions, ledgers, corpus, release bullet.

🤖 Generated with Claude Code

derek73 and others added 2 commits August 22, 2026 23:17
…gins

P2's chain ran "until a trailing suffix begins" and M2's walk took
the words after the marker "up to any trailing suffix", and both
asked with the suffix-piece test, whose initial veto does not see a
bare roman numeral -- the #401 question at a third and fourth site.
'John van der Berg V' read family 'van der Berg V' (as 1.4.0 read
it: shipped since 1.x) and 'John née Jones Smith V' read maiden
'Jones Smith V', where 'John Smith V' reads suffix 'V' (#424).

_trailing_start answers where assign's trailing run begins, read by
the shared S2 peel (_peel_trailing over _peel_walk, #425) over the
pieces as they stand. The chain computes it once per segment, before
its merges, and keeps it as a length from the end that those merges
do not move; it stops there as it stops at a suffix word, and takes
both forks -- the numeral, and the bare acronym with words to spare,
since its merges leave that fork the three pieces it counted:
'John van der Berg Ma' reads suffix 'Ma' again, which is how 1.4.0
read it and what 2.0 had lost. The maiden walk takes the numeral
only: the acronym fork counts pieces and the walk removes the very
pieces it counted, so 'John née Jones Smith Ma' keeps its maiden
'Jones Smith Ma' rather than reading family 'Ma'. The numeral fork
reads the piece before the numeral, and the take removes that piece
too: the walk re-asks the fork with the piece the take would leave
there -- the one before the marker -- and stops only where the
numeral reads as the suffix both ways, so 'J. née Jones Smith V'
keeps maiden 'Jones Smith V' rather than handing the V to the family
(both reviews found the first draft doing that). And the walk's peel
is read from the marker itself, so a numeral straight after the
marker has the piece before it the fork wants: 'Jane Smith née V'
declines as 'Jane Smith née PhD' does -- nothing after the marker but
a suffix, the marker stays a word, suffix 'V' -- which is 1.4.0's
reading. _peel_walk learns to skip a tail segment's delimiter cores,
which the walk steps over.

Where the chain's walk starts is assign's to say as well. The walk's
start and P4's leading-particle scan asked group's title test, which
does not see H2's unlisted abbreviations that assign peels as titles
all the same: 'Xyz. van Johnson' chained where 'Dr. van Johnson' did
not (#367 keyed the exception on the first piece of the name by
group's test), and 'Xyz. van Berg MA' chained the given word into the
family and left assign two pieces where the fork had counted three.
_is_leading_title and the period-abbreviation pattern move down into
group, _leading_titles is the one definition of where the name
begins, and assign sets the roles over it; the regex-sync pin follows
the pattern, and group's two other patterns join its roster. 'Esq.
van Gogh', a corpus name, moves with it -- family 'van Gogh' to given
'van', family 'Gogh', as 'Dr. van Gogh' has read since #367 -- and
gets its rule at every baseline, next to #367's. The tail invariant
has one exception the comment states: a particle that is suffix
vocabulary too (vd, mc) where the run would begin is taken by the
prefix run as a particle, as P6 reads it after a comma, so 'John van
Mc' keeps family 'van Mc'.

'John van der J. V' and 'Jane née Jones J. V' keep their readings,
and a numeral with a suffix behind it is not last in the walk. The
P2 citations quote the prefix the old and new statements share; the
M2 ones likewise; H2's implemented line gains group.

Tests first, at the piece level: the chain's numeral and acronym
stops and the shapes it keeps; the walk's numeral stop, its acronym
boundary, the marker followed only by the numeral, the numeral that
does not survive the take, and the abbreviation the chain steps over.
At the field level: each shape against its ordinary twin. The gate is
clean at every baseline at this commit; the next commit's rules
examples carry the other shapes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…eview

rules.md#P2 gains the clause -- a trailing suffix begins as assign
will read it: a trailing roman numeral, or a bare acronym with words
to spare, ends the chain as a suffix word does -- with examples for
'John van der Berg V', 'John van der Berg Ma' and the boundary 'John
van der J. V', and an Accepted clause for the particle-and-suffix
word the prefix run takes ('John van Mc'). rules.md#P4 says an
unlisted abbreviation is as transparent as a listed title, with
'Xyz. van Johnson'. rules.md#M2's "up to any trailing suffix"
becomes "up to any suffix word, or the trailing roman numeral assign
reads as the suffix, read as the take would leave the name", with
examples for 'John née Jones Smith V', 'Jane Smith née V' and the
boundary 'J. née Jones Smith V', and an Accepted clause for the
acronym the walk keeps ('John née Jones Smith Ma'). decisions.md
gains the P2 and M2 entries: the mechanism, why the chain takes both
forks and the walk one, why the walk reads from the marker and
re-asks the fork, the two further sites the reviews found, and the
1.4.0 readings.

The late review of the merged #425 entry (PR #426) found four things,
corrected here. P5's title-word clause had taken the three words
that are title AND particle vocabulary -- do, freiherr, st -- from
P6's attachment without either rule saying so: 'Berg, abdul do' reads
given 'abdul do', which is 1.4.0's reading and what every other
particle already did ('Berg, abdul van'); the precedence is the stage
order, and both rules carry it as Accepted with 'Berg, abdul van' as
the example (parity at every baseline) and a P6 decisions entry --
with its one exception, found by this change's docs review: a
particle that is suffix vocabulary too (vd, mc) is a suffix piece to
the join, which declines it, so the attachment does take it ('Berg,
abdul vd' reads family 'vd Berg'; 1.4.0 read given 'abdul vd', and
the comma-precomma-family rule reaches it there). "a bare acronym
with words behind it" read backwards in a document that uses
"behind" for "after"; it says "the acronym the peel takes". The
sentence implying 'abdul Sir Smith Berg' witnesses the title class
is corrected (it is byte-identical at every baseline; the class is
pinned in tests). The sweep pools are named, and the 17,640 sweep's
pool is the fourteen-word one its arithmetic implies, not the
twelve-word pool the sentence had claimed.

The rules examples carry the shapes into corpus_rules.jsonl (191
names). 1.4.0: 'John van der Berg V' gets its rule (it had landed
on the fields-only catch-all, count 16 -> 15 once the rule was in),
'John née Jones Smith Ma' and 'J. née Jones Smith V' accepted rules
(the fix(#274) rule's fields omit the suffix v1 read), 'Xyz. van
Johnson' its own next to the 'Esq. van Gogh' rule; 'John van der
Berg Ma', 'Jane Smith née V', 'John van Mc' and 'Berg, abdul van'
are 1.4.0 parity. 2.0.0 and 2.1.0: five rules for the five shapes
that move. Reach pins follow the eleven new names. One release-log
bullet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@derek73 derek73 added this to the v2.2 milestone Aug 23, 2026
@derek73 derek73 added the bug label Aug 23, 2026
@derek73 derek73 self-assigned this Aug 23, 2026
@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.59%. Comparing base (39047c7) to head (7727297).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #427      +/-   ##
==========================================
+ Coverage   98.57%   98.59%   +0.01%     
==========================================
  Files          44       44              
  Lines        3023     3053      +30     
==========================================
+ Hits         2980     3010      +30     
  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.

derek73 and others added 2 commits August 23, 2026 02:33
The four reviews of PR #427 found the two stops still asking one
condition of assign's peel where they had to ask the peel itself.

The chain's acronym fork counted pieces before the chain's own
merges, and the comment claimed the merges left the count alone.
Behind a word in both the title and particle vocabularies they do
not: #367 stops the leading-particle scan at 'Freiherr', 'St', 'Do'
-- the name's own first piece -- where assign's title peel steps
over them, so the chain takes the name's first word, and the acronym
the fork counted with three pieces met assign with two. 'Freiherr
von Berg MA' read given 'von Berg', family 'MA' (1.4.0's reading;
master read family 'von Berg MA'). The chain loop is chain(tail) now:
where the peel took a piece, the chain runs, _trailing_start is read
again over what it built, and where the verdict changed the chain
runs again without the stop -- what assign will not peel is a name
word, and the chain takes it. The numeral cannot flip, a chain group
never being initial-shaped, so 'Freiherr von Richthofen V' keeps
suffix 'V' and its chain reads as 'Dr. Smith V' reads. The snapshot
is one copy per segment with a trailing run.

The walk's re-ask checked the fork's preceding-piece condition and
nothing else, and a title before the marker ('Dr. née Jones Smith
V') leaves the numeral as assign's whole rest, where no fork fires
-- the walk stopped, and the V became the given name. The walk now
builds the view the take would leave, as P5's reserve builds its
view, and runs the peel over it.

And the bound join's "first non-title piece" was still group's title
test, so 'Xyz. abdul John Smith' joined nothing where 'Dr. abdul John
Smith' read given 'abdul John'; it is _leading_titles now, and the
PARTICLE_OR_GIVEN report keys on _is_leading_title as the scan does.
_assign stays on the regex-sync roster. Comments corrected where they
described the first draft: the tail invariant, the one-definition
claim, which function re-asks, and the module docstring's H2.

Tests first: the acronym the chain keeps behind a title-and-particle
word and the one it leaves with a given word of its own; the title
before the marker; the bound word behind an abbreviation. Pins from
the test review's mutation run: the tail as a length from the end
across a second chain, the numeral-only walk with an acronym between
the maiden name and the numeral, the walk's peel past a trailing
core, a title needing a following piece, and the title-led chain
before the numeral. The gate is clean at every baseline at this
commit; the next commit's rules examples carry the shapes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rules.md#P2 reads the trailing suffix "over the pieces the chain
leaves", with 'Freiherr von Berg MA' → family 'von Berg MA' and the
boundary 'Freiherr von Richthofen V' → suffix 'V'; its Accepted
clause for the particle-and-suffix words says what the chain does
rather than the opposite -- where the word opens the trailing run
the peel takes it ('John Smith Mc V' → suffix 'Mc, V', a class the
docs review found moving against every baseline with no record),
where it continues a prefix run the run takes it ('John van Mc').
rules.md#M2 takes the numeral "both as written and as the take would
leave the name", with the boundary 'Jane née Jones J. V'. P5, P6 and
the P6 decisions entry say "the unambiguous suffix vocabulary", which
is what the join declines; `do` is ambiguous and the join takes it.

decisions.md#P2 records the chain's second ask and the title-led
boundary, corrects the 'Xyz. van Berg MA' sentence to master's
reading, and names every site the one definition of the name's start
now covers (the bound join's was missed). decisions.md#M2 records
the view re-ask and 'Dr. née Jones Smith V', says "as `J. V` reads
the V as a name" (it was `J. Smith V`, which reads suffix 'V'), and
marks the 144-shape count's pool unrecorded. The ledger comments'
"above" and "below" point the right way, and the 1.4.0 ledger no
longer says #367's rule records 'van Gogh'.

Three ledger rules at 1.4.0 and two at 2.x for the new examples
(with the SUFFIX_OR_NAME report the re-read names now carry); corpus
195 names; reach pins follow. The release-log bullet no longer
claims the two stops in the universal, says 'Esq. van Gogh' moves,
and carries the new shapes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@derek73
derek73 merged commit a8b61c0 into master Aug 23, 2026
11 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.

John van der Berg V reads family van der Berg V — the particle chain and the maiden walk take a trailing numeral as a name word

1 participant