# [DEF:backend.tests.services.clean_release.test_audit_service:Module]
# @TIER: STANDARD
# @SEMANTICS: tests, clean-release, audit, logging
# @PURPOSE: Validate audit hooks emit expected log patterns for clean release lifecycle.
# @LAYER: Infra
# @RELATION: TESTS -> backend.src.services.clean_release.audit_service

from unittest.mock import patch
from src.services.clean_release.audit_service import audit_preparation, audit_check_run, audit_report

@patch("src.services.clean_release.audit_service.logger")
def test_audit_preparation(mock_logger):
    audit_preparation("cand-1", "PREPARED")
    mock_logger.info.assert_called_with("[REASON] clean-release preparation candidate=cand-1 status=PREPARED")

@patch("src.services.clean_release.audit_service.logger")
def test_audit_check_run(mock_logger):
    audit_check_run("check-1", "COMPLIANT")
    mock_logger.info.assert_called_with("[REFLECT] clean-release check_run=check-1 final_status=COMPLIANT")

@patch("src.services.clean_release.audit_service.logger")
def test_audit_report(mock_logger):
    audit_report("rep-1", "cand-1")
    mock_logger.info.assert_called_with("[EXPLORE] clean-release report_id=rep-1 candidate=cand-1")


# [/DEF:backend.tests.services.clean_release.test_audit_service:Module]
