semantics: complete DEF-to-region migration, fix regressions
- Convert legacy [DEF🆔Type] anchors to #region/#endregion across 329 files
- Reinstate _normalize_timestamp_value in sql_generator.py
- Fix MarkerLogger→logger migration in events.py (molecular CoT markers)
- Fix dataset_review orchestrator dependencies (_build_execution_snapshot)
- Fix config_manager stale-record deletion (moved to save path only)
- Add 77 missing [/DEF:] closers in 5 unbalanced test files
- Update assistant_chat.integration.test.js for #region format
- Apply molecular-cot-logging markers (REASON/REFLECT/EXPLORE) via logger.* methods
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# #region CleanReleaseCliScript [C:3] [TYPE Module] [SEMANTICS cli, clean-release, candidate, artifacts, manifest]
|
||||
# @BRIEF Provide headless CLI commands for candidate registration, artifact import and manifest build.
|
||||
# @LAYER Scripts
|
||||
# @RELATION CALLS -> [ComplianceOrchestrator]
|
||||
# @LAYER: Scripts
|
||||
# @RELATION CALLS -> ComplianceOrchestrator
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -102,8 +102,8 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
|
||||
# #region run_candidate_register [TYPE Function]
|
||||
# @BRIEF Register candidate in repository via CLI command.
|
||||
# @PRE Candidate ID must be unique.
|
||||
# @POST Candidate is persisted in DRAFT status.
|
||||
# @PRE: Candidate ID must be unique.
|
||||
# @POST: Candidate is persisted in DRAFT status.
|
||||
def run_candidate_register(args: argparse.Namespace) -> int:
|
||||
from ..dependencies import get_clean_release_repository
|
||||
|
||||
@@ -131,8 +131,8 @@ def run_candidate_register(args: argparse.Namespace) -> int:
|
||||
|
||||
# #region run_artifact_import [TYPE Function]
|
||||
# @BRIEF Import single artifact for existing candidate.
|
||||
# @PRE Candidate must exist.
|
||||
# @POST Artifact is persisted for candidate.
|
||||
# @PRE: Candidate must exist.
|
||||
# @POST: Artifact is persisted for candidate.
|
||||
def run_artifact_import(args: argparse.Namespace) -> int:
|
||||
from ..dependencies import get_clean_release_repository
|
||||
|
||||
@@ -164,8 +164,8 @@ def run_artifact_import(args: argparse.Namespace) -> int:
|
||||
|
||||
# #region run_manifest_build [TYPE Function]
|
||||
# @BRIEF Build immutable manifest snapshot for candidate.
|
||||
# @PRE Candidate must exist.
|
||||
# @POST New manifest version is persisted.
|
||||
# @PRE: Candidate must exist.
|
||||
# @POST: New manifest version is persisted.
|
||||
def run_manifest_build(args: argparse.Namespace) -> int:
|
||||
from ..dependencies import get_clean_release_repository
|
||||
from ..services.clean_release.manifest_service import build_manifest_snapshot
|
||||
@@ -198,8 +198,8 @@ def run_manifest_build(args: argparse.Namespace) -> int:
|
||||
|
||||
# #region run_compliance_run [TYPE Function]
|
||||
# @BRIEF Execute compliance run for candidate with optional manifest fallback.
|
||||
# @PRE Candidate exists and trusted snapshots are configured.
|
||||
# @POST Returns run payload and exit code 0 on success.
|
||||
# @PRE: Candidate exists and trusted snapshots are configured.
|
||||
# @POST: Returns run payload and exit code 0 on success.
|
||||
def run_compliance_run(args: argparse.Namespace) -> int:
|
||||
from ..dependencies import get_clean_release_repository, get_config_manager
|
||||
|
||||
@@ -237,8 +237,8 @@ def run_compliance_run(args: argparse.Namespace) -> int:
|
||||
|
||||
# #region run_compliance_status [TYPE Function]
|
||||
# @BRIEF Read run status by run id.
|
||||
# @PRE Run exists.
|
||||
# @POST Returns run status payload.
|
||||
# @PRE: Run exists.
|
||||
# @POST: Returns run status payload.
|
||||
def run_compliance_status(args: argparse.Namespace) -> int:
|
||||
from ..dependencies import get_clean_release_repository
|
||||
|
||||
@@ -269,8 +269,8 @@ def run_compliance_status(args: argparse.Namespace) -> int:
|
||||
|
||||
# #region _to_payload [TYPE Function]
|
||||
# @BRIEF Serialize domain models for CLI JSON output across SQLAlchemy/Pydantic variants.
|
||||
# @PRE value is serializable model or primitive object.
|
||||
# @POST Returns dictionary payload without mutating value.
|
||||
# @PRE: value is serializable model or primitive object.
|
||||
# @POST: Returns dictionary payload without mutating value.
|
||||
def _to_payload(value: Any) -> Dict[str, Any]:
|
||||
def _normalize(raw: Any) -> Any:
|
||||
if isinstance(raw, datetime):
|
||||
@@ -299,8 +299,8 @@ def _to_payload(value: Any) -> Dict[str, Any]:
|
||||
|
||||
# #region run_compliance_report [TYPE Function]
|
||||
# @BRIEF Read immutable report by run id.
|
||||
# @PRE Run and report exist.
|
||||
# @POST Returns report payload.
|
||||
# @PRE: Run and report exist.
|
||||
# @POST: Returns report payload.
|
||||
def run_compliance_report(args: argparse.Namespace) -> int:
|
||||
from ..dependencies import get_clean_release_repository
|
||||
|
||||
@@ -326,8 +326,8 @@ def run_compliance_report(args: argparse.Namespace) -> int:
|
||||
|
||||
# #region run_compliance_violations [TYPE Function]
|
||||
# @BRIEF Read run violations by run id.
|
||||
# @PRE Run exists.
|
||||
# @POST Returns violations payload.
|
||||
# @PRE: Run exists.
|
||||
# @POST: Returns violations payload.
|
||||
def run_compliance_violations(args: argparse.Namespace) -> int:
|
||||
from ..dependencies import get_clean_release_repository
|
||||
|
||||
@@ -351,8 +351,8 @@ def run_compliance_violations(args: argparse.Namespace) -> int:
|
||||
|
||||
# #region run_approve [TYPE Function]
|
||||
# @BRIEF Approve candidate based on immutable PASSED report.
|
||||
# @PRE Candidate and report exist; report is PASSED.
|
||||
# @POST Persists APPROVED decision and returns success payload.
|
||||
# @PRE: Candidate and report exist; report is PASSED.
|
||||
# @POST: Persists APPROVED decision and returns success payload.
|
||||
def run_approve(args: argparse.Namespace) -> int:
|
||||
from ..dependencies import get_clean_release_repository
|
||||
|
||||
@@ -382,8 +382,8 @@ def run_approve(args: argparse.Namespace) -> int:
|
||||
|
||||
# #region run_reject [TYPE Function]
|
||||
# @BRIEF Reject candidate without mutating compliance evidence.
|
||||
# @PRE Candidate and report exist.
|
||||
# @POST Persists REJECTED decision and returns success payload.
|
||||
# @PRE: Candidate and report exist.
|
||||
# @POST: Persists REJECTED decision and returns success payload.
|
||||
def run_reject(args: argparse.Namespace) -> int:
|
||||
from ..dependencies import get_clean_release_repository
|
||||
|
||||
@@ -413,8 +413,8 @@ def run_reject(args: argparse.Namespace) -> int:
|
||||
|
||||
# #region run_publish [TYPE Function]
|
||||
# @BRIEF Publish approved candidate to target channel.
|
||||
# @PRE Candidate is approved and report belongs to candidate.
|
||||
# @POST Appends ACTIVE publication record and returns payload.
|
||||
# @PRE: Candidate is approved and report belongs to candidate.
|
||||
# @POST: Appends ACTIVE publication record and returns payload.
|
||||
def run_publish(args: argparse.Namespace) -> int:
|
||||
from ..dependencies import get_clean_release_repository
|
||||
|
||||
@@ -441,8 +441,8 @@ def run_publish(args: argparse.Namespace) -> int:
|
||||
|
||||
# #region run_revoke [TYPE Function]
|
||||
# @BRIEF Revoke active publication record.
|
||||
# @PRE Publication id exists and is ACTIVE.
|
||||
# @POST Publication record status becomes REVOKED.
|
||||
# @PRE: Publication id exists and is ACTIVE.
|
||||
# @POST: Publication record status becomes REVOKED.
|
||||
def run_revoke(args: argparse.Namespace) -> int:
|
||||
from ..dependencies import get_clean_release_repository
|
||||
|
||||
|
||||
Reference in New Issue
Block a user