From 5dc447fe6ce027b2e12f43bb900c80f3937707a0 Mon Sep 17 00:00:00 2001 From: transcrilive Date: Sun, 10 May 2026 03:17:42 +0200 Subject: [PATCH] test: add T=1/T=2 integration smoke tests against real ZAYA1-8B Q4 --- tests/test_integration_smoke.py | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/test_integration_smoke.py diff --git a/tests/test_integration_smoke.py b/tests/test_integration_smoke.py new file mode 100644 index 0000000..7d04a75 --- /dev/null +++ b/tests/test_integration_smoke.py @@ -0,0 +1,39 @@ +import pytest + + +@pytest.mark.integration +def test_t1_n2_real_zaya_smoke(tmp_path): + """T=1 N=2 on a tiny prompt — should produce non-empty text + complete audit.""" + from markovian_rsa_mlx import MarkovianRSAOrchestrator, RSAConfig + + orch = MarkovianRSAOrchestrator.from_pretrained("kyr0/zaya1-base-8b-MLX") + cfg = RSAConfig( + rounds=1, parallel=2, aggregation_subsample=2, + chunk_tokens=128, tail_tokens=32, serial=True, seed=0, + ) + audit_path = tmp_path / "audit.jsonl" + text, result = orch.solve("What is the capital of France?", + config=cfg, return_audit=True, audit_path=audit_path) + assert isinstance(text, str) + assert len(text) > 0 + assert audit_path.exists() + audit_lines = audit_path.read_text().strip().split("\n") + assert len(audit_lines) >= 5 + assert result.stats.total_generated_tokens > 0 + + +@pytest.mark.integration +def test_t2_n2_real_zaya_smoke(tmp_path): + """T=2 N=2 sanity — same prompt should produce final text after aggregation.""" + from markovian_rsa_mlx import MarkovianRSAOrchestrator, RSAConfig + + orch = MarkovianRSAOrchestrator.from_pretrained("kyr0/zaya1-base-8b-MLX") + cfg = RSAConfig( + rounds=2, parallel=2, aggregation_subsample=2, + chunk_tokens=128, tail_tokens=32, serial=True, seed=0, + ) + text, result = orch.solve("Compute 7*8.", config=cfg, return_audit=True, + audit_path=tmp_path / "audit.jsonl") + assert len(result.rounds) == 2 + assert all(len(r.traces) == 2 for r in result.rounds) + assert all(t.parent_trace_ids for t in result.rounds[1].traces)