Skip to content

Split fix(suffix-routing) into the rules that name its shapes (#372) - #376

Open
derek73 wants to merge 2 commits into
masterfrom
claude/372-narrow-suffix-routing
Open

Split fix(suffix-routing) into the rules that name its shapes (#372)#376
derek73 wants to merge 2 commits into
masterfrom
claude/372-narrow-suffix-routing

Conversation

@derek73

@derek73 derek73 commented Aug 13, 2026

Copy link
Copy Markdown
Owner

The last of #372's confirmed over-claiming instances.

fix(suffix-routing) claimed 25 names in four shapes; its prose — "two-token name with unambiguous trailing suffix stays suffix" — described four. It is the only fields-only rule in any ledger, so it sorts after every name_regex rule and takes whatever nothing narrower named. It was never too broad; the narrower rules were missing.

The split

rule names shape
fix(cjk-glued-honorific-peel) 17 new김민준씨 → 김/민준/씨, Andersonさん → Anderson/さん
fix(cjk-honorific-suffix) 11 was 10 — gains 김민준 씨. and 김민준 양., loses 김민준 박사님 to glued
fix(comma-precomma-family) 3 newBob Jones, author, which moves no suffix at all
fix(suffix-routing) 4 Smith Jr., John V — exactly its original prose, restored

Gate unmoved: 108/0 at 1.4.0, 90/0 at 2.0.0, 1/0 at 2.1.0. Suite 3218.

A claim this PR made and had to retract

The second commit asserted the 17 glued honorifics could not have a rule — that 김민준씨 and the given name 김지양 are the same string shape, separable only by vocabulary and segmentation, neither reachable from a regex. Review falsified it, and the answer was sitting in the config:

GLUED_HONORIFICS omits: 양, 군, 氏, 殿, 博士

Exactly the characters whose glued match collides with real given names. The parser had already solved this by curating a narrower vocabulary; a regex reaches vocabulary by hand-copying it, which this ledger does routinely and pins with a sync test. The 2.0.0 ledger has had such a rule since #308 — this adds its twin, regex verbatim, enrolled in _HONORIFIC_SOURCES against the same source.

The other two names were never glued at all: 김민준 씨. and 김민준 양. are spaced, and the spaced rule missed them only because $ wouldn't tolerate a trailing period.

What the residual gap actually is

A second wrong claim, corrected rather than shipped: a future suffix regression on 김지양 is still absorbed — by the fields-only catch-all, measured. That is unchanged by this PR and is the standing cost of having a last-resort tier.

What #372 buys is that no rule named for honorifics will claim it. Being taken by the catch-all is recoverable; being labelled recognized honorific by a specific rule is not — and that is precisely what unanchoring the spaced rule (the first design here) would have caused.

Rosters

Four fired and were recorded: _HONORIFIC_SOURCES (the new vocabulary copy), _CORPUS_CLAIMS, _EXCLUSION_EFFECT (the Ph. D. entry's absorbed_by gained fix(comma-precomma-family) — it joined, it did not replace fix(suffix-routing)), and _CROSS_RULE_WINNERS, which gains the names on either side of the glued/spaced boundary.

#372 after this

All three confirmed instances are closed. Ambiguity reporting and the specificity floor remain declined on the evidence in #373.

🤖 Generated with Claude Code

It claimed 25 names in four shapes; its prose -- "two-token name with
unambiguous trailing suffix stays suffix" -- described four of them.

Three of the 25 move no suffix at all. 'Bob Jones, author' and
'MD, PHD' keep an identical title on both sides and move the pre-comma
run from `first` to `last`, because pre-comma is definitionally family.
Diff is exactly {given, family}. They now have their own rule,
fix(comma-precomma-family), separated from fix(comma-family) by fields
rather than order -- that rule's exclude `family`, which every name
here moves -- and Latin-anchored for the same reason it is.

The other 18 are #312's comma-less glued honorifics, and they stay.
They cannot be given a name_regex rule: '김민준씨' and the given name
'김지양' are the same string shape, hangul ending in a character that
is also an honorific, and only vocabulary plus segmentation tells them
apart. That is why fix(cjk-honorific-suffix) is anchored to a whole
trailing token.

Unanchoring that rule to reach the glued forms was the first design
here, and measuring it is what rejected it: it would make a future
suffix regression on '김지양' classify as a recognized honorific. A
specific rule confidently claiming a name it does not describe is
worse than this rule's honest breadth, and the differential run cannot
see the difference -- 108/0 either way -- because nothing is being
absorbed yet.

So the issue text becomes what all 22 remaining names share: a
trailing token routes to suffix. The Latin two-token case is four of
them; the comment now says the glued honorifics are the majority, and
why this is the last-resort tier rather than a gap left for later.

Gate unmoved: 108/0 at 1.4.0, 90/0 at 2.0.0, 1/0 at 2.1.0.

Three rosters recorded. _CORPUS_CLAIMS gains the new rule and rekeys
suffix-routing on its new issue text. _EXCLUSION_EFFECT's Ph. D. entry
gains fix(comma-precomma-family) in absorbed_by -- it JOINED, it did
not replace fix(suffix-routing), which still claims the readings
outside the new rule's two fields. _CROSS_RULE_WINNERS gains the five
names that now sit on either side of the split; measured, narrowing
the new rule so it can no longer claim them fails that pin.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@derek73 derek73 self-assigned this Aug 13, 2026
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.51%. Comparing base (b8738e1) to head (0125804).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #376   +/-   ##
=======================================
  Coverage   98.51%   98.51%           
=======================================
  Files          44       44           
  Lines        2895     2895           
=======================================
  Hits         2852     2852           
  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.

The previous commit claimed 18 names could not have a name_regex rule
-- that '김민준씨' and the given name '김지양' are the same string
shape and only vocabulary plus segmentation separates them, neither
reachable by a regex. Review falsified it, and the answer was in the
config: GLUED_HONORIFICS deliberately omits 양, 군, 氏, 殿 and 博士,
exactly the characters whose glued match collides with real given
names. The parser had already solved this by curating a narrower
vocabulary; a regex reaches vocabulary by hand-copying it, which this
ledger does routinely and pins with a sync test.

The 2.0.0 ledger has had such a rule since #308. This adds its twin to
the 1.4 ledger, regex verbatim, enrolled in _HONORIFIC_SOURCES against
the same GLUED_HONORIFICS source. 17 names.

The other two were never glued: '김민준 씨.' and '김민준 양.' are
spaced, and the spaced rule missed them only because its `$` would not
tolerate a trailing period. Relaxed to `\.?$`. 양 stays safe there --
it is in the SPACED vocabulary, where a whole-token anchor already
separates it from 지양.

So fix(suffix-routing) is back to the four Latin names its original
prose describes, and that prose is restored. It claimed 25 not because
it was too broad but because it is the only fields-only rule and sorts
last: when it grows, the question is which narrower rule is missing.

Measured, all shapes accounted for and the gate unmoved at 108/0,
90/0, 1/0:

  fix(cjk-glued-honorific-peel)  17   new
  fix(cjk-honorific-suffix)      11   was 10, +2 periods, -1 to glued
  fix(comma-precomma-family)      3   unchanged from the last commit
  fix(suffix-routing)             4   was 25

Three rosters fired and were recorded: _HONORIFIC_SOURCES (the new
vocabulary copy), _CORPUS_CLAIMS, _CROSS_RULE_WINNERS.

One claim in this commit's first draft was also wrong and is corrected
here rather than shipped: a suffix regression on '김지양' is still
absorbed, by the fields-only catch-all. What #372 buys is that no rule
NAMED for honorifics will claim it. Being taken by the catch-all is
recoverable; being labelled 'recognized honorific' is not.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@derek73 derek73 changed the title Stop fix(suffix-routing) explaining what it cannot name (#372) Split fix(suffix-routing) into the rules that name its shapes (#372) Aug 13, 2026
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.

1 participant