lawsynth/tests/test_cross_language.py
caelum0x c8700e78f8 feat: §8.5 parameter refinement + §8.6 causal hypothesis + executable conformance suites
Discovery: opt-in joint parameter refinement (refine.rs, via lawsynth-opt
coordinate_minimize, guaranteed non-worsening trajectory MSE) and dependency/
causal hypothesis discovery (causal.rs, via lawsynth-causal Granger/independence/
time-order, framed as a hypothesis with its assumption set). CLI --refine/--causal.

Verification: wire tests/{conformance,end-to-end,cross-language} to execute against
the real compiled CLI — valid worlds round-trip, every bad-* asserted-rejected,
unbuilt native/TS legs honestly skipped. 26 pytest cases.

Rust workspace 342->352 tests; +26 system-verification cases. clippy/fmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 19:05:23 +03:00

33 lines
1.1 KiB
Python

"""Cross-language suite: verify artifacts cross the Python/Rust wire boundary.
``bundle-roundtrip`` and ``schema-roundtrip`` assert a language-neutral binary
world produced on one side is read back identically by the Rust engine.
``rust-python`` exercises a portable world from Python-shaped data through the
CLI. ``python-rust`` probes the real Python ``lawsynth`` package against the
CLI and honestly reports ``available``/``unavailable`` for the native leg.
``typescript-rust`` records the honest boundary that no TypeScript binding
ships in this runtime.
"""
from __future__ import annotations
import sys
from pathlib import Path
import pytest
from conftest import discover_cases
_END_TO_END = Path(__file__).resolve().parent / "end-to-end"
if str(_END_TO_END) not in sys.path:
sys.path.insert(0, str(_END_TO_END))
import _workflow # noqa: E402
_CASES = discover_cases("cross-language")
@pytest.mark.parametrize("case_dir", _CASES, ids=[case.name for case in _CASES])
def test_cross_language_case(case_dir: Path, engine_binary: Path) -> None:
_workflow.run_case(case_dir)