def test_activation_errors_are_redacted(): from app.core.data_flow.workflow_activation import activation_error assert activation_error(RuntimeError("api-key=secret")) == "[redacted]" def test_activation_state_machine_declares_expected_states(): from app.core.data_flow.workflow_activation import WORKFLOW_STATES assert {"draft", "validating", "active", "superseded", "activation_failed"} <= WORKFLOW_STATES