from pathlib import Path ROOT = Path(__file__).resolve().parents[2] WEB_SETUP = ROOT / "autoinstall/websetup/server.py" def test_web_setup_exposes_validation_and_customer_facing_license_labels(): source = WEB_SETUP.read_text() assert "validate_static_network" in source assert "LICENSE_STATUS_LABELS" in source assert "Invalid signature — re-upload a valid signed license" in source def test_phase1_contract_requires_durable_progress_not_only_process_memory(): source = WEB_SETUP.read_text() # This test intentionally fails until T026 replaces process-local-only state. assert "INSTALL_OPERATION_JSON" in source assert "idempotency_key" in source assert "operation_id" in source def test_setup_acknowledgement_contract_is_explicit(): source = WEB_SETUP.read_text() assert "acknowledged_at" in source assert "duplicate_request" in source