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.api.auth:Module]
#
# @TIER: STANDARD
# @COMPLEXITY: 3
# @SEMANTICS: api, auth, routes, login, logout
# @PURPOSE: Authentication API endpoints.
# @LAYER: API
@@ -24,13 +24,13 @@ import starlette.requests
# [/SECTION]
# [DEF:router:Variable]
# @TIER: TRIVIAL
# @COMPLEXITY: 1
# @PURPOSE: APIRouter instance for authentication routes.
router = APIRouter(prefix="/api/auth", tags=["auth"])
# [/DEF:router:Variable]
# [DEF:login_for_access_token:Function]
# @TIER: STANDARD
# @COMPLEXITY: 3
# @PURPOSE: Authenticates a user and returns a JWT access token.
# @PRE: form_data contains username and password.
# @POST: Returns a Token object on success.
@@ -58,7 +58,7 @@ async def login_for_access_token(
# [/DEF:login_for_access_token:Function]
# [DEF:read_users_me:Function]
# @TIER: STANDARD
# @COMPLEXITY: 3
# @PURPOSE: Retrieves the profile of the currently authenticated user.
# @PRE: Valid JWT token provided.
# @POST: Returns the current user's data.
@@ -71,7 +71,7 @@ async def read_users_me(current_user: UserSchema = Depends(get_current_user)):
# [/DEF:read_users_me:Function]
# [DEF:logout:Function]
# @TIER: STANDARD
# @COMPLEXITY: 3
# @PURPOSE: Logs out the current user (placeholder for session revocation).
# @PRE: Valid JWT token provided.
# @POST: Returns success message.
@@ -85,7 +85,7 @@ async def logout(current_user: UserSchema = Depends(get_current_user)):
# [/DEF:logout:Function]
# [DEF:login_adfs:Function]
# @TIER: STANDARD
# @COMPLEXITY: 3
# @PURPOSE: Initiates the ADFS OIDC login flow.
# @POST: Redirects the user to ADFS.
@router.get("/login/adfs")
@@ -101,7 +101,7 @@ async def login_adfs(request: starlette.requests.Request):
# [/DEF:login_adfs:Function]
# [DEF:auth_callback_adfs:Function]
# @TIER: STANDARD
# @COMPLEXITY: 3
# @PURPOSE: Handles the callback from ADFS after successful authentication.
# @POST: Provisions user JIT and returns session token.
@router.get("/callback/adfs", name="auth_callback_adfs")