core/tests
Shay 948cca44e6 feat(phase3): multi_relation_walk closes Phase 3 v1 to 10/10 splits
Closes the mixed_relation_* (multi-step-reasoning) and composed_predicate
(compositionality) residuals with a single new operator plus a small
intent-classifier loosening. Both residuals shared an underlying shape:
walk any outgoing relation edge from the head, regardless of which
relation predicate appears at each step.

generate/operators.py:
  multi_relation_walk(triples, head, *, max_hops=5) -> WalkResult
    Walks any outgoing edge from head, accumulating a path across
    mixed relation types. Returns WalkResult with relation="<mixed>"
    so trace_hash records the cross-relation provenance explicitly.
    Deterministic, cycle-safe, first-write-wins on duplicate heads
    (across any relation).

generate/intent.py:
  _TRANSITIVE_QUERY_RE relaxed from a closed verb enumeration to any
  single verb-like word. "What does X (any verb)?" now routes to
  TRANSITIVE_QUERY consistently; unrecognised relations are handled
  by the pipeline's multi_relation_walk fallback rather than falling
  through to UNKNOWN. Verified no regression on 30 intent / realizer
  tests.

core/cognition/pipeline.py:
  _maybe_transitive_walk now does precision-first dispatch on
  TRANSITIVE_QUERY: try transitive_walk(relation) literal-match
  first, fall back to multi_relation_walk only when the literal
  walk returns a singleton. DEFINITION intents do not fall back
  (would be too permissive for "What is X?").

tests/test_inference_operators.py: 6 new TestMultiRelationWalk
tests covering single-relation pass-through, cross-relation walks,
cycle termination, max_hops truncation, and determinism.

Phase 3 v1 re-score:

  lane                       split        v1     v2     v3 (now)
  inference-closure          public       0.0    1.0    1.0  pass
  inference-closure          holdouts     0.0    1.0    1.0  pass
  multi-step-reasoning       public       0.0    0.73   1.0  pass
  multi-step-reasoning       holdouts     0.0    0.80   1.0  pass
  compositionality           public       0.06   0.31   0.69 pass
  compositionality           holdouts     0.0    0.30   0.80 pass
  cross-domain-transfer      public       0.0    1.0    1.0  pass
  cross-domain-transfer      holdouts     0.0    1.0    1.0  pass
  introspection              public       0.0    1.0    1.0  pass
  introspection              holdouts     0.0    1.0    1.0  pass

PHASE 3 v1 IS COMPLETE: 10 of 10 splits passing. Phase 3 exit gate
(>= 2 lanes passing v1 by phase exit) is satisfied five times over.
Foundation guarantees (premises_stored_rate, replay_determinism)
remain 1.0 across all lanes. Trace_hash bit-stability preserved
with operator invocation records folded in per ADR-0018.

Compositionality public at 0.69 / holdouts at 0.80 - the residual
failures are the novel_pair_under_seen_relation / novel_relation_on_seen_pair
cases whose contract authoring is itself ambiguous (the leakage
check in the v1 contract fires by design on those patterns). Those
are contract-refinement candidates for v2 of that lane, not
engineering work. Overall_pass threshold (>= 0.50) is comfortably
met on both splits.

CLI suites smoke / cognition / teaching / packs all pass; 53
operator+teaching+pipeline tests green; no regression.
2026-05-16 15:24:44 -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 fix(tests): align suite with persona-neutral strict-closure contract 2026-05-16 05:37:12 -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_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
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
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
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_graph_diffusion.py feat: manifold field topology, graph diffusion operator, vertical pulse 2026-05-15 16:02:48 -07:00
test_holonomy.py
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
test_manifold_state.py feat: manifold field topology, graph diffusion operator, vertical pulse 2026-05-15 16:02:48 -07:00
test_morphology_registry.py Implement trilingual field coherence 2026-05-13 19:53:37 -07:00
test_motor.py
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
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_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 fix(tests): align suite with persona-neutral strict-closure contract 2026-05-16 05:37:12 -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
test_semantic_realizer_integration.py feat: vault recall index, Rust versor parity, cognitive pack expansion 2026-05-15 15:34:39 -07:00
test_sensorium_mount.py
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_store.py feat: vault recall index, Rust versor parity, cognitive pack expansion 2026-05-15 15:34:39 -07:00
test_versor_closure.py fix(chat): keep generic runtime persona-neutral 2026-05-15 23:15:56 -07:00
test_vocab_manifold_invariants.py Fail closed on invalid versor construction 2026-05-14 10:55:11 -07:00