Files
ss-tools/specs/023-clean-repo-enterprise/tests
busya 0894254b98 feat(clean-release): complete and verify backend test suite (33 passing tests)
- 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.
2026-03-04 13:53:43 +03:00
..
[
2026-03-03 21:05:29 +03:00

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_CONTRACT coherence, verifying that all defined @TEST_FIXTURE, @TEST_EDGE, and @TEST_INVARIANT definitions 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

  1. policy_engine.py (CRITICAL): Deterministic policy evaluations for artifacts and resource registries.
  2. compliance_orchestrator.py (CRITICAL): State-machine enforcing mandatory execution of DATA_PURITY, MANIFEST_CONSISTENCY, INTERNAL_SOURCES_ONLY, and NO_EXTERNAL_ENDPOINTS.
  3. report_builder.py (CRITICAL): Integrity validation for compliance counters and operator summaries.
  4. Additional subsystems: manifest_builder.py, source_isolation.py, and api/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