core/tests
Shay 2342564883
feat(ADR-0136.S.4): novel-initial-form parser extension + rescan v4 (#210)
S.4 extends initial-state parsing with two closed subject-slot widenings:
- Indefinite-article: `A <noun> has N <unit>` (gsm8k-0046 sentence 1)
- Prepositional-prefix existential: `In a <place>, there are N <unit>...`
  (gsm8k-0038 sentence 1)

Design choice: sibling regexes (_INITIAL_HAS_INDEF_RE,
_INITIAL_THERE_ARE_PREFIX_RE) rather than widening the global _ENTITY
pattern — preserves existing behavior across all other initial-state
extractors (cascade-safety).

Per the S.x corridor discipline: no new short-circuit; new candidates
flow through extract_initial_candidates and the existing graph machinery.
No solver/graph/verifier changes.

Honest delta:
- Direct admissions: 0 (admission set unchanged at {0014, 0018, 0042})
- Barrier shifts: +2 (gsm8k-0038: novel_initial_form → compound_comparative;
  gsm8k-0046: novel_initial_form → fraction_operand)
- wrong == 0 on every lane

Bundled with this PR for ledger currency:

1. tests/test_rescan_v3_invariants.py refactored to read frozen on-disk
   v3 artifacts only (no more re-running build_rescan against live
   parser). The previous design tied a historical snapshot to live code
   and broke the moment any new phase landed.

2. rescan_v4.py + refusal_rescan_v4.json + refusal_taxonomy_v4.json +
   tests/test_rescan_v4_invariants.py — the current live snapshot.
   Shifts: exactly 2 (0038, 0046). Same pattern as v3.

Sonnet wrote: S.4 parser/axis-lane/tests/ADR.
Opus wrote: rescan_v4.py + v3 test refactor + bundling.

Files:
- generate/math_candidate_parser.py (+142 lines)
- evals/math_capability_axes/S4_novel_initial_form/v1/ (20-case lane)
- tests/test_adr_0136_S4_novel_initial_form.py (40 tests)
- docs/decisions/ADR-0136.S.4-novel-initial-form.md
- evals/gsm8k_math/train_sample/v1/{rescan_v4.py, *_v4.json}
- tests/test_rescan_v4_invariants.py (8 tests)
- tests/test_rescan_v3_invariants.py (refactored to artifact-only)
2026-05-23 22:34:51 -07:00
..
formation
__init__.py
test_achat.py
test_admissibility_trace.py
test_adr_0084_definitional_substrate.py
test_adr_0084_integration_closure.py
test_adr_0085_gloss_aware_cause.py
test_adr_0087_procedure_selector.py
test_adr_0087_rhetorical_style_substrate.py
test_adr_0097_mathematics_logic_ratification.py
test_adr_0100_0102_sibling_ratifications.py
test_adr_0110_math_expert_demo.py
test_adr_0111_physics_expert_demo.py
test_adr_0114a_2_ood_ratio.py feat(ADR-0114a.2): OOD-ratio auditor — Obligation #2 wired for B3, ratio=1.00 (#193) 2026-05-23 16:25:28 -07:00
test_adr_0114a_5_perturbation.py
test_adr_0114a_6_depth_curve.py feat(ADR-0114a.6): depth-curve auditor — Obligation #6 wired for B3 (assertion holds, coverage gap named) (#190) 2026-05-23 16:19:58 -07:00
test_adr_0114a_8_adversarial.py feat(ADR-0114a.8): adversarial auditor — Obligation #8 wired, PASSING; surfaces 2 known parser-layer gaps (#192) 2026-05-23 16:11:37 -07:00
test_adr_0114a_10_pack_provenance.py
test_adr_0119_1_sealed_holdout.py
test_adr_0119_4_frontier_baseline.py
test_adr_0119_5_adversarial.py
test_adr_0119_6_depth_curve.py
test_adr_0119_7_sealed_gsm8k.py
test_adr_0119_8_lane_gate.py
test_adr_0120_math_expert_promotion.py feat(ADR-0120 math, ledger flip): mathematics_logic → expert tier (first-ever) (#195) 2026-05-23 18:55:34 -07:00
test_adr_0121_math_expert_deferred.py
test_adr_0122_deferral.py
test_adr_0122_rate_per_unit.py
test_adr_0123_comparison_phrasing.py
test_adr_0124_systems_software_audit_passed.py
test_adr_0126_runner_wiring.py
test_adr_0126_train_sample_runner.py
test_adr_0127_loader.py
test_adr_0127_pack_ratification.py
test_adr_0128_loader.py
test_adr_0128_numeric_formats.py
test_adr_0128_pack_ratification.py
test_adr_0131_1_F_frontier.py
test_adr_0131_1_sealed_holdout.py
test_adr_0131_1_symbolic_equivalence_lane.py
test_adr_0131_2_teaching_corpus_lane.py
test_adr_0131_3_bounded_grammar_lane.py
test_adr_0131_4_composite_math_gate.py
test_adr_0131_G1_verb_classes.py
test_adr_0131_G2_comparatives.py fix(ADR-0131.G.2): rebase + mastery hardening — quarter/third fraction anchors, gate regex, boundary refusals (#196) 2026-05-23 19:28:09 -07:00
test_adr_0131_G3_numerics.py
test_adr_0131_G4_multi_clause.py
test_adr_0131_G5_aggregate.py feat(ADR-0131.G.5): aggregate answer composition — combined/together cues wired, axis lane 20/20, wrong==0 (#197) 2026-05-23 19:42:55 -07:00
test_adr_0131_G31_numerics_extensions.py
test_adr_0131_G_gsm8k_coverage_probe.py
test_adr_0136_S1_rate_events.py feat(ADR-0136.S.0): context-sentence classifier — skip no-digit sentences, gsm8k-0018 admits (#202) 2026-05-23 20:51:47 -07:00
test_adr_0136_S2_conditional_op.py feat(ADR-0136.S.2): conditional-op question — gsm8k-0042 admits, wrong==0 (#203) 2026-05-23 21:20:52 -07:00
test_adr_0136_S3_compound_initial_mutation.py feat(ADR-0136.S.3): compound initial-mutation extractor — one shape, gsm8k-0010 barrier shift, wrong==0 (#207) 2026-05-23 21:58:55 -07:00
test_adr_0136_S4_novel_initial_form.py feat(ADR-0136.S.4): novel-initial-form parser extension + rescan v4 (#210) 2026-05-23 22:34:51 -07:00
test_alignment_graph.py
test_anaphora.py
test_anchor_lens_cli.py
test_anchor_lens_engagement_unit.py
test_anchor_lens_lifts_proposition.py
test_anchor_lens_no_glyph_leak.py
test_anchor_lens_null_lift.py
test_anchor_lens_pack_loader.py
test_anchor_lens_pack_seam.py
test_anchor_lens_telemetry.py
test_anchor_lens_tour_demo.py
test_anti_regression_demo.py
test_architectural_invariants.py
test_articulation.py
test_articulation_bench.py
test_articulation_demo.py
test_articulation_legality.py
test_articulation_quality_e2e.py
test_articulation_quality_miner.py
test_articulation_realizer_v2.py
test_audit_tour.py
test_benchmarks_profiler.py
test_binding_graph_adapter.py
test_binding_graph_adapter_question_target.py
test_binding_graph_adapter_units.py
test_binding_graph_admissibility.py
test_binding_graph_model.py
test_binding_graph_question_target.py
test_binding_graph_units.py
test_capability_cli.py
test_capability_reports.py
test_cga_inner_rust_parity.py
test_chat_runtime.py
test_claims_md_is_current.py
test_cli.py
test_cli_demo.py
test_cli_pack_validate_security.py
test_cli_test_suites.py
test_cognition_eval_register_matrix.py
test_cognitive_eval_harness.py
test_cognitive_turn_pipeline.py
test_cold_start_grounding_lane.py
test_comb_pass_hot_path.py
test_compiler.py
test_compose_relations.py
test_composed_surface.py
test_composer_graph_atom_equivalence.py
test_compound_intent.py
test_compound_intent_substrate.py
test_compound_walkthrough_eval_lanes.py
test_contemplation.py
test_contemplation_loop.py
test_contemplation_pipeline_convergence.py
test_contemplation_wiring.py
test_conversation_demo.py
test_core_ingest.py
test_core_semantic_seed_pack.py
test_correction_cue_prefix_routing.py
test_correction_telemetry.py
test_correction_topic_lemma.py
test_cross_pack_chains.py
test_cross_pack_grounding.py
test_cross_pack_supersede.py
test_curriculum_proposals.py
test_demo_composition.py
test_determinism_proofs.py
test_deterministic_fluency_lane.py
test_deterministic_hash.py
test_dialogue.py
test_dialogue_fluency_regression.py
test_discourse_planner_behavior.py
test_discourse_planner_compound.py
test_discourse_planner_contract.py
test_discourse_planner_helper.py
test_discourse_planner_reflective.py
test_discourse_planner_render.py
test_discourse_planner_walkthrough.py
test_discovery_candidates.py
test_domain_contract_predicates.py
test_domain_pack_contract.py
test_en_collapse_anchors_v1_pack.py
test_en_core_action_v1_pack.py
test_en_core_attitude_v1_pack.py
test_en_core_causation_v1_pack.py
test_en_core_meta_v1_pack.py
test_en_core_polarity_v1_pack.py
test_en_core_quantitative_v1_pack.py
test_en_core_relations_v1_pack.py
test_en_core_relations_v2_pack.py
test_en_core_spatial_v1_pack.py
test_en_core_temporal_v1_pack.py
test_energy.py
test_engine_loop_proof.py
test_epistemic_invariants.py
test_ethics_check.py
test_ethics_packs.py
test_ethics_refusal_opt_in.py
test_eval_holdout_split.py
test_expert_demo_contract.py
test_expert_demo_runnable.py
test_explain.py
test_fabrication_control_runner.py
test_forward_graph_constraint_null_lift.py
test_forward_graph_constraint_wiring.py
test_forward_semantic_control.py
test_frontier_compare_cross_provider.py
test_frontier_compare_wave1.py
test_frontier_model_registry_pricing.py
test_generate_stream.py
test_geometric_product_rust_parity.py
test_graph_constraint.py
test_graph_diffusion.py
test_graph_topo_order_perf.py
test_grounding_accessors.py
test_grounding_source_characterization.py
test_gsm8k_math_runner.py
test_hedge_injection.py
test_holdout_encryption.py
test_holonomy.py
test_holonomy_resonance.py
test_identity_gate.py
test_identity_packs.py
test_identity_score_decomposition.py
test_identity_surface_divergence.py
test_identity_surface_divergence_depth.py
test_inference_operators.py
test_inner_loop_admissibility.py
test_inner_loop_phase2.py
test_inner_loop_phase3.py
test_inner_loop_phase4.py
test_intent_classification_extensions.py
test_intent_explain_paragraph.py
test_intent_proposition_graph.py
test_intent_ratifier.py
test_intent_subject_extraction.py
test_intent_subject_normalization_consistency.py
test_lane_sha_verifier.py
test_lane_shape_thresholds.py
test_language_pack_cache.py
test_language_pack_load_safety.py
test_language_pack_runtime.py
test_learning_loop_demo.py
test_long_context_comparison.py
test_manifold.py
test_manifold_state.py
test_margin_admissibility.py
test_math_candidate_graph.py
test_math_candidate_parser.py
test_math_parser.py
test_math_problem_graph.py
test_math_realizer.py
test_math_roundtrip.py
test_math_solver.py
test_math_symbolic_equivalence.py
test_math_symbolic_normalizer.py
test_math_verifier.py
test_mathlogic_expert_ledger_flip.py feat(ADR-0120 math, ledger flip): mathematics_logic → expert tier (first-ever) (#195) 2026-05-23 18:55:34 -07:00
test_medical_clinical_ethics_pack.py
test_miner_proposals.py
test_morphology_irregular.py
test_morphology_registry.py
test_motor.py
test_multi_sentence_response_eval.py
test_mutation_proposal_type.py
test_narrative_example_intents.py
test_null_cone.py
test_ood_surface_generator.py
test_oov_grounding_cache.py
test_oov_pipeline.py
test_oov_surface.py
test_operator_calibration_replay.py
test_orthogonality_tour_demo.py
test_pack_glosses_content.py
test_pack_grounded_comparison.py
test_pack_grounded_correction.py
test_pack_grounded_unknown.py
test_pack_grounding.py
test_pack_measurements_phase2.py
test_pack_resolver.py
test_pack_resolver_glosses.py
test_partial_surface.py
test_perturbation_suite.py
test_phase5_corpus.py
test_phase6_demo.py
test_pipeline.py
test_pipeline_teaching_integration.py
test_plan_contemplation.py
test_plan_contemplation_runtime.py
test_plan_metrics.py
test_plan_metrics_runtime.py
test_probe_repl.py
test_procedure_surface.py
test_prompt_diversity_runner.py
test_proof_properties.py
test_proposal_source.py
test_proposition.py
test_provenance.py
test_public_showcase.py
test_pulse_integration.py
test_ratification_threshold_default.py
test_realizer_grounded_authority_flag.py
test_realizer_guard_holdout.py
test_realizer_guard_runtime_seam.py
test_realizer_guard_unit.py
test_realizer_quantifier_agreement.py
test_refusal_contract.py
test_register_cli.py
test_register_firing_diagnostic.py
test_register_invariant_grounding.py
test_register_layering_separation.py
test_register_null_lift.py
test_register_pack_convivial_v1.py
test_register_pack_loader.py
test_register_pack_seam.py
test_register_pack_terse_v1.py
test_register_runtime_threading.py
test_register_substantive_consumption.py
test_register_telemetry.py
test_register_tour_demo.py
test_register_tour_gate_strengthening.py
test_register_variation.py
test_relations_chains_v1.py
test_replay_vs_llm_benchmark.py
test_rescan_v2_invariants.py audit(ADR-0136.S.2): refusal rescan v2 — barrier-shift ledger, subsumption directive pinned (#205) 2026-05-23 21:43:25 -07:00
test_rescan_v3_invariants.py feat(ADR-0136.S.4): novel-initial-form parser extension + rescan v4 (#210) 2026-05-23 22:34:51 -07:00
test_rescan_v4_invariants.py feat(ADR-0136.S.4): novel-initial-form parser extension + rescan v4 (#210) 2026-05-23 22:34:51 -07:00
test_response_mode_classifier.py
test_reviewed_teaching_loop.py
test_reviewer_registry.py
test_rotor_admissibility.py
test_rotor_power.py
test_runtime_config.py
test_runtime_config_passthrough.py
test_runtime_config_register.py
test_rust_backend.py
test_safe_display.py
test_safety_check.py
test_safety_pack.py
test_safety_refusal.py
test_salience.py
test_salience_vectorize_parity.py
test_segmenter.py
test_semantic_realizer_integration.py
test_sensorium_mount.py
test_session_coherence.py
test_speculative_subject_lifecycle.py
test_stop_tokens_override.py
test_supersede.py
test_supersession_history.py
test_surface.py
test_surface_resolution.py
test_teaching_audit.py
test_teaching_gaps.py
test_teaching_grounding.py
test_teaching_loop_bench.py
test_teaching_promotion.py
test_teaching_proposals.py
test_telemetry_fanout_and_summary.py
test_telemetry_sink.py
test_thread_context.py
test_transition_rotor.py
test_transitive_surface.py
test_turn_loop_verdicts.py
test_turn_verdicts_bundle.py
test_unified_ingest_null_lift.py
test_unknown_token_ingest.py
test_vault_config.py
test_vault_recall.py
test_vault_recall_indexing_batch.py
test_vault_recall_rust_parity.py
test_vault_recall_vectorised.py
test_vault_store.py
test_versor_apply_rust_parity.py
test_versor_closure.py
test_versor_condition_rust_parity.py
test_vocab_manifold_invariants.py
test_warmed_session_lane.py