- Relocated and standardized tests for clean_release subsystem into __tests__ sub-packages. - Implemented missing unit tests for preparation_service, audit_service, and stages. - Enhanced API contract tests for candidate preparation and compliance reporting. - Updated 023-clean-repo-enterprise coverage matrix with final verification results. - Fixed relative import issues and model validation mismatches during test migration.
Test Strategy: Clean Repository Enterprise Profile
Overview
This directory contains strategy, coverage matrices, and execution reports for testing the clean-release subsystem, ensuring 100% compliance with GRACE-Poly semantic standards and enterprise deployment isolation policies.
Mandate
- CRITICAL Modules: Strictly enforce
@TEST_CONTRACTcoherence, verifying that all defined@TEST_FIXTURE,@TEST_EDGE, and@TEST_INVARIANTdefinitions map directly to semantic tests. - STANDARD Modules: Validate expected inputs, outputs, and edge cases (e.g., manifest hashes, source isolation algorithms).
- No Degradation: Tests must never be deleted; regression implies an invariant violation.
Scope
policy_engine.py(CRITICAL): Deterministic policy evaluations for artifacts and resource registries.compliance_orchestrator.py(CRITICAL): State-machine enforcing mandatory execution ofDATA_PURITY,MANIFEST_CONSISTENCY,INTERNAL_SOURCES_ONLY, andNO_EXTERNAL_ENDPOINTS.report_builder.py(CRITICAL): Integrity validation for compliance counters and operator summaries.- Additional subsystems:
manifest_builder.py,source_isolation.py, andapi/routes/clean_release.py.
Execution
Run testing via Pytest targeting backend test modules:
cd backend && .venv/bin/python3 -m pytest tests/services/clean_release tests/api/routes/test_clean_release_api.py tests/api/routes/test_clean_release_source_policy.py -v