from gal_fingerprint_i.exports import _compact_package_name


def test_compact_package_name_is_zip_aware_and_short():
    state = {"mode": "THINNING_N10_DETERMINISTIC"}
    name = _compact_package_name("thinning_n10_deterministic_20260728T002319Z_391869", state)
    assert name == "GFI_T_391869_RUN_PACKAGE.zip"
    assert name.endswith("_RUN_PACKAGE.zip")
    assert len(name) < 40
