fix(group): the chain and the maiden walk stop where assign's peel begins (#424) - #427
Merged
Merged
Conversation
…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>
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
John van der Berg Vvan der Berg V(since 1.x)van der Berg, suffixV— asJohn Smith VJohn van der Berg Mavan der Berg Ma(2.0 regression)van der Berg, suffixMa— as 1.4.0 andJohn Smith MaJohn née Jones Smith VJones Smith VJones Smith, suffixVJane Smith née VVV— as… née PhD, and as 1.4.0Xyz. van Johnson,Esq. van Goghvan Johnson/van Goghvan, familyJohnson/Gogh— asDr. van Johnsonsince #367Xyz. van Berg MA,Xyz. abdul John Smithvan Berg MA; givenabdul, middleJohnDr.twins: suffixMA; givenabdul JohnJohn Smith Mc VMc V(every baseline)Smith, suffixMc, V— the particle-and-suffix word opens the trailing runFreiherr von Richthofen Vvon Richthofen V(every baseline)von Richthofen, suffixV— the chain is the one name piece, asDr. Smith V· boundaryFreiherr 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 McMechanism.
_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_titleand 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_walklearned 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→ familyvd 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-revieweron the draft, then/review-pr(code, tests, comments, design-docs) on the pushed PR. Everything found is fixed in the commits, not deferred:J. née Jones Smith V(round 1: preceding-piece re-ask) andDr. née Jones Smith V(round 2: the preceding-piece re-ask was one condition of the peel; now the peel over the view).Xyz. van Berg MA,Xyz. van Johnson(round 1), the bound join'sfk(round 2).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.John Smith Mc V→ suffixMc, Vis now recorded, with a rule at every baseline.numeral_only,_peel_walk'sskip, a title needing a following piece, the title-led chain).J. VnotJ. Smith V, "unambiguous" not "suffix vocabulary" (do), pool sizes, ledger "above/below",Xyz. van Berg MA's master reading, release-log universals,_assignback on the regex-sync roster.Verification
git archivecopies) and at the head. 1.4.0 catch-all stays at 15 — it flaggedJohn van der Berg VandEsq. van Goghon the way. Corpus 195 names (+11 rules examples).Berg, abdul vdis reached by the comma-precomma-family rule at 1.4.0.Commits
fix(group)—_trailing_start, the two stops, the walk's re-ask,_leading_titlesshared with assign,_peel_walk'sskip, tests, theEsq. van Goghrule.docs(design)— P2/P4/M2/P5/P6, decisions, theabdul Smith Jr Maloses the family name — P5's reserve does not mirror S2's bare-acronym fork #425 corrections, corpus, ledgers, guards, release bullet.fix(group)— the chain's second ask, the walk's view re-ask, the bound join'sfk, the review pins, comment corrections.docs(design)— the review round's rules, decisions, ledgers, corpus, release bullet.🤖 Generated with Claude Code