core/tests
Shay b5d6ad6510 feat(compositionality): compose_relations operator lifts lane 68.8% → 100%
Closes the residual `novel_pair_under_seen_relation` pattern that
neither `transitive_walk` nor `multi_relation_walk` could synthesise.

- new `compose_relations(triples, head, frame, relation)` operator —
  pure lookup, returns both `R(head, ?)` and `R(frame, ?)` tails
- new `FRAME_TRANSFER` intent + `_FRAME_TRANSFER_RE` regex tried
  before generic TRANSITIVE_QUERY so "in Y" isn't truncated; handles
  "X belong to in Y" → belongs_to normalisation
- pipeline wiring: `_maybe_compose_relations`, `_fold_compose_into_surface`,
  `_serialize_compose` (folded into operator_invocation so trace_hash
  stays bit-identical across replay)
- regression: inference_closure, multi_step_reasoning,
  cross_domain_transfer all still 100% on public + holdouts

discourse_paragraph v2:
- per-sentence grammar rubric (length, capitalization, subject
  alignment) gated on `require_per_sentence_grammar`
- scaling cases at 10 / 20 / 50 sentences — 3/3 pass, 100% per-sentence
- 3 runtime round-trip cases (`mode: runtime_roundtrip`) that prime
  vault, ask question, verify bit-identical across two fresh runtimes
- new `per_sentence_grammar_pass_rate` lane metric

Long-form replay benchmark (benchmarks/replay_vs_llm.py):
- `replay_determinism_report(prompts, runs, priming)` — CORE-only
- `compare_to_llm(prompts, llm_callable)` — BYO API client, no
  provider lock-in; reports per-prompt determinism on both sides
- ships with default cognition-pack prompts; 100% bit-identical at runs=3

