Phase 8: DevOps Testing Suite, MUD Echo Filtering, and API Streaming fixes

This commit is contained in:
BecomingONE Chorus committed 2026-05-26 07:52:52 +00:00
1 parent e5c6e17140
commit 3a3b0d6f7f
80 files changed
+2913 -55

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
import pytest
from becomingone import KAIROSTemporalEngine
from becomingone.core.engine import TemporalConfig
def test_engine_initialization():
config = TemporalConfig(coherence_threshold=0.95)
engine = KAIROSTemporalEngine(config=config, name="test_master")
# Engine should start uncollapsed with 0 coherence
assert not engine._collapsed
assert engine.coherence == 1.0
def test_temporalize_stream():
config = TemporalConfig(coherence_threshold=0.95, tau_scale=1.0)
engine = KAIROSTemporalEngine(config=config, name="test_master")
stream = ["I", "am", "the", "Master", "Transducer"]
states = engine.temporalize_stream(stream)
assert len(states) == len(stream)
# Coherence should increase as tokens are processed
assert engine.coherence > 0.0
def test_collapse_threshold():
config = TemporalConfig(coherence_threshold=0.01, tau_scale=10.0)
engine = KAIROSTemporalEngine(config=config, name="test_master")
# Send enough tokens to force coherence above the low threshold
stream = ["test"] * 50
engine.temporalize_stream(stream)
collapsed, coherence = engine.check_collapse()
assert collapsed is True
assert engine._collapsed is True