from grav_bridge_i.runner import run_analysis

def test_engine_smoke(tmp_path, radial_path, signature_path):
    overrides = {
        "cross_validation": {"n_splits": 3},
        "uncertainty": {"galaxy_bootstrap_repetitions": 100},
        "nulls": {"signature_permutations": 2, "target_curve_permutations": 2},
    }
    result = run_analysis(radial_path, signature_path, None, tmp_path, overrides)
    assert result["protocol_status"] == "ENGINEERING_OVERRIDE"
    assert result["verdict"] in {
        "ROBUST_INCREMENTAL_SIGNAL", "WEAK_INCREMENTAL_SIGNAL", "NO_INCREMENTAL_SIGNAL",
        "NON_GENERALIZING_SIGNAL", "NULL_CONSISTENT"
    }
    assert (tmp_path / "grav_bridge_i_v0_1_0_results.json").exists()
    assert (tmp_path / "GRAV_BRIDGE_I_RUN_PACKAGE.zip").exists()
