The shapes corpus learns its variations: 9/11/3 names deep for shapes 1-3 - #487
Merged
Conversation
…riations Shapes 1-3 are the given-first arrangements, and the shapes corpus held one name for shape 1, four for shape 2 and one for shape 3 -- the feature work that authored shapes 4 and 5 left the default-order half of the matrix at whatever the pipeline PRs happened to tag. This is the first half of #486: the sweep for rows that ALREADY instantiate a variation with reviewed expectations, where the tag is admission rather than new behavior. Default policy only, Latin text, and one row per variation -- a tag chosen deliberately, not every plausible row. Shape 1 (Title Given "Nickname" Middle Middle Family Suffix): title present -> audit_md_leading_stays_a_title double-quoted nickname -> nickname_quotes one middle -> sir_bob no-comma suffix -> audit_jr_trailing_unchanged particle-bearing family -> particle_beside_a_name_still_a_particle title + suffix pairing -> delavega initial-shaped name word -> initial_not_suffix Shape 2 (Family [Suffix], Title Given (Nickname) Middle Middle[,] Suffix): post-comma title -> comma_then_title post-comma middle -> comma_middle_initial pre-comma suffix -> family_segment_trailing_suffix trailing suffix, no comma-> family_comma_run_with_a_name_is_not_a_run double trailing suffix -> comma_extras_become_suffixes particle family pre-comma-> family_comma_particles Shape 3 (Title Given Middle Family [Suffix], Suffix [, Suffix]): title + middle + repeated comma suffix -> suffix_comma_decided_by_first_segment corpus_shapes.jsonl 13 -> 27 entries; shapes 1/2/3 go 1/4/1 -> 8/10/2. Ten of the fourteen names were already in a corpus, so the tag PROMOTES them from radar to contract (README, "To promote a radar name") or is a no-op for the three the rules corpus already held. Four were in no corpus and are new comparisons: 'John "Jack" Kennedy', 'Sir Bob Andrew Dole', 'Smith, John Jr.', 'Smith, John, Extra, Jr.'. None of the four diffs at any baseline, so no ledger rule moved: 1113 -> 1117 comparisons with intentional 226/205/113/0 unchanged, unexplained 0 and radar unclassified 0 at all four. Two claims grew on reach alone -- fix(comma-family) and fix(comma-precomma-family) at 1.4.0, 284 -> 286, both matching the bare comma in the two new comma names -- and the ASCII-pairs exclusion's captures went 55 -> 56 for 'John "Jack" Kennedy', which is its own second `examples` string arriving in a corpus. `absorbed_by` stayed empty. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The other half of #486: the three slots in the shape 1-3 notations that no existing case row instantiates, so the sweep in the commit before this one had nothing to tag for them. Expected values MEASURED against the tree, classifications resolved from the 1.4.0 gate rather than guessed, and the table's own vocabulary reused rather than new strings invented. shape 1, the second Middle slot -> middle_run_at_two_words, 'John Jack Andrew Kennedy' given John / middle 'Jack Andrew' / family Kennedy classification: parity shape 2, the (Nickname) slot after the family comma -> family_comma_paren_nickname, 'Kennedy, John (Jack)' given John / family Kennedy / nickname Jack classification: parity shape 3, the optional inline suffix standing WITH a comma suffix -> inline_suffix_then_comma_suffix, 'John Smith Jr., PhD' given John / family Smith / suffix 'Jr., PhD' classification: parity All three are new comparisons -- none was in any corpus -- and none of them diffs at any of the four baselines, which is what resolved each classification to parity: the 1.4.0 report names every classified name and names none of these. So no ledger rule was appended at any baseline. corpus_shapes.jsonl 27 -> 30 entries, shapes 1/2/3 now 9/11/3 names deep; 1117 -> 1120 comparisons (1113 at 1.4.0, where shapes 4 and 5 are skipped) with intentional 226/205/113/0 unchanged, unexplained 0, radar unclassified 0, and the dormancy, OVER-DECLARED and ORDER-BLIND blocks empty at all four. Claims re-recorded: fix(comma-family) and fix(comma-precomma-family) at 1.4.0 go 286 -> 288, both on the two comma-bearing arrivals, reach without absorption. The ASCII-pairs exclusion captures 56 -> 57 for 'Kennedy, John (Jack)', with `absorbed_by` still empty. Two variations needed no row of their own. An initial in the GIVEN slot: rules.md's own 'J. Smith' and 'J.R. Smith' boundary examples are already contract-tier through the rules corpus, and a third name word adds no branch to them. A non-suffix tail after the second comma: that is C2's structural-ambiguity branch, not a slot the shape 3 notation has. A third, the hyphenated family, is COVERED rather than skipped -- 'Dr. John P. Doe-Ray, CLU, CFP, LUTC' entered the corpus with the previous commit's shape-3 tag and carries one -- so what this commit declines is only a dedicated row for it, the hyphen being ordinary word content everywhere but H2's abbreviation shape. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The review of #486's two commits found four statements the tagging falsified or had already left stale, plus two notes worth adding to rows the tag half admitted. All prose and row notes -- no shape tag, corpus entry, floor, claim or ledger rule moves here. Falsified by the tagging, in expected_since_1.4.0.toml: the comment justifying the `examples` key illustrated "a protected shape need not appear in any corpus" with 'John "Jack" Kennedy', which is exactly the string the shape-1 tag put into corpus_shapes.jsonl (it is what took that entry's captures 55 -> 56). The illustration moves to 'John (Jack) Kennedy', the sibling example still in no corpus at all; the other two are corpus names in radar files, and a short note records that an example being promoted this way is the key working rather than failing. Two factual slips in the comment this work added at _EXCLUSION_EFFECT: 'John "Jack" Kennedy' is the entry's FIRST `examples` string, not its second, and it was in NO corpus before rather than in the radar ones -- the radar corpora hold the smart-quote spelling 'John “Jack” Kennedy', which is why the two classify differently at 1.4.0. Stale capture counts, pre-existing and moved again by this work, now replaced by a pointer instead of a fourth number that would rot the same way: expected_since_1.4.0.toml said 51, tools/differential/ README.md said 34 and test_ledger_guards.py said 46, while the checked value is _EXCLUSION_EFFECT's `captures` for that pattern, which fails CI when it drifts. Each of the three now says so and stops. decisions.md gains a dated follow-up bullet under the #469 arithmetic entry, whose figures this work superseded on the same date -- so the date could not disambiguate them and the new bullet says which is which. Same recipe, new numbers: 30 shape entries, 14 deduping into names already compared under the default order, 1120 comparisons, 7 entries skipped at --baseline 1.4.0 and 1113 compared there. Row notes: audit_md_leading_stays_a_title records that its shape-1 tag rides on 'md' keeping dual title membership -- the single deviation from the approved 2026-07-30 audit table, with #291 still unshipped -- so a reversal moves the tag rather than editing expectations under it. suffix_comma_decided_by_first_segment records that it is deliberately the compound shape-3 exemplar, filling Title, Middle and the repeated [, Suffix] at once and carrying the hyphenated family besides, so a diff on it is not attributable to any one slot. PROMOTION VERIFIED. Eight names the tag half moved from radar-only to contract: 'Dr. Juan de la Vega III', 'John V. Smith', 'Md Abdul Karim', 'Doe, John A.', 'Smith Jr., John', 'Smith, Dr. John', 'de la Vega, Juan', 'Dr. John P. Doe-Ray, CLU, CFP, LUTC'. Promotion turned no tolerated diff into a blocker, on two independent readings of the pre-change reference runs: radar unclassified was 0 at all four baselines, so no radar name had an unmatched diff to promote in the first place; and none of the eight appears anywhere in any pre-change report, so none of them diffed at all, classified or not. Re-measured after this commit: 1120 comparisons (1113 at 1.4.0, skipped 7), intentional 226/205/113/0, unexplained 0, radar unclassified 0, and the dormancy, OVER-DECLARED and ORDER-BLIND blocks empty at all four. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #487 +/- ##
=======================================
Coverage 98.66% 98.66%
=======================================
Files 45 45
Lines 3218 3218
=======================================
Hits 3175 3175
Misses 43 43 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…s its slot Five prose inaccuracies from the #487 review, two of them mine and three pre-existing but falsified or moved by this PR, plus the slot annotations that make the matrix readable from the rows themselves. No shape tag, corpus entry, floor, claim or ledger rule changes here -- notes are not in build_shapes_corpus.py's projection, so regenerating after this commit rewrites corpus_shapes.jsonl byte for byte. decisions.md, the #486 bullet: "None of the 30 needed a ledger rule" was false on a plain reading -- the seven shape 4/5 entries ARE classified by ledger rules today, and scoping exactly those rules is what the `orders` bullet three lines above is about. It now says none of the 17 names #486 tagged or authored needed one, and says out loud that this is not a claim about all 30 entries. Two same-dated counts this PR falsified rather than swept -- the dated-snapshot defence fails when the supersession lands the same day, so accuracy was the only option. decisions.md's #468 bullet said "a comparison of 1113 names today" (now 1120, with the earlier figure kept as history); mechanisms.md's LEDGER-RULE-SEPARATION entry said `[a-z]` "reaches 963 of 1113 comparisons". Re-measured here with the same (name, order)-dedup the gate uses, independently of the review's recount and agreeing with it: 970 of 1120 (` ` reaches 1057). Both keep their 2026-09-01 date. expected_since_1.4.0.toml, two of mine from bebb9d1: the capture-count history read "(46, then 51, then 55)" and git archaeology says the comment's copy went 34 -> 46 -> 51 and never carried 55 -- 55 was the value the pin already held while the copy still said 51, and that lag is now stated as the argument for deleting the copy rather than correcting it again. And "gave that string a case row and a shape tag" overstated the change: `nickname_quotes` predates this work by a long way and only the TAG is new. While there, the replacement illustration is named as the hazard it is -- 'John (Jack) Kennedy' is itself `nickname_parens`'s text, one tag from falsifying the sentence the same way, and no example is left that is neither a corpus name nor a case row. Slot auditability: every shape 1-3 row's notes now name the variation slot it witnesses, in the row's own voice, matching what the three authored rows and the two annotated rows already did. 18 rows gained a clause; all 23 shape 1-3 rows have one now, so the matrix reconstructs from the rows around `grep -n 'shape=' tests/v2/cases.py` without consulting a commit message. Two inaccuracies in f203017's own message cannot be fixed without rebasing a pushed branch, so they are recorded here instead. Its promotion arithmetic reads "Ten of the fourteen names were already in a corpus ... or is a no-op for the three the rules corpus already held", which double-counts: the correct split of the 14 tagged names is 8 promoted from radar-only to contract, 2 already contract through the rules corpus, and 4 in no corpus at all. And the exclusion-example slip that message repeats ('John "Jack" Kennedy' as the entry's second examples string, promoted out of the radar corpora) was corrected in bebb9d1: it is the first, and it was in no corpus before. Co-Authored-By: Claude Fable 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.
First pass of the shape-variation matrix. Closes #486.
What changes
Coverage goes from 1/4/1/4/3 to 9/11/3/4/3 names for shapes 1–5 (
build_shapes_corpus.py --coverage);corpus_shapes.jsonlgrows 13 → 30 entries, the gate 1113 → 1120 comparisons.cases.pyrows that already instantiate a shape 1–3 variation with reviewed expectations get theirshape=tag — post-comma title (Smith, Dr. John), paren nickname, post-comma middle initial, pre-comma suffix (Smith Jr., John), trailing suffix with and without its optional comma, double trailing suffix, particle families on both sides of the comma, no-comma suffix, quoted nickname, one-middle, initial-shaped name word, and the leading-Mdtitle row.John Jack Andrew Kennedy), a post-comma paren nickname (Kennedy, John (Jack)), and inline suffix followed by a comma suffix (John Smith Jr., PhD). All three measured against the tree and resolved toparityfrom the 1.4.0 gate run.[[never]]entry'sexamplesjustification re-illustrated with a name still in no corpus (tagging had falsified its old example), a dated follow-up bullet supersedes the Shoulddocs/document input shapes for the family-first name orders, and does a trailing particle belong in the notation? #469 corpus arithmetic in decisions.md (30 entries, 14 deduping, 1120 comparisons), three stale capture counts become pointers to the_EXCLUSION_EFFECTpin, and two row notes record the deliberate judgment calls (Md's contested title membership; the compound shape-3 exemplar being intentionally non-slot-attributable).Deliberately not done
A dedicated hyphenated-family row (covered inside the compound shape-3 exemplar), a given-slot-initial row (corpus_rules already carries the H2 boundary examples), and isolating Title-alone/Middle-alone rows for shape 3 — cheap follow-up if a diff there ever needs slot attribution.
Verification
Full suite 6372 passed; ruff, mypy, doc-guard suites clean. Gate exits 0 at all four baselines: intentional 226/205/113/0, unexplained 0, radar unclassified 0,
skipped 7at 1.4.0, and the dormancy / OVER-DECLARED / ORDER-BLIND blocks empty everywhere._CORPUS_CLAIMSgrowth traced name-by-name: the two 1.4.0 comma rules 284 → 288 by exactly the four comma-bearing arrivals; the ASCII-pairs exclusion captures 55 → 57 by exactly the quote and paren arrivals.🤖 Generated with Claude Code