fix: commit semantic repair changes
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
# [DEF:backend.tests.services.clean_release.test_compliance_execution_service:Module]
|
||||
# [DEF:TestComplianceExecutionService:Module]
|
||||
# @RELATION: BELONGS_TO -> SrcRoot
|
||||
# @COMPLEXITY: 5
|
||||
# @SEMANTICS: tests, clean-release, compliance, pipeline, run-finalization
|
||||
# @PURPOSE: Validate stage pipeline and run finalization contracts for compliance execution.
|
||||
# @LAYER: Tests
|
||||
# @RELATION: TESTS -> backend.src.services.clean_release.compliance_orchestrator
|
||||
# @RELATION: TESTS -> backend.src.services.clean_release.report_builder
|
||||
# @INVARIANT: Missing manifest prevents run startup; failed execution cannot finalize as PASSED.
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -27,6 +26,7 @@ from src.services.clean_release.repository import CleanReleaseRepository
|
||||
|
||||
|
||||
# [DEF:_seed_with_candidate_policy_registry:Function]
|
||||
# @RELATION: BINDS_TO -> TestComplianceExecutionService
|
||||
# @PURPOSE: Build deterministic repository state for run startup tests.
|
||||
# @PRE: candidate_id and snapshot ids are non-empty.
|
||||
# @POST: Returns repository with candidate, policy and registry; manifest is optional.
|
||||
@@ -100,6 +100,7 @@ def _seed_with_candidate_policy_registry(
|
||||
|
||||
|
||||
# [DEF:test_run_without_manifest_rejected:Function]
|
||||
# @RELATION: BINDS_TO -> TestComplianceExecutionService
|
||||
# @PURPOSE: Ensure compliance run cannot start when manifest is unresolved.
|
||||
# @PRE: Candidate/policy exist but manifest is missing.
|
||||
# @POST: start_check_run raises ValueError and no run is persisted.
|
||||
@@ -120,6 +121,7 @@ def test_run_without_manifest_rejected():
|
||||
|
||||
|
||||
# [DEF:test_task_crash_mid_run_marks_failed:Function]
|
||||
# @RELATION: BINDS_TO -> TestComplianceExecutionService
|
||||
# @PURPOSE: Ensure execution crash conditions force FAILED run status.
|
||||
# @PRE: Run exists, then required dependency becomes unavailable before execute_stages.
|
||||
# @POST: execute_stages persists run with FAILED status.
|
||||
@@ -143,6 +145,7 @@ def test_task_crash_mid_run_marks_failed():
|
||||
|
||||
|
||||
# [DEF:test_blocked_run_finalization_blocks_report_builder:Function]
|
||||
# @RELATION: BINDS_TO -> TestComplianceExecutionService
|
||||
# @PURPOSE: Ensure blocked runs require blocking violations before report creation.
|
||||
# @PRE: Manifest contains prohibited artifacts leading to BLOCKED decision.
|
||||
# @POST: finalize keeps BLOCKED and report_builder rejects zero blocking violations.
|
||||
@@ -170,4 +173,4 @@ def test_blocked_run_finalization_blocks_report_builder():
|
||||
builder.build_report_payload(run, [])
|
||||
# [/DEF:test_blocked_run_finalization_blocks_report_builder:Function]
|
||||
|
||||
# [/DEF:backend.tests.services.clean_release.test_compliance_execution_service:Module]
|
||||
# [/DEF:TestComplianceExecutionService:Module]
|
||||
|
||||
Reference in New Issue
Block a user