semantics

This commit is contained in:
2026-04-01 21:57:51 +03:00
parent 69e86a97e7
commit 78d6995e13
69 changed files with 333 additions and 319 deletions

View File

@@ -69,6 +69,10 @@ class DatasetReviewSessionRepository:
# [DEF:init_repo:Function]
# @COMPLEXITY: 4
# @PURPOSE: Bind one live SQLAlchemy session to the repository instance.
# @RELATION: DEPENDS_ON -> DatasetReviewSessionRepository; CALLS -> sqlalchemy
# @PRE: db_session is not None
# @POST: Repository instance initialized with valid session
# @SIDE_EFFECT: None - pure initialization
def __init__(self, db: Session):
self.db = db
self.event_logger = SessionEventLogger(db)
@@ -208,6 +212,9 @@ class DatasetReviewSessionRepository:
# @PURPOSE: Return the full session aggregate for API and frontend resume flows.
# @RELATION: [DEPENDS_ON] -> [DatasetReviewSession]
# @RELATION: [DEPENDS_ON] -> [SessionCollaborator]
# @PRE: session_id is a valid UUID; db_session is active
# @POST: Returns SessionDetail with all fields populated
# @SIDE_EFFECT: Read-only database operation
def load_session_detail(
self, session_id: str, user_id: str
) -> Optional[DatasetReviewSession]:
@@ -334,6 +341,9 @@ class DatasetReviewSessionRepository:
# @RELATION: [DEPENDS_ON] -> [ImportedFilter]
# @RELATION: [DEPENDS_ON] -> [TemplateVariable]
# @RELATION: [DEPENDS_ON] -> [ExecutionMapping]
# @PRE: session_id is a valid UUID; recovery_state is a valid dict
# @POST: Recovery state persisted to database
# @SIDE_EFFECT: Writes to database
def save_recovery_state(
self,
session_id: str,