core/generate
Shay ef7d59287b
rigor(intent): consistent subject normalization across all classifier paths (#93)
Comb pass 2026-05-21 (item 16).

Pre-fix ``classify_intent`` applied ``_normalize_subject`` only to
DEFINITION / CAUSE / VERIFICATION paths.  COMPARISON, FRAME_TRANSFER,
TRANSITIVE_QUERY (non-"means" branch), and BELONG_QUERY returned
bare ``.strip()`` subjects.  A probe like *"Compare the parent and
a child"* would carry the articles ("the parent", "a child") into
the subject slot, breaking downstream pack-resolver lookups that
key on bare lemmas.

Fix: apply ``_normalize_subject(..., IntentTag.DEFINITION)`` at every
classifier return site that was previously bare ``.strip()``.
DEFINITION mode preserves multi-word noun phrases (only strips
leading articles + trailing punctuation + infinitive markers); the
aux-verb stripping that's only meaningful for CAUSE/VERIFICATION
stays scoped to those paths.

Sites fixed (5):

  * COMPARISON subject + secondary_subject
  * FRAME_TRANSFER subject + frame
  * TRANSITIVE_QUERY subject (both the regular and "means" → DEFINITION
    redirect branches now share one normalized binding)
  * BELONG_QUERY subject

Behavior:

  * Eval cases without articles (the entirety of cognition v1) are
    byte-identical: ``"memory"`` and ``"recall"`` survive
    ``_normalize_subject`` unchanged.
  * Multi-word noun phrases survive intact: ``"artificial
    intelligence"`` is preserved (no aux-verb-strip wrongly trimming
    to head-noun).
  * Article-prefixed subjects ("the parent") now strip consistently
    with the DEFINITION path that's done so since ADR-0049.

Validation:

  * 7 new tests in
    ``tests/test_intent_subject_normalization_consistency.py``
    pin the consistency contract across COMPARISON, FRAME_TRANSFER,
    TRANSITIVE_QUERY, BELONG_QUERY, DEFINITION (regression guard
    on the pre-existing path), and CAUSE (regression guard on the
    aux-verb-strip behavior).
  * ``core eval cognition`` byte-identical across all three splits:
    public 100/100/91.7/100, dev 100/100/78.6/100, holdout
    100/100/83.3/100.
  * ``core test --suite cognition`` 120/0/1, ``smoke`` 67/0.
  * ``pytest -k intent`` 229/0.
2026-05-20 20:44:19 -07:00
..
__init__.py chore(generate): delete unreachable agenerate (#90) 2026-05-20 19:59:28 -07:00
admissibility.py feat(adr-0026): Phase 3 — ranked admissibility with margin 2026-05-17 15:03:03 -07:00
articulation.py
articulation_legality.py feat(realizer): C1.5 — articulation legality at the realizer boundary 2026-05-20 11:11:28 -07:00
attention.py Add ADR-0008 salience attention 2026-05-13 22:40:36 -07:00
bridge_trace.py Phase 1 — bridge trace instrumentation (observation-only) 2026-05-18 18:04:57 -07:00
dialogue.py Fix test suite errors across core physics and generation 2026-05-14 13:02:32 -07:00
discourse_planner.py feat(intent): normalize confirmation-tag propositions (#45) 2026-05-19 22:55:28 -07:00
exhaustion.py feat(adr-0025): Phase 4 — rotor / frame admissibility at the seam 2026-05-17 15:16:32 -07:00
graph_constraint.py fix(adr-0046): make forward-graph-constraint branch mergeable 2026-05-18 05:57:46 -07:00
graph_planner.py perf(graph): PropositionGraph.topo_order — Kahn's O(N+E) instead of O(N×E) (#92) 2026-05-20 20:37:21 -07:00
grounding_accessors.py feat(grounding): structured GroundedFact accessors for discourse planner 2026-05-19 11:19:59 -07:00
intent.py rigor(intent): consistent subject normalization across all classifier paths (#93) 2026-05-20 20:44:19 -07:00
intent_bridge.py Phase 2 — proposition-slot grounding for articulate_with_intent 2026-05-18 18:18:31 -07:00
intent_ratifier.py chore(ratifier): calibrate default ratification threshold 0.0 → 0.5 (#86) 2026-05-20 19:59:25 -07:00
morphology.py fix(gaps): close G1+G2+G3 + identity vocab + pipeline safety-stub honour 2026-05-16 21:21:06 -07:00
operators.py feat(compositionality): compose_relations operator lifts lane 68.8% → 100% 2026-05-16 22:44:06 -07:00
proposition.py feat(adr-0022): Forward Semantic Control — Accepted 2026-05-17 12:10:20 -07:00
realizer.py perf(cognition): hot-path comb pass — 5 mechanical-sympathy fixes (#91) 2026-05-20 20:31:56 -07:00
realizer_guard.py feat(coherence): ADR-0075 — realizer slot-type guard (C1) 2026-05-19 22:35:09 -07:00
render.py
result.py feat(adr-0023): Forward Semantic Control proof evidence — Accepted 2026-05-17 12:55:19 -07:00
rotor_admissibility.py feat(adr-0025): Phase 4 — rotor / frame admissibility at the seam 2026-05-17 15:16:32 -07:00
salience.py Implement core physics and pack validation 2026-05-14 12:35:19 -07:00
semantic_templates.py feat: vault recall index, Rust versor parity, cognitive pack expansion 2026-05-15 15:34:39 -07:00
stream.py chore(generate): make stop-tokens caller-overridable via RuntimeConfig (#87) 2026-05-20 19:59:33 -07:00
surface.py feat(surface): ADR-0031 — score-decomposition surface (per-axis hedges) 2026-05-17 20:16:22 -07:00
templates.py feat(realizer): C1.5 — articulation legality at the realizer boundary 2026-05-20 11:11:28 -07:00