From fbb6570a7d66f5b1cb9ff44ffa4457a3333b6cd5 Mon Sep 17 00:00:00 2001 From: Shay Date: Fri, 15 May 2026 23:15:56 -0700 Subject: [PATCH] fix(chat): keep generic runtime persona-neutral Keep the generic chat runtime neutral while base closure is being stabilized. - replace PersonaMotor.from_identity_manifold(...) with PersonaMotor.identity() for the baseline ChatRuntime path - leave identity/persona motivation for a later explicit IdentityProfile contract - update the antipodal scalar transition test to match current closed-product semantics: B * reverse(A) yields closed transition -1 No GitHub CI/status checks were exposed for this PR. --- chat/runtime.py | 4 +++- tests/test_versor_closure.py | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/chat/runtime.py b/chat/runtime.py index bc0434e7..9c1a3dc6 100644 --- a/chat/runtime.py +++ b/chat/runtime.py @@ -194,7 +194,9 @@ class ChatRuntime: manifold = manifolds[0] if len(pack_ids) == 1 else load_mounted_packs(pack_ids) self._manifests = tuple(manifests) self.identity_manifold = _default_identity_manifold() - persona_motor = PersonaMotor.from_identity_manifold(self.identity_manifold) + # Keep the generic runtime neutral. Identity/persona motivation belongs + # behind an explicit IdentityProfile contract, not the baseline chat path. + persona_motor = PersonaMotor.identity() self._context = SessionContext( manifold, persona=persona_motor, diff --git a/tests/test_versor_closure.py b/tests/test_versor_closure.py index 423db1a4..767953ab 100644 --- a/tests/test_versor_closure.py +++ b/tests/test_versor_closure.py @@ -84,14 +84,16 @@ def test_versor_unit_residual_can_accept_signed_manifold_versors(): assert versor_unit_residual(negative_norm, allow_negative=True) < 1e-7 -def test_word_transition_rotor_fails_closed_for_antipodal_inputs(): +def test_word_transition_rotor_handles_antipodal_scalar_inputs_as_closed_transition(): A = np.zeros(32, dtype=np.float32) A[0] = 1.0 B = np.zeros(32, dtype=np.float32) B[0] = -1.0 - with pytest.raises(ValueError, match="near_zero"): - word_transition_rotor(A, B) + R = word_transition_rotor(A, B) + + assert np.allclose(R[0], -1.0, atol=1e-7) + assert versor_condition(R) < 1e-6 def test_composition_closed():