Repository navigation
Merge the tail's particle runs before S2's read (#625) - #634
Merged
Merged
Conversation
Group merges each run of two or more adjacent particles past the
chain's leading position into one piece (`_pieces.merge_particle_runs`)
at the trailing site, after P3's joins and before the read. The read
then counts, stops at and absorbs the run as the one piece the chain
makes, so `_chain_units` loses its BOUND mark, the peel its stop for it,
and `credential_run` its gathering of absorbed particles.
The merged piece keeps `prefix` and drops `title`, which a P3 join can
carry in ('St und Berg'). The chain's PARTICLE_OR_GIVEN report keys on
its run claiming past the particle or on the run being one the merge
made. The title run and the lead are read once and handed to the read.
Measured against 505d6de: 774 role moves on a 137,810-name particle
grid, all `St und` shapes master read as titles, now the family the
1.4.0 and 2.3.0 wheels read; one S2-grid text loses the 'do' report
#620 added; every other grid, the corpora and the five gates unchanged.
Frames +3 on the reference row (decisions.md#parse-cost).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #634 +/- ##
=======================================
Coverage 99.01% 99.02%
=======================================
Files 46 46
Lines 4487 4495 +8
=======================================
+ Hits 4443 4451 +8
Misses 44 44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The review found two particle runs in one name reached by no test (an off-by-one in the merge's bookkeeping passed the suite), and the read's title run, taken before the merge, held only by the frame bands. Two parity rows and a unit-test half now hold the first, a unit test the second; the merge's docstring names a shape whose read the choice moves. decisions.md's #625 entry claimed the moved `St und` shapes read as the released wheels do; they do not (master matches 2.3.0 on 152 of the 258 moved texts, the tree on none), so the claim and the test docstring repeating it are corrected. The grid was 395,148 texts, not the 137,810 copied from #624's entry. The review's further move classes (any P3 join on a title-particle, a mid-name title behind a run, H3's give-back before a dual run) are recorded, all garbage, no rows (Derek). A stale "merges nothing" case note is updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merge-off control moved with the tests that commit added (30 in tests/v2, 32 over the suite). The read test held only the read's own re-ask of the title run; a parse assertion now holds group's too. H3 gives back 'Dr.', not 'mc'. `y` moves nothing in the P3-join class. The 2.3.0 comparison is over the seven fields, and a row note names the off-by-one it holds. Co-Authored-By: Claude Opus 5.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.
Summary
Since #614, S2's trailing run is read before P2's particle chain runs, so the read sees particles the chain hasn't merged yet. #620 made up for that in the reader:
_chain_unitsmarked a particle standing straight behind another as BOUND, and the peel stopped at it.credential_rungathered an absorbed run of those particles into one report.Now group merges each run of two or more adjacent particles past the chain's leading position into one piece. It does this at the trailing site, after P3's connective joins and before the read (
_pieces.merge_particle_runs). The read counts, stops at and absorbs the run as the one piece the chain makes, so the BOUND mark, its peel stop and the gathering are gone.Two details the measurements forced:
prefixand dropstitle. A P3 join can carry the title tag in from a word that is both a title and a particle (St und Berg). On a merged run that tag made the whole run read as a leading title.j > k + 1). A merged run has already done that, so the chain claims nothing more (Freiherr von der).premerged).Dr. St Do und), and moved 11,358 reports on the grid below.The title run's end and the chain's lead are read once, before the merge, and handed to the read, which used to ask for both again.
The rule text is unchanged: rules.md#S2 already counts a particle run as the one name word the chain makes, duals straight behind a particle included. The code grows by about 45 lines, docstrings included; what shrinks is the number of mechanisms. The read loses a mark and two branches and re-creates nothing of the chain; group gains the merge.
Measured (against 505d6de, py3.11, import asserted on each side; recipes in decisions.md#S2)
St und. Master readFreiherr Do St und Berg MAas title 'Freiherr Do St und Berg', family 'MA'.de Mesnil Ma do mc and Ph. D., and it no longer reportsdo.mc and Ph. D.into one suffix piece and the merge foldsdointo it, so the peel takes the piece whole.Freiherr St John Smith MAstart: should a title that is also a particle open the name? #624's title-particle head grid, the corpus names and case texts, or Where doesFreiherr St John Smith MAstart: should a title that is also a particle open the name? #624's comma-tail grid.Dr. mc mc) no longer applies: Where doesFreiherr St John Smith MAstart: should a title that is also a particle open the name? #624 already readsDr. Mc Mcwith suffix 'Mc Mc'.St undclass is any P3 join whose left word is both a title and a particle. Example:Freiherr Do Freiherr and Berg MA.Freiherr van der Dr. G.J. MAnow reads family 'van der Dr. G.J.', suffix 'MA'. That matches howFreiherr van Dr. G.J. MAalready reads.Dr. vd Jr. mc mcnow keeps title 'Dr.' where master handed it back as the given name.de la, and +1 on any name of three or more words read at the trailing site. Baselines are now 307 on 3.11 and 288 on 3.12–3.15 (decisions.md#parse-cost).Tests
test_a_merged_particle_run_is_a_particle_and_no_title(new): checks the merged piece's tags, and that the name's leading particle stays out of the merge (P4)._chain_unitsand read helpers intest_pieces.py: now merge first, as group does. The marks test readsvan mcas one piece.test_the_read_takes_the_title_run_as_written_before_the_merge(new, from the review):Dr. mc Jr mc mc.two_particle_runs_merge_eachanda_second_run_of_duals_is_the_family(parity, from the review): two particle runs in one name. An off-by-one in the merge's bookkeeping had passed the whole suite; these rows catch it. The merge's unit test gains the same two-run half.premergedreport triggertitlefrom the merged pieceReview
647e6c7: fixes the review's findings. It adds the two-run tests and the pre-merge title-run test, removes the false parity claim, corrects the grid size, records the extra move classes, and updates a stale case note.
Review of the fix commit: corrects the merge-off control count, adds a parse assertion so the read test holds group's half too, and fixes a docstring word, the P3-join class's connectives and a row note.
Docs
Closes #625
🤖 Generated with Claude Code