fix(generate): plural-subject agreement, 26/26 (Phase 3) #134

Merged
core-labs merged 1 commit from fix/predicate-agreement into main 2026-07-27 17:12:14 +00:00
Owner

Phase 3 of docs/plans/grammar-unification-2026-07-26.md. 26/26 against the hand-written oracle, from 17/26.

_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 were wrong, and every multi-word one was:

is defined as            -> "is defined a"          want "are defined as"
has the following steps  -> "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 more defects, found while writing the eval cases

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

  • pluralize("proof")"prooves". f/feves 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. That guard's first real use.

New construction C14 quantified_copular, 13 cases

The 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_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, not guessed):

reverted fix C14
baseline 13/13
phrase-head plural agreement 4/13
-es stem rule 12/13
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 harvests 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_ood 117/117 + 39/39 + dev 13/13 unchanged; grammatical_coverage v1 49/49; uv run core test --suite smoke -q 621 passed (unchanged); --suite deductive -q 405 passed; scripts/verify_lane_shas.py 11/11, no pin edited.

Phase 3 of `docs/plans/grammar-unification-2026-07-26.md`. **26/26** against the hand-written oracle, from 17/26. `_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 were wrong, and **every multi-word one was**: ``` is defined as -> "is defined a" want "are defined as" has the following steps -> "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 more defects, found while writing the eval cases - **`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`. - **`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. That guard's first real use. ## New construction C14 `quantified_copular`, 13 cases The 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_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, not guessed): | reverted fix | C14 | |---|---| | baseline | **13/13** | | phrase-head plural agreement | **4/13** | | `-es` stem rule | **12/13** | | 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` harvests 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_ood` **117/117 + 39/39** + dev 13/13 unchanged; `grammatical_coverage` v1 **49/49**; `uv run core test --suite smoke -q` **621 passed** (unchanged); `--suite deductive -q` **405 passed**; `scripts/verify_lane_shas.py` **11/11**, no pin edited.
core-labs added 1 commit 2026-07-27 17:12:05 +00:00
_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.
core-labs merged commit bb82029e8d into main 2026-07-27 17:12:14 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: core-labs/core#134
No description provided.