Lanes green: cognition 121/121, runtime 19/19, teaching 17/17,
packs 6/6, compositionality 16/16 + 10/10, inference_closure 20/20 +
12/12, multi_step_reasoning 15/15 + 10/10, cross_domain_transfer
10/10 + 8/8, discourse_paragraph v1 12/12 + v2 6/6.
2026-05-16 22:44:06 -07:00
..
__init__.py
test_achat.py test(chat): achat() and arespond() smoke tests — surface, fields, OOV grace, structural determinism 2026-05-14 14:31:49 -07:00
test_alignment_graph.py Fix test suite errors across core physics and generation 2026-05-14 13:02:32 -07:00
test_architectural_invariants.py feat(algebra): null-preserving versor_apply path + un-skip 2 invariant tests 2026-05-16 21:40:37 -07:00
test_articulation.py fix(tests): align suite with persona-neutral strict-closure contract 2026-05-16 05:37:12 -07:00
test_articulation_realizer_v2.py Add articulation realizer v2 2026-05-14 20:14:50 -07:00
test_benchmarks_profiler.py feat(benchmarks): discourse_paragraph lane + pipeline profiler + word-selection tracer 2026-05-16 21:53:46 -07:00
test_cga_inner_rust_parity.py feat(adr-0020): parity gates for cga_inner, geometric_product, versor_condition, versor_apply 2026-05-16 20:37:58 -07:00
test_chat_runtime.py Bridge chat OOV grounding 2026-05-13 20:47:28 -07:00
test_cli.py fix(tests): align suite with persona-neutral strict-closure contract 2026-05-16 05:37:12 -07:00
test_cli_pack_validate_security.py Harden pack validator trust boundary 2026-05-15 11:50:15 -07:00
test_cli_test_suites.py Speed up validation lanes and pack loading 2026-05-15 08:26:11 -07:00
test_cognitive_eval_harness.py Add cognitive eval harness and calibration replay (#30) 2026-05-15 07:41:36 -07:00
test_cognitive_turn_pipeline.py Wire intent graph into cognitive pipeline 2026-05-14 20:05:00 -07:00
test_compiler.py feat(core_ingest): IngestPipeline, manifold integration, full test suite 2026-05-13 12:07:12 -07:00
test_compose_relations.py feat(compositionality): compose_relations operator lifts lane 68.8% → 100% 2026-05-16 22:44:06 -07:00
test_core_ingest.py
test_core_semantic_seed_pack.py feat(packs): en_core_cognition_v1 v1.2.0 - rhetoric/metaphor/narrative 2026-05-16 15:15:14 -07:00
test_determinism_proofs.py Restore FieldState slots in determinism proof 2026-05-13 14:26:24 -07:00
test_deterministic_hash.py feat: manifold field topology, graph diffusion operator, vertical pulse 2026-05-15 16:02:48 -07:00
test_dialogue.py fix(tests): align suite with persona-neutral strict-closure contract 2026-05-16 05:37:12 -07:00
test_dialogue_fluency_regression.py fix: harden session field invariants and eliminate hot-path inefficiencies 2026-05-15 21:37:49 -07:00
test_energy.py Tighten hot-path backend consistency 2026-05-15 08:14:38 -07:00
test_engine_loop_proof.py Tighten session node tracking and generation selection 2026-05-13 14:35:31 -07:00
test_epistemic_invariants.py feat(adr-0021): epistemic_status surface wired across teaching + trace 2026-05-16 20:20:35 -07:00
test_explain.py feat(phase3): core/cognition/explain.py — close Gap 3 introspection 2026-05-16 15:09:48 -07:00
test_generate_stream.py fix(tests): align suite with persona-neutral strict-closure contract 2026-05-16 05:37:12 -07:00
test_geometric_product_rust_parity.py feat(adr-0020): parity gates for cga_inner, geometric_product, versor_condition, versor_apply 2026-05-16 20:37:58 -07:00
test_graph_diffusion.py feat: manifold field topology, graph diffusion operator, vertical pulse 2026-05-15 16:02:48 -07:00
test_holonomy.py Align holonomy tests with indefinite metric 2026-05-13 12:59:32 -07:00
test_holonomy_resonance.py Implement trilingual field coherence 2026-05-13 19:53:37 -07:00
test_identity_gate.py fix(identity): close v3 paraphrase gap with two-layer override defense 2026-05-16 14:05:55 -07:00
test_inference_operators.py feat(phase3): multi_relation_walk closes Phase 3 v1 to 10/10 splits 2026-05-16 15:24:44 -07:00
test_intent_proposition_graph.py feat: add intent-proposition graph comprehension layer 2026-05-14 19:52:57 -07:00
test_language_pack_cache.py feat: vault recall index, Rust versor parity, cognitive pack expansion 2026-05-15 15:34:39 -07:00
test_language_pack_runtime.py Implement trilingual field coherence 2026-05-13 19:53:37 -07:00
test_manifold.py feat(core_ingest): IngestPipeline, manifold integration, full test suite 2026-05-13 12:07:12 -07:00
test_manifold_state.py feat: manifold field topology, graph diffusion operator, vertical pulse 2026-05-15 16:02:48 -07:00
test_morphology_irregular.py fix(gaps): close G1+G2+G3 + identity vocab + pipeline safety-stub honour 2026-05-16 21:21:06 -07:00
test_morphology_registry.py Implement trilingual field coherence 2026-05-13 19:53:37 -07:00
test_motor.py Fix full test suite after cognitive runtime 2026-05-13 13:52:11 -07:00
test_null_cone.py
test_oov_grounding_cache.py Cache OOV morphology grounding structures 2026-05-15 11:53:46 -07:00
test_operator_calibration_replay.py Add cognitive eval harness and calibration replay (#30) 2026-05-15 07:41:36 -07:00
test_pipeline.py feat(core_ingest): IngestPipeline, manifold integration, full test suite 2026-05-13 12:07:12 -07:00
test_pipeline_teaching_integration.py feat: wire teaching loop into cognitive pipeline 2026-05-14 20:46:50 -07:00
test_probe_repl.py Implement trilingual field coherence 2026-05-13 19:53:37 -07:00
test_proof_properties.py feat: Full Proof — surface realizer join, Rust diffusion parity, benchmark harness 2026-05-15 17:39:14 -07:00
test_proposition.py Add proposition generation 2026-05-13 20:08:49 -07:00
test_provenance.py feat(evals): provenance lane v1 — replay determinism + source back-pointers 2026-05-16 11:45:00 -07:00
test_pulse_integration.py feat: Full Proof — surface realizer join, Rust diffusion parity, benchmark harness 2026-05-15 17:39:14 -07:00
test_realizer_quantifier_agreement.py fix(gaps): close G1+G2+G3 + identity vocab + pipeline safety-stub honour 2026-05-16 21:21:06 -07:00
test_replay_vs_llm_benchmark.py feat(compositionality): compose_relations operator lifts lane 68.8% → 100% 2026-05-16 22:44:06 -07:00
test_reviewed_teaching_loop.py feat: add reviewed teaching loop for controlled correction learning 2026-05-14 20:32:28 -07:00
test_rotor_power.py fix(drift): proper rotor-manifold scaling; restore respond contract 2026-05-16 11:44:45 -07:00
test_runtime_config.py fix(tests): align suite with persona-neutral strict-closure contract 2026-05-16 05:37:12 -07:00
test_rust_backend.py feat(algebra): null-preserving versor_apply path + un-skip 2 invariant tests 2026-05-16 21:40:37 -07:00
test_salience.py fix(tests): align suite with persona-neutral strict-closure contract 2026-05-16 05:37:12 -07:00
test_segmenter.py feat(core_ingest): IngestPipeline, manifold integration, full test suite 2026-05-13 12:07:12 -07:00
test_semantic_realizer_integration.py fix(gaps): close G1+G2+G3 + identity vocab + pipeline safety-stub honour 2026-05-16 21:21:06 -07:00
test_sensorium_mount.py feat: scaffold sensorium/ (ADR-0013) + tests/test_architectural_invariants.py + tests/test_sensorium_mount.py 2026-05-13 11:45:16 -07:00
test_session_coherence.py fix(session): CGA-only hemisphere consistency, remove forbidden Euclidean metric 2026-05-15 21:51:16 -07:00
test_surface.py test(surface): full unit test suite for SentenceAssembler — roles, guard, elaboration, languages, determinism 2026-05-14 14:29:46 -07:00
test_transition_rotor.py fix(algebra): enforce transition rotor invariants 2026-05-15 21:13:14 -07:00
test_unknown_token_ingest.py Ground unknown tokens in ingest 2026-05-13 20:33:20 -07:00
test_vault_config.py fix(tests): align suite with persona-neutral strict-closure contract 2026-05-16 05:37:12 -07:00
test_vault_recall.py Activate and verify Rust backend 2026-05-13 22:23:48 -07:00
test_vault_recall_rust_parity.py feat(rust-parity): vault_recall first surface — bit-identity gate passes 2026-05-16 17:14:22 -07:00
test_vault_recall_vectorised.py feat(phase4): long-context-cost lane + ADR-0019 Stage 1 vault recall vectorisation 2026-05-16 16:39:30 -07:00
test_vault_store.py feat: vault recall index, Rust versor parity, cognitive pack expansion 2026-05-15 15:34:39 -07:00
test_versor_apply_rust_parity.py perf(rust): versor_apply f64 parity port — 29x over Python, bit-identical 2026-05-16 20:43:01 -07:00
test_versor_closure.py feat(algebra): null-preserving versor_apply path + un-skip 2 invariant tests 2026-05-16 21:40:37 -07:00
test_versor_condition_rust_parity.py feat(adr-0020): parity gates for cga_inner, geometric_product, versor_condition, versor_apply 2026-05-16 20:37:58 -07:00
test_vocab_manifold_invariants.py Fail closed on invalid versor construction 2026-05-14 10:55:11 -07:00