Skip to content

Share P6's particle tail and the maiden take's candidates as one predicate each (#610) - #612

Merged
derek73 merged 3 commits into
masterfrom
fix/issue-610-shared-trailing-predicates
Oct 4, 2026
Merged

derek73 merged 3 commits into
masterfrom
fix/issue-610-shared-trailing-predicates

Conversation

@derek73

@derek73 derek73 commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Closes #610.

Summary

  • _pieces.particle_tail: P6's walk, read off roles, now asked by both post_rules' attachment and assign's given-part credential run (Should a name word after a credential join the suffix? John Smith PhD Jones reads middle Smith PhD #602). Before, these were two walks that agreed only through the run's roles. No reading moves, and family-comma parses get slightly cheaper (Smith, John 183 → 180 frames).

  • _pieces.trailing_candidates: the maiden take's choice of clause words, now written beside the peel whose admissions it has to cover. It replaces _group._clause_tail_word and an inline numeral clause.

  • A bug the shared predicate fixed. The fork recognizes a numeral in no wordlist (VI) by its shape, as the walk's last piece. A period title or the merged Ph. D. standing behind it leaves it last without standing at the end of the name. The old copy admitted the numeral only as the clause's last word, so:

    Input master this PR
    Jane Doe nee Smith VI Prof. maiden Smith VI, title Prof. maiden Smith, suffix VI, title Prof.
    Jane Doe nee Smith VI Ph. D. maiden Smith VI maiden Smith, suffix VI Ph. D.

    Both now match the clause-free name (John Smith VI Prof. gives suffix VI), as rules.md#M2 says they should. V and III already worked because they're in the vocabulary.

How it's guarded

  • A sweep test checks, at the take itself on the unjoined pieces it's handed, that every word tail_reading takes from the clause-free view is at or after the candidates' cut. 37,044 clauses, 0 misses. The recorded negative control is the loop Rethink the maiden-marker rule (M2): a marker stands after the current name and takes words up to the trailing suffix run #601 shipped: 432 misses, all this numeral class.
  • Equivalence against master over 95,813 texts under three policies (every field, ambiguity and initials string): 10 readings moved, all this class. The review's own fuzz, 1.3M parses across 36 parser configurations including custom lexicons, found 0 differences from particle_tail. Its 200k random fuzz moved 11 readings, all the numeral class.

Docs

  • rules.md M2 gains the VI Prof. example. decisions.md#M2 gains a Two stages hand-copy each other's trailing-word logic after #601/#602; share one predicate each #610 entry. mechanisms.md#ONE-PREDICATE-PER-QUESTION names both new instances, and its Field notes record the review's catch: the first sweep test ran on post-join pieces the take never sees.
  • AGENTS.md gains two Workflow-level paragraphs:
    • record the check that would have caught a defect, in the same PR, where the next session meets it, with where each kind of lesson goes;
    • sweep spellings as well as comma shapes and orders: a class reached by vocabulary is also reached by shape. Roman numerals are the case: ii–iv are listed, i/v are listed but initial-shaped, vi and up are in no list.

Test plan

  • uv run pytest (11,393 passed), also run without namedivider
  • uv run mypy, uv run ruff check
  • sphinx-build -b doctest docs, python -m doctest README.rst
  • differential gate at 1.4.0, 2.0.0, 2.1.0, 2.2.0 and 2.3.0, all exit 0, no moved shapes
  • review pass, with its finding fixed in 2db7ae0

🤖 Generated with Claude Code

derek73 and others added 3 commits October 4, 2026 12:45
…icate each (#610)

`_pieces.particle_tail` is P6's walk, read off roles, so post_rules'
attachment and assign's given-part credential run (#602) ask one walk
instead of two that agreed only through the run's roles; it moved none
of the 95,813 readings of the equivalence grid, and family-comma parses
pay fewer frames ('Smith, John' 183 -> 180).

`_pieces.trailing_candidates` is the maiden take's choice of clause
words, written beside the peel whose admissions it must cover, and a
sweep test pins that it is a superset of what `tail_reading` takes over
a 37,044-parse grid. The test found the hand copy wrong twice: a
shape-only numeral ('VI', in no wordlist) is the walk's last piece when
a period title stands behind it or the merged 'Ph. D.' does, so
'Jane Doe nee Smith VI Prof.' kept maiden 'Smith VI' where 'John Smith
VI Prof.' reads suffix 'VI'. Both now end the clause at the numeral, as
rules.md#M2 says; the recorded negative control is 288 misses for the
loop #601 shipped. Ten readings moved against master, all this class.

Two case rows, an M2 example, the ledgers classifying that example, and
a decisions.md#M2 entry; mechanisms.md#ONE-PREDICATE-PER-QUESTION names
both new instances.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ellings

Two Workflow-level additions from #610. A rule to write down, in the
same PR, the check that would have caught a defect, and where each kind
of lesson goes (the sweep paragraphs, Gotchas, docs/design/AGENTS.md's
axes, mechanisms.md). And a third sweep beside comma shapes and
`name_order`: a word class reached by vocabulary is also reached by
shape, with roman numerals as the case -- `ii`-`iv` listed, `i`/`v`
listed but initial-shaped, `vi` and up in no list -- which is how #610's
'VI' gap hid behind working 'V' and 'III'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review found the sweep test read plain names through all of `group`, so
the pieces it handed to `trailing_candidates` already carried the joins
the maiden take runs before ('de VI Prof.' as one piece where the take
sees three). The oracle now wraps `_group._maiden_take` and checks every
take of a 37,044-clause grid on the pieces it was actually handed: the
clause-free view, `tail_reading` over it, and every piece it takes at or
after the cut. 0 misses; the loop #601 shipped misses 432 there, every
one the shape-numeral class, which is the recorded negative control.
decisions.md#M2 relabels the first grid's figures with their population,
and mechanisms.md's Field notes record the trap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 2.4 milestone Oct 4, 2026
@derek73 derek73 added bug docs Documentation fixes and updates tests labels Oct 4, 2026
@derek73 derek73 self-assigned this Oct 4, 2026
@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.98%. Comparing base (8a8459a) to head (2db7ae0).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #612   +/-   ##
=======================================
  Coverage   98.97%   98.98%           
=======================================
  Files          45       45           
  Lines        4214     4227   +13     
=======================================
+ Hits         4171     4184   +13     
  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.

@derek73
derek73 merged commit 97d36e0 into master Oct 4, 2026
11 checks passed
@derek73
derek73 deleted the fix/issue-610-shared-trailing-predicates branch October 4, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug docs Documentation fixes and updates tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two stages hand-copy each other's trailing-word logic after #601/#602; share one predicate each

1 participant