fix(generate): plural-subject agreement, 26/26 (Phase 3) #134
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/predicate-agreement"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 3 of
docs/plans/grammar-unification-2026-07-26.md. 26/26 against the hand-written oracle, from 17/26._inflect_predicateappliedbase_form— a single-verb function — to whole humanized predicate phrases, stripping the final word's last character-class, and its plural branch never consultedcopular. Nine of the 26 seed predicates were wrong, and every multi-word one was:Root causes — both single-point, as §1.4 predicted
morphology.agree_plural_phraseinflects the head (the finite verb is the first token of every humanized predicate) and carries the rest through.base_formstays single-verb and is pinned as still wrong on a phrase, so nobody "fixes" the symptom in the wrong place.do not is defined a) and is fixed with it: a plural copula takes a barenot, everything else takes do-support.Two more defects, found while writing the eval cases
base_form("causes")→"caus". The-essibilant rule fired on a stem ending in a singles; it must require a doubledss("passes" → "pass"), because a singlesis nearly always a stem ending inethat took a plain-s.pluralize("proof")→"prooves".f/fe→vesis not productive in English (proof→proofs, chief→chiefs, roof→roofs) — it is a closed set. Now derived aslexicon.VES_PLURAL_SINGULARSfrom thevesrows ofIRREGULAR_SINGULARS, so the rule cannot claim a word the table does not know.Phase 2B had put
pluralizeon the serving path, so this one was live — and the surface-hashing pin from #133 confirms no served surface moved. That guard's first real use.New construction C14
quantified_copular, 13 casesThe combination that was broken is the one never tested. Measured before: 152 corpus cases carry a quantifier and zero combine it with a copular predicate.
My first draft of those cases could not fail
must_contain/word_orderlisted quantifier, subject and object — but not the verb — soall molecules is defined a compoundpassed and reverting the fix left 47/47 green. Rewritten with the agreed verb in both constraints, plusreject_surfacescarrying the actual pre-fix output (computed by running the reverted code, not guessed):-esstem rulevessetThe 4 survivors of the first mutation are the mass-noun controls, which is correct —
all evidence is grounded in truthmust not pluralize.Same lesson as the lane pins in #133: a pin that cannot fail guards nothing, and the only way to know is to break the thing on purpose.
grammar_roundtripharvests its graph corpus from the committed case files, so it grew 280 → 293. Updated exactly rather than loosened to an inequality — a corpus that grows or shrinks should require a deliberate edit.[Verification]: in-worktree on CPython 3.12.13 with
uv sync --locked— agreement 26/26 (from 17/26);english_fluency_ood117/117 + 39/39 + dev 13/13 unchanged;grammatical_coveragev1 49/49;uv run core test --suite smoke -q621 passed (unchanged);--suite deductive -q405 passed;scripts/verify_lane_shas.py11/11, no pin edited._inflect_predicate applied base_form — a SINGLE-VERB function — to whole humanized predicate phrases, stripping the final word's last character class, and its plural branch never consulted `copular`. Nine of the 26 seed predicates came out wrong and every multi-word one did: is defined as -> "is defined a" want "are defined as" has the following ... -> "...step" want "have the following steps" belongs to -> "belongs to" want "belong to" causes -> "caus" want "cause" Root causes, both single-point as §1.4 predicted: 1. morphology.agree_plural_phrase inflects the HEAD (the finite verb is the first token of every humanized predicate) and carries the rest through. base_form stays single-verb and is PINNED as still wrong on a phrase, so nobody "fixes" the symptom in the wrong place. 2. The plural branch now agrees the phrase. The plural NEGATED branch had the same defect ("do not is defined a") and is fixed with it: a plural copula takes a bare "not", everything else takes do-support. Two further defects found while writing the eval cases, both fixed here: base_form("causes") -> "caus". The -es sibilant rule fired on a stem ending in a single "s"; it must require a doubled "ss" ("passes"->"pass"), because a single "s" is nearly always a stem ending in "e" that took a plain -s ("causes"->"cause"). pluralize("proof") -> "prooves". f/fe -> ves is NOT productive in English (proof->proofs, chief->chiefs, roof->roofs); it is a closed set. Now derived as lexicon.VES_PLURAL_SINGULARS from the ves-rows of IRREGULAR_SINGULARS, so the rule cannot claim a word the table does not know. Phase 2B had put pluralize on the SERVING path, so this one was live — and the surface-hashing pin from #133 confirms no served surface moved, which is that guard's first real use. New construction C14 quantified_copular, 13 cases: the combination that was broken was the one never tested. Measured before: 152 corpus cases carry a quantifier and ZERO combine it with a copular predicate. MY FIRST DRAFT OF THOSE CASES COULD NOT FAIL. must_contain/word_order listed quantifier, subject and object but NOT THE VERB, so "all molecules is defined a compound" passed and reverting the fix left 47/47 green. Rewritten with the agreed verb in both constraints plus reject_surfaces carrying the ACTUAL pre-fix output, computed by running the reverted code rather than guessed. Mutation now: baseline 13/13 C14 revert phrase-head agreement 4/13 revert -es stem rule 12/13 revert closed ves set 11/13 The 4 survivors of the first mutation are the mass-noun controls, which is correct — "all evidence is grounded in truth" must NOT pluralize. Same lesson as the lane pins in #133: a pin that cannot fail guards nothing, and the only way to know is to break the thing on purpose. grammar_roundtrip's graph corpus is harvested from the committed case files, so it grew 280 -> 293. Updated exactly rather than loosened to an inequality: a corpus that grows or shrinks should require a deliberate edit. [Verification]: in-worktree on CPython 3.12.13, uv sync --locked — agreement 26/26 (from 17/26); english_fluency_ood 117/117 + 39/39 + dev 13/13 unchanged; grammatical_coverage v1 49/49; smoke 621 unchanged; deductive 405; scripts/verify_lane_shas.py 11/11, no pin edited.