Repository navigation
Decide C1 once after classify and bind the comma part; fold P6 into assign (#613) - #616
Merged
Merged
Conversation
) segment decided the comma structure before any word was tagged, so it modelled later stages -- group's particle chain unsettling a run the capitals settled (#562's pair), assign's reading of a capitals-settled run -- and assign re-decided #296's positional read with a second count. #611 named that the decisive sign. The decision now runs at the head of group (_comma.decide), after classify: the part after the first comma is read once by segment_suffix_reading, with the ambiguous words C1's count licenses, and a postnominal part's SUFFIX/TITLE roles are bound before any join (mechanisms.md#READ-WITHOUT-THEN-BIND). segment hands every comma form over as FAMILY_COMMA and keeps C2's flag; script_segment asks its own narrower question. Deleted: segment's decision block, classify's comma-run caps branch, assign's comma reading, positional count and second report, _vocab.run_word_fold, and the settled-run mirror test. Decided with Derek, each measured first: a connective surname counts its words before the comma (#575's count; 'Ortega y Gasset, Dr.' reads given Ortega); #562's pair report goes silent; no join reaches into a postnominal part except P3's title chain ('Mr. and Mrs.'); the positional read reports as the comma-less name does ('Smith Jr., Esq.' reads family Smith). Delimiter cores drop only behind a whole name. Gates exit 0 at all five baselines; the corpora move four names (two radar, two report-only). Comma names get cheaper in frames ('Smith, John' 179 -> 169); no-comma names are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rt (#613) #611 found P6 showing the same sign as C1, smaller: assign held back from #602's run exactly the particle tail post_rules would attach a stage later, asking particle_tail over roles that meant "not yet read" in one caller and "suffix" in the other. The attachment and its third exception move into assign, right after the given-part walk. particle_tail is asked once, when the walk reaches the run: the pieces in front hold the walk's roles and the run's words none, which is the state where its answer equals the one over the finished roles. post_rules ran P1's fold first, so assign asks P1's condition itself (is_lone_never_given_particle). The no-comma site (#467) stays in post_rules. Nothing moves: the P6 grid (103,786 texts, four policies, roles, tags, reports in order, initials), the #613 harness and the five gates are identical. Family-comma names drop nine frames ('Smith, John' 169 -> 160). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four reviewers on the two #613 commits. Commit 2 (P6) was confirmed output-neutral independently: 634,452 parses, 0 differences, with a positive control. The fixes: - script_segment's stand-in for the comma decision asked the vocabulary alone, so group read '김민준 박, MA' as a credential run behind a two-word name while the name stayed undivided. It now asks decide's name-word count for a listed ambiguous credential; '마틴 킹, MA' reads as master did again, and its re-recordings are reverted. A new invariant test holds the division to decide's answer, with a recorded residue and negative control. - The #563 quadratic came back in decide's paired-initials scan while its guard, counting a function the moved code no longer calls, passed. The speaker is found once; the guard counts is_suffix_piece, and AGENTS.md records the trap. - Two unreachable conditions removed (decide's lone two-capital clause, group's cores filter), output-neutral on the harness. - Case rows for the decided classes the table lacked, the title chains, and a numeral contrast; a cost guard on decide's early return. - About 45 stale comments, docstrings and test notes; the vacuous segment tests moved to test_comma.py. - Docs: C1's binding sentence scoped to a postnominal part, S2's #562 clause, W3, four mechanisms.md passages, the AGENTS.md comma sweep lesson, the release bullets, and the decisions entry rewritten with every mover class measured and the grids written out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- script_segment's count arm skipped two of decide's conditions, the numeral refusal and the policy-selected suffix test, so '김민준 박, MA V' divided behind a family comma and the family read '김 민준 박'. The arm now asks both. The agreement test is now the one-directional invariant that matters -- never divide where decide reads a family comma, over two policies and wider tails -- with the arm's own reach pinned and 24 of 168 parses as the recorded control. - group's cores filter is restored: its removal was output-neutral but left a dropped core as a piece with a suffix role, and the comment justifying it was false. - The helper's docstring and the decisions entry now name every shape still left whole, all in the harmless direction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- W3 now says what script_segment actually asks: the division and the
honorific split-off both follow C1's counts for suffix words and
listed class words, so a part read as postnominal by anything else
leaves the name whole and the honorific glued ('John 田中さん, XYZ',
as 2.3.0 read it). The decisions entry records the peel loss.
- WHAT MOVES: the role classes now state their first-match order and
recompute (936/456/65/250/31 and Ph. D., Jr.); the report-only
movers are compared in order and bucketed truthfully -- 182 are a
new report ORDER, and the anchored-pick shape is one of three
detail shapes, not the bucket's description.
- S2's capitals clause regains C1's precondition (a part of suffix
words and class words: 'Smith, MA Jones' keeps given 'MA'); C1's
postnominal part includes titles alone.
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 #616 +/- ##
==========================================
- Coverage 98.98% 98.98% -0.01%
==========================================
Files 45 46 +1
Lines 4255 4352 +97
==========================================
+ Hits 4212 4308 +96
- Misses 43 44 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Codecov's patch check found three new lines no test executed: the
guards for a state with no family comma, in _comma.decide and in
script_segment's stand-in, and decide's exit for a part of delimiter
cores alone ('John Smith, - -' under ' - '). Each is now pinned as a
contract.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- An empty part before the comma made decide return early, so ', PhD'
read given 'PhD' and ', Jr.' title 'Jr.', where 2.3.0 read suffix.
decide now reads the part behind an empty head (no whole name, so
the family comma stands with the part bound). Case rows added.
- Behind an empty head no family is named, so H1 and M4 decide before
P6: assign's attachment had run first (', Mr. Jones vd' read family
'vd'). The attachment behind an empty family part is post_rules'
again, after H1 and M4, through the same helper; the empty-head grid
now differs from master only in C1's decided classes.
- script_segment's stand-in counted a suffix before the comma as a
unit, dividing '김민준 Jr., PhD' and making decide agree after the
fact. It counts units holding a non-suffix word, as _whole_name
does; the invariant test now compares against decide on the
UNDIVIDED name, with suffix heads and a measured control (14 of 264).
- Three quadratics the frame guards could not see -- _title_chains'
slice rebuild, the paired-initials set copy and member-list scans,
the core-list filter -- fixed, each a calibrated _PREFIXED_SHAPES
row (broken 9.9-11.9x against fixed 4.0-4.3x).
- Comment fixes (the Ph./D. merge test now depends on the merge),
headers, AGENTS.md's comma sweep gains the empty head, decisions.md
records all of it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- decide cleared its caps-shape marks whenever the run test declined, so a part #603's opener bound anyway repaired its all-caps credential to 'Xyz' (rules.md#R4); the marks now stay on a bound caps word with the name's contrast. No role or report moves over the harness. - The stand-in invariant gains tails mixing a class member with a name word ('MA Jones'), which a mutation skipping the stand-in's suffix test would have divided behind a family comma, and checks the divisions it expects per policy. - Pinning rows for the decided and accepted readings the table lacked (De La Cruz particles, Smith Jr., V, the period-written member, the split credential, 'Mr. y', the contrast's period exclusion) and the tolerated CJK readings, regenerated into the radar corpus; the CJK claims they grow and one new contest pin re-recorded. - The cost guard names the mutation its control measured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The PR's simplification pass found that the last round dropped _inside_a_credential_run's empty-run guard on the claim that callers never pass one -- true of assign, false of post_rules' site behind an empty family part, so ', Jane PhD do MA' reported a third, bogus fork. The guard is back inside the function; a case row pins it. Simplifications, each identical over a 13,046-name fingerprint of roles, ordered reports, initials and capitalized() under six policies: - decide states the class-member test once, filling `licensed` and the other words in one pass (two frames fewer where the count runs); - _title_chains has one join path, an opening connective joining an empty piece; - the all-suffix reading is (True,) * n, not a generator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four reviewers (reuse, simplification, efficiency, altitude); every change below leaves a 78,282-parse fingerprint (roles, ordered reports, initials, capitalized() under six policies) byte-identical, and the gates, the #613 harness and the P6 and empty-head grids unchanged. - decide reads the part ONCE: before the count where the part holds no word of the class, after licensing where it does (the first read had been thrown away whenever a member was licensed). - decide empties the segment of a part it binds, as #601's take does, so group's bound filter, its flag and its frozenset go. - The member bookkeeping runs only where the part holds a class word, and drops two caps arms dead after binding; _title_chains asks _pieces.is_title_piece rather than a copy of it. - script_segment asks its stand-in once, re-asking only if the peel changed the state, and the peel's decline test runs its cheap half first: accented Latin comma names had paid ~12% of the parse for the double call ('Müller Schmidt, Hans' 320 -> 283 frames, master 287). - segment drops a dead memo, a constant held in a variable and a one-caller helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Decided with Derek in the /simplify pass. script_segment runs before
group but needs C1's answer to know whether the name before a comma
divides and where a glued honorific peels from. It had asked a hand
copy of C1 by the vocabulary, and the copy drifted from decide four
times in review (the class count, the numeral refusal, a suffix
before the comma, and -- found by this pass -- the split 'Ph. D.').
_postnominal_behind_a_whole_name now asks _comma.decide on a
classified copy of the name as written, lazily: the peel only where
its two candidate sites differ, the division only where there is a
token it would divide (the whole-surname bail moved into
_split_candidate so both share it). No Latin or accented-Latin comma
name pays for it ('Müller Schmidt, Hans' 275 frames, master 287).
_vocab.surname_unit_count, which only the copy asked, is deleted.
The division now follows decide in both directions, and the invariant
test asserts both (on 3320d70: 0 outran, 44 lagged of 300; now 0 and
0). Against b547c24 that restores the caps, dotted and peel readings
the copy had moved, and moves one tolerated class: a title and one
CJK name word before a credential divides as decide reads it ('Dr
김민준, MA' as 'Dr 김민준'), and a glued 'J.씨' in a postnominal part
stays glued ('John Smith, Dr. J.씨' as 'John Smith, J.씨'). On the
78,282-parse fingerprint, 1,106 parses move, every one a CJK name or
a 'J.씨'; rows, radar corpus, ledger claims and docs updated.
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.
Closes #613.
#611 found that rules.md#C1 had grown by patching.
segmentdecided what the comma means before any word was tagged, so it had to predict later stages: group's particle chain (#562's pair) and assign's reading of a capitals-settled run. Assign then re-decided #296's positional read with a second count. P6 showed the same sign on a smaller scale: assign held back from #602's run exactly the particle tail that post_rules would attach a stage later.What changes
C1 is decided once, after classify, and the part it decides is bound before any join (
cfdd4775)._pipeline/_comma.py, runs at the head of group.segment_suffix_reading, passing in the ambiguous words C1's count licenses.segmentnow outputs only NO_COMMA or FAMILY_COMMA._postnominal_behind_a_whole_name)._vocab.run_word_fold, and the settled-run mirror test.P6's comma site is decided in assign (
47fb2b21).particle_tailis asked once.Decided (Derek), each measured first
De La Cruz, Edlose its given name? #575's count).Ortega y Gasset, Dr.now reads title 'Dr.', given 'Ortega', middle 'y', family 'Gasset'. PR Read a comma part a credential opens as the postnominal part; titles past the second comma (#603, #611) #615's Vega rows reverse.John Smith, PhD DO DOread given 'PhD' and family 'DO DO John Smith'? #562's pair report goes silent.De La Cruz, DO DO DOreads suffix 'DO DO DO').John Smith, Ph. D. and Mary Jonesreads suffix 'Ph. D. and Mary Jones'.John Smith, Mr. and Mrs..Smith Jr., Esq.reads family 'Smith';Smith Jr., Vreads given 'V'.Accepted garbage-input costs, each pinned by a case row:
John Smith, PhD and Dr.John Smith, Ph. Ma D.John Smith, Ma.(now read asJohn Smith, Mais)The CJK radar tier is settled in decisions.md: the name is never divided where decide reads a family comma, and an invariant test holds that.
Measured (2026-10-06, against b547c24)
John Smith, PhD DO DOread given 'PhD' and family 'DO DO John Smith'? #562's report.Ph. D., Jr.moves; it's garbage, and its watched row is re-recorded.마틴 킹, MAchanges only in its report detail.Smith, JohnJohn Smith, PhD JonesSmith, MD PhDReview
Two rounds, each with four or two reviewers. Fixes are in
bac1b510,7dc7bfa8and505f1e8b:García Márquez, G.J.has no given name #563's quadratic came back in decide's paired-initials scan while its guard counted a function the moved code no longer calls. The scan is fixed, and the guard is retargeted.김민준 박, MA Vbehind a family comma.test_the_division_never_outruns_the_comma_decision, with recorded negative controls.PR review (
d99b9845; four reviewers: code, comments, tests, silent failures):, PhDread given 'PhD' and, Jr.title 'Jr.'. Both read suffix again, as in 2.3.0., Mr. Jones vd).김민준 Jr., PhD). The invariant test now compares against decide on the undivided name._title_chains, the paired-initials set copy, and the core-list filter, none visible to the frame guards. Each now has a calibrated_PREFIXED_SHAPESclock row./simplify pass (
3320d700,ed0a2e3e):_comma.decideitself (decided with Derek) instead of a hand copy of the comma decision. The copy had drifted four times in review.test_the_division_never_outruns_the_comma_decisionasserts both directions.Dr 김민준, MAdivides asDr 김민준does, andJohn Smith, Dr. J.씨reads asJohn Smith, J.씨does.Not in scope: #614 (S2's rethink).
🤖 Generated with Claude Code