refactor(semantics): migrate legacy @TIER to @COMPLEXITY annotations

- Replaced @TIER: TRIVIAL with @COMPLEXITY: 1
- Replaced @TIER: STANDARD with @COMPLEXITY: 3
- Replaced @TIER: CRITICAL with @COMPLEXITY: 5
- Manually elevated specific critical/complex components to levels 2 and 4
- Ignored legacy, specs, and node_modules directories
- Updated generated semantic map
This commit is contained in:
2026-03-16 10:06:44 +03:00
parent 321e0eb2db
commit 274510fc38
321 changed files with 30101 additions and 58483 deletions

View File

@@ -1,6 +1,6 @@
# [DEF:backend.src.schemas.profile:Module]
#
# @TIER: STANDARD
# @COMPLEXITY: 3
# @SEMANTICS: profile, schemas, pydantic, preferences, superset, lookup, security, git, ux
# @PURPOSE: Defines API schemas for profile preference persistence, security read-only snapshot, and Superset account lookup.
# @LAYER: API
@@ -16,7 +16,7 @@ from pydantic import BaseModel, Field
# [DEF:ProfilePermissionState:Class]
# @TIER: STANDARD
# @COMPLEXITY: 3
# @PURPOSE: Represents one permission badge state for profile read-only security view.
class ProfilePermissionState(BaseModel):
key: str
@@ -25,7 +25,7 @@ class ProfilePermissionState(BaseModel):
# [DEF:ProfileSecuritySummary:Class]
# @TIER: STANDARD
# @COMPLEXITY: 3
# @PURPOSE: Read-only security and access snapshot for current user.
class ProfileSecuritySummary(BaseModel):
read_only: bool = True
@@ -38,7 +38,7 @@ class ProfileSecuritySummary(BaseModel):
# [DEF:ProfilePreference:Class]
# @TIER: STANDARD
# @COMPLEXITY: 3
# @PURPOSE: Represents persisted profile preference for a single authenticated user.
class ProfilePreference(BaseModel):
user_id: str
@@ -69,7 +69,7 @@ class ProfilePreference(BaseModel):
# [DEF:ProfilePreferenceUpdateRequest:Class]
# @TIER: STANDARD
# @COMPLEXITY: 3
# @PURPOSE: Request payload for updating current user's profile settings.
class ProfilePreferenceUpdateRequest(BaseModel):
superset_username: Optional[str] = Field(
@@ -128,7 +128,7 @@ class ProfilePreferenceUpdateRequest(BaseModel):
# [DEF:ProfilePreferenceResponse:Class]
# @TIER: STANDARD
# @COMPLEXITY: 3
# @PURPOSE: Response envelope for profile preference read/update endpoints.
class ProfilePreferenceResponse(BaseModel):
status: Literal["success", "error"] = "success"
@@ -140,7 +140,7 @@ class ProfilePreferenceResponse(BaseModel):
# [DEF:SupersetAccountLookupRequest:Class]
# @TIER: STANDARD
# @COMPLEXITY: 3
# @PURPOSE: Query contract for Superset account lookup by selected environment.
class SupersetAccountLookupRequest(BaseModel):
environment_id: str
@@ -153,7 +153,7 @@ class SupersetAccountLookupRequest(BaseModel):
# [DEF:SupersetAccountCandidate:Class]
# @TIER: STANDARD
# @COMPLEXITY: 3
# @PURPOSE: Canonical account candidate projected from Superset users payload.
class SupersetAccountCandidate(BaseModel):
environment_id: str
@@ -165,7 +165,7 @@ class SupersetAccountCandidate(BaseModel):
# [DEF:SupersetAccountLookupResponse:Class]
# @TIER: STANDARD
# @COMPLEXITY: 3
# @PURPOSE: Response envelope for Superset account lookup (success or degraded mode).
class SupersetAccountLookupResponse(BaseModel):
status: Literal["success", "degraded"]