Skip to content

Repair a joined acronym credential as one word (#808) - #812

Merged
derek73 merged 2 commits into
masterfrom
claude/hyphenated-words-capitalization-135cdd
Oct 22, 2026
Merged

derek73 merged 2 commits into
masterfrom
claude/hyphenated-words-capitalization-135cdd

Conversation

@derek73

@derek73 derek73 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Closes #808.

A listed acronym credential joined by a hyphen or slash was split by case repair's per-word walk and each side capitalized as a name part: john smith, kchs/dchs gave Kchs/Dchs, ccc/slp gave Ccc/Slp. (pa-c only looked right because both halves happen to capitalize correctly.)

  • In the suffix role the whole token now repairs in capitals as one word (OTR/L, FNP-BC, KCHS/DCHS).
  • A recorded casing (mask) is laid over the whole token in any role. Before this it was silently dropped for a joined token, since the walk never asked the map about the whole; no shipped joined entry has one, so a caller's lexicon is the only way to reach it.
  • Hyphenated name parts (Smith-Jones, Jean-Luc, da-Silva), hyphenated titles (Dipl.-Ing) and mixed-case input (R5's gate) are unchanged.

Docs: rules/R4 gains fix and boundary rows, decisions/R4 a dated entry, and the 2.6.0 release log a bullet (checked against the 2.0.0, 2.4.2 and 2.5.0 wheels). capitalized() is invisible to the snapshot, so no count is claimed. rules_budget.json, corpus_rules.jsonl and snapshot.jsonl are re-recorded (the snapshot gains only the new example names).

Test plan: full suite (22,659 passed), ruff, mypy, and both Sphinx builds are clean. Three tests pin the repair (test_a_joined_acronym_repairs_whole_and_a_recorded_casing_wins, ..._is_capitals_only_as_a_listed_suffix, test_a_recorded_casing_reaches_a_joined_token_in_any_role); each gate (mask, vocabulary, suffix role) fails a test when removed. Not run: the Python 3.15 interpreter check.

🤖 Generated with Claude Code

…#808)

A listed acronym credential holding a hyphen or slash (otr/l, fnp-bc,
kchs/dchs) was split by the per-word walk and each side capitalized as a
name part: 'Otr/L'. In the suffix role the whole token now repairs in
capitals, and a recorded casing is laid over the whole token in any role
(it was silently dropped before). Hyphenated names and titles are
untouched.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@derek73 derek73 added the bug label Oct 22, 2026
@derek73 derek73 self-assigned this Oct 22, 2026
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.05%. Comparing base (13267b5) to head (99ea0f8).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #812   +/-   ##
=======================================
  Coverage   99.05%   99.05%           
=======================================
  Files          47       47           
  Lines        4642     4659   +17     
=======================================
+ Hits         4598     4615   +17     
  Misses         44       44           

☔ 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.

Review of #812 found that dropping either gate of _joined_whole passed
the suite. Add rows for a listed joined acronym in a name role, an
unlisted joined word in the suffix role, the comma shapes and
family-first order, and a mask in a non-suffix role and on a dotted
key; correct the decisions entry's claim about pa-c (2.0.0 through
2.5.0 gave Pa-C) and a stale test docstring.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit 1ae2aed into master Oct 22, 2026
12 checks passed
@derek73
derek73 deleted the claude/hyphenated-words-capitalization-135cdd branch October 22, 2026 04:06
@derek73 derek73 added this to the 2.6 milestone Oct 25, 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.

JOHN SMITH, PA-C repairs to Pa-C: a listed credential joined by a hyphen or slash is capitalized like a name

1 participant