From 0e0e26e2f7d135eb4c2f504ddf3adbe190b9dbf2 Mon Sep 17 00:00:00 2001 From: busya Date: Wed, 28 Jan 2026 16:57:19 +0300 Subject: [PATCH] semantic update --- .gitignore | 1 + backend/src/api/routes/admin.py | 1 + backend/src/api/routes/git_schemas.py | 2 + backend/src/models/auth.py | 1 + backend/src/models/dashboard.py | 3 + backend/src/models/mapping.py | 4 + backend/src/schemas/auth.py | 4 + .../src/components/storage/FileList.svelte | 12 +- .../src/components/storage/FileUpload.svelte | 3 +- frontend/src/routes/admin/roles/+page.svelte | 22 +- frontend/src/routes/login/+page.svelte | 3 +- frontend/src/routes/migration/+page.svelte | 4 +- .../src/routes/tools/storage/+page.svelte | 3 +- frontend/src/services/adminService.js | 1 + generate_semantic_map.py | 6 +- semantic_protocol.md | 2 +- semantics/semantic_map.json | 12530 ++++++++++++++-- specs/project_map.md | 617 +- 18 files changed, 11792 insertions(+), 1427 deletions(-) diff --git a/.gitignore b/.gitignore index a14e2ea..a765c85 100755 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,4 @@ backend/mappings.db backend/tasks.db backend/logs backend/auth.db +semantics/reports diff --git a/backend/src/api/routes/admin.py b/backend/src/api/routes/admin.py index 78482a8..7e79616 100644 --- a/backend/src/api/routes/admin.py +++ b/backend/src/api/routes/admin.py @@ -1,5 +1,6 @@ # [DEF:backend.src.api.routes.admin:Module] # +# @TIER: STANDARD # @SEMANTICS: api, admin, users, roles, permissions # @PURPOSE: Admin API endpoints for user and role management. # @LAYER: API diff --git a/backend/src/api/routes/git_schemas.py b/backend/src/api/routes/git_schemas.py index b4fcdda..5fb08bb 100644 --- a/backend/src/api/routes/git_schemas.py +++ b/backend/src/api/routes/git_schemas.py @@ -1,5 +1,6 @@ # [DEF:backend.src.api.routes.git_schemas:Module] # +# @TIER: STANDARD # @SEMANTICS: git, schemas, pydantic, api, contracts # @PURPOSE: Defines Pydantic models for the Git integration API layer. # @LAYER: API @@ -14,6 +15,7 @@ from uuid import UUID from src.models.git import GitProvider, GitStatus, SyncStatus # [DEF:GitServerConfigBase:Class] +# @TIER: TRIVIAL # @PURPOSE: Base schema for Git server configuration attributes. class GitServerConfigBase(BaseModel): name: str = Field(..., description="Display name for the Git server") diff --git a/backend/src/models/auth.py b/backend/src/models/auth.py index 62e3179..a27ddd2 100644 --- a/backend/src/models/auth.py +++ b/backend/src/models/auth.py @@ -1,5 +1,6 @@ # [DEF:backend.src.models.auth:Module] # +# @TIER: STANDARD # @SEMANTICS: auth, models, user, role, permission, sqlalchemy # @PURPOSE: SQLAlchemy models for multi-user authentication and authorization. # @LAYER: Domain diff --git a/backend/src/models/dashboard.py b/backend/src/models/dashboard.py index 166cb60..77a3e0d 100644 --- a/backend/src/models/dashboard.py +++ b/backend/src/models/dashboard.py @@ -1,4 +1,5 @@ # [DEF:backend.src.models.dashboard:Module] +# @TIER: STANDARD # @SEMANTICS: dashboard, model, metadata, migration # @PURPOSE: Defines data models for dashboard metadata and selection. # @LAYER: Model @@ -8,6 +9,7 @@ from pydantic import BaseModel from typing import List # [DEF:DashboardMetadata:Class] +# @TIER: TRIVIAL # @PURPOSE: Represents a dashboard available for migration. class DashboardMetadata(BaseModel): id: int @@ -17,6 +19,7 @@ class DashboardMetadata(BaseModel): # [/DEF:DashboardMetadata:Class] # [DEF:DashboardSelection:Class] +# @TIER: TRIVIAL # @PURPOSE: Represents the user's selection of dashboards to migrate. class DashboardSelection(BaseModel): selected_ids: List[int] diff --git a/backend/src/models/mapping.py b/backend/src/models/mapping.py index 1522042..754faf9 100644 --- a/backend/src/models/mapping.py +++ b/backend/src/models/mapping.py @@ -1,5 +1,6 @@ # [DEF:backend.src.models.mapping:Module] # +# @TIER: STANDARD # @SEMANTICS: database, mapping, environment, migration, sqlalchemy, sqlite # @PURPOSE: Defines the database schema for environment metadata and database mappings using SQLAlchemy. # @LAYER: Domain @@ -19,6 +20,7 @@ import enum Base = declarative_base() # [DEF:MigrationStatus:Class] +# @TIER: TRIVIAL # @PURPOSE: Enumeration of possible migration job statuses. class MigrationStatus(enum.Enum): PENDING = "PENDING" @@ -29,6 +31,7 @@ class MigrationStatus(enum.Enum): # [/DEF:MigrationStatus:Class] # [DEF:Environment:Class] +# @TIER: STANDARD # @PURPOSE: Represents a Superset instance environment. class Environment(Base): __tablename__ = "environments" @@ -40,6 +43,7 @@ class Environment(Base): # [/DEF:Environment:Class] # [DEF:DatabaseMapping:Class] +# @TIER: STANDARD # @PURPOSE: Represents a mapping between source and target databases. class DatabaseMapping(Base): __tablename__ = "database_mappings" diff --git a/backend/src/schemas/auth.py b/backend/src/schemas/auth.py index e640f6a..a4bd965 100644 --- a/backend/src/schemas/auth.py +++ b/backend/src/schemas/auth.py @@ -1,5 +1,6 @@ # [DEF:backend.src.schemas.auth:Module] # +# @TIER: STANDARD # @SEMANTICS: auth, schemas, pydantic, user, token # @PURPOSE: Pydantic schemas for authentication requests and responses. # @LAYER: API @@ -14,6 +15,7 @@ from datetime import datetime # [/SECTION] # [DEF:Token:Class] +# @TIER: TRIVIAL # @PURPOSE: Represents a JWT access token response. class Token(BaseModel): access_token: str @@ -21,6 +23,7 @@ class Token(BaseModel): # [/DEF:Token:Class] # [DEF:TokenData:Class] +# @TIER: TRIVIAL # @PURPOSE: Represents the data encoded in a JWT token. class TokenData(BaseModel): username: Optional[str] = None @@ -28,6 +31,7 @@ class TokenData(BaseModel): # [/DEF:TokenData:Class] # [DEF:PermissionSchema:Class] +# @TIER: TRIVIAL # @PURPOSE: Represents a permission in API responses. class PermissionSchema(BaseModel): id: Optional[str] = None diff --git a/frontend/src/components/storage/FileList.svelte b/frontend/src/components/storage/FileList.svelte index 7288d9b..7fe392b 100644 --- a/frontend/src/components/storage/FileList.svelte +++ b/frontend/src/components/storage/FileList.svelte @@ -1,8 +1,9 @@ +

Select Dashboards

@@ -316,7 +316,7 @@

Select a source environment to view dashboards.

{/if}
- +
diff --git a/frontend/src/routes/tools/storage/+page.svelte b/frontend/src/routes/tools/storage/+page.svelte index 1dfb8f6..5a16445 100644 --- a/frontend/src/routes/tools/storage/+page.svelte +++ b/frontend/src/routes/tools/storage/+page.svelte @@ -1,8 +1,9 @@ "), - "html_anchor_end": re.compile(r""), + "html_anchor_end": re.compile(r""), "js_anchor_start": re.compile(r"//\s*\[DEF:(?P[\w\.]+):(?P\w+)\]"), - "js_anchor_end": re.compile(r"//\s*\[/DEF:(?P[\w\.]+)\]"), + "js_anchor_end": re.compile(r"//\s*\[/DEF:(?P[\w\.]+)(?::\w+)?\]"), "html_tag": re.compile(r"@(?P[A-Z_]+):\s*(?P.*)"), "jsdoc_tag": re.compile(r"\*\s*@(?P[a-zA-Z]+)\s+(?P.*)"), "relation": re.compile(r"//\s*@RELATION:\s*(?P\w+)\s*->\s*(?P.*)"), diff --git a/semantic_protocol.md b/semantic_protocol.md index de445e6..1c28f08 100755 --- a/semantic_protocol.md +++ b/semantic_protocol.md @@ -12,7 +12,7 @@ I. ЗАКОН (АКСИОМЫ) II. СИНТАКСИС (ЖЕСТКИЙ ФОРМАТ) ЯКОРЬ (Контейнер): Начало: `# [DEF:id:Type]` (Python) | `` (Svelte) - Конец: `# [/DEF:id]` (ОБЯЗАТЕЛЬНО для аккумуляции) + Конец: `# [/DEF:id:Type]` (Python) | `` (Svelte) (ОБЯЗАТЕЛЬНО для аккумуляции) Типы: Module, Class, Function, Component, Store. ТЕГ (Метаданные): diff --git a/semantics/semantic_map.json b/semantics/semantic_map.json index d00fae9..633021e 100644 --- a/semantics/semantic_map.json +++ b/semantics/semantic_map.json @@ -1,16 +1,19 @@ { "project_root": ".", - "generated_at": "2026-01-26T11:41:28.347227", + "generated_at": "2026-01-28T16:48:53.121048", "modules": [ { "name": "generate_semantic_map", "type": "Module", + "tier": "CRITICAL", "start_line": 1, - "end_line": 614, + "end_line": 1000, "tags": { - "SEMANTICS": "semantic_analysis, parser, map_generator, compliance_checker", + "TIER": "CRITICAL", + "SEMANTICS": "semantic_analysis, parser, map_generator, compliance_checker, tier_validation, svelte_props, data_flow", "PURPOSE": "Scans the codebase to generate a Semantic Map and Compliance Report based on the System Standard.", - "LAYER": "DevOps/Tooling" + "LAYER": "DevOps/Tooling", + "INVARIANT": "All DEF anchors must have matching closing anchors; TIER determines validation strictness." }, "relations": [ { @@ -34,29 +37,31 @@ { "name": "__init__", "type": "Function", - "start_line": 21, - "end_line": 27, + "tier": "TRIVIAL", + "start_line": 25, + "end_line": 32, "tags": { - "PURPOSE": "Mock init.", + "TIER": "TRIVIAL", + "PURPOSE": "Mock init for self-containment.", "PRE": "name is a string.", "POST": "Instance initialized." }, "relations": [], "children": [], "compliance": { - "valid": false, - "issues": [ - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager." - ] + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "__enter__", "type": "Function", - "start_line": 29, - "end_line": 35, + "tier": "TRIVIAL", + "start_line": 34, + "end_line": 41, "tags": { + "TIER": "TRIVIAL", "PURPOSE": "Mock enter.", "PRE": "Instance initialized.", "POST": "Returns self." @@ -64,19 +69,19 @@ "relations": [], "children": [], "compliance": { - "valid": false, - "issues": [ - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager." - ] + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "__exit__", "type": "Function", - "start_line": 37, - "end_line": 43, + "tier": "TRIVIAL", + "start_line": 43, + "end_line": 50, "tags": { + "TIER": "TRIVIAL", "PURPOSE": "Mock exit.", "PRE": "Context entered.", "POST": "Context exited." @@ -84,30 +89,86 @@ "relations": [], "children": [], "compliance": { - "valid": false, - "issues": [ - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager." - ] + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "Tier", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 57, + "end_line": 63, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Enumeration of semantic tiers defining validation strictness." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "Severity", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 67, + "end_line": 73, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Severity levels for compliance issues." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "ComplianceIssue", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 119, + "end_line": 134, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Represents a single compliance issue with severity." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "SemanticEntity", "type": "Class", - "start_line": 67, - "end_line": 168, + "tier": "CRITICAL", + "start_line": 137, + "end_line": 313, "tags": { + "TIER": "CRITICAL", "PURPOSE": "Represents a code entity (Module, Function, Component) found during parsing.", - "INVARIANT": "start_line is always set; end_line is set upon closure." + "INVARIANT": "start_line is always set; end_line is set upon closure; tier defaults to STANDARD." }, "relations": [], "children": [ { "name": "__init__", "type": "Function", - "start_line": 71, - "end_line": 87, + "tier": "STANDARD", + "start_line": 142, + "end_line": 165, "tags": { + "TIER": "STANDARD", "PURPOSE": "Initializes a new SemanticEntity instance.", "PRE": "name, type_, start_line, file_path are provided.", "POST": "Instance is initialized with default values." @@ -116,122 +177,222 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_tier", + "type": "Function", + "tier": "STANDARD", + "start_line": 167, + "end_line": 179, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Returns the tier of the entity, defaulting to STANDARD.", + "PRE": "tags dictionary is accessible.", + "POST": "Returns Tier enum value." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "to_dict", "type": "Function", - "start_line": 89, - "end_line": 109, + "tier": "STANDARD", + "start_line": 181, + "end_line": 210, "tags": { + "TIER": "STANDARD", "PURPOSE": "Serializes the entity to a dictionary for JSON output.", "PRE": "Entity is fully populated.", - "POST": "Returns a dictionary representation.", - "RETURN": "Dict representation of the entity." + "POST": "Returns a dictionary representation." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "validate", "type": "Function", - "start_line": 111, - "end_line": 141, + "tier": "CRITICAL", + "start_line": 212, + "end_line": 276, "tags": { - "PURPOSE": "Checks for semantic compliance (closure, mandatory tags, belief state).", - "PRE": "Entity structure is complete.", - "POST": "Populates self.compliance_issues." + "TIER": "CRITICAL", + "PURPOSE": "Checks for semantic compliance based on TIER requirements.", + "PRE": "Entity structure is complete; tier is determined.", + "POST": "Populates self.compliance_issues with severity levels.", + "SIDE_EFFECT": "Modifies self.compliance_issues list." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_score", "type": "Function", - "start_line": 143, - "end_line": 167, + "tier": "STANDARD", + "start_line": 278, + "end_line": 312, "tags": { - "PURPOSE": "Calculates a compliance score (0.0 to 1.0).", + "TIER": "STANDARD", + "PURPOSE": "Calculates a compliance score (0.0 to 1.0) based on tier requirements.", "PRE": "validate() has been called.", - "POST": "Returns a float score.", - "RETURN": "Float score." + "POST": "Returns a float score." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_patterns", "type": "Function", - "start_line": 171, - "end_line": 199, + "tier": "STANDARD", + "start_line": 316, + "end_line": 351, "tags": { + "TIER": "STANDARD", "PURPOSE": "Returns regex patterns for a specific language.", "PRE": "lang is either 'python' or 'svelte_js'.", "POST": "Returns a dictionary of compiled regex patterns.", - "PARAM": "lang (str) - 'python' or 'svelte_js'", - "RETURN": "Dict containing compiled regex patterns." + "PARAM": "lang (str) - 'python' or 'svelte_js'" }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "extract_svelte_props", + "type": "Function", + "tier": "STANDARD", + "start_line": 354, + "end_line": 380, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Extracts props from Svelte component script section.", + "PRE": "lines is a list of file lines, start_idx is the starting line index.", + "POST": "Returns list of prop definitions." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "extract_svelte_events", + "type": "Function", + "tier": "STANDARD", + "start_line": 383, + "end_line": 417, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Extracts dispatched events from Svelte component.", + "PRE": "lines is a list of file lines.", + "POST": "Returns list of event names." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "extract_data_flow", + "type": "Function", + "tier": "STANDARD", + "start_line": 420, + "end_line": 470, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Extracts store subscriptions and data flow from Svelte component.", + "PRE": "lines is a list of file lines.", + "POST": "Returns list of data flow descriptors." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "parse_file", "type": "Function", - "start_line": 202, - "end_line": 325, + "tier": "CRITICAL", + "start_line": 473, + "end_line": 660, "tags": { - "PURPOSE": "Parses a single file to extract semantic entities.", + "TIER": "CRITICAL", + "PURPOSE": "Parses a single file to extract semantic entities with tier awareness and enhanced Svelte analysis.", "PRE": "full_path, rel_path, lang are valid strings.", "POST": "Returns extracted entities and list of issues.", - "PARAM": "lang - Language identifier.", - "RETURN": "Tuple[List[SemanticEntity], List[str]] - Entities found and global issues." + "INVARIANT": "Every opened anchor must have a matching closing anchor for valid compliance.", + "PARAM": "lang - Language identifier." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "SemanticMapGenerator", "type": "Class", - "start_line": 328, - "end_line": 608, + "tier": "CRITICAL", + "start_line": 663, + "end_line": 993, "tags": { - "PURPOSE": "Orchestrates the mapping process." + "TIER": "CRITICAL", + "PURPOSE": "Orchestrates the mapping process with tier-based validation.", + "INVARIANT": "All entities are validated according to their TIER requirements." }, "relations": [], "children": [ { "name": "__init__", "type": "Function", - "start_line": 331, - "end_line": 342, + "tier": "STANDARD", + "start_line": 668, + "end_line": 680, "tags": { + "TIER": "STANDARD", "PURPOSE": "Initializes the generator with a root directory.", "PRE": "root_dir is a valid path string.", "POST": "Generator instance is ready." @@ -240,52 +401,58 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_load_gitignore", "type": "Function", - "start_line": 344, - "end_line": 360, + "tier": "STANDARD", + "start_line": 682, + "end_line": 698, "tags": { + "TIER": "STANDARD", "PURPOSE": "Loads patterns from .gitignore file.", "PRE": ".gitignore exists in root_dir.", - "POST": "Returns set of ignore patterns.", - "RETURN": "Set of patterns to ignore." + "POST": "Returns set of ignore patterns." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_is_ignored", "type": "Function", - "start_line": 362, - "end_line": 403, + "tier": "STANDARD", + "start_line": 700, + "end_line": 734, "tags": { + "TIER": "STANDARD", "PURPOSE": "Checks if a path should be ignored based on .gitignore or hardcoded defaults.", "PRE": "rel_path is a valid relative path string.", - "POST": "Returns True if the path should be ignored.", - "PARAM": "rel_path (str) - Path relative to root.", - "RETURN": "bool - True if ignored." + "POST": "Returns True if the path should be ignored." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "run", "type": "Function", - "start_line": 405, - "end_line": 417, + "tier": "CRITICAL", + "start_line": 736, + "end_line": 749, "tags": { + "TIER": "CRITICAL", "PURPOSE": "Main execution flow.", "PRE": "Generator is initialized.", "POST": "Semantic map and reports are generated." @@ -303,15 +470,18 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_walk_and_parse", "type": "Function", - "start_line": 419, - "end_line": 448, + "tier": "CRITICAL", + "start_line": 751, + "end_line": 780, "tags": { + "TIER": "CRITICAL", "PURPOSE": "Recursively walks directories and triggers parsing.", "PRE": "root_dir exists.", "POST": "All files are scanned and entities extracted." @@ -320,16 +490,19 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_process_file_results", "type": "Function", - "start_line": 450, - "end_line": 477, + "tier": "STANDARD", + "start_line": 782, + "end_line": 811, "tags": { - "PURPOSE": "Validates entities and calculates file scores.", + "TIER": "STANDARD", + "PURPOSE": "Validates entities and calculates file scores with tier awareness.", "PRE": "Entities have been parsed from the file.", "POST": "File score is calculated and issues collected." }, @@ -338,9 +511,11 @@ { "name": "validate_recursive", "type": "Function", - "start_line": 459, - "end_line": 471, + "tier": "STANDARD", + "start_line": 792, + "end_line": 805, "tags": { + "TIER": "STANDARD", "PURPOSE": "Recursively validates a list of entities.", "PRE": "ent_list is a list of SemanticEntity objects.", "POST": "All entities and their children are validated." @@ -349,22 +524,26 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_generate_artifacts", "type": "Function", - "start_line": 479, - "end_line": 502, + "tier": "CRITICAL", + "start_line": 813, + "end_line": 833, "tags": { - "PURPOSE": "Writes output files.", + "TIER": "CRITICAL", + "PURPOSE": "Writes output files with tier-based compliance data.", "PRE": "Parsing and validation are complete.", "POST": "JSON and Markdown artifacts are written to disk." }, @@ -372,16 +551,19 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_generate_report", "type": "Function", - "start_line": 504, - "end_line": 544, + "tier": "CRITICAL", + "start_line": 835, + "end_line": 888, "tags": { - "PURPOSE": "Generates the Markdown compliance report.", + "TIER": "CRITICAL", + "PURPOSE": "Generates the Markdown compliance report with severity levels.", "PRE": "File scores and issues are available.", "POST": "Markdown report is created in reports directory." }, @@ -389,15 +571,18 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_collect_issues", "type": "Function", - "start_line": 546, - "end_line": 556, + "tier": "STANDARD", + "start_line": 890, + "end_line": 902, "tags": { + "TIER": "STANDARD", "PURPOSE": "Helper to collect issues for a specific file from the entity tree.", "PRE": "entities list and file_path are valid.", "POST": "issues list is populated with compliance issues." @@ -406,16 +591,19 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_generate_compressed_map", "type": "Function", - "start_line": 558, - "end_line": 574, + "tier": "CRITICAL", + "start_line": 904, + "end_line": 921, "tags": { - "PURPOSE": "Generates the token-optimized project map.", + "TIER": "CRITICAL", + "PURPOSE": "Generates the token-optimized project map with enhanced Svelte details.", "PRE": "Entities have been processed.", "POST": "Markdown project map is written." }, @@ -423,16 +611,19 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_write_entity_md", "type": "Function", - "start_line": 576, - "end_line": 606, + "tier": "CRITICAL", + "start_line": 923, + "end_line": 991, "tags": { - "PURPOSE": "Recursive helper to write entity tree to Markdown.", + "TIER": "CRITICAL", + "PURPOSE": "Recursive helper to write entity tree to Markdown with tier badges and enhanced details.", "PRE": "f is an open file handle, entity is valid.", "POST": "Entity details are written to the file." }, @@ -440,24 +631,46 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "to_dict", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 128, + "end_line": 128, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "stores_module", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 70, "tags": { @@ -470,6 +683,7 @@ { "name": "plugins", "type": "Data", + "tier": "STANDARD", "start_line": 9, "end_line": 12, "tags": { @@ -479,12 +693,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "tasks", "type": "Data", + "tier": "STANDARD", "start_line": 14, "end_line": 17, "tags": { @@ -494,12 +710,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "selectedPlugin", "type": "Data", + "tier": "STANDARD", "start_line": 19, "end_line": 22, "tags": { @@ -509,12 +727,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "selectedTask", "type": "Data", + "tier": "STANDARD", "start_line": 24, "end_line": 27, "tags": { @@ -524,12 +744,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "currentPage", "type": "Data", + "tier": "STANDARD", "start_line": 29, "end_line": 32, "tags": { @@ -539,12 +761,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "taskLogs", "type": "Data", + "tier": "STANDARD", "start_line": 34, "end_line": 37, "tags": { @@ -554,12 +778,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "fetchPlugins", "type": "Function", + "tier": "STANDARD", "start_line": 39, "end_line": 53, "tags": { @@ -571,12 +797,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 39 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 39 + } + ], + "score": 0.8 } }, { "name": "fetchTasks", "type": "Function", + "tier": "STANDARD", "start_line": 55, "end_line": 69, "tags": { @@ -588,18 +827,38 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 55 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 55 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "toasts_module", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 38, "tags": { @@ -612,6 +871,7 @@ { "name": "toasts", "type": "Data", + "tier": "STANDARD", "start_line": 8, "end_line": 11, "tags": { @@ -621,12 +881,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "addToast", "type": "Function", + "tier": "STANDARD", "start_line": 13, "end_line": 26, "tags": { @@ -639,12 +901,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 13 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 13 + } + ], + "score": 0.8 } }, { "name": "removeToast", "type": "Function", + "tier": "STANDARD", "start_line": 28, "end_line": 37, "tags": { @@ -657,20 +932,40 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "api_module", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 132, + "end_line": 170, "tags": { "SEMANTICS": "api, client, fetch, rest", "PURPOSE": "Handles all communication with the backend API.", @@ -681,6 +976,7 @@ { "name": "getWsUrl", "type": "Function", + "tier": "STANDARD", "start_line": 11, "end_line": 26, "tags": { @@ -694,14 +990,75 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 11 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 11 + } + ], + "score": 0.8 + } + }, + { + "name": "getAuthHeaders", + "type": "Function", + "tier": "STANDARD", + "start_line": 28, + "end_line": 42, + "tags": { + "PURPOSE": "Returns headers with Authorization if token exists." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + } + ], + "score": 0.26666666666666655 } }, { "name": "fetchApi", "type": "Function", - "start_line": 28, - "end_line": 48, + "tier": "STANDARD", + "start_line": 44, + "end_line": 72, "tags": { "PURPOSE": "Generic GET request wrapper.", "PRE": "endpoint string is provided.", @@ -713,14 +1070,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 44 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 44 + } + ], + "score": 0.8 } }, { "name": "postApi", "type": "Function", - "start_line": 50, - "end_line": 77, + "tier": "STANDARD", + "start_line": 74, + "end_line": 105, "tags": { "PURPOSE": "Generic POST request wrapper.", "PRE": "endpoint and body are provided.", @@ -732,14 +1102,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 74 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 74 + } + ], + "score": 0.8 } }, { "name": "requestApi", "type": "Function", - "start_line": 79, - "end_line": 107, + "tier": "STANDARD", + "start_line": 107, + "end_line": 142, "tags": { "PURPOSE": "Generic request wrapper.", "PRE": "endpoint and method are provided.", @@ -749,14 +1132,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 107 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 107 + } + ], + "score": 0.8 } }, { "name": "api", "type": "Data", - "start_line": 109, - "end_line": 130, + "tier": "STANDARD", + "start_line": 144, + "end_line": 168, "tags": { "PURPOSE": "API client object with specific methods." }, @@ -764,18 +1160,333 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + } + }, + { + "name": "authStore", + "type": "Store", + "tier": "STANDARD", + "start_line": 1, + "end_line": 91, + "tags": { + "SEMANTICS": "auth, store, svelte, jwt, session", + "PURPOSE": "Manages the global authentication state on the frontend.", + "LAYER": "Feature" + }, + "relations": [ + { + "type": "MODIFIED_BY", + "target": "handleLogin, handleLogout" + }, + { + "type": "BINDS_TO", + "target": "Navbar, ProtectedRoute" + } + ], + "children": [ + { + "name": "AuthState", + "type": "Interface", + "tier": "STANDARD", + "start_line": 11, + "end_line": 21, + "tags": { + "PURPOSE": "Defines the structure of the authentication state." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "createAuthStore", + "type": "Function", + "tier": "STANDARD", + "start_line": 30, + "end_line": 87, + "tags": { + "PURPOSE": "Creates and configures the auth store with helper methods.", + "RETURNS": "{Writable}" + }, + "relations": [], + "children": [ + { + "name": "setToken", + "type": "Function", + "tier": "STANDARD", + "start_line": 40, + "end_line": 52, + "tags": { + "PURPOSE": "Updates the store with a new JWT token.", + "PARAM": "{string} token - The JWT access token." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 40 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 40 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 40 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 40 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 40 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 40 + } + ], + "score": 0.26666666666666655 + } + }, + { + "name": "setUser", + "type": "Function", + "tier": "STANDARD", + "start_line": 53, + "end_line": 62, + "tags": { + "PURPOSE": "Sets the current user profile data.", + "PARAM": "{any} user - The user profile object." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 53 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 53 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 53 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 53 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 53 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 53 + } + ], + "score": 0.26666666666666655 + } + }, + { + "name": "logout", + "type": "Function", + "tier": "STANDARD", + "start_line": 63, + "end_line": 74, + "tags": { + "PURPOSE": "Clears authentication state and storage." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + } + ], + "score": 0.26666666666666655 + } + }, + { + "name": "setLoading", + "type": "Function", + "tier": "STANDARD", + "start_line": 75, + "end_line": 84, + "tags": { + "PURPOSE": "Updates the loading state.", + "PARAM": "{boolean} loading - Loading status." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + } + ], + "score": 0.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 30 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 30 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 30 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 30 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 30 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 30 + } + ], + "score": 0.26666666666666655 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "Select", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 40, "tags": { @@ -787,12 +1498,37 @@ "children": [], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "label", + "type": "string ", + "default": "\"\"" + }, + { + "name": "value", + "type": "string | number ", + "default": "\"\"" + }, + { + "name": "disabled", + "type": "boolean ", + "default": "false" + } + ] }, { "name": "ui", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 18, "tags": { @@ -805,12 +1541,20 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "PageHeader", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 26, "tags": { @@ -822,12 +1566,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "title", + "type": "string ", + "default": "\"\"" + } + ] }, { "name": "Card", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 35, "tags": { @@ -839,12 +1598,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "title", + "type": "string ", + "default": "\"\"" + } + ] }, { "name": "Button", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 61, "tags": { @@ -857,12 +1631,32 @@ "children": [], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "isLoading", + "type": "boolean ", + "default": "false" + }, + { + "name": "disabled", + "type": "boolean ", + "default": "false" + } + ] }, { "name": "Input", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 46, "tags": { @@ -875,12 +1669,47 @@ "children": [], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "label", + "type": "string ", + "default": "\"\"" + }, + { + "name": "value", + "type": "string ", + "default": "\"\"" + }, + { + "name": "placeholder", + "type": "string ", + "default": "\"\"" + }, + { + "name": "error", + "type": "string ", + "default": "\"\"" + }, + { + "name": "disabled", + "type": "boolean ", + "default": "false" + } + ] }, { "name": "LanguageSwitcher", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 30, "tags": { @@ -893,12 +1722,32 @@ "children": [], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "lib", + "type": "READS_FROM", + "line": 11 + }, + { + "store": "locale", + "type": "WRITES_TO", + "line": 24 + } + ] }, { "name": "i18n", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 56, "tags": { @@ -922,6 +1771,7 @@ { "name": "locale", "type": "Store", + "tier": "STANDARD", "start_line": 33, "end_line": 43, "tags": { @@ -931,12 +1781,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "t", "type": "Store", + "tier": "STANDARD", "start_line": 45, "end_line": 54, "tags": { @@ -947,20 +1799,29 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "selectPlugin", "type": "Function", + "tier": "STANDARD", "start_line": 19, - "end_line": 34, + "end_line": 32, "tags": { "PURPOSE": "Handles plugin selection and navigation.", "PRE": "plugin object must be provided.", @@ -970,14 +1831,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 19 + } + ], + "score": 0.9 } }, { "name": "handleFormSubmit", "type": "Function", - "start_line": 36, - "end_line": 54, + "tier": "STANDARD", + "start_line": 34, + "end_line": 52, "tags": { "PURPOSE": "Handles task creation from dynamic form submission.", "PRE": "event.detail must contain task parameters.", @@ -987,12 +1856,20 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + } + ], + "score": 0.9 } }, { "name": "load", "type": "Function", + "tier": "STANDARD", "start_line": 3, "end_line": 23, "tags": { @@ -1005,14 +1882,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 3 + } + ], + "score": 0.9 } }, { "name": "TaskManagementPage", "type": "Component", + "tier": "STANDARD", "start_line": 1, - "end_line": 182, + "end_line": 176, "tags": { "SEMANTICS": "tasks, management, history, logs", "PURPOSE": "Page for managing and monitoring tasks.", @@ -1024,6 +1909,7 @@ { "name": "loadInitialData", "type": "Function", + "tier": "STANDARD", "start_line": 26, "end_line": 49, "tags": { @@ -1035,12 +1921,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "refreshTasks", "type": "Function", + "tier": "STANDARD", "start_line": 51, "end_line": 68, "tags": { @@ -1052,12 +1940,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 51 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 51 + } + ], + "score": 0.8 } }, { "name": "handleSelectTask", "type": "Function", + "tier": "STANDARD", "start_line": 70, "end_line": 80, "tags": { @@ -1069,12 +1970,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + } + ], + "score": 0.8 } }, { "name": "handleRunBackup", "type": "Function", + "tier": "STANDARD", "start_line": 82, "end_line": 106, "tags": { @@ -1086,20 +2000,878 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "lib", + "type": "READS_FROM", + "line": 15 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 16 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 119 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 123 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 128 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 141 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 151 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 154 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 157 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 164 + } + ] + }, + { + "name": "LoginPage", + "type": "Component", + "tier": "STANDARD", + "start_line": 1, + "end_line": 166, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "login, auth, ui, form", + "PURPOSE": "Provides the user interface for local and ADFS authentication.", + "LAYER": "UI", + "RELATION": "CALLS -> api.auth.login", + "INVARIANT": "Shows both local login form and ADFS SSO button." + }, + "relations": [], + "children": [ + { + "name": "handleLogin", + "type": "Function", + "tier": "STANDARD", + "start_line": 23, + "end_line": 80, + "tags": { + "PURPOSE": "Submits the local login form to the backend.", + "PRE": "Username and password are not empty.", + "POST": "User is authenticated and redirected on success." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 23 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 23 + } + ], + "score": 0.8 + } + }, + { + "name": "handleADFSLogin", + "type": "Function", + "tier": "STANDARD", + "start_line": 82, + "end_line": 89, + "tags": { + "PURPOSE": "Redirects the user to the ADFS login endpoint." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + } + ], + "score": 0.26666666666666655 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + }, + "data_flow": [ + { + "store": "app", + "type": "READS_FROM", + "line": 16 + }, + { + "store": "auth", + "type": "READS_FROM", + "line": 92 + } + ] + }, + { + "name": "AdminRolesPage", + "type": "Component", + "tier": "STANDARD", + "start_line": 1, + "end_line": 236, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "admin, role-management, rbac", + "PURPOSE": "UI for managing system roles and their permissions.", + "LAYER": "Domain", + "RELATION": "DEPENDS_ON -> frontend.src.components.auth.ProtectedRoute", + "INVARIANT": "Only accessible by users with Admin role." + }, + "relations": [], + "children": [ + { + "name": "loadData", + "type": "Function", + "tier": "STANDARD", + "start_line": 35, + "end_line": 57, + "tags": { + "PURPOSE": "Fetches roles and available permissions.", + "PRE": "Component mounted.", + "POST": "roles and permissions arrays populated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "openCreateModal", + "type": "Function", + "tier": "STANDARD", + "start_line": 59, + "end_line": 72, + "tags": { + "PURPOSE": "Initializes state for creating a new role.", + "PRE": "None.", + "POST": "showModal is true, roleForm is reset." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "openEditModal", + "type": "Function", + "tier": "STANDARD", + "start_line": 74, + "end_line": 91, + "tags": { + "PURPOSE": "Initializes state for editing an existing role.", + "PRE": "role object is provided.", + "POST": "showModal is true, roleForm is populated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 74 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 74 + } + ], + "score": 0.8 + } + }, + { + "name": "handleSaveRole", + "type": "Function", + "tier": "STANDARD", + "start_line": 93, + "end_line": 115, + "tags": { + "PURPOSE": "Submits role data (create or update).", + "PRE": "roleForm contains valid data.", + "POST": "Role is saved, modal closed, data reloaded." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleDeleteRole", + "type": "Function", + "tier": "STANDARD", + "start_line": 117, + "end_line": 136, + "tags": { + "PURPOSE": "Deletes a role after confirmation.", + "PRE": "role object is provided.", + "POST": "Role is deleted if confirmed, data reloaded." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + }, + "data_flow": [ + { + "store": "lib", + "type": "READS_FROM", + "line": 16 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 124 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 145 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 150 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 155 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 163 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 164 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 165 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 166 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 184 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 185 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 198 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 198 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 202 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 206 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 210 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 219 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 222 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 223 + } + ] + }, + { + "name": "AdminUsersPage", + "type": "Component", + "tier": "STANDARD", + "start_line": 1, + "end_line": 284, + "tags": { + "SEMANTICS": "admin, user-management, rbac", + "PURPOSE": "UI for managing system users and their roles.", + "LAYER": "Feature", + "RELATION": "DEPENDS_ON -> frontend.src.components.auth.ProtectedRoute", + "INVARIANT": "Only accessible by users with \"admin:users\" permission." + }, + "relations": [], + "children": [ + { + "name": "loadData", + "type": "Function", + "tier": "STANDARD", + "start_line": 37, + "end_line": 59, + "tags": { + "PURPOSE": "Fetches users and roles from the backend.", + "PRE": "Component mounted.", + "POST": "users and roles arrays populated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "openCreateModal", + "type": "Function", + "tier": "STANDARD", + "start_line": 61, + "end_line": 72, + "tags": { + "PURPOSE": "Prepares the form for creating a new user.", + "POST": "showModal is true, isEditing is false, userForm is reset." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 61 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 61 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 61 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 61 + } + ], + "score": 0.5333333333333333 + } + }, + { + "name": "openEditModal", + "type": "Function", + "tier": "STANDARD", + "start_line": 74, + "end_line": 93, + "tags": { + "PURPOSE": "Prepares the form for editing an existing user.", + "PRE": "user object must be valid.", + "POST": "showModal is true, isEditing is true, userForm populated with user data.", + "PARAM": "{Object} user - The user object to edit." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 74 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 74 + } + ], + "score": 0.8 + } + }, + { + "name": "handleSaveUser", + "type": "Function", + "tier": "STANDARD", + "start_line": 95, + "end_line": 122, + "tags": { + "PURPOSE": "Submits user data to the backend (create or update).", + "PRE": "userForm must be valid.", + "POST": "User created or updated, modal closed, data reloaded.", + "RELATION": "CALLS -> adminService.updateUser" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleDeleteUser", + "type": "Function", + "tier": "STANDARD", + "start_line": 124, + "end_line": 150, + "tags": { + "PURPOSE": "Deletes a user after confirmation.", + "PRE": "user object must be valid.", + "POST": "User deleted if confirmed, data reloaded.", + "RELATION": "CALLS -> adminService.deleteUser", + "PARAM": "{Object} user - The user to delete." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "lib", + "type": "READS_FROM", + "line": 15 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 135 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 159 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 164 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 170 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 174 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 182 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 183 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 184 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 185 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 186 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 187 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 211 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 211 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 216 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 222 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 222 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 236 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 236 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 240 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 244 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 248 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 251 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 257 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 261 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 267 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 270 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 271 + } + ] + }, + { + "name": "AdminSettingsPage", + "type": "Component", + "tier": "STANDARD", + "start_line": 1, + "end_line": 213, + "tags": { + "SEMANTICS": "admin, adfs, mappings, configuration", + "PURPOSE": "UI for configuring Active Directory Group to local Role mappings for ADFS SSO.", + "LAYER": "Feature", + "RELATION": "DEPENDS_ON -> frontend.src.components.auth.ProtectedRoute", + "INVARIANT": "Only accessible by users with \"admin:settings\" permission." + }, + "relations": [], + "children": [ + { + "name": "loadData", + "type": "Function", + "tier": "STANDARD", + "start_line": 31, + "end_line": 62, + "tags": { + "PURPOSE": "Fetches AD mappings and roles from the backend to populate the UI.", + "PRE": "Component is mounted and user has active session.", + "POST": "mappings and roles variables are updated with backend data.", + "RETURNS": "{Promise}", + "RELATION": "CALLS -> adminService.getADGroupMappings" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleCreateMapping", + "type": "Function", + "tier": "STANDARD", + "start_line": 64, + "end_line": 94, + "tags": { + "PURPOSE": "Submits a new AD Group to Role mapping to the backend.", + "PRE": "'newMapping' object contains valid 'ad_group' and 'role_id'.", + "POST": "A new mapping is created in the database and the table is refreshed.", + "RETURNS": "{Promise}", + "RELATION": "CALLS -> adminService.createADGroupMapping" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "lib", + "type": "READS_FROM", + "line": 15 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 103 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 108 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 114 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 118 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 126 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 127 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 148 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 161 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 164 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 172 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 175 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 181 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 193 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 199 + } + ] }, { "name": "MigrationDashboard", "type": "Component", + "tier": "STANDARD", "start_line": 1, - "end_line": 418, + "end_line": 390, "tags": { "SEMANTICS": "migration, dashboard, environment, selection, database-replacement", "PURPOSE": "Main dashboard for configuring and starting migrations.", @@ -1112,8 +2884,9 @@ { "name": "fetchEnvironments", "type": "Function", - "start_line": 53, - "end_line": 70, + "tier": "STANDARD", + "start_line": 54, + "end_line": 69, "tags": { "PURPOSE": "Fetches the list of environments from the API.", "PRE": "None.", @@ -1123,14 +2896,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 54 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 54 + } + ], + "score": 0.8 } }, { "name": "fetchDashboards", "type": "Function", - "start_line": 72, - "end_line": 90, + "tier": "STANDARD", + "start_line": 71, + "end_line": 87, "tags": { "PURPOSE": "Fetches dashboards for the selected source environment.", "PRE": "envId is a valid environment ID.", @@ -1141,14 +2927,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 71 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 71 + } + ], + "score": 0.8 } }, { "name": "fetchDatabases", "type": "Function", - "start_line": 97, - "end_line": 132, + "tier": "STANDARD", + "start_line": 94, + "end_line": 123, "tags": { "PURPOSE": "Fetches databases from both environments and gets suggestions.", "PRE": "sourceEnvId and targetEnvId must be set.", @@ -1158,14 +2957,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 94 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 94 + } + ], + "score": 0.8 } }, { "name": "handleMappingUpdate", "type": "Function", - "start_line": 134, - "end_line": 169, + "tier": "STANDARD", + "start_line": 125, + "end_line": 153, "tags": { "PURPOSE": "Saves a mapping to the backend.", "PRE": "event.detail contains sourceUuid and targetUuid.", @@ -1175,14 +2987,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 125 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 125 + } + ], + "score": 0.8 } }, { "name": "handleViewLogs", "type": "Function", - "start_line": 171, - "end_line": 181, + "tier": "STANDARD", + "start_line": 155, + "end_line": 165, "tags": { "PURPOSE": "Opens the log viewer for a specific task.", "PRE": "event.detail contains task object.", @@ -1192,14 +3017,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 155 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 155 + } + ], + "score": 0.8 } }, { "name": "handlePasswordPrompt", "type": "Function", - "start_line": 183, - "end_line": 205, + "tier": "STANDARD", + "start_line": 167, + "end_line": 189, "tags": { "PURPOSE": "Reactive logic to show password prompt when a task is awaiting input.", "PRE": "selectedTask status is AWAITING_INPUT.", @@ -1209,14 +3047,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 167 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 167 + } + ], + "score": 0.8 } }, { "name": "handleResumeMigration", "type": "Function", - "start_line": 207, - "end_line": 225, + "tier": "STANDARD", + "start_line": 191, + "end_line": 209, "tags": { "PURPOSE": "Resumes a migration task with provided passwords.", "PRE": "event.detail contains passwords.", @@ -1226,14 +3077,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 191 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 191 + } + ], + "score": 0.8 } }, { "name": "startMigration", "type": "Function", - "start_line": 227, - "end_line": 294, + "tier": "STANDARD", + "start_line": 211, + "end_line": 266, "tags": { "PURPOSE": "Starts the migration process.", "PRE": "sourceEnvId and targetEnvId must be set and different.", @@ -1243,20 +3107,163 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 211 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 211 + } + ], + "score": 0.8 + } + }, + { + "name": "DashboardSelectionSection", + "type": "Component", + "tier": "STANDARD", + "start_line": 306, + "end_line": 319, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 306 + }, + { + "message": "Missing Mandatory Tag: @LAYER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 306 + }, + { + "message": "Missing Mandatory Tag: @SEMANTICS (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 306 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 306 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 306 + }, + { + "message": "Missing Mandatory Tag: @LAYER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 306 + }, + { + "message": "Missing Mandatory Tag: @SEMANTICS (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 306 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 306 + } + ], + "score": 0.0 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "lib", + "type": "READS_FROM", + "line": 25 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 26 + }, + { + "store": "selectedTask", + "type": "READS_FROM", + "line": 176 + }, + { + "store": "selectedTask", + "type": "READS_FROM", + "line": 176 + }, + { + "store": "selectedTask", + "type": "READS_FROM", + "line": 176 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 177 + }, + { + "store": "selectedTask", + "type": "READS_FROM", + "line": 183 + }, + { + "store": "selectedTask", + "type": "READS_FROM", + "line": 183 + }, + { + "store": "selectedTask", + "type": "READS_FROM", + "line": 196 + }, + { + "store": "selectedTask", + "type": "READS_FROM", + "line": 200 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 271 + }, + { + "store": "selectedTask", + "type": "READS_FROM", + "line": 275 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 280 + } + ] }, { "name": "MappingManagement", "type": "Component", + "tier": "STANDARD", "start_line": 1, - "end_line": 194, + "end_line": 180, "tags": { "SEMANTICS": "mapping, management, database, fuzzy-matching", "PURPOSE": "Page for managing database mappings between environments.", @@ -1269,8 +3276,9 @@ { "name": "fetchEnvironments", "type": "Function", - "start_line": 35, - "end_line": 50, + "tier": "STANDARD", + "start_line": 36, + "end_line": 49, "tags": { "PURPOSE": "Fetches the list of environments.", "PRE": "None.", @@ -1280,14 +3288,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + } + ], + "score": 0.8 } }, { "name": "fetchDatabases", "type": "Function", - "start_line": 54, - "end_line": 90, + "tier": "STANDARD", + "start_line": 53, + "end_line": 83, "tags": { "PURPOSE": "Fetches databases from both environments and gets suggestions.", "PRE": "sourceEnvId and targetEnvId must be set.", @@ -1297,14 +3318,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 53 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 53 + } + ], + "score": 0.8 } }, { "name": "handleUpdate", "type": "Function", - "start_line": 92, - "end_line": 128, + "tier": "STANDARD", + "start_line": 85, + "end_line": 114, "tags": { "PURPOSE": "Saves a mapping to the backend.", "PRE": "event.detail contains sourceUuid and targetUuid.", @@ -1314,24 +3348,57 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 85 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 85 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "lib", + "type": "READS_FROM", + "line": 18 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 19 + } + ] }, { "name": "StoragePage", "type": "Component", + "tier": "STANDARD", "start_line": 1, - "end_line": 198, + "end_line": 213, "tags": { + "TIER": "STANDARD", "SEMANTICS": "storage, files, management", "PURPOSE": "Main page for file storage management.", - "LAYER": "Feature", + "LAYER": "UI", "RELATION": "CONTAINS -> FileUpload", "INVARIANT": "Always displays tabs for Backups and Repositories." }, @@ -1340,8 +3407,9 @@ { "name": "loadFiles", "type": "Function", - "start_line": 23, - "end_line": 58, + "tier": "STANDARD", + "start_line": 25, + "end_line": 60, "tags": { "PURPOSE": "Fetches the list of files from the server.", "POST": "Updates the `files` array with the latest data." @@ -1349,18 +3417,38 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @PRE" - ] + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + } + ], + "score": 0.5333333333333333 } }, { "name": "handleDelete", "type": "Function", - "start_line": 60, - "end_line": 77, + "tier": "STANDARD", + "start_line": 62, + "end_line": 79, "tags": { "PURPOSE": "Handles the file deletion process.", "PARAM": "{CustomEvent} event - The delete event containing category and path." @@ -1368,20 +3456,48 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST" - ] + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 62 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 62 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 62 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 62 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 62 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 62 + } + ], + "score": 0.26666666666666655 } }, { "name": "handleNavigate", "type": "Function", - "start_line": 79, - "end_line": 88, + "tier": "STANDARD", + "start_line": 81, + "end_line": 90, "tags": { "PURPOSE": "Updates the current path and reloads files when navigating into a directory.", "PARAM": "{CustomEvent} event - The navigation event containing the new path." @@ -1389,61 +3505,145 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST" - ] + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 81 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 81 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 81 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 81 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 81 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 81 + } + ], + "score": 0.26666666666666655 } }, { "name": "navigateUp", "type": "Function", - "start_line": 90, - "end_line": 101, + "tier": "STANDARD", + "start_line": 92, + "end_line": 105, "tags": { - "PURPOSE": "Navigates one level up in the directory structure." + "PURPOSE": "Navigates one level up in the directory structure.", + "PRE": "currentPath is set and deeper than activeTab root.", + "POST": "currentPath is moved up one directory level." }, "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST" - ] + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 92 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 92 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } - }, - { - "name": "SearchPage", - "type": "Component", - "start_line": 1, - "end_line": 25, - "tags": { - "SEMANTICS": "search, page, tool", - "PURPOSE": "Page for the dataset search tool.", - "LAYER": "UI" + "issues": [], + "score": 1.0 }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } + "data_flow": [ + { + "store": "app", + "type": "READS_FROM", + "line": 17 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 55 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 69 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 73 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 76 + }, + { + "store": "page", + "type": "WRITES_TO", + "line": 108 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 132 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 135 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 155 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 155 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 169 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 175 + } + ] }, { "name": "MapperPage", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 25, "tags": { @@ -1455,12 +3655,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "lib", + "type": "READS_FROM", + "line": 10 + } + ] }, { "name": "DebugPage", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 25, "tags": { @@ -1472,14 +3687,29 @@ "children": [], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "lib", + "type": "READS_FROM", + "line": 10 + } + ] }, { "name": "handleSaveGlobal", "type": "Function", - "start_line": 26, - "end_line": 42, + "tier": "STANDARD", + "start_line": 46, + "end_line": 62, "tags": { "PURPOSE": "Saves global application settings.", "PRE": "settings.settings must contain valid configuration.", @@ -1489,14 +3719,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 46 + } + ], + "score": 0.9 } }, { "name": "handleSaveStorage", "type": "Function", - "start_line": 44, - "end_line": 60, + "tier": "STANDARD", + "start_line": 64, + "end_line": 80, "tags": { "PURPOSE": "Saves storage-specific settings.", "PRE": "settings.settings.storage must contain valid configuration.", @@ -1506,14 +3744,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 64 + } + ], + "score": 0.9 } }, { "name": "handleAddOrUpdateEnv", "type": "Function", - "start_line": 62, - "end_line": 88, + "tier": "STANDARD", + "start_line": 82, + "end_line": 108, "tags": { "PURPOSE": "Adds a new environment or updates an existing one.", "PRE": "newEnv must contain valid environment details.", @@ -1523,14 +3769,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + } + ], + "score": 0.9 } }, { "name": "handleDeleteEnv", "type": "Function", - "start_line": 90, - "end_line": 109, + "tier": "STANDARD", + "start_line": 110, + "end_line": 129, "tags": { "PURPOSE": "Deletes a Superset environment.", "PRE": "id must be a valid environment ID.", @@ -1540,14 +3794,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 110 + } + ], + "score": 0.9 } }, { "name": "handleTestEnv", "type": "Function", - "start_line": 111, - "end_line": 132, + "tier": "STANDARD", + "start_line": 131, + "end_line": 152, "tags": { "PURPOSE": "Tests the connection to a Superset environment.", "PRE": "id must be a valid environment ID.", @@ -1557,14 +3819,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 131 + } + ], + "score": 0.9 } }, { "name": "editEnv", "type": "Function", - "start_line": 134, - "end_line": 143, + "tier": "STANDARD", + "start_line": 154, + "end_line": 163, "tags": { "PURPOSE": "Populates the environment form for editing.", "PRE": "env object must be provided.", @@ -1574,14 +3844,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 154 + } + ], + "score": 0.9 } }, { "name": "resetEnvForm", "type": "Function", - "start_line": 145, - "end_line": 161, + "tier": "STANDARD", + "start_line": 165, + "end_line": 181, "tags": { "PURPOSE": "Resets the environment creation/edit form to default state.", "PRE": "None.", @@ -1591,14 +3869,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 165 + } + ], + "score": 0.9 } }, { "name": "load", "type": "Function", + "tier": "STANDARD", "start_line": 3, - "end_line": 28, + "end_line": 34, "tags": { "PURPOSE": "Loads application settings and environment list.", "PRE": "API must be reachable.", @@ -1609,12 +3895,20 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 3 + } + ], + "score": 0.9 } }, { "name": "ConnectionsSettingsPage", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 40, "tags": { @@ -1627,6 +3921,7 @@ { "name": "handleSuccess", "type": "Function", + "tier": "STANDARD", "start_line": 13, "end_line": 23, "tags": { @@ -1638,18 +3933,38 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 13 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 13 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "GitSettingsPage", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 182, "tags": { @@ -1664,6 +3979,7 @@ { "name": "loadConfigs", "type": "Function", + "tier": "STANDARD", "start_line": 33, "end_line": 46, "tags": { @@ -1675,12 +3991,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 33 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 33 + } + ], + "score": 0.8 } }, { "name": "handleTest", "type": "Function", + "tier": "STANDARD", "start_line": 50, "end_line": 71, "tags": { @@ -1692,12 +4021,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 50 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 50 + } + ], + "score": 0.8 } }, { "name": "handleSave", "type": "Function", + "tier": "STANDARD", "start_line": 73, "end_line": 89, "tags": { @@ -1709,12 +4051,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 73 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 73 + } + ], + "score": 0.8 } }, { "name": "handleDelete", "type": "Function", + "tier": "STANDARD", "start_line": 91, "end_line": 108, "tags": { @@ -1727,20 +4082,52 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 91 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 91 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "lib", + "type": "READS_FROM", + "line": 17 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 18 + } + ] }, { "name": "GitDashboardPage", "type": "Component", + "tier": "STANDARD", "start_line": 1, - "end_line": 96, + "end_line": 93, "tags": { "PURPOSE": "Dashboard management page for Git integration.", "LAYER": "Page", @@ -1751,8 +4138,9 @@ { "name": "fetchEnvironments", "type": "Function", - "start_line": 21, - "end_line": 39, + "tier": "STANDARD", + "start_line": 22, + "end_line": 38, "tags": { "PURPOSE": "Fetches the list of deployment environments from the API.", "PRE": "Component is mounted.", @@ -1762,14 +4150,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + } + ], + "score": 0.8 } }, { "name": "fetchDashboards", "type": "Function", - "start_line": 41, - "end_line": 59, + "tier": "STANDARD", + "start_line": 40, + "end_line": 56, "tags": { "PURPOSE": "Fetches dashboards for a specific environment.", "PRE": "`envId` is a valid environment ID.", @@ -1779,18 +4180,50 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 40 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 40 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "lib", + "type": "READS_FROM", + "line": 13 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 14 + } + ] }, { "name": "Dashboard", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 64, "tags": { @@ -1806,6 +4239,7 @@ { "name": "onMount", "type": "Function", + "tier": "STANDARD", "start_line": 17, "end_line": 27, "tags": { @@ -1817,12 +4251,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "selectPlugin", "type": "Function", + "tier": "STANDARD", "start_line": 29, "end_line": 40, "tags": { @@ -1835,18 +4271,45 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 29 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 29 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "plugins", + "type": "READS_FROM", + "line": 47 + } + ] }, { "name": "Settings", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 340, "tags": { @@ -1863,6 +4326,7 @@ { "name": "loadSettings", "type": "Function", + "tier": "STANDARD", "start_line": 49, "end_line": 66, "tags": { @@ -1874,12 +4338,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 49 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 49 + } + ], + "score": 0.8 } }, { "name": "handleSaveGlobal", "type": "Function", + "tier": "STANDARD", "start_line": 68, "end_line": 85, "tags": { @@ -1891,12 +4368,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 68 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 68 + } + ], + "score": 0.8 } }, { "name": "handleAddOrUpdateEnv", "type": "Function", + "tier": "STANDARD", "start_line": 87, "end_line": 111, "tags": { @@ -1908,12 +4398,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 87 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 87 + } + ], + "score": 0.8 } }, { "name": "handleDeleteEnv", "type": "Function", + "tier": "STANDARD", "start_line": 113, "end_line": 134, "tags": { @@ -1926,12 +4429,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 113 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 113 + } + ], + "score": 0.8 } }, { "name": "handleTestEnv", "type": "Function", + "tier": "STANDARD", "start_line": 136, "end_line": 159, "tags": { @@ -1944,12 +4460,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 136 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 136 + } + ], + "score": 0.8 } }, { "name": "editEnv", "type": "Function", + "tier": "STANDARD", "start_line": 161, "end_line": 172, "tags": { @@ -1962,12 +4491,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 161 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 161 + } + ], + "score": 0.8 } }, { "name": "resetEnvForm", "type": "Function", + "tier": "STANDARD", "start_line": 174, "end_line": 195, "tags": { @@ -1979,20 +4521,40 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 174 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 174 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "getConnections", "type": "Function", - "start_line": 7, - "end_line": 23, + "tier": "STANDARD", + "start_line": 9, + "end_line": 21, "tags": { "PURPOSE": "Fetch a list of saved connections.", "PRE": "None.", @@ -2003,14 +4565,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 9 + } + ], + "score": 0.9 } }, { "name": "createConnection", "type": "Function", - "start_line": 25, - "end_line": 50, + "tier": "STANDARD", + "start_line": 23, + "end_line": 36, "tags": { "PURPOSE": "Create a new connection configuration.", "PRE": "connectionData must be a valid object.", @@ -2022,14 +4592,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 23 + } + ], + "score": 0.9 } }, { "name": "deleteConnection", "type": "Function", - "start_line": 52, - "end_line": 70, + "tier": "STANDARD", + "start_line": 38, + "end_line": 50, "tags": { "PURPOSE": "Delete a connection configuration.", "PRE": "connectionId must be a valid string.", @@ -2040,14 +4618,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 38 + } + ], + "score": 0.9 } }, { "name": "GitServiceClient", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 325, + "end_line": 258, "tags": { "SEMANTICS": "git, service, api, client", "PURPOSE": "API client for Git operations, managing the communication between frontend and backend.", @@ -2059,8 +4645,9 @@ { "name": "gitService", "type": "Action", - "start_line": 11, - "end_line": 323, + "tier": "STANDARD", + "start_line": 13, + "end_line": 256, "tags": { "PURPOSE": "Retrieves the diff for specific files or the whole repository.", "PRE": "dashboardId must be a valid integer.", @@ -2072,20 +4659,29 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "runTask", "type": "Function", - "start_line": 7, - "end_line": 33, + "tier": "STANDARD", + "start_line": 9, + "end_line": 23, "tags": { "PURPOSE": "Start a new task for a given plugin.", "PRE": "pluginId and params must be provided.", @@ -2097,14 +4693,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 9 + } + ], + "score": 0.9 } }, { "name": "getTaskStatus", "type": "Function", - "start_line": 35, - "end_line": 52, + "tier": "STANDARD", + "start_line": 25, + "end_line": 38, "tags": { "PURPOSE": "Fetch details for a specific task (to poll status or get result).", "PRE": "taskId must be provided.", @@ -2116,14 +4720,450 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + } + ], + "score": 0.9 + } + }, + { + "name": "adminService", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 241, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "admin, users, roles, ad-mappings, api", + "PURPOSE": "Service for Admin-related API calls (User and Role management).", + "LAYER": "Service", + "INVARIANT": "All requests must include valid Admin JWT token (handled by api client)." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "frontend.src.lib.api" + } + ], + "children": [ + { + "name": "getUsers", + "type": "Function", + "tier": "STANDARD", + "start_line": 15, + "end_line": 34, + "tags": { + "PURPOSE": "Fetches all registered users from the backend.", + "PRE": "User must be authenticated with Admin privileges.", + "POST": "Returns an array of user objects.", + "RETURNS": "{Promise}", + "RELATION": "CALLS -> backend.src.api.routes.admin.list_users" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "createUser", + "type": "Function", + "tier": "STANDARD", + "start_line": 36, + "end_line": 56, + "tags": { + "PURPOSE": "Creates a new local user.", + "PRE": "User must be authenticated with Admin privileges.", + "PARAM": "{Object} userData - User details (username, email, password, roles, is_active).", + "POST": "New user record created in auth.db.", + "RETURNS": "{Promise}", + "RELATION": "CALLS -> backend.src.api.routes.admin.create_user" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "getRoles", + "type": "Function", + "tier": "STANDARD", + "start_line": 58, + "end_line": 75, + "tags": { + "PURPOSE": "Fetches all available system roles.", + "RETURNS": "{Promise}", + "RELATION": "CALLS -> backend.src.api.routes.admin.list_roles" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 58 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 58 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 58 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 58 + } + ], + "score": 0.4666666666666666 + } + }, + { + "name": "getADGroupMappings", + "type": "Function", + "tier": "STANDARD", + "start_line": 77, + "end_line": 93, + "tags": { + "PURPOSE": "Fetches mappings between AD groups and local roles.", + "RETURNS": "{Promise}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 77 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 77 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 77 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 77 + } + ], + "score": 0.4666666666666666 + } + }, + { + "name": "createADGroupMapping", + "type": "Function", + "tier": "STANDARD", + "start_line": 95, + "end_line": 112, + "tags": { + "PURPOSE": "Creates or updates an AD group to Role mapping.", + "PARAM": "{Object} mappingData - Mapping details (ad_group, role_id).", + "RETURNS": "{Promise}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 95 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 95 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 95 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 95 + } + ], + "score": 0.4666666666666666 + } + }, + { + "name": "updateUser", + "type": "Function", + "tier": "STANDARD", + "start_line": 114, + "end_line": 132, + "tags": { + "PURPOSE": "Updates an existing user.", + "PARAM": "{Object} userData - Updated user data.", + "RETURNS": "{Promise}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 114 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 114 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 114 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 114 + } + ], + "score": 0.4666666666666666 + } + }, + { + "name": "deleteUser", + "type": "Function", + "tier": "STANDARD", + "start_line": 134, + "end_line": 150, + "tags": { + "PURPOSE": "Deletes a user.", + "PARAM": "{string} userId - Target user ID.", + "RETURNS": "{Promise}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 134 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 134 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 134 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 134 + } + ], + "score": 0.4666666666666666 + } + }, + { + "name": "createRole", + "type": "Function", + "tier": "STANDARD", + "start_line": 152, + "end_line": 169, + "tags": { + "PURPOSE": "Creates a new role.", + "PARAM": "{Object} roleData - Role details (name, description, permissions).", + "RETURNS": "{Promise}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 152 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 152 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 152 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 152 + } + ], + "score": 0.4666666666666666 + } + }, + { + "name": "updateRole", + "type": "Function", + "tier": "STANDARD", + "start_line": 171, + "end_line": 189, + "tags": { + "PURPOSE": "Updates an existing role.", + "PARAM": "{Object} roleData - Updated role data.", + "RETURNS": "{Promise}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 171 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 171 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 171 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 171 + } + ], + "score": 0.4666666666666666 + } + }, + { + "name": "deleteRole", + "type": "Function", + "tier": "STANDARD", + "start_line": 191, + "end_line": 207, + "tags": { + "PURPOSE": "Deletes a role.", + "PARAM": "{string} roleId - Target role ID.", + "RETURNS": "{Promise}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 191 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 191 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 191 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 191 + } + ], + "score": 0.4666666666666666 + } + }, + { + "name": "getPermissions", + "type": "Function", + "tier": "STANDARD", + "start_line": 209, + "end_line": 225, + "tags": { + "PURPOSE": "Fetches all available permissions.", + "RETURNS": "{Promise}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 209 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 209 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 209 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 209 + } + ], + "score": 0.4666666666666666 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "getTasks", "type": "Function", - "start_line": 7, - "end_line": 34, + "tier": "STANDARD", + "start_line": 9, + "end_line": 32, "tags": { "PURPOSE": "Fetch a list of tasks with pagination and optional status filter.", "PRE": "limit and offset are numbers.", @@ -2135,14 +5175,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 9 + } + ], + "score": 0.9 } }, { "name": "getTask", "type": "Function", - "start_line": 36, - "end_line": 53, + "tier": "STANDARD", + "start_line": 34, + "end_line": 47, "tags": { "PURPOSE": "Fetch details for a specific task.", "PRE": "taskId must be provided.", @@ -2154,14 +5202,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + } + ], + "score": 0.9 } }, { "name": "getTaskLogs", "type": "Function", - "start_line": 55, - "end_line": 75, + "tier": "STANDARD", + "start_line": 49, + "end_line": 69, "tags": { "PURPOSE": "Fetch logs for a specific task.", "PRE": "taskId must be provided.", @@ -2173,14 +5229,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 49 + } + ], + "score": 0.9 } }, { "name": "resumeTask", "type": "Function", - "start_line": 77, - "end_line": 103, + "tier": "STANDARD", + "start_line": 71, + "end_line": 85, "tags": { "PURPOSE": "Resume a task that is awaiting input (e.g., passwords).", "PRE": "taskId and passwords must be provided.", @@ -2192,14 +5256,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 71 + } + ], + "score": 0.9 } }, { "name": "resolveTask", "type": "Function", - "start_line": 105, - "end_line": 131, + "tier": "STANDARD", + "start_line": 87, + "end_line": 101, "tags": { "PURPOSE": "Resolve a task that is awaiting mapping.", "PRE": "taskId and resolutionParams must be provided.", @@ -2211,14 +5283,22 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 87 + } + ], + "score": 0.9 } }, { "name": "clearTasks", "type": "Function", - "start_line": 133, - "end_line": 156, + "tier": "STANDARD", + "start_line": 103, + "end_line": 120, "tags": { "PURPOSE": "Clear tasks based on status.", "PRE": "status is a string or null.", @@ -2229,12 +5309,20 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + } + ], + "score": 0.9 } }, { "name": "storageService", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 109, "tags": { @@ -2248,6 +5336,7 @@ { "name": "listFiles", "type": "Function", + "tier": "STANDARD", "start_line": 11, "end_line": 34, "tags": { @@ -2261,12 +5350,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 11 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 11 + } + ], + "score": 0.8 } }, { "name": "uploadFile", "type": "Function", + "tier": "STANDARD", "start_line": 36, "end_line": 65, "tags": { @@ -2280,12 +5382,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + } + ], + "score": 0.8 } }, { "name": "deleteFile", "type": "Function", + "tier": "STANDARD", "start_line": 67, "end_line": 86, "tags": { @@ -2299,12 +5414,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 67 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 67 + } + ], + "score": 0.8 } }, { "name": "downloadFileUrl", "type": "Function", + "tier": "STANDARD", "start_line": 88, "end_line": 100, "tags": { @@ -2318,18 +5446,38 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 88 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 88 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "PasswordPrompt", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 133, "tags": { @@ -2343,6 +5491,7 @@ { "name": "handleSubmit", "type": "Function", + "tier": "STANDARD", "start_line": 21, "end_line": 39, "tags": { @@ -2354,12 +5503,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + } + ], + "score": 0.8 } }, { "name": "handleCancel", "type": "Function", + "tier": "STANDARD", "start_line": 41, "end_line": 49, "tags": { @@ -2371,18 +5533,59 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "show", + "type": "any", + "default": "false" + }, + { + "name": "databases", + "type": "any", + "default": "[]" + }, + { + "name": "errorMessage", + "type": "any", + "default": "\"\"" + } + ], + "events": [ + "cancel", + "resume" + ] }, { "name": "MappingTable", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 98, "tags": { @@ -2397,6 +5600,7 @@ { "name": "updateMapping", "type": "Function", + "tier": "STANDARD", "start_line": 25, "end_line": 34, "tags": { @@ -2408,12 +5612,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + } + ], + "score": 0.8 } }, { "name": "getSuggestion", "type": "Function", + "tier": "STANDARD", "start_line": 36, "end_line": 45, "tags": { @@ -2425,18 +5642,41 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "events": [ + "update" + ] }, { "name": "TaskLogViewer", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 244, "tags": { @@ -2450,6 +5690,7 @@ { "name": "fetchLogs", "type": "Function", + "tier": "STANDARD", "start_line": 30, "end_line": 53, "tags": { @@ -2461,12 +5702,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 30 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 30 + } + ], + "score": 0.8 } }, { "name": "scrollToBottom", "type": "Function", + "tier": "STANDARD", "start_line": 55, "end_line": 68, "tags": { @@ -2478,12 +5732,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 55 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 55 + } + ], + "score": 0.8 } }, { "name": "handleScroll", "type": "Function", + "tier": "STANDARD", "start_line": 70, "end_line": 83, "tags": { @@ -2495,12 +5762,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + } + ], + "score": 0.8 } }, { "name": "close", "type": "Function", + "tier": "STANDARD", "start_line": 85, "end_line": 95, "tags": { @@ -2512,12 +5792,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 85 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 85 + } + ], + "score": 0.8 } }, { "name": "getLogLevelColor", "type": "Function", + "tier": "STANDARD", "start_line": 97, "end_line": 112, "tags": { @@ -2529,12 +5822,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + } + ], + "score": 0.8 } }, { "name": "onDestroy", "type": "Function", + "tier": "STANDARD", "start_line": 131, "end_line": 140, "tags": { @@ -2546,18 +5852,110 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 131 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 131 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "show", + "type": "any", + "default": "false" + }, + { + "name": "inline", + "type": "any", + "default": "false" + }, + { + "name": "taskId", + "type": "any", + "default": "null" + }, + { + "name": "taskStatus", + "type": "any", + "default": "null" + } + ], + "events": [ + "close" + ], + "data_flow": [ + { + "store": "t", + "type": "READS_FROM", + "line": 148 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 150 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 157 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 161 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 197 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 198 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 205 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 209 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 236 + } + ] }, { "name": "Footer", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 10, "tags": { @@ -2569,12 +5967,20 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "MissingMappingModal", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 118, "tags": { @@ -2589,6 +5995,7 @@ { "name": "resolve", "type": "Function", + "tier": "STANDARD", "start_line": 26, "end_line": 39, "tags": { @@ -2600,12 +6007,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 26 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 26 + } + ], + "score": 0.8 } }, { "name": "cancel", "type": "Function", + "tier": "STANDARD", "start_line": 41, "end_line": 49, "tags": { @@ -2617,18 +6037,59 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "show", + "type": "boolean ", + "default": "false" + }, + { + "name": "sourceDbName", + "type": "string ", + "default": "\"\"" + }, + { + "name": "sourceDbUuid", + "type": "string ", + "default": "\"\"" + } + ], + "events": [ + "cancel", + "resolve" + ] }, { "name": "DashboardGrid", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 258, "tags": { @@ -2643,6 +6104,7 @@ { "name": "handleSort", "type": "Function", + "tier": "STANDARD", "start_line": 71, "end_line": 83, "tags": { @@ -2654,12 +6116,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 71 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 71 + } + ], + "score": 0.8 } }, { "name": "handleSelectionChange", "type": "Function", + "tier": "STANDARD", "start_line": 85, "end_line": 99, "tags": { @@ -2671,12 +6146,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 85 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 85 + } + ], + "score": 0.8 } }, { "name": "handleSelectAll", "type": "Function", + "tier": "STANDARD", "start_line": 101, "end_line": 119, "tags": { @@ -2688,12 +6176,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 101 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 101 + } + ], + "score": 0.8 } }, { "name": "goToPage", "type": "Function", + "tier": "STANDARD", "start_line": 121, "end_line": 130, "tags": { @@ -2705,12 +6206,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + } + ], + "score": 0.8 } }, { "name": "openGit", "type": "Function", + "tier": "STANDARD", "start_line": 132, "end_line": 141, "tags": { @@ -2719,26 +6233,123 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST" - ] + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 132 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 132 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 132 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 132 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 132 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 132 + } + ], + "score": 0.26666666666666655 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "dashboards", + "type": "DashboardMetadata[] ", + "default": "[]" + }, + { + "name": "selectedIds", + "type": "number[] ", + "default": "[]" + } + ], + "events": [ + "selectionChanged" + ], + "data_flow": [ + { + "store": "t", + "type": "WRITES_TO", + "line": 151 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 170 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 173 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 176 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 178 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 206 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 218 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 230 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 238 + } + ] }, { "name": "Navbar", "type": "Component", + "tier": "STANDARD", "start_line": 1, - "end_line": 71, + "end_line": 79, "tags": { "SEMANTICS": "navbar, navigation, header, layout", "PURPOSE": "Main navigation bar for the application.", @@ -2749,14 +6360,177 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "app", + "type": "READS_FROM", + "line": 6 + }, + { + "store": "app", + "type": "READS_FROM", + "line": 9 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 10 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 11 + }, + { + "store": "app", + "type": "READS_FROM", + "line": 13 + }, + { + "store": "page", + "type": "WRITES_TO", + "line": 31 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 33 + }, + { + "store": "page", + "type": "WRITES_TO", + "line": 37 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 39 + }, + { + "store": "page", + "type": "WRITES_TO", + "line": 42 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 43 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 46 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 47 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 48 + }, + { + "store": "auth", + "type": "READS_FROM", + "line": 52 + }, + { + "store": "auth", + "type": "READS_FROM", + "line": 52 + }, + { + "store": "page", + "type": "WRITES_TO", + "line": 54 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 55 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 58 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 59 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 60 + }, + { + "store": "auth", + "type": "READS_FROM", + "line": 66 + }, + { + "store": "auth", + "type": "WRITES_TO", + "line": 68 + } + ] + }, + { + "name": "Navbar", + "type": "Module", + "tier": "TRIVIAL", + "start_line": 1, + "end_line": 79, + "tags": { + "PURPOSE": "Auto-generated module for frontend/src/components/Navbar.svelte", + "TIER": "TRIVIAL", + "LAYER": "Unknown" + }, + "relations": [], + "children": [ + { + "name": "handleLogout", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 15, + "end_line": 15, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "TaskHistory", "type": "Component", + "tier": "STANDARD", "start_line": 1, - "end_line": 209, + "end_line": 215, "tags": { "SEMANTICS": "task, history, list, status, monitoring", "PURPOSE": "Displays a list of recent tasks with their status and allows selecting them for viewing logs.", @@ -2768,8 +6542,9 @@ { "name": "fetchTasks", "type": "Function", + "tier": "STANDARD", "start_line": 18, - "end_line": 48, + "end_line": 50, "tags": { "PURPOSE": "Fetches the list of recent tasks from the API.", "PRE": "None.", @@ -2779,14 +6554,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + } + ], + "score": 0.8 } }, { "name": "clearTasks", "type": "Function", - "start_line": 50, - "end_line": 69, + "tier": "STANDARD", + "start_line": 52, + "end_line": 73, "tags": { "PURPOSE": "Clears tasks from the history, optionally filtered by status.", "PRE": "User confirms deletion via prompt.", @@ -2796,14 +6584,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 52 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 52 + } + ], + "score": 0.8 } }, { "name": "selectTask", "type": "Function", - "start_line": 71, - "end_line": 91, + "tier": "STANDARD", + "start_line": 75, + "end_line": 97, "tags": { "PURPOSE": "Selects a task and fetches its full details.", "PRE": "task object is provided.", @@ -2813,14 +6614,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + } + ], + "score": 0.8 } }, { "name": "getStatusColor", "type": "Function", - "start_line": 93, - "end_line": 107, + "tier": "STANDARD", + "start_line": 99, + "end_line": 113, "tags": { "PURPOSE": "Returns the CSS color class for a given task status.", "PRE": "status string is provided.", @@ -2830,14 +6644,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 99 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 99 + } + ], + "score": 0.8 } }, { "name": "onMount", "type": "Function", - "start_line": 109, - "end_line": 117, + "tier": "STANDARD", + "start_line": 115, + "end_line": 123, "tags": { "PURPOSE": "Initializes the component by fetching tasks and starting polling.", "PRE": "Component is mounting.", @@ -2847,14 +6674,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 115 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 115 + } + ], + "score": 0.8 } }, { "name": "onDestroy", "type": "Function", - "start_line": 119, - "end_line": 126, + "tier": "STANDARD", + "start_line": 125, + "end_line": 132, "tags": { "PURPOSE": "Cleans up the polling interval when the component is destroyed.", "PRE": "Component is being destroyed.", @@ -2864,18 +6704,65 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 125 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 125 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "selectedTask", + "type": "READS_FROM", + "line": 38 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 39 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 40 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 177 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 177 + } + ] }, { "name": "Toast", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 31, "tags": { @@ -2890,12 +6777,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "toasts", + "type": "READS_FROM", + "line": 19 + } + ] }, { "name": "TaskRunner", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 395, "tags": { @@ -2911,6 +6813,7 @@ { "name": "connect", "type": "Function", + "tier": "STANDARD", "start_line": 38, "end_line": 132, "tags": { @@ -2922,12 +6825,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 38 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 38 + } + ], + "score": 0.8 } }, { "name": "fetchTargetDatabases", "type": "Function", + "tier": "STANDARD", "start_line": 134, "end_line": 156, "tags": { @@ -2939,12 +6855,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 134 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 134 + } + ], + "score": 0.8 } }, { "name": "handleMappingResolve", "type": "Function", + "tier": "STANDARD", "start_line": 158, "end_line": 201, "tags": { @@ -2956,12 +6885,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 158 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 158 + } + ], + "score": 0.8 } }, { "name": "handlePasswordResume", "type": "Function", + "tier": "STANDARD", "start_line": 203, "end_line": 225, "tags": { @@ -2973,12 +6915,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 203 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 203 + } + ], + "score": 0.8 } }, { "name": "startDataTimeout", "type": "Function", + "tier": "STANDARD", "start_line": 227, "end_line": 239, "tags": { @@ -2990,12 +6945,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 227 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 227 + } + ], + "score": 0.8 } }, { "name": "resetDataTimeout", "type": "Function", + "tier": "STANDARD", "start_line": 241, "end_line": 250, "tags": { @@ -3007,12 +6975,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 241 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 241 + } + ], + "score": 0.8 } }, { "name": "onMount", "type": "Function", + "tier": "STANDARD", "start_line": 252, "end_line": 279, "tags": { @@ -3024,12 +7005,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 252 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 252 + } + ], + "score": 0.8 } }, { "name": "onDestroy", "type": "Function", + "tier": "STANDARD", "start_line": 281, "end_line": 295, "tags": { @@ -3041,18 +7035,79 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "selectedTask", + "type": "READS_FROM", + "line": 300 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 302 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 335 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 336 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 337 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 337 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 338 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 342 + }, + { + "store": "taskLogs", + "type": "READS_FROM", + "line": 349 + }, + { + "store": "taskLogs", + "type": "READS_FROM", + "line": 352 + } + ] }, { "name": "TaskList", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 110, "tags": { @@ -3066,6 +7121,7 @@ { "name": "getStatusColor", "type": "Function", + "tier": "STANDARD", "start_line": 19, "end_line": 34, "tags": { @@ -3077,12 +7133,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 19 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 19 + } + ], + "score": 0.8 } }, { "name": "formatTime", "type": "Function", + "tier": "STANDARD", "start_line": 36, "end_line": 48, "tags": { @@ -3094,12 +7163,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + } + ], + "score": 0.8 } }, { "name": "handleTaskClick", "type": "Function", + "tier": "STANDARD", "start_line": 50, "end_line": 57, "tags": { @@ -3111,18 +7193,70 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 50 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 50 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "tasks", + "type": "Array ", + "default": "[]" + }, + { + "name": "loading", + "type": "boolean ", + "default": "false" + } + ], + "events": [ + "select" + ], + "data_flow": [ + { + "store": "t", + "type": "WRITES_TO", + "line": 62 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 64 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 98 + } + ] }, { "name": "DynamicForm", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 92, "tags": { @@ -3138,6 +7272,7 @@ { "name": "handleSubmit", "type": "Function", + "tier": "STANDARD", "start_line": 23, "end_line": 33, "tags": { @@ -3149,12 +7284,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "initializeForm", "type": "Function", + "tier": "STANDARD", "start_line": 35, "end_line": 48, "tags": { @@ -3166,18 +7303,48 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 35 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 35 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "schema", + "type": "any", + "default": null + } + ], + "events": [ + "submit" + ] }, { "name": "EnvSelector", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 60, "tags": { @@ -3192,6 +7359,7 @@ { "name": "handleSelect", "type": "Function", + "tier": "STANDARD", "start_line": 24, "end_line": 36, "tags": { @@ -3204,24 +7372,124 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 24 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 24 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "label", + "type": "string ", + "default": "\"Select Environment\"" + }, + { + "name": "selectedId", + "type": "string ", + "default": "\"\"" + } + ], + "events": [ + "change" + ] + }, + { + "name": "ProtectedRoute", + "type": "Component", + "tier": "STANDARD", + "start_line": 1, + "end_line": 61, + "tags": { + "SEMANTICS": "auth, guard, route, protection", + "PURPOSE": "Wraps content to ensure only authenticated users can access it.", + "LAYER": "Component", + "RELATION": "CALLS -> goto", + "INVARIANT": "Redirects to /login if user is not authenticated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "app", + "type": "READS_FROM", + "line": 15 + }, + { + "store": "auth", + "type": "READS_FROM", + "line": 23 + }, + { + "store": "auth", + "type": "READS_FROM", + "line": 23 + }, + { + "store": "auth", + "type": "READS_FROM", + "line": 28 + }, + { + "store": "auth", + "type": "READS_FROM", + "line": 47 + }, + { + "store": "auth", + "type": "READS_FROM", + "line": 53 + }, + { + "store": "auth", + "type": "READS_FROM", + "line": 57 + } + ] }, { "name": "FileList", "type": "Component", + "tier": "STANDARD", "start_line": 1, - "end_line": 134, + "end_line": 144, "tags": { + "TIER": "STANDARD", "SEMANTICS": "storage, files, list, table", "PURPOSE": "Displays a table of files with metadata and actions.", - "LAYER": "Component", + "LAYER": "UI", "RELATION": "DEPENDS_ON -> storageService", "PROPS": "files (Array) - List of StoredFile objects.", "EVENTS": "delete (filename) - Dispatched when a file is deleted." @@ -3231,84 +7499,148 @@ { "name": "isDirectory", "type": "Function", - "start_line": 22, - "end_line": 31, + "tier": "STANDARD", + "start_line": 23, + "end_line": 35, "tags": { "PURPOSE": "Checks if a file object represents a directory.", + "PRE": "file object has mime_type property.", + "POST": "Returns boolean.", "PARAM": "{Object} file - The file object to check.", "RETURN": "{boolean} True if it's a directory, false otherwise." }, "relations": [], "children": [], "compliance": { - "valid": false, - "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST" - ] + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "formatSize", "type": "Function", - "start_line": 33, - "end_line": 46, + "tier": "STANDARD", + "start_line": 37, + "end_line": 53, "tags": { "PURPOSE": "Formats file size in bytes into a human-readable string.", + "PRE": "bytes is a number.", + "POST": "Returns formatted string.", "PARAM": "{number} bytes - The size in bytes.", "RETURN": "{string} Formatted size (e.g., \"1.2 MB\")." }, "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST" - ] + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 37 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 37 + } + ], + "score": 0.8 } }, { "name": "formatDate", "type": "Function", - "start_line": 48, - "end_line": 57, + "tier": "STANDARD", + "start_line": 55, + "end_line": 67, "tags": { "PURPOSE": "Formats an ISO date string into a localized readable format.", + "PRE": "dateStr is a valid date string.", + "POST": "Returns localized string.", "PARAM": "{string} dateStr - The date string to format.", "RETURN": "{string} Localized date and time." }, "relations": [], "children": [], "compliance": { - "valid": false, - "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST" - ] + "valid": true, + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [], + "score": 1.0 + }, + "props": [ + { + "name": "files", + "type": "any", + "default": "[]" + } + ], + "events": [ + "delete", + "navigate" + ], + "data_flow": [ + { + "store": "t", + "type": "WRITES_TO", + "line": 75 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 76 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 77 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 78 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 79 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 117 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 124 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 131 + } + ] }, { "name": "FileUpload", "type": "Component", + "tier": "STANDARD", "start_line": 1, - "end_line": 134, + "end_line": 135, "tags": { + "TIER": "STANDARD", "SEMANTICS": "storage, upload, files", "PURPOSE": "Provides a form for uploading files to a specific category.", - "LAYER": "Component", + "LAYER": "UI", "RELATION": "DEPENDS_ON -> storageService", "PROPS": "None", "EVENTS": "uploaded - Dispatched when a file is successfully uploaded." @@ -3318,8 +7650,9 @@ { "name": "handleUpload", "type": "Function", - "start_line": 20, - "end_line": 55, + "tier": "STANDARD", + "start_line": 21, + "end_line": 56, "tags": { "PURPOSE": "Handles the file upload process.", "PRE": "A file must be selected in the file input.", @@ -3329,14 +7662,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + } + ], + "score": 0.8 } }, { "name": "handleDrop", "type": "Function", - "start_line": 57, - "end_line": 71, + "tier": "STANDARD", + "start_line": 58, + "end_line": 72, "tags": { "PURPOSE": "Handles the file drop event for drag-and-drop.", "PARAM": "{DragEvent} event - The drop event." @@ -3344,24 +7690,108 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST" - ] + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 58 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 58 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 58 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 58 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 58 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 58 + } + ], + "score": 0.26666666666666655 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [], + "score": 1.0 + }, + "events": [ + "uploaded" + ], + "data_flow": [ + { + "store": "t", + "type": "READS_FROM", + "line": 47 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 51 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 77 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 81 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 86 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 87 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 104 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 115 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 117 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 124 + } + ] }, { "name": "ConnectionForm", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 95, "tags": { @@ -3375,6 +7805,7 @@ { "name": "handleSubmit", "type": "Function", + "tier": "STANDARD", "start_line": 28, "end_line": 52, "tags": { @@ -3386,12 +7817,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + } + ], + "score": 0.8 } }, { "name": "resetForm", "type": "Function", + "tier": "STANDARD", "start_line": 54, "end_line": 67, "tags": { @@ -3403,18 +7847,83 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 54 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 54 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "events": [ + "success" + ], + "data_flow": [ + { + "store": "t", + "type": "WRITES_TO", + "line": 71 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 73 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 76 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 77 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 80 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 83 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 84 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 89 + } + ] }, { "name": "ConnectionList", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 88, "tags": { @@ -3428,6 +7937,7 @@ { "name": "fetchConnections", "type": "Function", + "tier": "STANDARD", "start_line": 22, "end_line": 36, "tags": { @@ -3439,12 +7949,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + } + ], + "score": 0.8 } }, { "name": "handleDelete", "type": "Function", + "tier": "STANDARD", "start_line": 38, "end_line": 53, "tags": { @@ -3456,20 +7979,62 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 38 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 38 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "t", + "type": "WRITES_TO", + "line": 62 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 65 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 67 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 80 + } + ] }, { "name": "MapperTool", "type": "Component", + "tier": "STANDARD", "start_line": 1, - "end_line": 165, + "end_line": 183, "tags": { "SEMANTICS": "mapper, tool, dataset, postgresql, excel", "PURPOSE": "UI component for mapping dataset column verbose names using the MapperPlugin.", @@ -3481,8 +8046,9 @@ { "name": "fetchData", "type": "Function", - "start_line": 29, - "end_line": 42, + "tier": "STANDARD", + "start_line": 31, + "end_line": 44, "tags": { "PURPOSE": "Fetches environments and saved connections.", "PRE": "None.", @@ -3492,14 +8058,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 31 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 31 + } + ], + "score": 0.8 } }, { "name": "handleRunMapper", "type": "Function", - "start_line": 44, - "end_line": 85, + "tier": "STANDARD", + "start_line": 46, + "end_line": 87, "tags": { "PURPOSE": "Triggers the MapperPlugin task.", "PRE": "selectedEnv and datasetId are set; source-specific fields are valid.", @@ -3509,18 +8088,135 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 46 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 46 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "data_flow": [ + { + "store": "t", + "type": "READS_FROM", + "line": 41 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 52 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 57 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 62 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 80 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 94 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 99 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 102 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 109 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 117 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 121 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 125 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 134 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 137 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 145 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 152 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 162 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 176 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 176 + } + ] }, { "name": "DebugTool", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 190, "tags": { @@ -3534,7 +8230,8 @@ { "name": "fetchEnvironments", "type": "Function", - "start_line": 26, + "tier": "STANDARD", + "start_line": 27, "end_line": 41, "tags": { "PURPOSE": "Fetches available environments.", @@ -3546,12 +8243,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 27 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 27 + } + ], + "score": 0.8 } }, { "name": "handleRunDebug", "type": "Function", + "tier": "STANDARD", "start_line": 43, "end_line": 84, "tags": { @@ -3564,12 +8274,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 43 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 43 + } + ], + "score": 0.8 } }, { "name": "startPolling", "type": "Function", + "tier": "STANDARD", "start_line": 86, "end_line": 116, "tags": { @@ -3583,88 +8306,38 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 86 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 86 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } - }, - { - "name": "SearchTool", - "type": "Component", - "start_line": 1, - "end_line": 186, - "tags": { - "SEMANTICS": "search, tool, dataset, regex", - "PURPOSE": "UI component for searching datasets using the SearchPlugin.", - "LAYER": "UI", - "RELATION": "USES -> frontend/src/services/toolsService.js" - }, - "relations": [], - "children": [ - { - "name": "fetchEnvironments", - "type": "Function", - "start_line": 23, - "end_line": 35, - "tags": { - "PURPOSE": "Fetches the list of available environments.", - "PRE": "None.", - "POST": "envs array is populated." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 } - }, - { - "name": "handleSearch", - "type": "Function", - "start_line": 37, - "end_line": 64, - "tags": { - "PURPOSE": "Triggers the SearchPlugin task.", - "PRE": "selectedEnv and searchQuery must be set.", - "POST": "Task is started and polling begins." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "startPolling", - "type": "Function", - "start_line": 66, - "end_line": 95, - "tags": { - "PURPOSE": "Polls for task completion and results.", - "PRE": "taskId is provided.", - "POST": "pollInterval is set and results are updated on success." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] + ], + "score": 0.85 } }, { "name": "CommitHistory", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 95, "tags": { @@ -3678,6 +8351,7 @@ { "name": "onMount", "type": "Function", + "tier": "STANDARD", "start_line": 27, "end_line": 36, "tags": { @@ -3689,12 +8363,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 27 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 27 + } + ], + "score": 0.8 } }, { "name": "loadHistory", "type": "Function", + "tier": "STANDARD", "start_line": 38, "end_line": 57, "tags": { @@ -3706,18 +8393,62 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 38 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 38 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "dashboardId", + "type": "any", + "default": null + } + ], + "data_flow": [ + { + "store": "t", + "type": "READS_FROM", + "line": 64 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 67 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 76 + } + ] }, { "name": "DeploymentModal", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 148, "tags": { @@ -3732,6 +8463,7 @@ { "name": "loadStatus", "type": "Watcher", + "tier": "STANDARD", "start_line": 33, "end_line": 35, "tags": {}, @@ -3739,12 +8471,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "loadEnvironments", "type": "Function", + "tier": "STANDARD", "start_line": 37, "end_line": 59, "tags": { @@ -3754,16 +8488,36 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @PRE" - ] + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 37 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 37 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 37 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 37 + } + ], + "score": 0.5333333333333333 } }, { "name": "handleDeploy", "type": "Function", + "tier": "STANDARD", "start_line": 61, "end_line": 85, "tags": { @@ -3775,18 +8529,53 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 61 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 61 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "dashboardId", + "type": "any", + "default": null + }, + { + "name": "show", + "type": "any", + "default": "false" + } + ], + "events": [ + "deploy" + ] }, { "name": "ConflictResolver", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 142, "tags": { @@ -3802,6 +8591,7 @@ { "name": "resolve", "type": "Function", + "tier": "STANDARD", "start_line": 29, "end_line": 43, "tags": { @@ -3814,12 +8604,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 29 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 29 + } + ], + "score": 0.8 } }, { "name": "handleSave", "type": "Function", + "tier": "STANDARD", "start_line": 45, "end_line": 66, "tags": { @@ -3831,18 +8634,53 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 45 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 45 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "conflicts", + "type": "any", + "default": "[]" + }, + { + "name": "show", + "type": "any", + "default": "false" + } + ], + "events": [ + "resolve" + ] }, { "name": "CommitModal", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 175, "tags": { @@ -3856,6 +8694,7 @@ { "name": "loadStatus", "type": "Function", + "tier": "STANDARD", "start_line": 34, "end_line": 61, "tags": { @@ -3865,16 +8704,36 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @POST" - ] + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + } + ], + "score": 0.5333333333333333 } }, { "name": "handleCommit", "type": "Function", + "tier": "STANDARD", "start_line": 63, "end_line": 87, "tags": { @@ -3886,18 +8745,53 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "dashboardId", + "type": "any", + "default": null + }, + { + "name": "show", + "type": "any", + "default": "false" + } + ], + "events": [ + "commit" + ] }, { "name": "BranchSelector", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 178, "tags": { @@ -3911,6 +8805,7 @@ { "name": "onMount", "type": "Function", + "tier": "STANDARD", "start_line": 35, "end_line": 44, "tags": { @@ -3922,12 +8817,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 35 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 35 + } + ], + "score": 0.8 } }, { "name": "loadBranches", "type": "Function", + "tier": "STANDARD", "start_line": 46, "end_line": 65, "tags": { @@ -3939,12 +8847,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 46 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 46 + } + ], + "score": 0.8 } }, { "name": "handleSelect", "type": "Function", + "tier": "STANDARD", "start_line": 67, "end_line": 76, "tags": { @@ -3956,12 +8877,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 67 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 67 + } + ], + "score": 0.8 } }, { "name": "handleCheckout", "type": "Function", + "tier": "STANDARD", "start_line": 78, "end_line": 97, "tags": { @@ -3972,16 +8906,36 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @PRE" - ] + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 78 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 78 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 78 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 78 + } + ], + "score": 0.5333333333333333 } }, { "name": "handleCreate", "type": "Function", + "tier": "STANDARD", "start_line": 99, "end_line": 120, "tags": { @@ -3993,18 +8947,70 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 99 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 99 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "dashboardId", + "type": "any", + "default": null + }, + { + "name": "currentBranch", + "type": "any", + "default": "'main'" + } + ], + "events": [ + "change" + ], + "data_flow": [ + { + "store": "t", + "type": "READS_FROM", + "line": 142 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 163 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 171 + } + ] }, { "name": "GitManager", "type": "Component", + "tier": "STANDARD", "start_line": 1, "end_line": 300, "tags": { @@ -4018,6 +9024,7 @@ { "name": "checkStatus", "type": "Function", + "tier": "STANDARD", "start_line": 51, "end_line": 72, "tags": { @@ -4029,12 +9036,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 51 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 51 + } + ], + "score": 0.8 } }, { "name": "handleInit", "type": "Function", + "tier": "STANDARD", "start_line": 74, "end_line": 96, "tags": { @@ -4046,12 +9066,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 74 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 74 + } + ], + "score": 0.8 } }, { "name": "handleSync", "type": "Function", + "tier": "STANDARD", "start_line": 98, "end_line": 117, "tags": { @@ -4063,12 +9096,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 98 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 98 + } + ], + "score": 0.8 } }, { "name": "handlePush", "type": "Function", + "tier": "STANDARD", "start_line": 119, "end_line": 136, "tags": { @@ -4080,12 +9126,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 119 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 119 + } + ], + "score": 0.8 } }, { "name": "handlePull", "type": "Function", + "tier": "STANDARD", "start_line": 138, "end_line": 155, "tags": { @@ -4097,18 +9156,122 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 138 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 138 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] - } + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + }, + "props": [ + { + "name": "dashboardId", + "type": "any", + "default": null + }, + { + "name": "dashboardTitle", + "type": "any", + "default": "\"\"" + }, + { + "name": "show", + "type": "any", + "default": "false" + } + ], + "data_flow": [ + { + "store": "t", + "type": "WRITES_TO", + "line": 164 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 183 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 188 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 197 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 208 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 218 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 223 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 230 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 237 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 246 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 254 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 260 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 267 + } + ] }, { "name": "backend.delete_running_tasks", "type": "Module", + "tier": "STANDARD", "start_line": 2, "end_line": 44, "tags": { @@ -4121,6 +9284,7 @@ { "name": "delete_running_tasks", "type": "Function", + "tier": "STANDARD", "start_line": 11, "end_line": 40, "tags": { @@ -4131,24 +9295,41 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager." - ] + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 11 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 11 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 2 + } + ], + "score": 0.85 } }, { "name": "AppModule", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 190, + "end_line": 198, "tags": { "SEMANTICS": "app, main, entrypoint, fastapi", "PURPOSE": "The main entry point for the FastAPI application. It initializes the app, configures CORS, sets up dependencies, includes API routers, and defines the WebSocket endpoint for log streaming.", @@ -4160,8 +9341,9 @@ { "name": "App", "type": "Global", - "start_line": 24, - "end_line": 32, + "tier": "STANDARD", + "start_line": 26, + "end_line": 34, "tags": { "SEMANTICS": "app, fastapi, instance", "PURPOSE": "The global FastAPI application instance." @@ -4170,14 +9352,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "startup_event", "type": "Function", - "start_line": 34, - "end_line": 44, + "tier": "STANDARD", + "start_line": 36, + "end_line": 46, "tags": { "PURPOSE": "Handles application startup tasks, such as starting the scheduler.", "PRE": "None.", @@ -4187,14 +9371,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "shutdown_event", "type": "Function", - "start_line": 46, - "end_line": 56, + "tier": "STANDARD", + "start_line": 48, + "end_line": 58, "tags": { "PURPOSE": "Handles application shutdown tasks, such as stopping the scheduler.", "PRE": "None.", @@ -4204,14 +9390,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "log_requests", "type": "Function", - "start_line": 68, - "end_line": 81, + "tier": "STANDARD", + "start_line": 74, + "end_line": 87, "tags": { "PURPOSE": "Middleware to log incoming HTTP requests and their response status.", "PRE": "request is a FastAPI Request object.", @@ -4222,14 +9410,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "websocket_endpoint", "type": "Function", - "start_line": 94, - "end_line": 151, + "tier": "STANDARD", + "start_line": 102, + "end_line": 159, "tags": { "PURPOSE": "Provides a WebSocket endpoint for real-time log streaming of a task.", "PRE": "task_id must be a valid task ID.", @@ -4239,14 +9429,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "StaticFiles", "type": "Mount", - "start_line": 153, - "end_line": 189, + "tier": "STANDARD", + "start_line": 161, + "end_line": 197, "tags": { "SEMANTICS": "static, frontend, spa", "PURPOSE": "Mounts the frontend build directory to serve static assets." @@ -4256,8 +9448,9 @@ { "name": "serve_spa", "type": "Function", - "start_line": 161, - "end_line": 178, + "tier": "STANDARD", + "start_line": 169, + "end_line": 186, "tags": { "PURPOSE": "Serves frontend static files or index.html for SPA routing.", "PRE": "file_path is requested by the client.", @@ -4267,14 +9460,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "read_root", "type": "Function", - "start_line": 180, - "end_line": 188, + "tier": "STANDARD", + "start_line": 188, + "end_line": 196, "tags": { "PURPOSE": "A simple root endpoint to confirm that the API is running when frontend is missing.", "PRE": "None.", @@ -4284,28 +9479,38 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "Dependencies", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 80, + "end_line": 153, "tags": { - "SEMANTICS": "dependency, injection, singleton, factory", + "SEMANTICS": "dependency, injection, singleton, factory, auth, jwt", "PURPOSE": "Manages the creation and provision of shared application dependencies, such as the PluginLoader and TaskManager, to avoid circular imports.", "LAYER": "Core", "RELATION": "Used by the main app and API routers to get access to shared instances." @@ -4315,8 +9520,9 @@ { "name": "get_config_manager", "type": "Function", - "start_line": 24, - "end_line": 33, + "tier": "STANDARD", + "start_line": 31, + "end_line": 40, "tags": { "PURPOSE": "Dependency injector for the ConfigManager.", "PRE": "Global config_manager must be initialized.", @@ -4327,14 +9533,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_plugin_loader", "type": "Function", - "start_line": 47, - "end_line": 56, + "tier": "STANDARD", + "start_line": 54, + "end_line": 63, "tags": { "PURPOSE": "Dependency injector for the PluginLoader.", "PRE": "Global plugin_loader must be initialized.", @@ -4345,14 +9553,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_task_manager", "type": "Function", - "start_line": 58, - "end_line": 67, + "tier": "STANDARD", + "start_line": 65, + "end_line": 74, "tags": { "PURPOSE": "Dependency injector for the TaskManager.", "PRE": "Global task_manager must be initialized.", @@ -4363,14 +9573,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_scheduler_service", "type": "Function", - "start_line": 69, - "end_line": 78, + "tier": "STANDARD", + "start_line": 76, + "end_line": 85, "tags": { "PURPOSE": "Dependency injector for the SchedulerService.", "PRE": "Global scheduler_service must be initialized.", @@ -4381,18 +9593,640 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "oauth2_scheme", + "type": "Variable", + "tier": "STANDARD", + "start_line": 87, + "end_line": 90, + "tags": { + "PURPOSE": "OAuth2 password bearer scheme for token extraction." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_current_user", + "type": "Function", + "tier": "STANDARD", + "start_line": 92, + "end_line": 120, + "tags": { + "PURPOSE": "Dependency for retrieving the currently authenticated user from a JWT.", + "PRE": "JWT token provided in Authorization header.", + "POST": "Returns the User object if token is valid.", + "THROW": "HTTPException 401 if token is invalid or user not found.", + "PARAM": "db (Session) - Auth database session.", + "RETURN": "User - The authenticated user." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "has_permission", + "type": "Function", + "tier": "STANDARD", + "start_line": 122, + "end_line": 151, + "tags": { + "PURPOSE": "Dependency for checking if the current user has a specific permission.", + "PRE": "User is authenticated.", + "POST": "Returns True if user has permission.", + "THROW": "HTTPException 403 if permission is denied.", + "PARAM": "action (str) - The action identifier (READ, EXECUTE, WRITE).", + "RETURN": "User - The authenticated user if permission granted." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "permission_checker", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 131, + "end_line": 131, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + } + }, + { + "name": "backend.src.scripts.seed_permissions", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 116, + "tags": { + "SEMANTICS": "setup, database, auth, permissions, seeding", + "PURPOSE": "Populates the auth database with initial system permissions.", + "LAYER": "Scripts", + "INVARIANT": "Safe to run multiple times (idempotent)." + }, + "relations": [ + { + "type": "USES", + "target": "backend.src.core.database.get_auth_db" + }, + { + "type": "USES", + "target": "backend.src.models.auth.Permission" + } + ], + "children": [ + { + "name": "INITIAL_PERMISSIONS", + "type": "Constant", + "tier": "STANDARD", + "start_line": 24, + "end_line": 49, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "seed_permissions", + "type": "Function", + "tier": "STANDARD", + "start_line": 51, + "end_line": 111, + "tags": { + "PURPOSE": "Inserts missing permissions into the database.", + "POST": "All INITIAL_PERMISSIONS exist in the DB." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 51 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 51 + } + ], + "score": 0.7333333333333334 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + } + }, + { + "name": "backend.src.scripts.init_auth_db", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 44, + "tags": { + "SEMANTICS": "setup, database, auth, migration", + "PURPOSE": "Initializes the auth database and creates the necessary tables.", + "LAYER": "Scripts", + "INVARIANT": "Safe to run multiple times (idempotent)." + }, + "relations": [ + { + "type": "CALLS", + "target": "backend.src.core.database.init_db" + } + ], + "children": [ + { + "name": "run_init", + "type": "Function", + "tier": "STANDARD", + "start_line": 23, + "end_line": 39, + "tags": { + "PURPOSE": "Main entry point for the initialization script.", + "POST": "auth.db is initialized with the correct schema and seeded permissions." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 23 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 23 + } + ], + "score": 0.7333333333333334 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + } + }, + { + "name": "backend.src.scripts.create_admin", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 82, + "tags": { + "SEMANTICS": "admin, setup, user, auth, cli", + "PURPOSE": "CLI tool for creating the initial admin user.", + "LAYER": "Scripts", + "INVARIANT": "Admin user must have the \"Admin\" role." + }, + "relations": [ + { + "type": "USES", + "target": "backend.src.core.auth.security" + }, + { + "type": "USES", + "target": "backend.src.core.database" + }, + { + "type": "USES", + "target": "backend.src.models.auth" + } + ], + "children": [ + { + "name": "create_admin", + "type": "Function", + "tier": "STANDARD", + "start_line": 26, + "end_line": 70, + "tags": { + "PURPOSE": "Creates an admin user and necessary roles/permissions.", + "PRE": "username and password provided via CLI.", + "POST": "Admin user exists in auth.db.", + "PARAM": "password (str) - Admin password." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + } + }, + { + "name": "backend.src.schemas.auth", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 128, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "auth, schemas, pydantic, user, token", + "PURPOSE": "Pydantic schemas for authentication requests and responses.", + "LAYER": "API", + "INVARIANT": "Sensitive fields like password must not be included in response schemas." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "pydantic" + } + ], + "children": [ + { + "name": "Token", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 17, + "end_line": 23, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Represents a JWT access token response." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "TokenData", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 25, + "end_line": 31, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Represents the data encoded in a JWT token." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "PermissionSchema", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 33, + "end_line": 43, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Represents a permission in API responses." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "RoleSchema", + "type": "Class", + "tier": "STANDARD", + "start_line": 45, + "end_line": 55, + "tags": { + "PURPOSE": "Represents a role in API responses." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 45 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 45 + } + ], + "score": 0.7000000000000001 + } + }, + { + "name": "RoleCreate", + "type": "Class", + "tier": "STANDARD", + "start_line": 57, + "end_line": 63, + "tags": { + "PURPOSE": "Schema for creating a new role." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 57 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 57 + } + ], + "score": 0.7000000000000001 + } + }, + { + "name": "RoleUpdate", + "type": "Class", + "tier": "STANDARD", + "start_line": 65, + "end_line": 71, + "tags": { + "PURPOSE": "Schema for updating an existing role." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 65 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 65 + } + ], + "score": 0.7000000000000001 + } + }, + { + "name": "ADGroupMappingSchema", + "type": "Class", + "tier": "STANDARD", + "start_line": 73, + "end_line": 82, + "tags": { + "PURPOSE": "Represents an AD Group to Role mapping in API responses." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 73 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 73 + } + ], + "score": 0.7000000000000001 + } + }, + { + "name": "ADGroupMappingCreate", + "type": "Class", + "tier": "STANDARD", + "start_line": 84, + "end_line": 89, + "tags": { + "PURPOSE": "Schema for creating an AD Group mapping." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 84 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 84 + } + ], + "score": 0.7000000000000001 + } + }, + { + "name": "UserBase", + "type": "Class", + "tier": "STANDARD", + "start_line": 91, + "end_line": 97, + "tags": { + "PURPOSE": "Base schema for user data." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 91 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 91 + } + ], + "score": 0.7000000000000001 + } + }, + { + "name": "UserCreate", + "type": "Class", + "tier": "STANDARD", + "start_line": 99, + "end_line": 104, + "tags": { + "PURPOSE": "Schema for creating a new user." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 99 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 99 + } + ], + "score": 0.7000000000000001 + } + }, + { + "name": "UserUpdate", + "type": "Class", + "tier": "STANDARD", + "start_line": 106, + "end_line": 113, + "tags": { + "PURPOSE": "Schema for updating an existing user." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 106 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 106 + } + ], + "score": 0.7000000000000001 + } + }, + { + "name": "User", + "type": "Class", + "tier": "STANDARD", + "start_line": 115, + "end_line": 126, + "tags": { + "PURPOSE": "Schema for user data in API responses." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 115 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 115 + } + ], + "score": 0.7000000000000001 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "backend.src.core.superset_client", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 450, "tags": { @@ -4416,6 +10250,7 @@ { "name": "SupersetClient", "type": "Class", + "tier": "STANDARD", "start_line": 24, "end_line": 448, "tags": { @@ -4426,6 +10261,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 27, "end_line": 53, "tags": { @@ -4438,12 +10274,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "authenticate", "type": "Function", + "tier": "STANDARD", "start_line": 55, "end_line": 63, "tags": { @@ -4456,12 +10294,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "headers", "type": "Function", + "tier": "STANDARD", "start_line": 66, "end_line": 73, "tags": { @@ -4473,12 +10313,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_dashboards", "type": "Function", + "tier": "STANDARD", "start_line": 77, "end_line": 97, "tags": { @@ -4492,12 +10334,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_dashboards_summary", "type": "Function", + "tier": "STANDARD", "start_line": 99, "end_line": 121, "tags": { @@ -4510,12 +10354,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "export_dashboard", "type": "Function", + "tier": "STANDARD", "start_line": 123, "end_line": 144, "tags": { @@ -4529,12 +10375,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "import_dashboard", "type": "Function", + "tier": "STANDARD", "start_line": 146, "end_line": 173, "tags": { @@ -4548,12 +10396,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "delete_dashboard", "type": "Function", + "tier": "STANDARD", "start_line": 175, "end_line": 189, "tags": { @@ -4566,12 +10416,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_datasets", "type": "Function", + "tier": "STANDARD", "start_line": 195, "end_line": 213, "tags": { @@ -4585,12 +10437,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_dataset", "type": "Function", + "tier": "STANDARD", "start_line": 215, "end_line": 228, "tags": { @@ -4604,12 +10458,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "update_dataset", "type": "Function", + "tier": "STANDARD", "start_line": 230, "end_line": 249, "tags": { @@ -4623,12 +10479,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_databases", "type": "Function", + "tier": "STANDARD", "start_line": 255, "end_line": 274, "tags": { @@ -4642,12 +10500,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_database", "type": "Function", + "tier": "STANDARD", "start_line": 276, "end_line": 289, "tags": { @@ -4661,12 +10521,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_databases_summary", "type": "Function", + "tier": "STANDARD", "start_line": 291, "end_line": 308, "tags": { @@ -4679,12 +10541,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_database_by_uuid", "type": "Function", + "tier": "STANDARD", "start_line": 310, "end_line": 323, "tags": { @@ -4698,12 +10562,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_resolve_target_id_for_delete", "type": "Function", + "tier": "STANDARD", "start_line": 329, "end_line": 348, "tags": { @@ -4715,12 +10581,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_do_import", "type": "Function", + "tier": "STANDARD", "start_line": 350, "end_line": 368, "tags": { @@ -4732,12 +10600,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_validate_export_response", "type": "Function", + "tier": "STANDARD", "start_line": 370, "end_line": 381, "tags": { @@ -4749,12 +10619,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_resolve_export_filename", "type": "Function", + "tier": "STANDARD", "start_line": 383, "end_line": 396, "tags": { @@ -4766,12 +10638,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_validate_query_params", "type": "Function", + "tier": "STANDARD", "start_line": 398, "end_line": 406, "tags": { @@ -4783,12 +10657,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_fetch_total_object_count", "type": "Function", + "tier": "STANDARD", "start_line": 408, "end_line": 419, "tags": { @@ -4800,12 +10676,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_fetch_all_pages", "type": "Function", + "tier": "STANDARD", "start_line": 421, "end_line": 428, "tags": { @@ -4817,12 +10695,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_validate_import_file", "type": "Function", + "tier": "STANDARD", "start_line": 430, "end_line": 444, "tags": { @@ -4834,24 +10714,45 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 24 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 24 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "ConfigManagerModule", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 284, "tags": { @@ -4879,6 +10780,7 @@ { "name": "ConfigManager", "type": "Class", + "tier": "STANDARD", "start_line": 22, "end_line": 282, "tags": { @@ -4894,6 +10796,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 27, "end_line": 50, "tags": { @@ -4906,12 +10809,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_load_config", "type": "Function", + "tier": "STANDARD", "start_line": 52, "end_line": 88, "tags": { @@ -4924,12 +10829,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_save_config_to_disk", "type": "Function", + "tier": "STANDARD", "start_line": 90, "end_line": 109, "tags": { @@ -4942,12 +10849,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "save", "type": "Function", + "tier": "STANDARD", "start_line": 111, "end_line": 118, "tags": { @@ -4959,12 +10868,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_config", "type": "Function", + "tier": "STANDARD", "start_line": 120, "end_line": 128, "tags": { @@ -4977,12 +10888,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "update_global_settings", "type": "Function", + "tier": "STANDARD", "start_line": 130, "end_line": 150, "tags": { @@ -4995,12 +10908,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "validate_path", "type": "Function", + "tier": "STANDARD", "start_line": 152, "end_line": 171, "tags": { @@ -5014,12 +10929,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_environments", "type": "Function", + "tier": "STANDARD", "start_line": 173, "end_line": 181, "tags": { @@ -5032,12 +10949,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "has_environments", "type": "Function", + "tier": "STANDARD", "start_line": 183, "end_line": 191, "tags": { @@ -5050,12 +10969,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_environment", "type": "Function", + "tier": "STANDARD", "start_line": 193, "end_line": 205, "tags": { @@ -5069,12 +10990,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "add_environment", "type": "Function", + "tier": "STANDARD", "start_line": 207, "end_line": 226, "tags": { @@ -5087,12 +11010,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "update_environment", "type": "Function", + "tier": "STANDARD", "start_line": 228, "end_line": 257, "tags": { @@ -5106,12 +11031,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "delete_environment", "type": "Function", + "tier": "STANDARD", "start_line": 259, "end_line": 280, "tags": { @@ -5124,24 +11051,45 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "SchedulerModule", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 119, "tags": { @@ -5155,6 +11103,7 @@ { "name": "SchedulerService", "type": "Class", + "tier": "STANDARD", "start_line": 16, "end_line": 118, "tags": { @@ -5166,6 +11115,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 20, "end_line": 30, "tags": { @@ -5177,12 +11127,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "start", "type": "Function", + "tier": "STANDARD", "start_line": 32, "end_line": 42, "tags": { @@ -5194,12 +11146,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "stop", "type": "Function", + "tier": "STANDARD", "start_line": 44, "end_line": 53, "tags": { @@ -5211,12 +11165,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "load_schedules", "type": "Function", + "tier": "STANDARD", "start_line": 55, "end_line": 68, "tags": { @@ -5228,12 +11184,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "add_backup_job", "type": "Function", + "tier": "STANDARD", "start_line": 70, "end_line": 90, "tags": { @@ -5246,12 +11204,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_trigger_backup", "type": "Function", + "tier": "STANDARD", "start_line": 92, "end_line": 116, "tags": { @@ -5264,24 +11224,45 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 16 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 16 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "ConfigModels", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 63, "tags": { @@ -5303,6 +11284,7 @@ { "name": "Schedule", "type": "DataClass", + "tier": "STANDARD", "start_line": 12, "end_line": 17, "tags": { @@ -5312,12 +11294,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "Environment", "type": "DataClass", + "tier": "STANDARD", "start_line": 19, "end_line": 31, "tags": { @@ -5327,12 +11311,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "LoggingConfig", "type": "DataClass", + "tier": "STANDARD", "start_line": 33, "end_line": 41, "tags": { @@ -5342,12 +11328,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "GlobalSettings", "type": "DataClass", + "tier": "STANDARD", "start_line": 43, "end_line": 54, "tags": { @@ -5357,12 +11345,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "AppConfig", "type": "DataClass", + "tier": "STANDARD", "start_line": 56, "end_line": 61, "tags": { @@ -5372,20 +11362,29 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.src.core.database", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 87, + "end_line": 128, "tags": { "SEMANTICS": "database, sqlite, sqlalchemy, session, persistence", "PURPOSE": "Configures the SQLite database connection and session management.", @@ -5400,113 +11399,228 @@ { "type": "USES", "target": "backend.src.models.mapping" + }, + { + "type": "USES", + "target": "backend.src.core.auth.config" } ], "children": [ { "name": "DATABASE_URL", "type": "Constant", - "start_line": 23, - "end_line": 25, - "tags": {}, + "tier": "STANDARD", + "start_line": 26, + "end_line": 29, + "tags": { + "PURPOSE": "URL for the main mappings database." + }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "TASKS_DATABASE_URL", "type": "Constant", - "start_line": 27, - "end_line": 29, - "tags": {}, + "tier": "STANDARD", + "start_line": 31, + "end_line": 34, + "tags": { + "PURPOSE": "URL for the tasks execution database." + }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "AUTH_DATABASE_URL", + "type": "Constant", + "tier": "STANDARD", + "start_line": 36, + "end_line": 39, + "tags": { + "PURPOSE": "URL for the authentication database." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "engine", "type": "Variable", - "start_line": 31, - "end_line": 33, - "tags": {}, + "tier": "STANDARD", + "start_line": 41, + "end_line": 44, + "tags": { + "PURPOSE": "SQLAlchemy engine for mappings database." + }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "tasks_engine", "type": "Variable", - "start_line": 35, - "end_line": 37, - "tags": {}, + "tier": "STANDARD", + "start_line": 46, + "end_line": 49, + "tags": { + "PURPOSE": "SQLAlchemy engine for tasks database." + }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "auth_engine", + "type": "Variable", + "tier": "STANDARD", + "start_line": 51, + "end_line": 54, + "tags": { + "PURPOSE": "SQLAlchemy engine for authentication database." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "SessionLocal", "type": "Class", - "start_line": 39, - "end_line": 42, + "tier": "STANDARD", + "start_line": 56, + "end_line": 60, "tags": { - "PURPOSE": "A session factory for the main mappings database." + "PURPOSE": "A session factory for the main mappings database.", + "PRE": "engine is initialized." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 56 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 56 + } + ], + "score": 0.7000000000000001 } }, { "name": "TasksSessionLocal", "type": "Class", - "start_line": 44, - "end_line": 47, + "tier": "STANDARD", + "start_line": 62, + "end_line": 66, "tags": { - "PURPOSE": "A session factory for the tasks execution database." + "PURPOSE": "A session factory for the tasks execution database.", + "PRE": "tasks_engine is initialized." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 62 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 62 + } + ], + "score": 0.7000000000000001 + } + }, + { + "name": "AuthSessionLocal", + "type": "Class", + "tier": "STANDARD", + "start_line": 68, + "end_line": 72, + "tags": { + "PURPOSE": "A session factory for the authentication database.", + "PRE": "auth_engine is initialized." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 68 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 68 + } + ], + "score": 0.7000000000000001 } }, { "name": "init_db", "type": "Function", - "start_line": 49, - "end_line": 57, + "tier": "STANDARD", + "start_line": 74, + "end_line": 84, "tags": { "PURPOSE": "Initializes the database by creating all tables.", - "PRE": "engine and tasks_engine are initialized.", - "POST": "Database tables created." + "PRE": "engine, tasks_engine and auth_engine are initialized.", + "POST": "Database tables created in all databases.", + "SIDE_EFFECT": "Creates physical database files if they don't exist." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_db", "type": "Function", - "start_line": 59, - "end_line": 71, + "tier": "STANDARD", + "start_line": 86, + "end_line": 98, "tags": { "PURPOSE": "Dependency for getting a database session.", "PRE": "SessionLocal is initialized.", @@ -5517,14 +11631,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_tasks_db", "type": "Function", - "start_line": 73, - "end_line": 85, + "tier": "STANDARD", + "start_line": 100, + "end_line": 112, "tags": { "PURPOSE": "Dependency for getting a tasks database session.", "PRE": "TasksSessionLocal is initialized.", @@ -5535,18 +11651,47 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_auth_db", + "type": "Function", + "tier": "STANDARD", + "start_line": 114, + "end_line": 126, + "tags": { + "PURPOSE": "Dependency for getting an authentication database session.", + "PRE": "AuthSessionLocal is initialized.", + "POST": "Session is closed after use.", + "RETURN": "Generator[Session, None, None]" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "LoggerModule", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 246, "tags": { @@ -5560,6 +11705,7 @@ { "name": "BeliefFormatter", "type": "Class", + "tier": "STANDARD", "start_line": 22, "end_line": 38, "tags": { @@ -5570,6 +11716,7 @@ { "name": "format", "type": "Function", + "tier": "STANDARD", "start_line": 25, "end_line": 37, "tags": { @@ -5584,18 +11731,32 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + } + ], + "score": 0.7000000000000001 } }, { "name": "LogEntry", "type": "Class", + "tier": "STANDARD", "start_line": 41, "end_line": 50, "tags": { @@ -5606,12 +11767,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + } + ], + "score": 0.7000000000000001 } }, { "name": "belief_scope", "type": "Function", + "tier": "STANDARD", "start_line": 52, "end_line": 86, "tags": { @@ -5625,12 +11799,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "configure_logger", "type": "Function", + "tier": "STANDARD", "start_line": 88, "end_line": 131, "tags": { @@ -5644,12 +11820,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "WebSocketLogHandler", "type": "Class", + "tier": "STANDARD", "start_line": 133, "end_line": 195, "tags": { @@ -5661,6 +11839,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 141, "end_line": 152, "tags": { @@ -5674,12 +11853,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "emit", "type": "Function", + "tier": "STANDARD", "start_line": 154, "end_line": 180, "tags": { @@ -5693,12 +11874,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_recent_logs", "type": "Function", + "tier": "STANDARD", "start_line": 182, "end_line": 193, "tags": { @@ -5712,18 +11895,32 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 133 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 133 + } + ], + "score": 0.7000000000000001 } }, { "name": "Logger", "type": "Global", + "tier": "STANDARD", "start_line": 197, "end_line": 245, "tags": { @@ -5735,6 +11932,7 @@ { "name": "believed", "type": "Function", + "tier": "STANDARD", "start_line": 202, "end_line": 224, "tags": { @@ -5748,6 +11946,7 @@ { "name": "decorator", "type": "Function", + "tier": "STANDARD", "start_line": 208, "end_line": 222, "tags": { @@ -5760,6 +11959,7 @@ { "name": "wrapper", "type": "Function", + "tier": "STANDARD", "start_line": 213, "end_line": 220, "tags": { @@ -5771,38 +11971,50 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "PluginLoader", "type": "Class", + "tier": "STANDARD", "start_line": 9, - "end_line": 200, + "end_line": 201, "tags": { "SEMANTICS": "plugin, loader, dynamic, import", "PURPOSE": "Scans a specified directory for Python modules, dynamically loads them, and registers any classes that are valid implementations of the PluginBase interface.", @@ -5814,6 +12026,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 20, "end_line": 31, "tags": { @@ -5826,12 +12039,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_load_plugins", "type": "Function", + "tier": "STANDARD", "start_line": 33, "end_line": 66, "tags": { @@ -5843,12 +12058,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_load_module", "type": "Function", + "tier": "STANDARD", "start_line": 68, "end_line": 116, "tags": { @@ -5861,14 +12078,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_register_plugin", "type": "Function", + "tier": "STANDARD", "start_line": 118, - "end_line": 156, + "end_line": 157, "tags": { "PURPOSE": "Registers a PluginBase instance and its configuration.", "PRE": "plugin_instance is a valid implementation of PluginBase.", @@ -5879,14 +12098,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_plugin", "type": "Function", - "start_line": 159, - "end_line": 171, + "tier": "STANDARD", + "start_line": 160, + "end_line": 172, "tags": { "PURPOSE": "Retrieves a loaded plugin instance by its ID.", "PRE": "plugin_id is a string.", @@ -5898,14 +12119,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_all_plugin_configs", "type": "Function", - "start_line": 173, - "end_line": 184, + "tier": "STANDARD", + "start_line": 174, + "end_line": 185, "tags": { "PURPOSE": "Returns a list of all registered plugin configurations.", "PRE": "None.", @@ -5916,14 +12139,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "has_plugin", "type": "Function", - "start_line": 186, - "end_line": 198, + "tier": "STANDARD", + "start_line": 187, + "end_line": 199, "tags": { "PURPOSE": "Checks if a plugin with the given ID is registered.", "PRE": "plugin_id is a string.", @@ -5935,18 +12160,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 9 + } + ], + "score": 0.8 } }, { "name": "backend.src.core.migration_engine", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 104, "tags": { @@ -5965,6 +12199,7 @@ { "name": "MigrationEngine", "type": "Class", + "tier": "STANDARD", "start_line": 22, "end_line": 102, "tags": { @@ -5975,6 +12210,7 @@ { "name": "transform_zip", "type": "Function", + "tier": "STANDARD", "start_line": 26, "end_line": 78, "tags": { @@ -5988,12 +12224,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_transform_yaml", "type": "Function", + "tier": "STANDARD", "start_line": 80, "end_line": 100, "tags": { @@ -6005,31 +12243,64 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager." - ] + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 80 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 80 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 80 + } + ], + "score": 0.7 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "PluginBase", "type": "Class", + "tier": "STANDARD", "start_line": 7, - "end_line": 101, + "end_line": 128, "tags": { "SEMANTICS": "plugin, interface, base, abstract", "PURPOSE": "Defines the abstract base class that all plugins must implement to be recognized by the system. It enforces a common structure for plugin metadata and execution.", @@ -6042,6 +12313,7 @@ { "name": "id", "type": "Function", + "tier": "STANDARD", "start_line": 21, "end_line": 30, "tags": { @@ -6054,12 +12326,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "name", "type": "Function", + "tier": "STANDARD", "start_line": 34, "end_line": 43, "tags": { @@ -6072,12 +12346,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "description", "type": "Function", + "tier": "STANDARD", "start_line": 47, "end_line": 56, "tags": { @@ -6090,12 +12366,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "version", "type": "Function", + "tier": "STANDARD", "start_line": 60, "end_line": 69, "tags": { @@ -6108,14 +12386,56 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "required_permission", + "type": "Function", + "tier": "STANDARD", + "start_line": 72, + "end_line": 81, + "tags": { + "PURPOSE": "Returns the required permission string to execute this plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string permission.", + "RETURN": "str - Required permission (e.g., \"plugin:backup:execute\")." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "ui_route", + "type": "Function", + "tier": "STANDARD", + "start_line": 84, + "end_line": 96, + "tags": { + "PURPOSE": "Returns the frontend route for the plugin's UI, if applicable.", + "PRE": "Plugin instance exists.", + "POST": "Returns string route or None.", + "RETURN": "Optional[str] - Frontend route." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "get_schema", "type": "Function", - "start_line": 72, - "end_line": 84, + "tier": "STANDARD", + "start_line": 99, + "end_line": 111, "tags": { "PURPOSE": "Returns the JSON schema for the plugin's input parameters.", "PRE": "Plugin instance exists.", @@ -6126,14 +12446,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "execute", "type": "Function", - "start_line": 87, - "end_line": 100, + "tier": "STANDARD", + "start_line": 114, + "end_line": 127, "tags": { "PURPOSE": "Executes the plugin's core logic.", "PARAM": "params (Dict[str, Any]) - Validated input parameters.", @@ -6144,20 +12466,29 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 7 + } + ], + "score": 0.8 } }, { "name": "PluginConfig", "type": "Class", - "start_line": 103, - "end_line": 115, + "tier": "STANDARD", + "start_line": 130, + "end_line": 143, "tags": { "SEMANTICS": "plugin, config, schema, pydantic", "PURPOSE": "A Pydantic model used to represent the validated configuration and metadata of a loaded plugin. This object is what gets exposed to the API layer.", @@ -6168,12 +12499,753 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 130 + } + ], + "score": 0.8 + } + }, + { + "name": "backend.src.core.auth.config", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 45, + "tags": { + "SEMANTICS": "auth, config, settings, jwt, adfs", + "PURPOSE": "Centralized configuration for authentication and authorization.", + "LAYER": "Core", + "INVARIANT": "All sensitive configuration must have defaults or be loaded from environment." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "pydantic" + } + ], + "children": [ + { + "name": "AuthConfig", + "type": "Class", + "tier": "STANDARD", + "start_line": 16, + "end_line": 38, + "tags": { + "PURPOSE": "Holds authentication-related settings.", + "PRE": "Environment variables may be provided via .env file.", + "POST": "Returns a configuration object with validated settings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 16 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 16 + } + ], + "score": 0.7000000000000001 + } + }, + { + "name": "auth_config", + "type": "Variable", + "tier": "STANDARD", + "start_line": 40, + "end_line": 43, + "tags": { + "PURPOSE": "Singleton instance of AuthConfig." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + } + }, + { + "name": "backend.src.core.auth.jwt", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 54, + "tags": { + "SEMANTICS": "jwt, token, session, auth", + "PURPOSE": "JWT token generation and validation logic.", + "LAYER": "Core", + "INVARIANT": "Tokens must include expiration time and user identifier." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "jose" + }, + { + "type": "USES", + "target": "backend.src.core.auth.config.auth_config" + } + ], + "children": [ + { + "name": "create_access_token", + "type": "Function", + "tier": "STANDARD", + "start_line": 19, + "end_line": 38, + "tags": { + "PURPOSE": "Generates a new JWT access token.", + "PRE": "data dict contains 'sub' (user_id) and optional 'scopes' (roles).", + "POST": "Returns a signed JWT string.", + "PARAM": "expires_delta (Optional[timedelta]) - Custom expiration time.", + "RETURN": "str - The encoded JWT." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "decode_token", + "type": "Function", + "tier": "STANDARD", + "start_line": 40, + "end_line": 52, + "tags": { + "PURPOSE": "Decodes and validates a JWT token.", + "PRE": "token is a signed JWT string.", + "POST": "Returns the decoded payload if valid.", + "PARAM": "token (str) - The JWT to decode.", + "RETURN": "dict - The decoded payload.", + "THROW": "jose.JWTError - If token is invalid or expired." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + } + }, + { + "name": "backend.src.core.auth.oauth", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 51, + "tags": { + "SEMANTICS": "auth, oauth, oidc, adfs", + "PURPOSE": "ADFS OIDC configuration and client using Authlib.", + "LAYER": "Core", + "INVARIANT": "Must use secure OIDC flows." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "authlib" + }, + { + "type": "USES", + "target": "backend.src.core.auth.config.auth_config" + } + ], + "children": [ + { + "name": "oauth", + "type": "Variable", + "tier": "STANDARD", + "start_line": 16, + "end_line": 19, + "tags": { + "PURPOSE": "Global Authlib OAuth registry." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "register_adfs", + "type": "Function", + "tier": "STANDARD", + "start_line": 21, + "end_line": 36, + "tags": { + "PURPOSE": "Registers the ADFS OIDC client.", + "PRE": "ADFS configuration is provided in auth_config.", + "POST": "ADFS client is registered in oauth registry." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + } + ], + "score": 0.8 + } + }, + { + "name": "is_adfs_configured", + "type": "Function", + "tier": "STANDARD", + "start_line": 38, + "end_line": 46, + "tags": { + "PURPOSE": "Checks if ADFS is properly configured.", + "PRE": "None.", + "POST": "Returns True if ADFS client is registered, False otherwise.", + "RETURN": "bool - Configuration status." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 38 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 38 + } + ], + "score": 0.8 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + } + }, + { + "name": "backend.src.core.auth.logger", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 31, + "tags": { + "SEMANTICS": "auth, logger, audit, security", + "PURPOSE": "Audit logging for security-related events.", + "LAYER": "Core", + "INVARIANT": "Must not log sensitive data like passwords or full tokens." + }, + "relations": [ + { + "type": "USES", + "target": "backend.src.core.logger.belief_scope" + } + ], + "children": [ + { + "name": "log_security_event", + "type": "Function", + "tier": "STANDARD", + "start_line": 15, + "end_line": 29, + "tags": { + "PURPOSE": "Logs a security-related event for audit trails.", + "PRE": "event_type and username are strings.", + "POST": "Security event is written to the application log.", + "PARAM": "details (dict) - Additional non-sensitive metadata." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + } + }, + { + "name": "backend.src.core.auth.security", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 42, + "tags": { + "SEMANTICS": "security, password, hashing, bcrypt", + "PURPOSE": "Utility for password hashing and verification using Passlib.", + "LAYER": "Core", + "INVARIANT": "Uses bcrypt for hashing with standard work factor." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "passlib" + } + ], + "children": [ + { + "name": "pwd_context", + "type": "Variable", + "tier": "STANDARD", + "start_line": 14, + "end_line": 17, + "tags": { + "PURPOSE": "Passlib CryptContext for password management." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "verify_password", + "type": "Function", + "tier": "STANDARD", + "start_line": 19, + "end_line": 29, + "tags": { + "PURPOSE": "Verifies a plain password against a hashed password.", + "PRE": "plain_password is a string, hashed_password is a bcrypt hash.", + "POST": "Returns True if password matches, False otherwise.", + "PARAM": "hashed_password (str) - The stored hash.", + "RETURN": "bool - Verification result." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 19 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 19 + } + ], + "score": 0.8 + } + }, + { + "name": "get_password_hash", + "type": "Function", + "tier": "STANDARD", + "start_line": 31, + "end_line": 40, + "tags": { + "PURPOSE": "Generates a bcrypt hash for a plain password.", + "PRE": "password is a string.", + "POST": "Returns a secure bcrypt hash string.", + "PARAM": "password (str) - The password to hash.", + "RETURN": "str - The generated hash." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 31 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 31 + } + ], + "score": 0.8 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + } + }, + { + "name": "backend.src.core.auth.repository", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 123, + "tags": { + "SEMANTICS": "auth, repository, database, user, role", + "PURPOSE": "Data access layer for authentication-related entities.", + "LAYER": "Core", + "INVARIANT": "All database operations must be performed within a session." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "sqlalchemy" + }, + { + "type": "USES", + "target": "backend.src.models.auth" + } + ], + "children": [ + { + "name": "AuthRepository", + "type": "Class", + "tier": "STANDARD", + "start_line": 18, + "end_line": 121, + "tags": { + "PURPOSE": "Encapsulates database operations for authentication." + }, + "relations": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "tier": "STANDARD", + "start_line": 21, + "end_line": 26, + "tags": { + "PURPOSE": "Initializes the repository with a database session.", + "PARAM": "db (Session) - SQLAlchemy session." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + } + ], + "score": 0.26666666666666655 + } + }, + { + "name": "get_user_by_username", + "type": "Function", + "tier": "STANDARD", + "start_line": 28, + "end_line": 37, + "tags": { + "PURPOSE": "Retrieves a user by their username.", + "PRE": "username is a string.", + "POST": "Returns User object if found, else None.", + "PARAM": "username (str) - The username to search for.", + "RETURN": "Optional[User] - The found user or None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_user_by_id", + "type": "Function", + "tier": "STANDARD", + "start_line": 39, + "end_line": 48, + "tags": { + "PURPOSE": "Retrieves a user by their unique ID.", + "PRE": "user_id is a valid UUID string.", + "POST": "Returns User object if found, else None.", + "PARAM": "user_id (str) - The user's unique identifier.", + "RETURN": "Optional[User] - The found user or None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_role_by_name", + "type": "Function", + "tier": "STANDARD", + "start_line": 50, + "end_line": 59, + "tags": { + "PURPOSE": "Retrieves a role by its name.", + "PRE": "name is a string.", + "POST": "Returns Role object if found, else None.", + "PARAM": "name (str) - The role name to search for.", + "RETURN": "Optional[Role] - The found role or None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "update_last_login", + "type": "Function", + "tier": "STANDARD", + "start_line": 61, + "end_line": 73, + "tags": { + "PURPOSE": "Updates the last_login timestamp for a user.", + "PRE": "user object is a valid User instance.", + "POST": "User's last_login is updated in the database.", + "SIDE_EFFECT": "Commits the transaction.", + "PARAM": "user (User) - The user to update." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_role_by_id", + "type": "Function", + "tier": "STANDARD", + "start_line": 75, + "end_line": 84, + "tags": { + "PURPOSE": "Retrieves a role by its unique ID.", + "PRE": "role_id is a string.", + "POST": "Returns Role object if found, else None.", + "PARAM": "role_id (str) - The role's unique identifier.", + "RETURN": "Optional[Role] - The found role or None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_permission_by_id", + "type": "Function", + "tier": "STANDARD", + "start_line": 86, + "end_line": 95, + "tags": { + "PURPOSE": "Retrieves a permission by its unique ID.", + "PRE": "perm_id is a string.", + "POST": "Returns Permission object if found, else None.", + "PARAM": "perm_id (str) - The permission's unique identifier.", + "RETURN": "Optional[Permission] - The found permission or None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_permission_by_resource_action", + "type": "Function", + "tier": "STANDARD", + "start_line": 97, + "end_line": 110, + "tags": { + "PURPOSE": "Retrieves a permission by resource and action.", + "PRE": "resource and action are strings.", + "POST": "Returns Permission object if found, else None.", + "PARAM": "action (str) - The action name.", + "RETURN": "Optional[Permission] - The found permission or None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "list_permissions", + "type": "Function", + "tier": "STANDARD", + "start_line": 112, + "end_line": 119, + "tags": { + "PURPOSE": "Lists all available permissions.", + "POST": "Returns a list of all Permission objects.", + "RETURN": "List[Permission] - List of permissions." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 112 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 112 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 112 + } + ], + "score": 0.6333333333333333 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + } + ], + "score": 0.7000000000000001 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.core.utils.fileio", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 488, "tags": { @@ -6196,6 +13268,7 @@ { "name": "InvalidZipFormatError", "type": "Class", + "tier": "STANDARD", "start_line": 26, "end_line": 30, "tags": { @@ -6205,12 +13278,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 26 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 26 + } + ], + "score": 0.7000000000000001 } }, { "name": "create_temp_file", "type": "Function", + "tier": "STANDARD", "start_line": 32, "end_line": 71, "tags": { @@ -6225,12 +13311,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "remove_empty_directories", "type": "Function", + "tier": "STANDARD", "start_line": 73, "end_line": 96, "tags": { @@ -6244,12 +13332,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "read_dashboard_from_disk", "type": "Function", + "tier": "STANDARD", "start_line": 98, "end_line": 114, "tags": { @@ -6264,12 +13354,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "calculate_crc32", "type": "Function", + "tier": "STANDARD", "start_line": 116, "end_line": 128, "tags": { @@ -6284,12 +13376,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "RetentionPolicy", "type": "DataClass", + "tier": "STANDARD", "start_line": 131, "end_line": 138, "tags": { @@ -6299,12 +13393,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "archive_exports", "type": "Function", + "tier": "STANDARD", "start_line": 141, "end_line": 222, "tags": { @@ -6326,12 +13422,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "apply_retention_policy", "type": "Function", + "tier": "STANDARD", "start_line": 224, "end_line": 257, "tags": { @@ -6345,12 +13443,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "save_and_unpack_dashboard", "type": "Function", + "tier": "STANDARD", "start_line": 259, "end_line": 288, "tags": { @@ -6365,12 +13465,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "update_yamls", "type": "Function", + "tier": "STANDARD", "start_line": 290, "end_line": 310, "tags": { @@ -6389,12 +13491,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_update_yaml_file", "type": "Function", + "tier": "STANDARD", "start_line": 312, "end_line": 377, "tags": { @@ -6408,6 +13512,7 @@ { "name": "replacer", "type": "Function", + "tier": "STANDARD", "start_line": 359, "end_line": 368, "tags": { @@ -6418,23 +13523,38 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager." - ] + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 359 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 359 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 359 + } + ], + "score": 0.7 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "create_dashboard_export", "type": "Function", + "tier": "STANDARD", "start_line": 379, "end_line": 405, "tags": { @@ -6448,12 +13568,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "sanitize_filename", "type": "Function", + "tier": "STANDARD", "start_line": 407, "end_line": 416, "tags": { @@ -6467,12 +13589,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_filename_from_headers", "type": "Function", + "tier": "STANDARD", "start_line": 418, "end_line": 430, "tags": { @@ -6486,12 +13610,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "consolidate_archive_folders", "type": "Function", + "tier": "STANDARD", "start_line": 432, "end_line": 486, "tags": { @@ -6505,18 +13631,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.core.utils.network", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 326, "tags": { @@ -6539,6 +13674,7 @@ { "name": "SupersetAPIError", "type": "Class", + "tier": "STANDARD", "start_line": 22, "end_line": 34, "tags": { @@ -6549,6 +13685,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 25, "end_line": 33, "tags": { @@ -6560,18 +13697,32 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + } + ], + "score": 0.7000000000000001 } }, { "name": "AuthenticationError", "type": "Class", + "tier": "STANDARD", "start_line": 36, "end_line": 47, "tags": { @@ -6582,6 +13733,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 39, "end_line": 46, "tags": { @@ -6593,18 +13745,32 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + } + ], + "score": 0.7000000000000001 } }, { "name": "PermissionDeniedError", "type": "Class", + "tier": "STANDARD", "start_line": 49, "end_line": 60, "tags": { @@ -6615,6 +13781,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 52, "end_line": 59, "tags": { @@ -6626,18 +13793,32 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 49 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 49 + } + ], + "score": 0.7000000000000001 } }, { "name": "DashboardNotFoundError", "type": "Class", + "tier": "STANDARD", "start_line": 62, "end_line": 73, "tags": { @@ -6648,6 +13829,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 65, "end_line": 72, "tags": { @@ -6659,18 +13841,32 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 62 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 62 + } + ], + "score": 0.7000000000000001 } }, { "name": "NetworkError", "type": "Class", + "tier": "STANDARD", "start_line": 75, "end_line": 87, "tags": { @@ -6681,6 +13877,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 78, "end_line": 86, "tags": { @@ -6692,18 +13889,32 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + } + ], + "score": 0.7000000000000001 } }, { "name": "APIClient", "type": "Class", + "tier": "STANDARD", "start_line": 89, "end_line": 324, "tags": { @@ -6714,6 +13925,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 94, "end_line": 111, "tags": { @@ -6726,12 +13938,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_init_session", "type": "Function", + "tier": "STANDARD", "start_line": 113, "end_line": 130, "tags": { @@ -6744,12 +13958,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "authenticate", "type": "Function", + "tier": "STANDARD", "start_line": 132, "end_line": 159, "tags": { @@ -6763,12 +13979,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "headers", "type": "Function", + "tier": "STANDARD", "start_line": 162, "end_line": 175, "tags": { @@ -6780,12 +13998,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "request", "type": "Function", + "tier": "STANDARD", "start_line": 177, "end_line": 201, "tags": { @@ -6800,12 +14020,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_handle_http_error", "type": "Function", + "tier": "STANDARD", "start_line": 203, "end_line": 216, "tags": { @@ -6818,12 +14040,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_handle_network_error", "type": "Function", + "tier": "STANDARD", "start_line": 218, "end_line": 230, "tags": { @@ -6836,12 +14060,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "upload_file", "type": "Function", + "tier": "STANDARD", "start_line": 232, "end_line": 259, "tags": { @@ -6856,12 +14082,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_perform_upload", "type": "Function", + "tier": "STANDARD", "start_line": 261, "end_line": 287, "tags": { @@ -6875,12 +14103,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "fetch_paginated_count", "type": "Function", + "tier": "STANDARD", "start_line": 289, "end_line": 301, "tags": { @@ -6894,12 +14124,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "fetch_paginated_data", "type": "Function", + "tier": "STANDARD", "start_line": 303, "end_line": 322, "tags": { @@ -6913,24 +14145,45 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 89 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 89 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.src.core.utils.matching", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 53, "tags": { @@ -6949,6 +14202,7 @@ { "name": "suggest_mappings", "type": "Function", + "tier": "STANDARD", "start_line": 15, "end_line": 51, "tags": { @@ -6961,22 +14215,39 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager." - ] + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 15 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 15 + } + ], + "score": 0.8 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.core.utils.dataset_mapper", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 237, "tags": { @@ -7003,6 +14274,7 @@ { "name": "DatasetMapper", "type": "Class", + "tier": "STANDARD", "start_line": 18, "end_line": 235, "tags": { @@ -7013,6 +14285,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 21, "end_line": 26, "tags": { @@ -7022,20 +14295,31 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Mandatory Tag: @PRE", - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Mandatory Tag: @PRE", - "Missing Belief State Logging: Function should use belief_scope context manager." - ] + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + } + ], + "score": 0.6333333333333333 } }, { "name": "get_postgres_comments", "type": "Function", + "tier": "STANDARD", "start_line": 28, "end_line": 91, "tags": { @@ -7050,12 +14334,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "load_excel_mappings", "type": "Function", + "tier": "STANDARD", "start_line": 93, "end_line": 111, "tags": { @@ -7070,12 +14356,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "run_mapping", "type": "Function", + "tier": "STANDARD", "start_line": 113, "end_line": 234, "tags": { @@ -7105,24 +14393,45 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "TaskPersistenceModule", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 158, "tags": { @@ -7137,6 +14446,7 @@ { "name": "TaskPersistenceService", "type": "Class", + "tier": "STANDARD", "start_line": 20, "end_line": 157, "tags": { @@ -7148,6 +14458,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 24, "end_line": 32, "tags": { @@ -7159,12 +14470,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "persist_task", "type": "Function", + "tier": "STANDARD", "start_line": 34, "end_line": 77, "tags": { @@ -7177,12 +14490,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "persist_tasks", "type": "Function", + "tier": "STANDARD", "start_line": 79, "end_line": 88, "tags": { @@ -7195,12 +14510,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "load_tasks", "type": "Function", + "tier": "STANDARD", "start_line": 90, "end_line": 135, "tags": { @@ -7214,12 +14531,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "delete_tasks", "type": "Function", + "tier": "STANDARD", "start_line": 137, "end_line": 155, "tags": { @@ -7232,24 +14551,45 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 20 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 20 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "TaskManagerModule", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 398, "tags": { @@ -7265,6 +14605,7 @@ { "name": "TaskManager", "type": "Class", + "tier": "STANDARD", "start_line": 20, "end_line": 397, "tags": { @@ -7276,6 +14617,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 28, "end_line": 49, "tags": { @@ -7288,12 +14630,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "create_task", "type": "Function", + "tier": "STANDARD", "start_line": 51, "end_line": 78, "tags": { @@ -7308,12 +14652,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_run_task", "type": "Function", + "tier": "STANDARD", "start_line": 80, "end_line": 120, "tags": { @@ -7326,12 +14672,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "resolve_task", "type": "Function", + "tier": "STANDARD", "start_line": 122, "end_line": 144, "tags": { @@ -7345,12 +14693,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "wait_for_resolution", "type": "Function", + "tier": "STANDARD", "start_line": 146, "end_line": 165, "tags": { @@ -7363,12 +14713,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "wait_for_input", "type": "Function", + "tier": "STANDARD", "start_line": 167, "end_line": 185, "tags": { @@ -7381,12 +14733,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_task", "type": "Function", + "tier": "STANDARD", "start_line": 187, "end_line": 196, "tags": { @@ -7400,12 +14754,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_all_tasks", "type": "Function", + "tier": "STANDARD", "start_line": 198, "end_line": 206, "tags": { @@ -7418,12 +14774,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_tasks", "type": "Function", + "tier": "STANDARD", "start_line": 208, "end_line": 224, "tags": { @@ -7437,12 +14795,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_task_logs", "type": "Function", + "tier": "STANDARD", "start_line": 226, "end_line": 236, "tags": { @@ -7456,12 +14816,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_add_log", "type": "Function", + "tier": "STANDARD", "start_line": 238, "end_line": 260, "tags": { @@ -7474,12 +14836,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "subscribe_logs", "type": "Function", + "tier": "STANDARD", "start_line": 262, "end_line": 275, "tags": { @@ -7493,12 +14857,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "unsubscribe_logs", "type": "Function", + "tier": "STANDARD", "start_line": 277, "end_line": 290, "tags": { @@ -7511,12 +14877,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "load_persisted_tasks", "type": "Function", + "tier": "STANDARD", "start_line": 292, "end_line": 302, "tags": { @@ -7528,12 +14896,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "await_input", "type": "Function", + "tier": "STANDARD", "start_line": 304, "end_line": 324, "tags": { @@ -7547,12 +14917,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "resume_task_with_password", "type": "Function", + "tier": "STANDARD", "start_line": 326, "end_line": 353, "tags": { @@ -7566,12 +14938,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "clear_tasks", "type": "Function", + "tier": "STANDARD", "start_line": 355, "end_line": 395, "tags": { @@ -7585,24 +14959,45 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 20 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 20 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "TaskManagerModels", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 68, "tags": { @@ -7618,6 +15013,7 @@ { "name": "TaskStatus", "type": "Enum", + "tier": "STANDARD", "start_line": 18, "end_line": 28, "tags": { @@ -7628,12 +15024,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "LogEntry", "type": "Class", + "tier": "STANDARD", "start_line": 30, "end_line": 38, "tags": { @@ -7644,12 +15042,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 30 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 30 + } + ], + "score": 0.7000000000000001 } }, { "name": "Task", "type": "Class", + "tier": "STANDARD", "start_line": 40, "end_line": 66, "tags": { @@ -7661,6 +15072,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 56, "end_line": 65, "tags": { @@ -7672,29 +15084,46 @@ "relations": [], "children": [], "compliance": { - "valid": false, - "issues": [ - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager." - ] + "valid": true, + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 40 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 40 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "TaskCleanupModule", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 47, "tags": { @@ -7708,6 +15137,7 @@ { "name": "TaskCleanupService", "type": "Class", + "tier": "STANDARD", "start_line": 12, "end_line": 46, "tags": { @@ -7718,6 +15148,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 15, "end_line": 22, "tags": { @@ -7728,17 +15159,15 @@ "relations": [], "children": [], "compliance": { - "valid": false, - "issues": [ - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager." - ] + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "run_cleanup", "type": "Function", + "tier": "STANDARD", "start_line": 24, "end_line": 44, "tags": { @@ -7750,24 +15179,45 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 12 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 12 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "TaskManagerPackage", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 12, "tags": { @@ -7780,55 +15230,195 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { - "name": "AuthModule", + "name": "backend.src.api.auth", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 59, + "end_line": 118, "tags": { - "SEMANTICS": "auth, authentication, adfs, oauth, middleware", - "PURPOSE": "Implements ADFS authentication using Authlib for FastAPI. It provides a dependency to protect endpoints.", - "LAYER": "UI (API)", - "RELATION": "Used by API routers to protect endpoints that require authentication." + "SEMANTICS": "api, auth, routes, login, logout", + "PURPOSE": "Authentication API endpoints.", + "LAYER": "API", + "INVARIANT": "All auth endpoints must return consistent error codes." }, - "relations": [], + "relations": [ + { + "type": "USES", + "target": "backend.src.services.auth_service.AuthService" + }, + { + "type": "USES", + "target": "backend.src.core.database.get_auth_db" + } + ], "children": [ { - "name": "get_current_user", - "type": "Function", - "start_line": 34, - "end_line": 58, + "name": "router", + "type": "Variable", + "tier": "STANDARD", + "start_line": 25, + "end_line": 28, "tags": { - "PURPOSE": "Dependency to get the current user from the ADFS token.", - "PARAM": "token (str) - The OAuth2 bearer token.", - "PRE": "token should be provided via Authorization header.", - "POST": "Returns user details if authenticated, else raises 401.", - "RETURN": "Dict[str, str] - User information." + "PURPOSE": "APIRouter instance for authentication routes." }, "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "login_for_access_token", + "type": "Function", + "tier": "STANDARD", + "start_line": 30, + "end_line": 55, + "tags": { + "PURPOSE": "Authenticates a user and returns a JWT access token.", + "PRE": "form_data contains username and password.", + "POST": "Returns a Token object on success.", + "THROW": "HTTPException 401 if authentication fails.", + "PARAM": "db (Session) - Auth database session.", + "RETURN": "Token - The generated JWT token." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "read_users_me", + "type": "Function", + "tier": "STANDARD", + "start_line": 57, + "end_line": 67, + "tags": { + "PURPOSE": "Retrieves the profile of the currently authenticated user.", + "PRE": "Valid JWT token provided.", + "POST": "Returns the current user's data.", + "PARAM": "current_user (UserSchema) - The user extracted from the token.", + "RETURN": "UserSchema - The current user profile." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "logout", + "type": "Function", + "tier": "STANDARD", + "start_line": 69, + "end_line": 80, + "tags": { + "PURPOSE": "Logs out the current user (placeholder for session revocation).", + "PRE": "Valid JWT token provided.", + "POST": "Returns success message." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "login_adfs", + "type": "Function", + "tier": "STANDARD", + "start_line": 82, + "end_line": 95, + "tags": { + "PURPOSE": "Initiates the ADFS OIDC login flow.", + "POST": "Redirects the user to ADFS." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, "issues": [ - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Belief State Logging: Function should use belief_scope context manager." - ] + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + } + ], + "score": 0.7333333333333334 + } + }, + { + "name": "auth_callback_adfs", + "type": "Function", + "tier": "STANDARD", + "start_line": 97, + "end_line": 116, + "tags": { + "PURPOSE": "Handles the callback from ADFS after successful authentication.", + "POST": "Provisions user JIT and returns session token." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + } + ], + "score": 0.7333333333333334 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.src.api.routes.git", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 337, + "end_line": 400, "tags": { "SEMANTICS": "git, routes, api, fastapi, repository, deployment", "PURPOSE": "Provides FastAPI endpoints for Git integration operations.", @@ -7853,8 +15443,9 @@ { "name": "get_git_configs", "type": "Function", + "tier": "STANDARD", "start_line": 31, - "end_line": 40, + "end_line": 43, "tags": { "PURPOSE": "List all configured Git servers.", "PRE": "Database session `db` is available.", @@ -7865,14 +15456,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "create_git_config", "type": "Function", - "start_line": 42, - "end_line": 56, + "tier": "STANDARD", + "start_line": 45, + "end_line": 63, "tags": { "PURPOSE": "Register a new Git server configuration.", "PRE": "`config` contains valid GitServerConfigCreate data.", @@ -7884,14 +15477,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "delete_git_config", "type": "Function", - "start_line": 58, - "end_line": 73, + "tier": "STANDARD", + "start_line": 65, + "end_line": 84, "tags": { "PURPOSE": "Remove a Git server configuration.", "PRE": "`config_id` corresponds to an existing configuration.", @@ -7902,14 +15497,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "test_git_config", "type": "Function", - "start_line": 75, - "end_line": 88, + "tier": "STANDARD", + "start_line": 86, + "end_line": 102, "tags": { "PURPOSE": "Validate connection to a Git server using provided credentials.", "PRE": "`config` contains provider, url, and pat.", @@ -7920,14 +15517,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "init_repository", "type": "Function", - "start_line": 90, - "end_line": 132, + "tier": "STANDARD", + "start_line": 104, + "end_line": 151, "tags": { "PURPOSE": "Link a dashboard to a Git repository and perform initial clone/init.", "PRE": "`dashboard_id` exists and `init_data` contains valid config_id and remote_url.", @@ -7938,14 +15537,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_branches", "type": "Function", - "start_line": 134, - "end_line": 147, + "tier": "STANDARD", + "start_line": 153, + "end_line": 169, "tags": { "PURPOSE": "List all branches for a dashboard's repository.", "PRE": "Repository for `dashboard_id` is initialized.", @@ -7957,14 +15558,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "create_branch", "type": "Function", - "start_line": 149, - "end_line": 163, + "tier": "STANDARD", + "start_line": 171, + "end_line": 189, "tags": { "PURPOSE": "Create a new branch in the dashboard's repository.", "PRE": "`dashboard_id` repository exists and `branch_data` has name and from_branch.", @@ -7975,14 +15578,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "checkout_branch", "type": "Function", - "start_line": 165, - "end_line": 179, + "tier": "STANDARD", + "start_line": 191, + "end_line": 209, "tags": { "PURPOSE": "Switch the dashboard's repository to a specific branch.", "PRE": "`dashboard_id` repository exists and branch `checkout_data.name` exists.", @@ -7993,14 +15598,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "commit_changes", "type": "Function", - "start_line": 181, - "end_line": 195, + "tier": "STANDARD", + "start_line": 211, + "end_line": 229, "tags": { "PURPOSE": "Stage and commit changes in the dashboard's repository.", "PRE": "`dashboard_id` repository exists and `commit_data` has message and files.", @@ -8011,14 +15618,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "push_changes", "type": "Function", - "start_line": 197, - "end_line": 210, + "tier": "STANDARD", + "start_line": 231, + "end_line": 247, "tags": { "PURPOSE": "Push local commits to the remote repository.", "PRE": "`dashboard_id` repository exists and has a remote configured.", @@ -8029,14 +15638,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "pull_changes", "type": "Function", - "start_line": 212, - "end_line": 225, + "tier": "STANDARD", + "start_line": 249, + "end_line": 265, "tags": { "PURPOSE": "Pull changes from the remote repository.", "PRE": "`dashboard_id` repository exists and has a remote configured.", @@ -8047,14 +15658,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "sync_dashboard", "type": "Function", - "start_line": 227, - "end_line": 246, + "tier": "STANDARD", + "start_line": 267, + "end_line": 290, "tags": { "PURPOSE": "Sync dashboard state from Superset to Git using the GitPlugin.", "PRE": "`dashboard_id` is valid; GitPlugin is available.", @@ -8065,14 +15678,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_environments", "type": "Function", - "start_line": 248, - "end_line": 265, + "tier": "STANDARD", + "start_line": 292, + "end_line": 312, "tags": { "PURPOSE": "List all deployment environments.", "PRE": "Config manager is accessible.", @@ -8083,14 +15698,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "deploy_dashboard", "type": "Function", - "start_line": 267, - "end_line": 286, + "tier": "STANDARD", + "start_line": 314, + "end_line": 337, "tags": { "PURPOSE": "Deploy dashboard from Git to a target environment.", "PRE": "`dashboard_id` and `deploy_data.environment_id` are valid.", @@ -8101,14 +15718,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_history", "type": "Function", - "start_line": 288, - "end_line": 302, + "tier": "STANDARD", + "start_line": 339, + "end_line": 357, "tags": { "PURPOSE": "View commit history for a dashboard's repository.", "PRE": "`dashboard_id` repository exists.", @@ -8120,14 +15739,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_repository_status", "type": "Function", - "start_line": 304, - "end_line": 317, + "tier": "STANDARD", + "start_line": 359, + "end_line": 375, "tags": { "PURPOSE": "Get current Git status for a dashboard repository.", "PRE": "`dashboard_id` repository exists.", @@ -8139,14 +15760,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_repository_diff", "type": "Function", - "start_line": 319, - "end_line": 335, + "tier": "STANDARD", + "start_line": 377, + "end_line": 398, "tags": { "PURPOSE": "Get Git diff for a dashboard repository.", "PRE": "`dashboard_id` repository exists.", @@ -8158,18 +15781,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "ConnectionsRouter", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 100, "tags": { @@ -8184,6 +15816,7 @@ { "name": "ConnectionSchema", "type": "Class", + "tier": "STANDARD", "start_line": 21, "end_line": 35, "tags": { @@ -8193,12 +15826,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + } + ], + "score": 0.7000000000000001 } }, { "name": "ConnectionCreate", "type": "Class", + "tier": "STANDARD", "start_line": 37, "end_line": 47, "tags": { @@ -8208,12 +15854,25 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 37 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 37 + } + ], + "score": 0.7000000000000001 } }, { "name": "list_connections", "type": "Function", + "tier": "STANDARD", "start_line": 49, "end_line": 60, "tags": { @@ -8227,12 +15886,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "create_connection", "type": "Function", + "tier": "STANDARD", "start_line": 62, "end_line": 78, "tags": { @@ -8246,12 +15907,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "delete_connection", "type": "Function", + "tier": "STANDARD", "start_line": 80, "end_line": 98, "tags": { @@ -8265,20 +15928,29 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.src.api.routes.environments", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 122, + "end_line": 130, "tags": { "SEMANTICS": "api, environments, superset, databases", "PURPOSE": "API endpoints for listing environments and their databases.", @@ -8299,6 +15971,7 @@ { "name": "ScheduleSchema", "type": "DataClass", + "tier": "STANDARD", "start_line": 23, "end_line": 27, "tags": {}, @@ -8306,12 +15979,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "EnvironmentResponse", "type": "DataClass", + "tier": "STANDARD", "start_line": 29, "end_line": 35, "tags": {}, @@ -8319,12 +15994,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "DatabaseResponse", "type": "DataClass", + "tier": "STANDARD", "start_line": 37, "end_line": 42, "tags": {}, @@ -8332,14 +16009,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_environments", "type": "Function", + "tier": "STANDARD", "start_line": 44, - "end_line": 67, + "end_line": 70, "tags": { "PURPOSE": "List all configured environments.", "PRE": "config_manager is injected via Depends.", @@ -8350,14 +16029,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "update_environment_schedule", "type": "Function", - "start_line": 69, - "end_line": 98, + "tier": "STANDARD", + "start_line": 72, + "end_line": 102, "tags": { "PURPOSE": "Update backup schedule for an environment.", "PRE": "Environment id exists, schedule is valid ScheduleSchema.", @@ -8368,14 +16049,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_environment_databases", "type": "Function", - "start_line": 100, - "end_line": 120, + "tier": "STANDARD", + "start_line": 104, + "end_line": 128, "tags": { "PURPOSE": "Fetch the list of databases from a specific environment.", "PRE": "Environment id exists.", @@ -8387,20 +16070,29 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.src.api.routes.migration", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 71, + "end_line": 80, "tags": { "SEMANTICS": "api, migration, dashboards", "PURPOSE": "API endpoints for migration operations.", @@ -8420,8 +16112,9 @@ { "name": "get_dashboards", "type": "Function", + "tier": "STANDARD", "start_line": 17, - "end_line": 34, + "end_line": 38, "tags": { "PURPOSE": "Fetch all dashboards from the specified environment for the grid.", "PRE": "Environment ID must be valid.", @@ -8433,14 +16126,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "execute_migration", "type": "Function", - "start_line": 36, - "end_line": 69, + "tier": "STANDARD", + "start_line": 40, + "end_line": 78, "tags": { "PURPOSE": "Execute the migration of selected dashboards.", "PRE": "Selection must be valid and environments must exist.", @@ -8452,20 +16147,29 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "PluginsRouter", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 30, + "end_line": 31, "tags": { "SEMANTICS": "api, router, plugins, list", "PURPOSE": "Defines the FastAPI router for plugin-related endpoints, allowing clients to list available plugins.", @@ -8477,8 +16181,9 @@ { "name": "list_plugins", "type": "Function", + "tier": "STANDARD", "start_line": 15, - "end_line": 29, + "end_line": 30, "tags": { "PURPOSE": "Retrieve a list of all available plugins.", "PRE": "plugin_loader is injected via Depends.", @@ -8489,20 +16194,29 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.src.api.routes.mappings", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 120, + "end_line": 126, "tags": { "SEMANTICS": "api, mappings, database, fuzzy-matching", "PURPOSE": "API endpoints for managing database mappings and getting suggestions.", @@ -8527,6 +16241,7 @@ { "name": "MappingCreate", "type": "DataClass", + "tier": "STANDARD", "start_line": 25, "end_line": 33, "tags": {}, @@ -8534,12 +16249,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "MappingResponse", "type": "DataClass", + "tier": "STANDARD", "start_line": 35, "end_line": 47, "tags": {}, @@ -8547,12 +16264,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "SuggestRequest", "type": "DataClass", + "tier": "STANDARD", "start_line": 49, "end_line": 53, "tags": {}, @@ -8560,14 +16279,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_mappings", "type": "Function", + "tier": "STANDARD", "start_line": 55, - "end_line": 72, + "end_line": 73, "tags": { "PURPOSE": "List all saved database mappings.", "PRE": "db session is injected.", @@ -8577,14 +16298,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "create_mapping", "type": "Function", - "start_line": 74, - "end_line": 100, + "tier": "STANDARD", + "start_line": 75, + "end_line": 105, "tags": { "PURPOSE": "Create or update a database mapping.", "PRE": "mapping is valid MappingCreate, db session is injected.", @@ -8594,14 +16317,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "suggest_mappings_api", "type": "Function", - "start_line": 102, - "end_line": 118, + "tier": "STANDARD", + "start_line": 107, + "end_line": 124, "tags": { "PURPOSE": "Get suggested mappings based on fuzzy matching.", "PRE": "request is valid SuggestRequest, config_manager is injected.", @@ -8611,20 +16336,29 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "SettingsRouter", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 212, + "end_line": 227, "tags": { "SEMANTICS": "settings, api, router, fastapi", "PURPOSE": "Provides API endpoints for managing application settings and Superset environments.", @@ -8646,8 +16380,9 @@ { "name": "get_settings", "type": "Function", + "tier": "STANDARD", "start_line": 26, - "end_line": 41, + "end_line": 44, "tags": { "PURPOSE": "Retrieves all application settings.", "PRE": "Config manager is available.", @@ -8658,14 +16393,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "update_global_settings", "type": "Function", - "start_line": 43, - "end_line": 59, + "tier": "STANDARD", + "start_line": 46, + "end_line": 63, "tags": { "PURPOSE": "Updates global application settings.", "PRE": "New settings are provided.", @@ -8677,14 +16414,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_storage_settings", "type": "Function", - "start_line": 61, - "end_line": 68, + "tier": "STANDARD", + "start_line": 65, + "end_line": 75, "tags": { "PURPOSE": "Retrieves storage-specific settings.", "RETURN": "StorageConfig - The storage configuration." @@ -8692,20 +16431,38 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST" - ] + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 65 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 65 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 65 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 65 + } + ], + "score": 0.4666666666666666 } }, { "name": "update_storage_settings", "type": "Function", - "start_line": 70, - "end_line": 86, + "tier": "STANDARD", + "start_line": 77, + "end_line": 97, "tags": { "PURPOSE": "Updates storage-specific settings.", "PARAM": "storage (StorageConfig) - The new storage settings.", @@ -8715,18 +16472,28 @@ "relations": [], "children": [], "compliance": { - "valid": false, + "valid": true, "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @PRE" - ] + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 77 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 77 + } + ], + "score": 0.7333333333333334 } }, { "name": "get_environments", "type": "Function", - "start_line": 88, - "end_line": 98, + "tier": "STANDARD", + "start_line": 99, + "end_line": 112, "tags": { "PURPOSE": "Lists all configured Superset environments.", "PRE": "Config manager is available.", @@ -8737,14 +16504,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "add_environment", "type": "Function", - "start_line": 100, - "end_line": 124, + "tier": "STANDARD", + "start_line": 114, + "end_line": 139, "tags": { "PURPOSE": "Adds a new Superset environment.", "PRE": "Environment data is valid and reachable.", @@ -8756,14 +16525,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "update_environment", "type": "Function", - "start_line": 126, - "end_line": 160, + "tier": "STANDARD", + "start_line": 141, + "end_line": 175, "tags": { "PURPOSE": "Updates an existing Superset environment.", "PRE": "ID and valid environment data are provided.", @@ -8775,14 +16546,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "delete_environment", "type": "Function", - "start_line": 162, - "end_line": 176, + "tier": "STANDARD", + "start_line": 177, + "end_line": 191, "tags": { "PURPOSE": "Deletes a Superset environment.", "PRE": "ID is provided.", @@ -8793,14 +16566,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "test_environment_connection", "type": "Function", - "start_line": 178, - "end_line": 209, + "tier": "STANDARD", + "start_line": 193, + "end_line": 224, "tags": { "PURPOSE": "Tests the connection to a Superset environment.", "PRE": "ID is provided.", @@ -8812,21 +16587,434 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 + } + }, + { + "name": "backend.src.api.routes.admin", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 310, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "api, admin, users, roles, permissions", + "PURPOSE": "Admin API endpoints for user and role management.", + "LAYER": "API", + "INVARIANT": "All endpoints in this module require 'Admin' role or 'admin' scope." + }, + "relations": [ + { + "type": "USES", + "target": "backend.src.core.auth.repository.AuthRepository" + }, + { + "type": "USES", + "target": "backend.src.dependencies.has_permission" + } + ], + "children": [ + { + "name": "router", + "type": "Variable", + "tier": "STANDARD", + "start_line": 29, + "end_line": 32, + "tags": { + "PURPOSE": "APIRouter instance for admin routes." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "list_users", + "type": "Function", + "tier": "STANDARD", + "start_line": 34, + "end_line": 48, + "tags": { + "PURPOSE": "Lists all registered users.", + "PRE": "Current user has 'Admin' role.", + "POST": "Returns a list of UserSchema objects.", + "PARAM": "db (Session) - Auth database session.", + "RETURN": "List[UserSchema] - List of users." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "create_user", + "type": "Function", + "tier": "STANDARD", + "start_line": 50, + "end_line": 85, + "tags": { + "PURPOSE": "Creates a new local user.", + "PRE": "Current user has 'Admin' role.", + "POST": "New user is created in the database.", + "PARAM": "db (Session) - Auth database session.", + "RETURN": "UserSchema - The created user." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "update_user", + "type": "Function", + "tier": "STANDARD", + "start_line": 87, + "end_line": 119, + "tags": { + "PURPOSE": "Updates an existing user." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 87 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 87 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 87 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 87 + } + ], + "score": 0.4666666666666666 + } + }, + { + "name": "delete_user", + "type": "Function", + "tier": "STANDARD", + "start_line": 121, + "end_line": 142, + "tags": { + "PURPOSE": "Deletes a user." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + } + ], + "score": 0.4666666666666666 + } + }, + { + "name": "list_roles", + "type": "Function", + "tier": "STANDARD", + "start_line": 144, + "end_line": 155, + "tags": { + "PURPOSE": "Lists all available roles.", + "RETURN": "List[RoleSchema] - List of roles." + }, + "relations": [ + { + "type": "CALLS", + "target": "backend.src.models.auth.Role" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 144 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 144 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 144 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 144 + } + ], + "score": 0.4666666666666666 + } + }, + { + "name": "create_role", + "type": "Function", + "tier": "STANDARD", + "start_line": 157, + "end_line": 192, + "tags": { + "PURPOSE": "Creates a new system role with associated permissions.", + "PRE": "Role name must be unique.", + "POST": "New Role record is created in auth.db.", + "PARAM": "db (Session) - Auth database session.", + "RETURN": "RoleSchema - The created role.", + "SIDE_EFFECT": "Commits new role and associations to auth.db." + }, + "relations": [ + { + "type": "CALLS", + "target": "backend.src.core.auth.repository.AuthRepository.get_permission_by_id" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "update_role", + "type": "Function", + "tier": "STANDARD", + "start_line": 194, + "end_line": 236, + "tags": { + "PURPOSE": "Updates an existing role's metadata and permissions.", + "PRE": "role_id must be a valid existing role UUID.", + "POST": "Role record is updated in auth.db.", + "PARAM": "db (Session) - Auth database session.", + "RETURN": "RoleSchema - The updated role.", + "SIDE_EFFECT": "Commits updates to auth.db." + }, + "relations": [ + { + "type": "CALLS", + "target": "backend.src.core.auth.repository.AuthRepository.get_role_by_id" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "delete_role", + "type": "Function", + "tier": "STANDARD", + "start_line": 238, + "end_line": 262, + "tags": { + "PURPOSE": "Removes a role from the system.", + "PRE": "role_id must be a valid existing role UUID.", + "POST": "Role record is removed from auth.db.", + "PARAM": "db (Session) - Auth database session.", + "RETURN": "None", + "SIDE_EFFECT": "Deletes record from auth.db and commits." + }, + "relations": [ + { + "type": "CALLS", + "target": "backend.src.core.auth.repository.AuthRepository.get_role_by_id" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "list_permissions", + "type": "Function", + "tier": "STANDARD", + "start_line": 264, + "end_line": 278, + "tags": { + "PURPOSE": "Lists all available system permissions for assignment.", + "POST": "Returns a list of all PermissionSchema objects.", + "PARAM": "db (Session) - Auth database session.", + "RETURN": "List[PermissionSchema] - List of permissions." + }, + "relations": [ + { + "type": "CALLS", + "target": "backend.src.core.auth.repository.AuthRepository.list_permissions" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 264 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 264 + } + ], + "score": 0.7333333333333334 + } + }, + { + "name": "list_ad_mappings", + "type": "Function", + "tier": "STANDARD", + "start_line": 280, + "end_line": 289, + "tags": { + "PURPOSE": "Lists all AD Group to Role mappings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 280 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 280 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 280 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 280 + } + ], + "score": 0.4666666666666666 + } + }, + { + "name": "create_ad_mapping", + "type": "Function", + "tier": "STANDARD", + "start_line": 291, + "end_line": 308, + "tags": { + "PURPOSE": "Creates a new AD Group mapping." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 291 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 291 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 291 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 291 + } + ], + "score": 0.4666666666666666 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "backend.src.api.routes.git_schemas", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 143, + "end_line": 145, "tags": { + "TIER": "STANDARD", "SEMANTICS": "git, schemas, pydantic, api, contracts", "PURPOSE": "Defines Pydantic models for the Git integration API layer.", "LAYER": "API", @@ -8842,23 +17030,27 @@ { "name": "GitServerConfigBase", "type": "Class", - "start_line": 16, - "end_line": 24, + "tier": "TRIVIAL", + "start_line": 17, + "end_line": 26, "tags": { + "TIER": "TRIVIAL", "PURPOSE": "Base schema for Git server configuration attributes." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "GitServerConfigCreate", "type": "Class", - "start_line": 26, - "end_line": 31, + "tier": "STANDARD", + "start_line": 28, + "end_line": 33, "tags": { "PURPOSE": "Schema for creating a new Git server configuration." }, @@ -8866,14 +17058,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + } + ], + "score": 0.7000000000000001 } }, { "name": "GitServerConfigSchema", "type": "Class", - "start_line": 33, - "end_line": 43, + "tier": "STANDARD", + "start_line": 35, + "end_line": 45, "tags": { "PURPOSE": "Schema for representing a Git server configuration with metadata." }, @@ -8881,14 +17086,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 35 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 35 + } + ], + "score": 0.7000000000000001 } }, { "name": "GitRepositorySchema", "type": "Class", - "start_line": 45, - "end_line": 59, + "tier": "STANDARD", + "start_line": 47, + "end_line": 61, "tags": { "PURPOSE": "Schema for tracking a local Git repository linked to a dashboard." }, @@ -8896,14 +17114,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 47 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 47 + } + ], + "score": 0.7000000000000001 } }, { "name": "BranchSchema", "type": "Class", - "start_line": 61, - "end_line": 69, + "tier": "STANDARD", + "start_line": 63, + "end_line": 71, "tags": { "PURPOSE": "Schema for representing a Git branch metadata." }, @@ -8911,14 +17142,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + } + ], + "score": 0.7000000000000001 } }, { "name": "CommitSchema", "type": "Class", - "start_line": 71, - "end_line": 81, + "tier": "STANDARD", + "start_line": 73, + "end_line": 83, "tags": { "PURPOSE": "Schema for representing Git commit details." }, @@ -8926,14 +17170,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 73 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 73 + } + ], + "score": 0.7000000000000001 } }, { "name": "BranchCreate", "type": "Class", - "start_line": 83, - "end_line": 89, + "tier": "STANDARD", + "start_line": 85, + "end_line": 91, "tags": { "PURPOSE": "Schema for branch creation requests." }, @@ -8941,14 +17198,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 85 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 85 + } + ], + "score": 0.7000000000000001 } }, { "name": "BranchCheckout", "type": "Class", - "start_line": 91, - "end_line": 96, + "tier": "STANDARD", + "start_line": 93, + "end_line": 98, "tags": { "PURPOSE": "Schema for branch checkout requests." }, @@ -8956,14 +17226,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 93 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 93 + } + ], + "score": 0.7000000000000001 } }, { "name": "CommitCreate", "type": "Class", - "start_line": 98, - "end_line": 104, + "tier": "STANDARD", + "start_line": 100, + "end_line": 106, "tags": { "PURPOSE": "Schema for staging and committing changes." }, @@ -8971,14 +17254,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 100 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 100 + } + ], + "score": 0.7000000000000001 } }, { "name": "ConflictResolution", "type": "Class", - "start_line": 106, - "end_line": 113, + "tier": "STANDARD", + "start_line": 108, + "end_line": 115, "tags": { "PURPOSE": "Schema for resolving merge conflicts." }, @@ -8986,14 +17282,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 108 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 108 + } + ], + "score": 0.7000000000000001 } }, { "name": "DeploymentEnvironmentSchema", "type": "Class", - "start_line": 115, - "end_line": 126, + "tier": "STANDARD", + "start_line": 117, + "end_line": 128, "tags": { "PURPOSE": "Schema for representing a target deployment environment." }, @@ -9001,14 +17310,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 117 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 117 + } + ], + "score": 0.7000000000000001 } }, { "name": "DeployRequest", "type": "Class", - "start_line": 128, - "end_line": 133, + "tier": "STANDARD", + "start_line": 130, + "end_line": 135, "tags": { "PURPOSE": "Schema for dashboard deployment requests." }, @@ -9016,14 +17338,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 130 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 130 + } + ], + "score": 0.7000000000000001 } }, { "name": "RepoInitRequest", "type": "Class", - "start_line": 135, - "end_line": 141, + "tier": "STANDARD", + "start_line": 137, + "end_line": 143, "tags": { "PURPOSE": "Schema for repository initialization requests." }, @@ -9031,20 +17366,34 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 137 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 137 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "storage_routes", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 132, + "end_line": 145, "tags": { "SEMANTICS": "storage, files, upload, download, backup, repository", "PURPOSE": "API endpoints for file storage management (backups and repositories).", @@ -9061,8 +17410,9 @@ { "name": "list_files", "type": "Function", - "start_line": 22, - "end_line": 44, + "tier": "STANDARD", + "start_line": 23, + "end_line": 46, "tags": { "PURPOSE": "List all files and directories in the storage system.", "PRE": "None.", @@ -9079,14 +17429,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "upload_file", "type": "Function", - "start_line": 46, - "end_line": 76, + "tier": "STANDARD", + "start_line": 48, + "end_line": 79, "tags": { "PURPOSE": "Upload a file to the storage system.", "PRE": "file must be a valid UploadFile.", @@ -9104,14 +17456,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "delete_file", "type": "Function", - "start_line": 78, - "end_line": 103, + "tier": "STANDARD", + "start_line": 81, + "end_line": 111, "tags": { "PURPOSE": "Delete a specific file or directory.", "PRE": "category must be a valid FileCategory.", @@ -9129,14 +17483,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "download_file", "type": "Function", - "start_line": 105, - "end_line": 130, + "tier": "STANDARD", + "start_line": 113, + "end_line": 143, "tags": { "PURPOSE": "Retrieve a file for download.", "PRE": "category must be a valid FileCategory.", @@ -9153,20 +17509,29 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "TasksRouter", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 187, + "end_line": 194, "tags": { "SEMANTICS": "api, router, tasks, create, list, get", "PURPOSE": "Defines the FastAPI router for task-related endpoints, allowing clients to create, list, and get the status of tasks.", @@ -9178,8 +17543,9 @@ { "name": "create_task", "type": "Function", + "tier": "STANDARD", "start_line": 27, - "end_line": 50, + "end_line": 51, "tags": { "PURPOSE": "Create and start a new task for a given plugin.", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -9191,14 +17557,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "list_tasks", "type": "Function", - "start_line": 53, - "end_line": 73, + "tier": "STANDARD", + "start_line": 54, + "end_line": 75, "tags": { "PURPOSE": "Retrieve a list of tasks with pagination and optional status filter.", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -9210,14 +17578,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_task", "type": "Function", - "start_line": 76, - "end_line": 95, + "tier": "STANDARD", + "start_line": 78, + "end_line": 98, "tags": { "PURPOSE": "Retrieve the details of a specific task.", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -9229,14 +17599,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_task_logs", "type": "Function", - "start_line": 98, - "end_line": 117, + "tier": "STANDARD", + "start_line": 101, + "end_line": 121, "tags": { "PURPOSE": "Retrieve logs for a specific task.", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -9248,14 +17620,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "resolve_task", "type": "Function", - "start_line": 120, - "end_line": 142, + "tier": "STANDARD", + "start_line": 124, + "end_line": 147, "tags": { "PURPOSE": "Resolve a task that is awaiting mapping.", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -9267,14 +17641,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "resume_task", "type": "Function", - "start_line": 145, - "end_line": 167, + "tier": "STANDARD", + "start_line": 150, + "end_line": 173, "tags": { "PURPOSE": "Resume a task that is awaiting input (e.g., passwords).", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -9286,14 +17662,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "clear_tasks", "type": "Function", - "start_line": 170, - "end_line": 186, + "tier": "STANDARD", + "start_line": 176, + "end_line": 193, "tags": { "PURPOSE": "Clear tasks matching the status filter.", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -9304,18 +17682,27 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "GitModels", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 73, "tags": { @@ -9328,12 +17715,20 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.src.models.task", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 35, "tags": { @@ -9352,6 +17747,7 @@ { "name": "TaskRecord", "type": "Class", + "tier": "STANDARD", "start_line": 17, "end_line": 33, "tags": { @@ -9361,18 +17757,38 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 17 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 17 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.src.models.connection", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 34, "tags": { @@ -9391,6 +17807,7 @@ { "name": "ConnectionConfig", "type": "Class", + "tier": "STANDARD", "start_line": 17, "end_line": 32, "tags": { @@ -9400,21 +17817,42 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 17 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 17 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.src.models.mapping", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 70, + "end_line": 74, "tags": { + "TIER": "STANDARD", "SEMANTICS": "database, mapping, environment, migration, sqlalchemy, sqlite", "PURPOSE": "Defines the database schema for environment metadata and database mappings using SQLAlchemy.", "LAYER": "Domain", @@ -9431,53 +17869,63 @@ { "name": "MigrationStatus", "type": "Class", - "start_line": 21, - "end_line": 29, + "tier": "TRIVIAL", + "start_line": 22, + "end_line": 31, "tags": { + "TIER": "TRIVIAL", "PURPOSE": "Enumeration of possible migration job statuses." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "Environment", "type": "Class", - "start_line": 31, - "end_line": 40, + "tier": "STANDARD", + "start_line": 33, + "end_line": 43, "tags": { + "TIER": "STANDARD", "PURPOSE": "Represents a Superset instance environment." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "DatabaseMapping", "type": "Class", - "start_line": 42, - "end_line": 55, + "tier": "STANDARD", + "start_line": 45, + "end_line": 59, "tags": { + "TIER": "STANDARD", "PURPOSE": "Represents a mapping between source and target databases." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "MigrationJob", "type": "Class", - "start_line": 57, - "end_line": 68, + "tier": "STANDARD", + "start_line": 61, + "end_line": 72, "tags": { "PURPOSE": "Represents a single migration execution job." }, @@ -9485,18 +17933,32 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 61 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 61 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "FileCategory", "type": "Class", + "tier": "STANDARD", "start_line": 6, "end_line": 11, "tags": { @@ -9506,12 +17968,20 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 6 + } + ], + "score": 0.8 } }, { "name": "StorageConfig", "type": "Class", + "tier": "STANDARD", "start_line": 13, "end_line": 20, "tags": { @@ -9521,12 +17991,20 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 13 + } + ], + "score": 0.8 } }, { "name": "StoredFile", "type": "Class", + "tier": "STANDARD", "start_line": 22, "end_line": 31, "tags": { @@ -9536,15 +18014,24 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + } + ], + "score": 0.8 } }, { "name": "backend.src.models.dashboard", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 28, + "end_line": 31, "tags": { + "TIER": "STANDARD", "SEMANTICS": "dashboard, model, metadata, migration", "PURPOSE": "Defines data models for dashboard metadata and selection.", "LAYER": "Model" @@ -9559,42 +18046,468 @@ { "name": "DashboardMetadata", "type": "Class", - "start_line": 10, - "end_line": 17, + "tier": "TRIVIAL", + "start_line": 11, + "end_line": 19, "tags": { + "TIER": "TRIVIAL", "PURPOSE": "Represents a dashboard available for migration." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "DashboardSelection", "type": "Class", - "start_line": 19, - "end_line": 26, + "tier": "TRIVIAL", + "start_line": 21, + "end_line": 29, "tags": { + "TIER": "TRIVIAL", "PURPOSE": "Represents the user's selection of dashboards to migrate." }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "backend.src.models.auth", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 105, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "auth, models, user, role, permission, sqlalchemy", + "PURPOSE": "SQLAlchemy models for multi-user authentication and authorization.", + "LAYER": "Domain", + "INVARIANT": "Usernames and emails must be unique." + }, + "relations": [ + { + "type": "INHERITS_FROM", + "target": "backend.src.models.mapping.Base" + } + ], + "children": [ + { + "name": "generate_uuid", + "type": "Function", + "tier": "STANDARD", + "start_line": 19, + "end_line": 24, + "tags": { + "PURPOSE": "Generates a unique UUID string.", + "POST": "Returns a string representation of a new UUID." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 19 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 19 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 19 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 19 + } + ], + "score": 0.5333333333333333 + } + }, + { + "name": "user_roles", + "type": "Table", + "tier": "STANDARD", + "start_line": 26, + "end_line": 34, + "tags": { + "PURPOSE": "Association table for many-to-many relationship between Users and Roles." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "role_permissions", + "type": "Table", + "tier": "STANDARD", + "start_line": 36, + "end_line": 44, + "tags": { + "PURPOSE": "Association table for many-to-many relationship between Roles and Permissions." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "User", + "type": "Class", + "tier": "STANDARD", + "start_line": 46, + "end_line": 62, + "tags": { + "PURPOSE": "Represents an identity that can authenticate to the system." + }, + "relations": [ + { + "type": "HAS_MANY", + "target": "Role (via user_roles)" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 46 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 46 + } + ], + "score": 0.7000000000000001 + } + }, + { + "name": "Role", + "type": "Class", + "tier": "STANDARD", + "start_line": 64, + "end_line": 77, + "tags": { + "PURPOSE": "Represents a collection of permissions." + }, + "relations": [ + { + "type": "HAS_MANY", + "target": "User (via user_roles)" + }, + { + "type": "HAS_MANY", + "target": "Permission (via role_permissions)" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 64 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 64 + } + ], + "score": 0.7000000000000001 + } + }, + { + "name": "Permission", + "type": "Class", + "tier": "STANDARD", + "start_line": 79, + "end_line": 90, + "tags": { + "PURPOSE": "Represents a specific capability within the system." + }, + "relations": [ + { + "type": "HAS_MANY", + "target": "Role (via role_permissions)" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 79 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 79 + } + ], + "score": 0.7000000000000001 + } + }, + { + "name": "ADGroupMapping", + "type": "Class", + "tier": "STANDARD", + "start_line": 92, + "end_line": 103, + "tags": { + "PURPOSE": "Maps an Active Directory group to a local System Role." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "Role" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 92 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 92 + } + ], + "score": 0.7000000000000001 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "backend.src.services.auth_service", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 115, + "tags": { + "SEMANTICS": "auth, service, business-logic, login, jwt", + "PURPOSE": "Orchestrates authentication business logic.", + "LAYER": "Service", + "INVARIANT": "Authentication must verify both credentials and account status." + }, + "relations": [ + { + "type": "USES", + "target": "backend.src.core.auth.repository.AuthRepository" + }, + { + "type": "USES", + "target": "backend.src.core.auth.security" + }, + { + "type": "USES", + "target": "backend.src.core.auth.jwt" + } + ], + "children": [ + { + "name": "AuthService", + "type": "Class", + "tier": "STANDARD", + "start_line": 22, + "end_line": 113, + "tags": { + "PURPOSE": "Provides high-level authentication services." + }, + "relations": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "tier": "STANDARD", + "start_line": 25, + "end_line": 30, + "tags": { + "PURPOSE": "Initializes the service with a database session.", + "PARAM": "db (Session) - SQLAlchemy session." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + } + ], + "score": 0.26666666666666655 + } + }, + { + "name": "authenticate_user", + "type": "Function", + "tier": "STANDARD", + "start_line": 32, + "end_line": 54, + "tags": { + "PURPOSE": "Authenticates a user with username and password.", + "PRE": "username and password are provided.", + "POST": "Returns User object if authentication succeeds, else None.", + "SIDE_EFFECT": "Updates last_login timestamp on success.", + "PARAM": "password (str) - The plain password.", + "RETURN": "Optional[User] - The authenticated user or None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "create_session", + "type": "Function", + "tier": "STANDARD", + "start_line": 56, + "end_line": 77, + "tags": { + "PURPOSE": "Creates a JWT session for an authenticated user.", + "PRE": "user is a valid User object.", + "POST": "Returns a dictionary with access_token and token_type.", + "PARAM": "user (User) - The authenticated user.", + "RETURN": "Dict[str, str] - Session data." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "provision_adfs_user", + "type": "Function", + "tier": "STANDARD", + "start_line": 79, + "end_line": 111, + "tags": { + "PURPOSE": "Just-In-Time (JIT) provisioning for ADFS users based on group mappings.", + "PRE": "user_info contains 'upn' (username), 'email', and 'groups'.", + "POST": "User is created/updated and assigned roles based on groups.", + "PARAM": "user_info (Dict[str, Any]) - Claims from ADFS token.", + "RETURN": "User - The provisioned user." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + } + ], + "score": 0.7000000000000001 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.src.services.git_service", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 413, "tags": { @@ -9621,6 +18534,7 @@ { "name": "GitService", "type": "Class", + "tier": "STANDARD", "start_line": 22, "end_line": 412, "tags": { @@ -9631,6 +18545,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 29, "end_line": 45, "tags": { @@ -9643,12 +18558,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_get_repo_path", "type": "Function", + "tier": "STANDARD", "start_line": 47, "end_line": 56, "tags": { @@ -9662,12 +18579,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "init_repo", "type": "Function", + "tier": "STANDARD", "start_line": 58, "end_line": 83, "tags": { @@ -9681,12 +18600,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_repo", "type": "Function", + "tier": "STANDARD", "start_line": 85, "end_line": 101, "tags": { @@ -9699,12 +18620,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "list_branches", "type": "Function", + "tier": "STANDARD", "start_line": 103, "end_line": 155, "tags": { @@ -9717,12 +18640,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "create_branch", "type": "Function", + "tier": "STANDARD", "start_line": 157, "end_line": 191, "tags": { @@ -9735,12 +18660,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "checkout_branch", "type": "Function", + "tier": "STANDARD", "start_line": 193, "end_line": 202, "tags": { @@ -9752,12 +18679,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "commit_changes", "type": "Function", + "tier": "STANDARD", "start_line": 204, "end_line": 228, "tags": { @@ -9770,12 +18699,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "push_changes", "type": "Function", + "tier": "STANDARD", "start_line": 230, "end_line": 262, "tags": { @@ -9787,12 +18718,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "pull_changes", "type": "Function", + "tier": "STANDARD", "start_line": 264, "end_line": 285, "tags": { @@ -9804,12 +18737,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_status", "type": "Function", + "tier": "STANDARD", "start_line": 287, "end_line": 311, "tags": { @@ -9822,12 +18757,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_diff", "type": "Function", + "tier": "STANDARD", "start_line": 313, "end_line": 330, "tags": { @@ -9841,12 +18778,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_commit_history", "type": "Function", + "tier": "STANDARD", "start_line": 332, "end_line": 360, "tags": { @@ -9860,12 +18799,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "test_connection", "type": "Function", + "tier": "STANDARD", "start_line": 362, "end_line": 410, "tags": { @@ -9879,24 +18820,45 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 22 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.src.services.mapping_service", "type": "Module", + "tier": "STANDARD", "start_line": 1, "end_line": 71, "tags": { @@ -9919,6 +18881,7 @@ { "name": "MappingService", "type": "Class", + "tier": "STANDARD", "start_line": 18, "end_line": 69, "tags": { @@ -9929,6 +18892,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 22, "end_line": 30, "tags": { @@ -9941,12 +18905,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_get_client", "type": "Function", + "tier": "STANDARD", "start_line": 32, "end_line": 46, "tags": { @@ -9960,12 +18926,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_suggestions", "type": "Function", + "tier": "STANDARD", "start_line": 48, "end_line": 67, "tags": { @@ -9979,26 +18947,47 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "BackupPlugin", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 184, + "end_line": 193, "tags": { "SEMANTICS": "backup, superset, automation, dashboard, plugin", "PURPOSE": "A plugin that provides functionality to back up Superset dashboards.", @@ -10022,8 +19011,9 @@ { "name": "BackupPlugin", "type": "Class", + "tier": "STANDARD", "start_line": 27, - "end_line": 183, + "end_line": 192, "tags": { "PURPOSE": "Implementation of the backup plugin logic." }, @@ -10032,6 +19022,7 @@ { "name": "id", "type": "Function", + "tier": "STANDARD", "start_line": 35, "end_line": 43, "tags": { @@ -10044,12 +19035,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "name", "type": "Function", + "tier": "STANDARD", "start_line": 46, "end_line": 54, "tags": { @@ -10062,12 +19055,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "description", "type": "Function", + "tier": "STANDARD", "start_line": 57, "end_line": 65, "tags": { @@ -10080,12 +19075,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "version", "type": "Function", + "tier": "STANDARD", "start_line": 68, "end_line": 76, "tags": { @@ -10098,14 +19095,65 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "ui_route", + "type": "Function", + "tier": "STANDARD", + "start_line": 79, + "end_line": 85, + "tags": { + "PURPOSE": "Returns the frontend route for the backup plugin.", + "RETURN": "str - \"/tools/backups\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 79 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 79 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 79 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 79 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 79 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 79 + } + ], + "score": 0.26666666666666655 } }, { "name": "get_schema", "type": "Function", - "start_line": 78, - "end_line": 101, + "tier": "STANDARD", + "start_line": 87, + "end_line": 110, "tags": { "PURPOSE": "Returns the JSON schema for backup plugin parameters.", "PRE": "Plugin instance exists.", @@ -10116,14 +19164,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "execute", "type": "Function", - "start_line": 103, - "end_line": 182, + "tier": "STANDARD", + "start_line": 112, + "end_line": 191, "tags": { "PURPOSE": "Executes the dashboard backup logic.", "PARAM": "params (Dict[str, Any]) - Backup parameters (env, backup_path).", @@ -10134,26 +19184,47 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 27 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 27 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "DebugPluginModule", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 187, + "end_line": 196, "tags": { "SEMANTICS": "plugin, debug, api, database, superset", "PURPOSE": "Implements a plugin for system diagnostics and debugging Superset API responses.", @@ -10166,8 +19237,9 @@ { "name": "DebugPlugin", "type": "Class", + "tier": "STANDARD", "start_line": 15, - "end_line": 186, + "end_line": 195, "tags": { "PURPOSE": "Plugin for system diagnostics and debugging." }, @@ -10176,6 +19248,7 @@ { "name": "id", "type": "Function", + "tier": "STANDARD", "start_line": 23, "end_line": 31, "tags": { @@ -10188,12 +19261,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "name", "type": "Function", + "tier": "STANDARD", "start_line": 34, "end_line": 42, "tags": { @@ -10206,12 +19281,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "description", "type": "Function", + "tier": "STANDARD", "start_line": 45, "end_line": 53, "tags": { @@ -10224,12 +19301,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "version", "type": "Function", + "tier": "STANDARD", "start_line": 56, "end_line": 64, "tags": { @@ -10242,14 +19321,65 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "ui_route", + "type": "Function", + "tier": "STANDARD", + "start_line": 67, + "end_line": 73, + "tags": { + "PURPOSE": "Returns the frontend route for the debug plugin.", + "RETURN": "str - \"/tools/debug\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 67 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 67 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 67 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 67 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 67 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 67 + } + ], + "score": 0.26666666666666655 } }, { "name": "get_schema", "type": "Function", - "start_line": 66, - "end_line": 105, + "tier": "STANDARD", + "start_line": 75, + "end_line": 114, "tags": { "PURPOSE": "Returns the JSON schema for the debug plugin parameters.", "PRE": "Plugin instance exists.", @@ -10260,14 +19390,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "execute", "type": "Function", - "start_line": 107, - "end_line": 123, + "tier": "STANDARD", + "start_line": 116, + "end_line": 132, "tags": { "PURPOSE": "Executes the debug logic.", "PARAM": "params (Dict[str, Any]) - Debug parameters.", @@ -10279,14 +19411,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_test_db_api", "type": "Function", - "start_line": 125, - "end_line": 157, + "tier": "STANDARD", + "start_line": 134, + "end_line": 166, "tags": { "PURPOSE": "Tests database API connectivity for source and target environments.", "PRE": "source_env and target_env params exist in params.", @@ -10298,14 +19432,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_get_dataset_structure", "type": "Function", - "start_line": 159, - "end_line": 184, + "tier": "STANDARD", + "start_line": 168, + "end_line": 193, "tags": { "PURPOSE": "Retrieves the structure of a dataset.", "PRE": "env and dataset_id params exist in params.", @@ -10317,26 +19453,47 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 15 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 15 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "SearchPluginModule", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 202, + "end_line": 211, "tags": { "SEMANTICS": "plugin, search, datasets, regex, superset", "PURPOSE": "Implements a plugin for searching text patterns across all datasets in a specific Superset environment.", @@ -10349,8 +19506,9 @@ { "name": "SearchPlugin", "type": "Class", + "tier": "STANDARD", "start_line": 16, - "end_line": 201, + "end_line": 210, "tags": { "PURPOSE": "Plugin for searching text patterns in Superset datasets." }, @@ -10359,6 +19517,7 @@ { "name": "id", "type": "Function", + "tier": "STANDARD", "start_line": 24, "end_line": 32, "tags": { @@ -10371,12 +19530,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "name", "type": "Function", + "tier": "STANDARD", "start_line": 35, "end_line": 43, "tags": { @@ -10389,12 +19550,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "description", "type": "Function", + "tier": "STANDARD", "start_line": 46, "end_line": 54, "tags": { @@ -10407,12 +19570,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "version", "type": "Function", + "tier": "STANDARD", "start_line": 57, "end_line": 65, "tags": { @@ -10425,14 +19590,65 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "ui_route", + "type": "Function", + "tier": "STANDARD", + "start_line": 68, + "end_line": 74, + "tags": { + "PURPOSE": "Returns the frontend route for the search plugin.", + "RETURN": "str - \"/tools/search\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 68 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 68 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 68 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 68 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 68 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 68 + } + ], + "score": 0.26666666666666655 } }, { "name": "get_schema", "type": "Function", - "start_line": 67, - "end_line": 90, + "tier": "STANDARD", + "start_line": 76, + "end_line": 99, "tags": { "PURPOSE": "Returns the JSON schema for the search plugin parameters.", "PRE": "Plugin instance exists.", @@ -10443,14 +19659,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "execute", "type": "Function", - "start_line": 92, - "end_line": 161, + "tier": "STANDARD", + "start_line": 101, + "end_line": 170, "tags": { "PURPOSE": "Executes the dataset search logic.", "PARAM": "params (Dict[str, Any]) - Search parameters.", @@ -10462,14 +19680,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_get_context", "type": "Function", - "start_line": 163, - "end_line": 199, + "tier": "STANDARD", + "start_line": 172, + "end_line": 208, "tags": { "PURPOSE": "Extracts a small context around the match for display.", "PARAM": "context_lines (int) - Number of lines of context to include.", @@ -10481,26 +19701,47 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 16 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 16 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "MapperPluginModule", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 195, + "end_line": 204, "tags": { "SEMANTICS": "plugin, mapper, datasets, postgresql, excel", "PURPOSE": "Implements a plugin for mapping dataset columns using external database connections or Excel files.", @@ -10513,8 +19754,9 @@ { "name": "MapperPlugin", "type": "Class", + "tier": "STANDARD", "start_line": 18, - "end_line": 194, + "end_line": 203, "tags": { "PURPOSE": "Plugin for mapping dataset columns verbose names." }, @@ -10523,6 +19765,7 @@ { "name": "id", "type": "Function", + "tier": "STANDARD", "start_line": 26, "end_line": 34, "tags": { @@ -10535,12 +19778,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "name", "type": "Function", + "tier": "STANDARD", "start_line": 37, "end_line": 45, "tags": { @@ -10553,12 +19798,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "description", "type": "Function", + "tier": "STANDARD", "start_line": 48, "end_line": 56, "tags": { @@ -10571,12 +19818,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "version", "type": "Function", + "tier": "STANDARD", "start_line": 59, "end_line": 67, "tags": { @@ -10589,14 +19838,65 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "ui_route", + "type": "Function", + "tier": "STANDARD", + "start_line": 70, + "end_line": 76, + "tags": { + "PURPOSE": "Returns the frontend route for the mapper plugin.", + "RETURN": "str - \"/tools/mapper\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + } + ], + "score": 0.26666666666666655 } }, { "name": "get_schema", "type": "Function", - "start_line": 69, - "end_line": 119, + "tier": "STANDARD", + "start_line": 78, + "end_line": 128, "tags": { "PURPOSE": "Returns the JSON schema for the mapper plugin parameters.", "PRE": "Plugin instance exists.", @@ -10607,14 +19907,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "execute", "type": "Function", - "start_line": 121, - "end_line": 192, + "tier": "STANDARD", + "start_line": 130, + "end_line": 201, "tags": { "PURPOSE": "Executes the dataset mapping logic.", "PARAM": "params (Dict[str, Any]) - Mapping parameters.", @@ -10626,26 +19928,47 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "backend.src.plugins.git_plugin", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 376, + "end_line": 385, "tags": { "SEMANTICS": "git, plugin, dashboard, version_control, sync, deploy", "PURPOSE": "\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 Superset.", @@ -10675,8 +19998,9 @@ { "name": "GitPlugin", "type": "Class", + "tier": "STANDARD", "start_line": 28, - "end_line": 375, + "end_line": 384, "tags": { "PURPOSE": "\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Git Integration \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432." }, @@ -10685,6 +20009,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 32, "end_line": 60, "tags": { @@ -10696,12 +20021,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "id", "type": "Function", + "tier": "STANDARD", "start_line": 63, "end_line": 70, "tags": { @@ -10713,12 +20040,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "name", "type": "Function", + "tier": "STANDARD", "start_line": 73, "end_line": 80, "tags": { @@ -10730,12 +20059,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "description", "type": "Function", + "tier": "STANDARD", "start_line": 83, "end_line": 90, "tags": { @@ -10747,12 +20078,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "version", "type": "Function", + "tier": "STANDARD", "start_line": 93, "end_line": 100, "tags": { @@ -10764,14 +20097,65 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "ui_route", + "type": "Function", + "tier": "STANDARD", + "start_line": 103, + "end_line": 109, + "tags": { + "PURPOSE": "Returns the frontend route for the git plugin.", + "RETURN": "str - \"/git\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + } + ], + "score": 0.26666666666666655 } }, { "name": "get_schema", "type": "Function", - "start_line": 102, - "end_line": 119, + "tier": "STANDARD", + "start_line": 111, + "end_line": 128, "tags": { "PURPOSE": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 JSON-\u0441\u0445\u0435\u043c\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043f\u043b\u0430\u0433\u0438\u043d\u0430.", "PRE": "GitPlugin is initialized.", @@ -10782,14 +20166,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "initialize", "type": "Function", - "start_line": 121, - "end_line": 374, + "tier": "STANDARD", + "start_line": 130, + "end_line": 383, "tags": { "PURPOSE": "\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043f\u043b\u0430\u0433\u0438\u043d\u0430.", "PRE": "GitPlugin is initialized.", @@ -10800,8 +20186,9 @@ { "name": "execute", "type": "Function", - "start_line": 129, - "end_line": 158, + "tier": "STANDARD", + "start_line": 138, + "end_line": 167, "tags": { "PURPOSE": "\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043f\u043b\u0430\u0433\u0438\u043d\u0430.", "PRE": "task_data \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 'operation' \u0438 'dashboard_id'.", @@ -10822,14 +20209,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_handle_sync", "type": "Function", - "start_line": 160, - "end_line": 240, + "tier": "STANDARD", + "start_line": 169, + "end_line": 249, "tags": { "PURPOSE": "\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0438\u0437 Superset \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432 Git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439.", "PRE": "\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0434\u043b\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c.", @@ -10851,14 +20240,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_handle_deploy", "type": "Function", - "start_line": 242, - "end_line": 307, + "tier": "STANDARD", + "start_line": 251, + "end_line": 316, "tags": { "PURPOSE": "\u0423\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432 ZIP \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 Superset.", "PRE": "environment_id \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u043c\u0443 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044e.", @@ -10876,14 +20267,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "_get_env", "type": "Function", - "start_line": 309, - "end_line": 372, + "tier": "STANDARD", + "start_line": 318, + "end_line": 381, "tags": { "PURPOSE": "\u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.", "PARAM": "env_id (Optional[str]) - ID \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.", @@ -10895,32 +20288,54 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "MigrationPlugin", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 387, + "end_line": 396, "tags": { "SEMANTICS": "migration, superset, automation, dashboard, plugin", "PURPOSE": "A plugin that provides functionality to migrate Superset dashboards between environments.", @@ -10944,8 +20359,9 @@ { "name": "MigrationPlugin", "type": "Class", + "tier": "STANDARD", "start_line": 23, - "end_line": 386, + "end_line": 395, "tags": { "PURPOSE": "Implementation of the migration plugin logic." }, @@ -10954,6 +20370,7 @@ { "name": "id", "type": "Function", + "tier": "STANDARD", "start_line": 31, "end_line": 39, "tags": { @@ -10966,12 +20383,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "name", "type": "Function", + "tier": "STANDARD", "start_line": 42, "end_line": 50, "tags": { @@ -10984,12 +20403,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "description", "type": "Function", + "tier": "STANDARD", "start_line": 53, "end_line": 61, "tags": { @@ -11002,12 +20423,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "version", "type": "Function", + "tier": "STANDARD", "start_line": 64, "end_line": 72, "tags": { @@ -11020,14 +20443,65 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "ui_route", + "type": "Function", + "tier": "STANDARD", + "start_line": 75, + "end_line": 81, + "tags": { + "PURPOSE": "Returns the frontend route for the migration plugin.", + "RETURN": "str - \"/migration\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 75 + } + ], + "score": 0.26666666666666655 } }, { "name": "get_schema", "type": "Function", - "start_line": 74, - "end_line": 123, + "tier": "STANDARD", + "start_line": 83, + "end_line": 132, "tags": { "PURPOSE": "Returns the JSON schema for migration plugin parameters.", "PRE": "Config manager is available.", @@ -11038,14 +20512,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "execute", "type": "Function", - "start_line": 125, - "end_line": 385, + "tier": "STANDARD", + "start_line": 134, + "end_line": 394, "tags": { "PURPOSE": "Executes the dashboard migration logic.", "PARAM": "params (Dict[str, Any]) - Migration parameters.", @@ -11057,8 +20533,9 @@ { "name": "MigrationPlugin.execute", "type": "Action", - "start_line": 145, - "end_line": 384, + "tier": "STANDARD", + "start_line": 154, + "end_line": 393, "tags": { "PURPOSE": "Execute the migration logic with proper task logging." }, @@ -11067,8 +20544,9 @@ { "name": "__init__", "type": "Function", - "start_line": 152, - "end_line": 160, + "tier": "STANDARD", + "start_line": 161, + "end_line": 169, "tags": { "PURPOSE": "Initializes the proxy logger.", "PRE": "None.", @@ -11078,14 +20556,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "debug", "type": "Function", - "start_line": 162, - "end_line": 169, + "tier": "STANDARD", + "start_line": 171, + "end_line": 178, "tags": { "PURPOSE": "Logs a debug message to the task manager.", "PRE": "msg is a string.", @@ -11095,14 +20575,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "info", "type": "Function", - "start_line": 171, - "end_line": 178, + "tier": "STANDARD", + "start_line": 180, + "end_line": 187, "tags": { "PURPOSE": "Logs an info message to the task manager.", "PRE": "msg is a string.", @@ -11112,14 +20594,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "warning", "type": "Function", - "start_line": 180, - "end_line": 187, + "tier": "STANDARD", + "start_line": 189, + "end_line": 196, "tags": { "PURPOSE": "Logs a warning message to the task manager.", "PRE": "msg is a string.", @@ -11129,14 +20613,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "error", "type": "Function", - "start_line": 189, - "end_line": 196, + "tier": "STANDARD", + "start_line": 198, + "end_line": 205, "tags": { "PURPOSE": "Logs an error message to the task manager.", "PRE": "msg is a string.", @@ -11146,14 +20632,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "critical", "type": "Function", - "start_line": 198, - "end_line": 205, + "tier": "STANDARD", + "start_line": 207, + "end_line": 214, "tags": { "PURPOSE": "Logs a critical message to the task manager.", "PRE": "msg is a string.", @@ -11163,14 +20651,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "exception", "type": "Function", - "start_line": 207, - "end_line": 214, + "tier": "STANDARD", + "start_line": 216, + "end_line": 223, "tags": { "PURPOSE": "Logs an exception message to the task manager.", "PRE": "msg is a string.", @@ -11180,38 +20670,61 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 23 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 23 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "StoragePlugin", "type": "Module", + "tier": "STANDARD", "start_line": 1, - "end_line": 324, + "end_line": 333, "tags": { "SEMANTICS": "storage, files, filesystem, plugin", "PURPOSE": "Provides core filesystem operations for managing backups and repositories.", @@ -11232,8 +20745,9 @@ { "name": "StoragePlugin", "type": "Class", + "tier": "STANDARD", "start_line": 25, - "end_line": 323, + "end_line": 332, "tags": { "PURPOSE": "Implementation of the storage management plugin." }, @@ -11242,6 +20756,7 @@ { "name": "__init__", "type": "Function", + "tier": "STANDARD", "start_line": 32, "end_line": 39, "tags": { @@ -11253,12 +20768,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "id", "type": "Function", + "tier": "STANDARD", "start_line": 42, "end_line": 50, "tags": { @@ -11271,12 +20788,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "name", "type": "Function", + "tier": "STANDARD", "start_line": 53, "end_line": 61, "tags": { @@ -11289,12 +20808,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "description", "type": "Function", + "tier": "STANDARD", "start_line": 64, "end_line": 72, "tags": { @@ -11307,12 +20828,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "version", "type": "Function", + "tier": "STANDARD", "start_line": 75, "end_line": 83, "tags": { @@ -11325,14 +20848,65 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "ui_route", + "type": "Function", + "tier": "STANDARD", + "start_line": 86, + "end_line": 92, + "tags": { + "PURPOSE": "Returns the frontend route for the storage plugin.", + "RETURN": "str - \"/tools/storage\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 86 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 86 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 86 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 86 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 86 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 86 + } + ], + "score": 0.26666666666666655 } }, { "name": "get_schema", "type": "Function", - "start_line": 85, - "end_line": 103, + "tier": "STANDARD", + "start_line": 94, + "end_line": 112, "tags": { "PURPOSE": "Returns the JSON schema for storage plugin parameters.", "PRE": "None.", @@ -11343,14 +20917,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "execute", "type": "Function", - "start_line": 105, - "end_line": 112, + "tier": "STANDARD", + "start_line": 114, + "end_line": 121, "tags": { "PURPOSE": "Executes storage-related tasks (placeholder for PluginBase compliance).", "PRE": "params must match the plugin schema.", @@ -11360,14 +20936,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_storage_root", "type": "Function", - "start_line": 114, - "end_line": 134, + "tier": "STANDARD", + "start_line": 123, + "end_line": 143, "tags": { "PURPOSE": "Resolves the absolute path to the storage root.", "PRE": "Settings must define a storage root path.", @@ -11377,14 +20955,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "resolve_path", "type": "Function", - "start_line": 136, - "end_line": 158, + "tier": "STANDARD", + "start_line": 145, + "end_line": 167, "tags": { "PURPOSE": "Resolves a dynamic path pattern using provided variables.", "PARAM": "variables (Dict[str, str]) - Variables to substitute in the pattern.", @@ -11396,14 +20976,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "ensure_directories", "type": "Function", - "start_line": 160, - "end_line": 173, + "tier": "STANDARD", + "start_line": 169, + "end_line": 182, "tags": { "PURPOSE": "Creates the storage root and category subdirectories if they don't exist.", "PRE": "Storage root must be resolvable.", @@ -11414,14 +20996,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "validate_path", "type": "Function", - "start_line": 175, - "end_line": 189, + "tier": "STANDARD", + "start_line": 184, + "end_line": 198, "tags": { "PURPOSE": "Prevents path traversal attacks by ensuring the path is within the storage root.", "PRE": "path must be a Path object.", @@ -11431,14 +21015,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "list_files", "type": "Function", - "start_line": 191, - "end_line": 240, + "tier": "STANDARD", + "start_line": 200, + "end_line": 249, "tags": { "PURPOSE": "Lists all files and directories in a specific category and subpath.", "PARAM": "subpath (Optional[str]) - Nested path within the category.", @@ -11450,14 +21036,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "save_file", "type": "Function", - "start_line": 242, - "end_line": 274, + "tier": "STANDARD", + "start_line": 251, + "end_line": 283, "tags": { "PURPOSE": "Saves an uploaded file to the specified category and optional subpath.", "PARAM": "subpath (Optional[str]) - The target subpath.", @@ -11470,14 +21058,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "delete_file", "type": "Function", - "start_line": 276, - "end_line": 300, + "tier": "STANDARD", + "start_line": 285, + "end_line": 309, "tags": { "PURPOSE": "Deletes a file or directory from the specified category and path.", "PARAM": "path (str) - The relative path of the file or directory.", @@ -11489,14 +21079,16 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "get_file_path", "type": "Function", - "start_line": 302, - "end_line": 321, + "tier": "STANDARD", + "start_line": 311, + "end_line": 330, "tags": { "PURPOSE": "Returns the absolute path of a file for download.", "PARAM": "path (str) - The relative path of the file.", @@ -11508,24 +21100,45 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 25 + } + ], + "score": 0.7000000000000001 } } ], "compliance": { "valid": true, - "issues": [] + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.85 } }, { "name": "test_environment_model", "type": "Function", + "tier": "STANDARD", "start_line": 5, "end_line": 21, "tags": { @@ -11537,12 +21150,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "test_belief_scope_logs_entry_action_exit", "type": "Function", + "tier": "STANDARD", "start_line": 5, "end_line": 22, "tags": { @@ -11554,12 +21169,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "test_belief_scope_error_handling", "type": "Function", + "tier": "STANDARD", "start_line": 25, "end_line": 42, "tags": { @@ -11571,12 +21188,14 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 } }, { "name": "test_belief_scope_success_coherence", "type": "Function", + "tier": "STANDARD", "start_line": 45, "end_line": 59, "tags": { @@ -11588,7 +21207,190 @@ "children": [], "compliance": { "valid": true, - "issues": [] + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_auth", + "type": "Module", + "tier": "TRIVIAL", + "start_line": 1, + "end_line": 162, + "tags": { + "PURPOSE": "Auto-generated module for backend/tests/test_auth.py", + "TIER": "TRIVIAL", + "LAYER": "Unknown" + }, + "relations": [], + "children": [ + { + "name": "db_session", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 27, + "end_line": 27, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "auth_service", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 40, + "end_line": 40, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "auth_repo", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 44, + "end_line": 44, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_create_user", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 47, + "end_line": 47, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_authenticate_user", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 65, + "end_line": 65, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_create_session", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 90, + "end_line": 90, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_role_permission_association", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 108, + "end_line": 108, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_user_role_association", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 127, + "end_line": 127, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_ad_group_mapping", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 148, + "end_line": 148, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } } ] diff --git a/specs/project_map.md b/specs/project_map.md index bc22dfb..124c8ba 100644 --- a/specs/project_map.md +++ b/specs/project_map.md @@ -2,55 +2,77 @@ > Compressed view for AI Context. Generated automatically. -- 📦 **generate_semantic_map** (`Module`) +- 📦 **generate_semantic_map** (`Module`) `[CRITICAL]` - 📝 Scans the codebase to generate a Semantic Map and Compliance Report based on the System Standard. - 🏗️ Layer: DevOps/Tooling - - ƒ **__init__** (`Function`) - - 📝 Mock init. - - ƒ **__enter__** (`Function`) + - 🔒 Invariant: All DEF anchors must have matching closing anchors; TIER determines validation strictness. + - ƒ **__init__** (`Function`) `[TRIVIAL]` + - 📝 Mock init for self-containment. + - ƒ **__enter__** (`Function`) `[TRIVIAL]` - 📝 Mock enter. - - ƒ **__exit__** (`Function`) + - ƒ **__exit__** (`Function`) `[TRIVIAL]` - 📝 Mock exit. - - ℂ **SemanticEntity** (`Class`) + - ℂ **Tier** (`Class`) `[TRIVIAL]` + - 📝 Enumeration of semantic tiers defining validation strictness. + - ℂ **Severity** (`Class`) `[TRIVIAL]` + - 📝 Severity levels for compliance issues. + - ℂ **ComplianceIssue** (`Class`) `[TRIVIAL]` + - 📝 Represents a single compliance issue with severity. + - ℂ **SemanticEntity** (`Class`) `[CRITICAL]` - 📝 Represents a code entity (Module, Function, Component) found during parsing. + - 🔒 Invariant: start_line is always set; end_line is set upon closure; tier defaults to STANDARD. - ƒ **__init__** (`Function`) - 📝 Initializes a new SemanticEntity instance. + - ƒ **get_tier** (`Function`) + - 📝 Returns the tier of the entity, defaulting to STANDARD. - ƒ **to_dict** (`Function`) - 📝 Serializes the entity to a dictionary for JSON output. - - ƒ **validate** (`Function`) - - 📝 Checks for semantic compliance (closure, mandatory tags, belief state). + - ƒ **validate** (`Function`) `[CRITICAL]` + - 📝 Checks for semantic compliance based on TIER requirements. - ƒ **get_score** (`Function`) - - 📝 Calculates a compliance score (0.0 to 1.0). + - 📝 Calculates a compliance score (0.0 to 1.0) based on tier requirements. - ƒ **get_patterns** (`Function`) - 📝 Returns regex patterns for a specific language. - - ƒ **parse_file** (`Function`) - - 📝 Parses a single file to extract semantic entities. - - ℂ **SemanticMapGenerator** (`Class`) - - 📝 Orchestrates the mapping process. + - ƒ **extract_svelte_props** (`Function`) + - 📝 Extracts props from Svelte component script section. + - ƒ **extract_svelte_events** (`Function`) + - 📝 Extracts dispatched events from Svelte component. + - ƒ **extract_data_flow** (`Function`) + - 📝 Extracts store subscriptions and data flow from Svelte component. + - ƒ **parse_file** (`Function`) `[CRITICAL]` + - 📝 Parses a single file to extract semantic entities with tier awareness and enhanced Svelte analysis. + - 🔒 Invariant: Every opened anchor must have a matching closing anchor for valid compliance. + - ℂ **SemanticMapGenerator** (`Class`) `[CRITICAL]` + - 📝 Orchestrates the mapping process with tier-based validation. + - 🔒 Invariant: All entities are validated according to their TIER requirements. - ƒ **__init__** (`Function`) - 📝 Initializes the generator with a root directory. - ƒ **_load_gitignore** (`Function`) - 📝 Loads patterns from .gitignore file. - ƒ **_is_ignored** (`Function`) - 📝 Checks if a path should be ignored based on .gitignore or hardcoded defaults. - - ƒ **run** (`Function`) + - ƒ **run** (`Function`) `[CRITICAL]` - 📝 Main execution flow. - 🔗 CALLS -> `_walk_and_parse` - 🔗 CALLS -> `_generate_artifacts` - - ƒ **_walk_and_parse** (`Function`) + - ƒ **_walk_and_parse** (`Function`) `[CRITICAL]` - 📝 Recursively walks directories and triggers parsing. - ƒ **_process_file_results** (`Function`) - - 📝 Validates entities and calculates file scores. - - ƒ **_generate_artifacts** (`Function`) - - 📝 Writes output files. - - ƒ **_generate_report** (`Function`) - - 📝 Generates the Markdown compliance report. + - 📝 Validates entities and calculates file scores with tier awareness. + - ƒ **validate_recursive** (`Function`) + - 📝 Recursively validates a list of entities. + - ƒ **_generate_artifacts** (`Function`) `[CRITICAL]` + - 📝 Writes output files with tier-based compliance data. + - ƒ **_generate_report** (`Function`) `[CRITICAL]` + - 📝 Generates the Markdown compliance report with severity levels. - ƒ **_collect_issues** (`Function`) - 📝 Helper to collect issues for a specific file from the entity tree. - - ƒ **_generate_compressed_map** (`Function`) - - 📝 Generates the token-optimized project map. - - ƒ **_write_entity_md** (`Function`) - - 📝 Recursive helper to write entity tree to Markdown. + - ƒ **_generate_compressed_map** (`Function`) `[CRITICAL]` + - 📝 Generates the token-optimized project map with enhanced Svelte details. + - ƒ **_write_entity_md** (`Function`) `[CRITICAL]` + - 📝 Recursive helper to write entity tree to Markdown with tier badges and enhanced details. + - ƒ **to_dict** (`Function`) `[TRIVIAL]` + - 📝 Auto-detected function (orphan) - 📦 **stores_module** (`Module`) - 📝 Global state management using Svelte stores. - 🏗️ Layer: UI-State @@ -84,6 +106,8 @@ - 🏗️ Layer: Infra-API - ƒ **getWsUrl** (`Function`) - 📝 Returns the WebSocket URL for a specific task, with fallback logic. + - ƒ **getAuthHeaders** (`Function`) + - 📝 Returns headers with Authorization if token exists. - ƒ **fetchApi** (`Function`) - 📝 Generic GET request wrapper. - ƒ **postApi** (`Function`) @@ -92,35 +116,61 @@ - 📝 Generic request wrapper. - 📦 **api** (`Data`) - 📝 API client object with specific methods. +- 🗄️ **authStore** (`Store`) + - 📝 Manages the global authentication state on the frontend. + - 🏗️ Layer: Feature + - 📦 **AuthState** (`Interface`) + - 📝 Defines the structure of the authentication state. + - ƒ **createAuthStore** (`Function`) + - 📝 Creates and configures the auth store with helper methods. + - ƒ **setToken** (`Function`) + - 📝 Updates the store with a new JWT token. + - ƒ **setUser** (`Function`) + - 📝 Sets the current user profile data. + - ƒ **logout** (`Function`) + - 📝 Clears authentication state and storage. + - ƒ **setLoading** (`Function`) + - 📝 Updates the loading state. - 🧩 **Select** (`Component`) - 📝 Standardized dropdown selection component. - 🏗️ Layer: Atom + - 📥 Props: label: string , value: string | number , disabled: boolean - 📦 **ui** (`Module`) - 📝 Central export point for standardized UI components. - 🏗️ Layer: Atom + - 🔒 Invariant: All components exported here must follow Semantic Protocol. - 🧩 **PageHeader** (`Component`) - 📝 Standardized page header with title and action area. - 🏗️ Layer: Atom + - 📥 Props: title: string - 🧩 **Card** (`Component`) - 📝 Standardized container with padding and elevation. - 🏗️ Layer: Atom + - 📥 Props: title: string - 🧩 **Button** (`Component`) - 📝 Define component interface and default values. - 🏗️ Layer: Atom + - 🔒 Invariant: Supports accessible labels and keyboard navigation. + - 📥 Props: isLoading: boolean , disabled: boolean - 🧩 **Input** (`Component`) - 📝 Standardized text input component with label and error handling. - 🏗️ Layer: Atom + - 🔒 Invariant: Consistent spacing and focus states. + - 📥 Props: label: string , value: string , placeholder: string , error: string , disabled: boolean - 🧩 **LanguageSwitcher** (`Component`) - 📝 Dropdown component to switch between supported languages. - 🏗️ Layer: Atom + - ⬅️ READS_FROM `lib` + - ➡️ WRITES_TO `locale` - 📦 **i18n** (`Module`) - 📝 Determines the starting locale. - 🏗️ Layer: Infra + - 🔒 Invariant: Persistence is handled via LocalStorage. - 🔗 DEPENDS_ON -> `locales/ru.json` - 🔗 DEPENDS_ON -> `locales/en.json` - - 📦 **locale** (`Store`) + - 🗄️ **locale** (`Store`) - 📝 Holds the current active locale string. - - 📦 **t** (`Store`) + - 🗄️ **t** (`Store`) - 📝 Derived store providing the translation dictionary. - ƒ **selectPlugin** (`Function`) - 📝 Handles plugin selection and navigation. @@ -131,6 +181,9 @@ - 🧩 **TaskManagementPage** (`Component`) - 📝 Page for managing and monitoring tasks. - 🏗️ Layer: Page + - ⬅️ READS_FROM `lib` + - ➡️ WRITES_TO `t` + - ⬅️ READS_FROM `t` - ƒ **loadInitialData** (`Function`) - 📝 Loads tasks and environments on page initialization. - ƒ **refreshTasks** (`Function`) @@ -139,9 +192,68 @@ - 📝 Updates the selected task ID when a task is clicked. - ƒ **handleRunBackup** (`Function`) - 📝 Triggers a manual backup task for the selected environment. +- 🧩 **LoginPage** (`Component`) + - 📝 Provides the user interface for local and ADFS authentication. + - 🏗️ Layer: UI + - 🔒 Invariant: Shows both local login form and ADFS SSO button. + - ⬅️ READS_FROM `app` + - ⬅️ READS_FROM `auth` + - ƒ **handleLogin** (`Function`) + - 📝 Submits the local login form to the backend. + - ƒ **handleADFSLogin** (`Function`) + - 📝 Redirects the user to the ADFS login endpoint. +- 🧩 **AdminRolesPage** (`Component`) + - 📝 UI for managing system roles and their permissions. + - 🏗️ Layer: Domain + - 🔒 Invariant: Only accessible by users with Admin role. + - ⬅️ READS_FROM `lib` + - ⬅️ READS_FROM `t` + - ➡️ WRITES_TO `t` + - ƒ **loadData** (`Function`) + - 📝 Fetches roles and available permissions. + - ƒ **openCreateModal** (`Function`) + - 📝 Initializes state for creating a new role. + - ƒ **openEditModal** (`Function`) + - 📝 Initializes state for editing an existing role. + - ƒ **handleSaveRole** (`Function`) + - 📝 Submits role data (create or update). + - ƒ **handleDeleteRole** (`Function`) + - 📝 Deletes a role after confirmation. +- 🧩 **AdminUsersPage** (`Component`) + - 📝 UI for managing system users and their roles. + - 🏗️ Layer: Feature + - 🔒 Invariant: Only accessible by users with "admin:users" permission. + - ⬅️ READS_FROM `lib` + - ⬅️ READS_FROM `t` + - ➡️ WRITES_TO `t` + - ƒ **loadData** (`Function`) + - 📝 Fetches users and roles from the backend. + - ƒ **openCreateModal** (`Function`) + - 📝 Prepares the form for creating a new user. + - ƒ **openEditModal** (`Function`) + - 📝 Prepares the form for editing an existing user. + - ƒ **handleSaveUser** (`Function`) + - 📝 Submits user data to the backend (create or update). + - ƒ **handleDeleteUser** (`Function`) + - 📝 Deletes a user after confirmation. +- 🧩 **AdminSettingsPage** (`Component`) + - 📝 UI for configuring Active Directory Group to local Role mappings for ADFS SSO. + - 🏗️ Layer: Feature + - 🔒 Invariant: Only accessible by users with "admin:settings" permission. + - ⬅️ READS_FROM `lib` + - ➡️ WRITES_TO `t` + - ⬅️ READS_FROM `t` + - ƒ **loadData** (`Function`) + - 📝 Fetches AD mappings and roles from the backend to populate the UI. + - ƒ **handleCreateMapping** (`Function`) + - 📝 Submits a new AD Group to Role mapping to the backend. - 🧩 **MigrationDashboard** (`Component`) - 📝 Main dashboard for configuring and starting migrations. - 🏗️ Layer: Page + - 🔒 Invariant: Migration cannot start without source and target environments. + - ⬅️ READS_FROM `lib` + - ⬅️ READS_FROM `selectedTask` + - ➡️ WRITES_TO `selectedTask` - ƒ **fetchEnvironments** (`Function`) - 📝 Fetches the list of environments from the API. - ƒ **fetchDashboards** (`Function`) @@ -158,9 +270,12 @@ - 📝 Resumes a migration task with provided passwords. - ƒ **startMigration** (`Function`) - 📝 Starts the migration process. + - 🧩 **DashboardSelectionSection** (`Component`) - 🧩 **MappingManagement** (`Component`) - 📝 Page for managing database mappings between environments. - 🏗️ Layer: Page + - 🔒 Invariant: Mappings are saved to the backend for persistence. + - ⬅️ READS_FROM `lib` - ƒ **fetchEnvironments** (`Function`) - 📝 Fetches the list of environments. - ƒ **fetchDatabases** (`Function`) @@ -169,7 +284,11 @@ - 📝 Saves a mapping to the backend. - 🧩 **StoragePage** (`Component`) - 📝 Main page for file storage management. - - 🏗️ Layer: Feature + - 🏗️ Layer: UI + - 🔒 Invariant: Always displays tabs for Backups and Repositories. + - ⬅️ READS_FROM `app` + - ⬅️ READS_FROM `t` + - ➡️ WRITES_TO `page` - ƒ **loadFiles** (`Function`) - 📝 Fetches the list of files from the server. - ƒ **handleDelete** (`Function`) @@ -178,15 +297,14 @@ - 📝 Updates the current path and reloads files when navigating into a directory. - ƒ **navigateUp** (`Function`) - 📝 Navigates one level up in the directory structure. -- 🧩 **SearchPage** (`Component`) - - 📝 Page for the dataset search tool. - - 🏗️ Layer: UI - 🧩 **MapperPage** (`Component`) - 📝 Page for the dataset column mapper tool. - 🏗️ Layer: UI + - ⬅️ READS_FROM `lib` - 🧩 **DebugPage** (`Component`) - 📝 Page for system diagnostics and debugging. - 🏗️ Layer: UI + - ⬅️ READS_FROM `lib` - ƒ **handleSaveGlobal** (`Function`) - 📝 Saves global application settings. - ƒ **handleSaveStorage** (`Function`) @@ -211,6 +329,8 @@ - 🧩 **GitSettingsPage** (`Component`) - 📝 Manage Git server configurations for dashboard versioning. - 🏗️ Layer: Page + - 🔒 Invariant: All configurations must be validated via connection test. + - ⬅️ READS_FROM `lib` - ƒ **loadConfigs** (`Function`) - 📝 Fetches existing git configurations. - ƒ **handleTest** (`Function`) @@ -222,6 +342,7 @@ - 🧩 **GitDashboardPage** (`Component`) - 📝 Dashboard management page for Git integration. - 🏗️ Layer: Page + - ⬅️ READS_FROM `lib` - ƒ **fetchEnvironments** (`Function`) - 📝 Fetches the list of deployment environments from the API. - ƒ **fetchDashboards** (`Function`) @@ -229,6 +350,7 @@ - 🧩 **Dashboard** (`Component`) - 📝 Displays the list of available plugins and allows selecting one. - 🏗️ Layer: UI + - ⬅️ READS_FROM `plugins` - ƒ **onMount** (`Function`) - 📝 Fetch plugins when the component mounts. - ƒ **selectPlugin** (`Function`) @@ -236,6 +358,7 @@ - 🧩 **Settings** (`Component`) - 📝 The main settings page for the application, allowing management of environments and global settings. - 🏗️ Layer: UI + - 🔒 Invariant: Settings changes must be saved to the backend. - ƒ **loadSettings** (`Function`) - 📝 Loads settings from the backend. - ƒ **handleSaveGlobal** (`Function`) @@ -265,6 +388,33 @@ - 📝 Start a new task for a given plugin. - ƒ **getTaskStatus** (`Function`) - 📝 Fetch details for a specific task (to poll status or get result). +- 📦 **adminService** (`Module`) + - 📝 Service for Admin-related API calls (User and Role management). + - 🏗️ Layer: Service + - 🔒 Invariant: All requests must include valid Admin JWT token (handled by api client). + - 🔗 DEPENDS_ON -> `frontend.src.lib.api` + - ƒ **getUsers** (`Function`) + - 📝 Fetches all registered users from the backend. + - ƒ **createUser** (`Function`) + - 📝 Creates a new local user. + - ƒ **getRoles** (`Function`) + - 📝 Fetches all available system roles. + - ƒ **getADGroupMappings** (`Function`) + - 📝 Fetches mappings between AD groups and local roles. + - ƒ **createADGroupMapping** (`Function`) + - 📝 Creates or updates an AD group to Role mapping. + - ƒ **updateUser** (`Function`) + - 📝 Updates an existing user. + - ƒ **deleteUser** (`Function`) + - 📝 Deletes a user. + - ƒ **createRole** (`Function`) + - 📝 Creates a new role. + - ƒ **updateRole** (`Function`) + - 📝 Updates an existing role. + - ƒ **deleteRole** (`Function`) + - 📝 Deletes a role. + - ƒ **getPermissions** (`Function`) + - 📝 Fetches all available permissions. - ƒ **getTasks** (`Function`) - 📝 Fetch a list of tasks with pagination and optional status filter. - ƒ **getTask** (`Function`) @@ -291,6 +441,8 @@ - 🧩 **PasswordPrompt** (`Component`) - 📝 A modal component to prompt the user for database passwords when a migration task is paused. - 🏗️ Layer: UI + - 📥 Props: show: any, databases: any, errorMessage: any + - ⚡ Events: cancel, resume - ƒ **handleSubmit** (`Function`) - 📝 Validates and dispatches the passwords to resume the task. - ƒ **handleCancel** (`Function`) @@ -298,6 +450,8 @@ - 🧩 **MappingTable** (`Component`) - 📝 Displays and allows editing of database mappings. - 🏗️ Layer: Feature + - 🔒 Invariant: Each source database can be mapped to one target database. + - ⚡ Events: update - ƒ **updateMapping** (`Function`) - 📝 Updates a mapping for a specific source database. - ƒ **getSuggestion** (`Function`) @@ -305,6 +459,10 @@ - 🧩 **TaskLogViewer** (`Component`) - 📝 Displays detailed logs for a specific task in a modal or inline. - 🏗️ Layer: UI + - 📥 Props: show: any, inline: any, taskId: any, taskStatus: any + - ⚡ Events: close + - ⬅️ READS_FROM `t` + - ➡️ WRITES_TO `t` - ƒ **fetchLogs** (`Function`) - 📝 Fetches logs for the current task. - ƒ **scrollToBottom** (`Function`) @@ -323,6 +481,9 @@ - 🧩 **MissingMappingModal** (`Component`) - 📝 Prompts the user to provide a database mapping when one is missing during migration. - 🏗️ Layer: Feature + - 🔒 Invariant: Modal blocks migration progress until resolved or cancelled. + - 📥 Props: show: boolean , sourceDbName: string , sourceDbUuid: string + - ⚡ Events: cancel, resolve - ƒ **resolve** (`Function`) - 📝 Dispatches the resolution event with the selected mapping. - ƒ **cancel** (`Function`) @@ -330,6 +491,11 @@ - 🧩 **DashboardGrid** (`Component`) - 📝 Displays a grid of dashboards with selection and pagination. - 🏗️ Layer: Component + - 🔒 Invariant: Selected IDs must be a subset of available dashboards. + - 📥 Props: dashboards: DashboardMetadata[] , selectedIds: number[] + - ⚡ Events: selectionChanged + - ➡️ WRITES_TO `t` + - ⬅️ READS_FROM `t` - ƒ **handleSort** (`Function`) - 📝 Toggles sort direction or changes sort column. - ƒ **handleSelectionChange** (`Function`) @@ -343,9 +509,19 @@ - 🧩 **Navbar** (`Component`) - 📝 Main navigation bar for the application. - 🏗️ Layer: UI + - ⬅️ READS_FROM `app` + - ⬅️ READS_FROM `lib` + - ➡️ WRITES_TO `page` +- 📦 **Navbar** (`Module`) `[TRIVIAL]` + - 📝 Auto-generated module for frontend/src/components/Navbar.svelte + - 🏗️ Layer: Unknown + - ƒ **handleLogout** (`Function`) `[TRIVIAL]` + - 📝 Auto-detected function (orphan) - 🧩 **TaskHistory** (`Component`) - 📝 Displays a list of recent tasks with their status and allows selecting them for viewing logs. - 🏗️ Layer: UI + - ⬅️ READS_FROM `selectedTask` + - ➡️ WRITES_TO `selectedTask` - ƒ **fetchTasks** (`Function`) - 📝 Fetches the list of recent tasks from the API. - ƒ **clearTasks** (`Function`) @@ -361,9 +537,13 @@ - 🧩 **Toast** (`Component`) - 📝 Displays transient notifications (toasts) in the bottom-right corner. - 🏗️ Layer: UI + - ⬅️ READS_FROM `toasts` - 🧩 **TaskRunner** (`Component`) - 📝 Connects to a WebSocket to display real-time logs for a running task. - 🏗️ Layer: UI + - ⬅️ READS_FROM `selectedTask` + - ➡️ WRITES_TO `selectedTask` + - ⬅️ READS_FROM `taskLogs` - ƒ **connect** (`Function`) - 📝 Establishes WebSocket connection with exponential backoff. - ƒ **fetchTargetDatabases** (`Function`) @@ -383,6 +563,10 @@ - 🧩 **TaskList** (`Component`) - 📝 Displays a list of tasks with their status and execution details. - 🏗️ Layer: Component + - 📥 Props: tasks: Array , loading: boolean + - ⚡ Events: select + - ➡️ WRITES_TO `t` + - ⬅️ READS_FROM `t` - ƒ **getStatusColor** (`Function`) - 📝 Returns the CSS color class for a given task status. - ƒ **formatTime** (`Function`) @@ -392,6 +576,8 @@ - 🧩 **DynamicForm** (`Component`) - 📝 Generates a form dynamically based on a JSON schema. - 🏗️ Layer: UI + - 📥 Props: schema: any + - ⚡ Events: submit - ƒ **handleSubmit** (`Function`) - 📝 Dispatches the submit event with the form data. - ƒ **initializeForm** (`Function`) @@ -399,11 +585,24 @@ - 🧩 **EnvSelector** (`Component`) - 📝 Provides a UI component for selecting source and target environments. - 🏗️ Layer: Feature + - 🔒 Invariant: Source and target environments must be selectable from the list of configured environments. + - 📥 Props: label: string , selectedId: string + - ⚡ Events: change - ƒ **handleSelect** (`Function`) - 📝 Dispatches the selection change event. +- 🧩 **ProtectedRoute** (`Component`) + - 📝 Wraps content to ensure only authenticated users can access it. + - 🏗️ Layer: Component + - 🔒 Invariant: Redirects to /login if user is not authenticated. + - ⬅️ READS_FROM `app` + - ⬅️ READS_FROM `auth` - 🧩 **FileList** (`Component`) - 📝 Displays a table of files with metadata and actions. - - 🏗️ Layer: Component + - 🏗️ Layer: UI + - 📥 Props: files: any + - ⚡ Events: delete, navigate + - ➡️ WRITES_TO `t` + - ⬅️ READS_FROM `t` - ƒ **isDirectory** (`Function`) - 📝 Checks if a file object represents a directory. - ƒ **formatSize** (`Function`) @@ -412,7 +611,10 @@ - 📝 Formats an ISO date string into a localized readable format. - 🧩 **FileUpload** (`Component`) - 📝 Provides a form for uploading files to a specific category. - - 🏗️ Layer: Component + - 🏗️ Layer: UI + - ⚡ Events: uploaded + - ⬅️ READS_FROM `t` + - ➡️ WRITES_TO `t` - ƒ **handleUpload** (`Function`) - 📝 Handles the file upload process. - ƒ **handleDrop** (`Function`) @@ -420,6 +622,9 @@ - 🧩 **ConnectionForm** (`Component`) - 📝 UI component for creating a new database connection configuration. - 🏗️ Layer: UI + - ⚡ Events: success + - ➡️ WRITES_TO `t` + - ⬅️ READS_FROM `t` - ƒ **handleSubmit** (`Function`) - 📝 Submits the connection form to the backend. - ƒ **resetForm** (`Function`) @@ -427,6 +632,8 @@ - 🧩 **ConnectionList** (`Component`) - 📝 UI component for listing and deleting saved database connection configurations. - 🏗️ Layer: UI + - ➡️ WRITES_TO `t` + - ⬅️ READS_FROM `t` - ƒ **fetchConnections** (`Function`) - 📝 Fetches the list of connections from the backend. - ƒ **handleDelete** (`Function`) @@ -434,6 +641,8 @@ - 🧩 **MapperTool** (`Component`) - 📝 UI component for mapping dataset column verbose names using the MapperPlugin. - 🏗️ Layer: UI + - ⬅️ READS_FROM `t` + - ➡️ WRITES_TO `t` - ƒ **fetchData** (`Function`) - 📝 Fetches environments and saved connections. - ƒ **handleRunMapper** (`Function`) @@ -447,18 +656,12 @@ - 📝 Triggers the debug task. - ƒ **startPolling** (`Function`) - 📝 Polls for task completion. -- 🧩 **SearchTool** (`Component`) - - 📝 UI component for searching datasets using the SearchPlugin. - - 🏗️ Layer: UI - - ƒ **fetchEnvironments** (`Function`) - - 📝 Fetches the list of available environments. - - ƒ **handleSearch** (`Function`) - - 📝 Triggers the SearchPlugin task. - - ƒ **startPolling** (`Function`) - - 📝 Polls for task completion and results. - 🧩 **CommitHistory** (`Component`) - 📝 Displays the commit history for a specific dashboard. - 🏗️ Layer: Component + - 📥 Props: dashboardId: any + - ⬅️ READS_FROM `t` + - ➡️ WRITES_TO `t` - ƒ **onMount** (`Function`) - 📝 Load history when component is mounted. - ƒ **loadHistory** (`Function`) @@ -466,6 +669,9 @@ - 🧩 **DeploymentModal** (`Component`) - 📝 Modal for deploying a dashboard to a target environment. - 🏗️ Layer: Component + - 🔒 Invariant: Cannot deploy without a selected environment. + - 📥 Props: dashboardId: any, show: any + - ⚡ Events: deploy - 📦 **loadStatus** (`Watcher`) - ƒ **loadEnvironments** (`Function`) - 📝 Fetch available environments from API. @@ -474,6 +680,9 @@ - 🧩 **ConflictResolver** (`Component`) - 📝 UI for resolving merge conflicts (Keep Mine / Keep Theirs). - 🏗️ Layer: Component + - 🔒 Invariant: User must resolve all conflicts before saving. + - 📥 Props: conflicts: any, show: any + - ⚡ Events: resolve - ƒ **resolve** (`Function`) - 📝 Set resolution strategy for a file. - ƒ **handleSave** (`Function`) @@ -481,6 +690,8 @@ - 🧩 **CommitModal** (`Component`) - 📝 Модальное окно для создания коммита с просмотром изменений (diff). - 🏗️ Layer: Component + - 📥 Props: dashboardId: any, show: any + - ⚡ Events: commit - ƒ **loadStatus** (`Function`) - 📝 Загружает текущий статус репозитория и diff. - ƒ **handleCommit** (`Function`) @@ -488,6 +699,9 @@ - 🧩 **BranchSelector** (`Component`) - 📝 UI для выбора и создания веток Git. - 🏗️ Layer: Component + - 📥 Props: dashboardId: any, currentBranch: any + - ⚡ Events: change + - ⬅️ READS_FROM `t` - ƒ **onMount** (`Function`) - 📝 Load branches when component is mounted. - ƒ **loadBranches** (`Function`) @@ -501,6 +715,9 @@ - 🧩 **GitManager** (`Component`) - 📝 Центральный компонент для управления Git-операциями конкретного дашборда. - 🏗️ Layer: Component + - 📥 Props: dashboardId: any, dashboardTitle: any, show: any + - ➡️ WRITES_TO `t` + - ⬅️ READS_FROM `t` - ƒ **checkStatus** (`Function`) - 📝 Проверяет, инициализирован ли репозиторий для данного дашборда. - ƒ **handleInit** (`Function`) @@ -546,9 +763,67 @@ - 📝 Dependency injector for the TaskManager. - ƒ **get_scheduler_service** (`Function`) - 📝 Dependency injector for the SchedulerService. + - 📦 **oauth2_scheme** (`Variable`) + - 📝 OAuth2 password bearer scheme for token extraction. + - ƒ **get_current_user** (`Function`) + - 📝 Dependency for retrieving the currently authenticated user from a JWT. + - ƒ **has_permission** (`Function`) + - 📝 Dependency for checking if the current user has a specific permission. + - ƒ **permission_checker** (`Function`) `[TRIVIAL]` + - 📝 Auto-detected function (orphan) +- 📦 **backend.src.scripts.seed_permissions** (`Module`) + - 📝 Populates the auth database with initial system permissions. + - 🏗️ Layer: Scripts + - 🔒 Invariant: Safe to run multiple times (idempotent). + - 📦 **INITIAL_PERMISSIONS** (`Constant`) + - ƒ **seed_permissions** (`Function`) + - 📝 Inserts missing permissions into the database. +- 📦 **backend.src.scripts.init_auth_db** (`Module`) + - 📝 Initializes the auth database and creates the necessary tables. + - 🏗️ Layer: Scripts + - 🔒 Invariant: Safe to run multiple times (idempotent). + - 🔗 CALLS -> `backend.src.core.database.init_db` + - ƒ **run_init** (`Function`) + - 📝 Main entry point for the initialization script. +- 📦 **backend.src.scripts.create_admin** (`Module`) + - 📝 CLI tool for creating the initial admin user. + - 🏗️ Layer: Scripts + - 🔒 Invariant: Admin user must have the "Admin" role. + - ƒ **create_admin** (`Function`) + - 📝 Creates an admin user and necessary roles/permissions. +- 📦 **backend.src.schemas.auth** (`Module`) + - 📝 Pydantic schemas for authentication requests and responses. + - 🏗️ Layer: API + - 🔒 Invariant: Sensitive fields like password must not be included in response schemas. + - 🔗 DEPENDS_ON -> `pydantic` + - ℂ **Token** (`Class`) `[TRIVIAL]` + - 📝 Represents a JWT access token response. + - ℂ **TokenData** (`Class`) `[TRIVIAL]` + - 📝 Represents the data encoded in a JWT token. + - ℂ **PermissionSchema** (`Class`) `[TRIVIAL]` + - 📝 Represents a permission in API responses. + - ℂ **RoleSchema** (`Class`) + - 📝 Represents a role in API responses. + - ℂ **RoleCreate** (`Class`) + - 📝 Schema for creating a new role. + - ℂ **RoleUpdate** (`Class`) + - 📝 Schema for updating an existing role. + - ℂ **ADGroupMappingSchema** (`Class`) + - 📝 Represents an AD Group to Role mapping in API responses. + - ℂ **ADGroupMappingCreate** (`Class`) + - 📝 Schema for creating an AD Group mapping. + - ℂ **UserBase** (`Class`) + - 📝 Base schema for user data. + - ℂ **UserCreate** (`Class`) + - 📝 Schema for creating a new user. + - ℂ **UserUpdate** (`Class`) + - 📝 Schema for updating an existing user. + - ℂ **User** (`Class`) + - 📝 Schema for user data in API responses. - 📦 **backend.src.core.superset_client** (`Module`) - 📝 Предоставляет высокоуровневый клиент для взаимодействия с Superset REST API, инкапсулируя логику запросов, обработку ошибок и пагинацию. - 🏗️ Layer: Core + - 🔒 Invariant: All network operations must use the internal APIClient instance. - ℂ **SupersetClient** (`Class`) - 📝 Класс-обёртка над Superset REST API, предоставляющий методы для работы с дашбордами и датасетами. - ƒ **__init__** (`Function`) @@ -600,6 +875,7 @@ - 📦 **ConfigManagerModule** (`Module`) - 📝 Manages application configuration, including loading/saving to JSON and CRUD for environments. - 🏗️ Layer: Core + - 🔒 Invariant: Configuration must always be valid according to AppConfig model. - 🔗 DEPENDS_ON -> `ConfigModels` - 🔗 CALLS -> `logger` - ℂ **ConfigManager** (`Class`) @@ -663,21 +939,34 @@ - 📦 **backend.src.core.database** (`Module`) - 📝 Configures the SQLite database connection and session management. - 🏗️ Layer: Core + - 🔒 Invariant: A single engine instance is used for the entire application. - 🔗 DEPENDS_ON -> `sqlalchemy` - 📦 **DATABASE_URL** (`Constant`) + - 📝 URL for the main mappings database. - 📦 **TASKS_DATABASE_URL** (`Constant`) + - 📝 URL for the tasks execution database. + - 📦 **AUTH_DATABASE_URL** (`Constant`) + - 📝 URL for the authentication database. - 📦 **engine** (`Variable`) + - 📝 SQLAlchemy engine for mappings database. - 📦 **tasks_engine** (`Variable`) + - 📝 SQLAlchemy engine for tasks database. + - 📦 **auth_engine** (`Variable`) + - 📝 SQLAlchemy engine for authentication database. - ℂ **SessionLocal** (`Class`) - 📝 A session factory for the main mappings database. - ℂ **TasksSessionLocal** (`Class`) - 📝 A session factory for the tasks execution database. + - ℂ **AuthSessionLocal** (`Class`) + - 📝 A session factory for the authentication database. - ƒ **init_db** (`Function`) - 📝 Initializes the database by creating all tables. - ƒ **get_db** (`Function`) - 📝 Dependency for getting a database session. - ƒ **get_tasks_db** (`Function`) - 📝 Dependency for getting a tasks database session. + - ƒ **get_auth_db** (`Function`) + - 📝 Dependency for getting an authentication database session. - 📦 **LoggerModule** (`Module`) - 📝 Configures the application's logging system, including a custom handler for buffering logs and streaming them over WebSockets. - 🏗️ Layer: Core @@ -703,6 +992,8 @@ - 📝 The global logger instance for the application, configured with both a console handler and the custom WebSocket handler. - ƒ **believed** (`Function`) - 📝 A decorator that wraps a function in a belief scope. + - ƒ **decorator** (`Function`) + - 📝 Internal decorator for belief scope. - ℂ **PluginLoader** (`Class`) - 📝 Scans a specified directory for Python modules, dynamically loads them, and registers any classes that are valid implementations of the PluginBase interface. - 🏗️ Layer: Core @@ -723,6 +1014,7 @@ - 📦 **backend.src.core.migration_engine** (`Module`) - 📝 Handles the interception and transformation of Superset asset ZIP archives. - 🏗️ Layer: Core + - 🔒 Invariant: ZIP structure must be preserved after transformation. - 🔗 DEPENDS_ON -> `PyYAML` - ℂ **MigrationEngine** (`Class`) - 📝 Engine for transforming Superset export ZIPs. @@ -733,6 +1025,7 @@ - ℂ **PluginBase** (`Class`) - 📝 Defines the abstract base class that all plugins must implement to be recognized by the system. It enforces a common structure for plugin metadata and execution. - 🏗️ Layer: Core + - 🔒 Invariant: All plugins MUST inherit from this class. - ƒ **id** (`Function`) - 📝 Returns the unique identifier for the plugin. - ƒ **name** (`Function`) @@ -741,6 +1034,10 @@ - 📝 Returns a brief description of the plugin. - ƒ **version** (`Function`) - 📝 Returns the version of the plugin. + - ƒ **required_permission** (`Function`) + - 📝 Returns the required permission string to execute this plugin. + - ƒ **ui_route** (`Function`) + - 📝 Returns the frontend route for the plugin's UI, if applicable. - ƒ **get_schema** (`Function`) - 📝 Returns the JSON schema for the plugin's input parameters. - ƒ **execute** (`Function`) @@ -748,6 +1045,77 @@ - ℂ **PluginConfig** (`Class`) - 📝 A Pydantic model used to represent the validated configuration and metadata of a loaded plugin. This object is what gets exposed to the API layer. - 🏗️ Layer: Core +- 📦 **backend.src.core.auth.config** (`Module`) + - 📝 Centralized configuration for authentication and authorization. + - 🏗️ Layer: Core + - 🔒 Invariant: All sensitive configuration must have defaults or be loaded from environment. + - 🔗 DEPENDS_ON -> `pydantic` + - ℂ **AuthConfig** (`Class`) + - 📝 Holds authentication-related settings. + - 📦 **auth_config** (`Variable`) + - 📝 Singleton instance of AuthConfig. +- 📦 **backend.src.core.auth.jwt** (`Module`) + - 📝 JWT token generation and validation logic. + - 🏗️ Layer: Core + - 🔒 Invariant: Tokens must include expiration time and user identifier. + - 🔗 DEPENDS_ON -> `jose` + - ƒ **create_access_token** (`Function`) + - 📝 Generates a new JWT access token. + - ƒ **decode_token** (`Function`) + - 📝 Decodes and validates a JWT token. +- 📦 **backend.src.core.auth.oauth** (`Module`) + - 📝 ADFS OIDC configuration and client using Authlib. + - 🏗️ Layer: Core + - 🔒 Invariant: Must use secure OIDC flows. + - 🔗 DEPENDS_ON -> `authlib` + - 📦 **oauth** (`Variable`) + - 📝 Global Authlib OAuth registry. + - ƒ **register_adfs** (`Function`) + - 📝 Registers the ADFS OIDC client. + - ƒ **is_adfs_configured** (`Function`) + - 📝 Checks if ADFS is properly configured. +- 📦 **backend.src.core.auth.logger** (`Module`) + - 📝 Audit logging for security-related events. + - 🏗️ Layer: Core + - 🔒 Invariant: Must not log sensitive data like passwords or full tokens. + - ƒ **log_security_event** (`Function`) + - 📝 Logs a security-related event for audit trails. +- 📦 **backend.src.core.auth.security** (`Module`) + - 📝 Utility for password hashing and verification using Passlib. + - 🏗️ Layer: Core + - 🔒 Invariant: Uses bcrypt for hashing with standard work factor. + - 🔗 DEPENDS_ON -> `passlib` + - 📦 **pwd_context** (`Variable`) + - 📝 Passlib CryptContext for password management. + - ƒ **verify_password** (`Function`) + - 📝 Verifies a plain password against a hashed password. + - ƒ **get_password_hash** (`Function`) + - 📝 Generates a bcrypt hash for a plain password. +- 📦 **backend.src.core.auth.repository** (`Module`) + - 📝 Data access layer for authentication-related entities. + - 🏗️ Layer: Core + - 🔒 Invariant: All database operations must be performed within a session. + - 🔗 DEPENDS_ON -> `sqlalchemy` + - ℂ **AuthRepository** (`Class`) + - 📝 Encapsulates database operations for authentication. + - ƒ **__init__** (`Function`) + - 📝 Initializes the repository with a database session. + - ƒ **get_user_by_username** (`Function`) + - 📝 Retrieves a user by their username. + - ƒ **get_user_by_id** (`Function`) + - 📝 Retrieves a user by their unique ID. + - ƒ **get_role_by_name** (`Function`) + - 📝 Retrieves a role by its name. + - ƒ **update_last_login** (`Function`) + - 📝 Updates the last_login timestamp for a user. + - ƒ **get_role_by_id** (`Function`) + - 📝 Retrieves a role by its unique ID. + - ƒ **get_permission_by_id** (`Function`) + - 📝 Retrieves a permission by its unique ID. + - ƒ **get_permission_by_resource_action** (`Function`) + - 📝 Retrieves a permission by resource and action. + - ƒ **list_permissions** (`Function`) + - 📝 Lists all available permissions. - 📦 **backend.core.utils.fileio** (`Module`) - 📝 Предоставляет набор утилит для управления файловыми операциями, включая работу с временными файлами, архивами ZIP, файлами YAML и очистку директорий. - 🏗️ Layer: Infra @@ -840,6 +1208,7 @@ - 📦 **backend.src.core.utils.matching** (`Module`) - 📝 Provides utility functions for fuzzy matching database names. - 🏗️ Layer: Core + - 🔒 Invariant: Confidence scores are returned as floats between 0.0 and 1.0. - 🔗 DEPENDS_ON -> `rapidfuzz` - ƒ **suggest_mappings** (`Function`) - 📝 Suggests mappings between source and target databases using fuzzy matching. @@ -866,6 +1235,7 @@ - 📦 **TaskPersistenceModule** (`Module`) - 📝 Handles the persistence of tasks using SQLAlchemy and the tasks.db database. - 🏗️ Layer: Core + - 🔒 Invariant: Database schema must match the TaskRecord model structure. - ℂ **TaskPersistenceService** (`Class`) - 📝 Provides methods to save and load tasks from the tasks.db database using SQLAlchemy. - ƒ **__init__** (`Function`) @@ -881,6 +1251,7 @@ - 📦 **TaskManagerModule** (`Module`) - 📝 Manages the lifecycle of tasks, including their creation, execution, and state tracking. It uses a thread pool to run plugins asynchronously. - 🏗️ Layer: Core + - 🔒 Invariant: Task IDs are unique. - ℂ **TaskManager** (`Class`) - 📝 Manages the lifecycle of tasks, including their creation, execution, and state tracking. - ƒ **__init__** (`Function`) @@ -920,6 +1291,7 @@ - 📦 **TaskManagerModels** (`Module`) - 📝 Defines the data models and enumerations used by the Task Manager. - 🏗️ Layer: Core + - 🔒 Invariant: Task IDs are immutable once created. - 📦 **TaskStatus** (`Enum`) - 📝 Defines the possible states a task can be in during its lifecycle. - ℂ **LogEntry** (`Class`) @@ -940,14 +1312,26 @@ - 📦 **TaskManagerPackage** (`Module`) - 📝 Exports the public API of the task manager package. - 🏗️ Layer: Core -- 📦 **AuthModule** (`Module`) - - 📝 Implements ADFS authentication using Authlib for FastAPI. It provides a dependency to protect endpoints. - - 🏗️ Layer: UI (API) - - ƒ **get_current_user** (`Function`) - - 📝 Dependency to get the current user from the ADFS token. +- 📦 **backend.src.api.auth** (`Module`) + - 📝 Authentication API endpoints. + - 🏗️ Layer: API + - 🔒 Invariant: All auth endpoints must return consistent error codes. + - 📦 **router** (`Variable`) + - 📝 APIRouter instance for authentication routes. + - ƒ **login_for_access_token** (`Function`) + - 📝 Authenticates a user and returns a JWT access token. + - ƒ **read_users_me** (`Function`) + - 📝 Retrieves the profile of the currently authenticated user. + - ƒ **logout** (`Function`) + - 📝 Logs out the current user (placeholder for session revocation). + - ƒ **login_adfs** (`Function`) + - 📝 Initiates the ADFS OIDC login flow. + - ƒ **auth_callback_adfs** (`Function`) + - 📝 Handles the callback from ADFS after successful authentication. - 📦 **backend.src.api.routes.git** (`Module`) - 📝 Provides FastAPI endpoints for Git integration operations. - 🏗️ Layer: API + - 🔒 Invariant: All Git operations must be routed through GitService. - ƒ **get_git_configs** (`Function`) - 📝 List all configured Git servers. - ƒ **create_git_config** (`Function`) @@ -998,6 +1382,7 @@ - 📦 **backend.src.api.routes.environments** (`Module`) - 📝 API endpoints for listing environments and their databases. - 🏗️ Layer: API + - 🔒 Invariant: Environment IDs must exist in the configuration. - 🔗 DEPENDS_ON -> `backend.src.dependencies` - 🔗 DEPENDS_ON -> `backend.src.core.superset_client` - 📦 **ScheduleSchema** (`DataClass`) @@ -1026,6 +1411,7 @@ - 📦 **backend.src.api.routes.mappings** (`Module`) - 📝 API endpoints for managing database mappings and getting suggestions. - 🏗️ Layer: API + - 🔒 Invariant: Mappings are persisted in the SQLite database. - 🔗 DEPENDS_ON -> `backend.src.dependencies` - 🔗 DEPENDS_ON -> `backend.src.core.database` - 🔗 DEPENDS_ON -> `backend.src.services.mapping_service` @@ -1041,6 +1427,7 @@ - 📦 **SettingsRouter** (`Module`) - 📝 Provides API endpoints for managing application settings and Superset environments. - 🏗️ Layer: UI (API) + - 🔒 Invariant: All settings changes must be persisted via ConfigManager. - 🔗 DEPENDS_ON -> `ConfigManager` - 🔗 DEPENDS_ON -> `ConfigModels` - ƒ **get_settings** (`Function`) @@ -1061,11 +1448,45 @@ - 📝 Deletes a Superset environment. - ƒ **test_environment_connection** (`Function`) - 📝 Tests the connection to a Superset environment. +- 📦 **backend.src.api.routes.admin** (`Module`) + - 📝 Admin API endpoints for user and role management. + - 🏗️ Layer: API + - 🔒 Invariant: All endpoints in this module require 'Admin' role or 'admin' scope. + - 📦 **router** (`Variable`) + - 📝 APIRouter instance for admin routes. + - ƒ **list_users** (`Function`) + - 📝 Lists all registered users. + - ƒ **create_user** (`Function`) + - 📝 Creates a new local user. + - ƒ **update_user** (`Function`) + - 📝 Updates an existing user. + - ƒ **delete_user** (`Function`) + - 📝 Deletes a user. + - ƒ **list_roles** (`Function`) + - 📝 Lists all available roles. + - 🔗 CALLS -> `backend.src.models.auth.Role` + - ƒ **create_role** (`Function`) + - 📝 Creates a new system role with associated permissions. + - 🔗 CALLS -> `backend.src.core.auth.repository.AuthRepository.get_permission_by_id` + - ƒ **update_role** (`Function`) + - 📝 Updates an existing role's metadata and permissions. + - 🔗 CALLS -> `backend.src.core.auth.repository.AuthRepository.get_role_by_id` + - ƒ **delete_role** (`Function`) + - 📝 Removes a role from the system. + - 🔗 CALLS -> `backend.src.core.auth.repository.AuthRepository.get_role_by_id` + - ƒ **list_permissions** (`Function`) + - 📝 Lists all available system permissions for assignment. + - 🔗 CALLS -> `backend.src.core.auth.repository.AuthRepository.list_permissions` + - ƒ **list_ad_mappings** (`Function`) + - 📝 Lists all AD Group to Role mappings. + - ƒ **create_ad_mapping** (`Function`) + - 📝 Creates a new AD Group mapping. - 📦 **backend.src.api.routes.git_schemas** (`Module`) - 📝 Defines Pydantic models for the Git integration API layer. - 🏗️ Layer: API + - 🔒 Invariant: All schemas must be compatible with the FastAPI router. - 🔗 DEPENDS_ON -> `backend.src.models.git` - - ℂ **GitServerConfigBase** (`Class`) + - ℂ **GitServerConfigBase** (`Class`) `[TRIVIAL]` - 📝 Base schema for Git server configuration attributes. - ℂ **GitServerConfigCreate** (`Class`) - 📝 Schema for creating a new Git server configuration. @@ -1094,6 +1515,7 @@ - 📦 **storage_routes** (`Module`) - 📝 API endpoints for file storage management (backups and repositories). - 🏗️ Layer: API + - 🔒 Invariant: All paths must be validated against path traversal. - 🔗 DEPENDS_ON -> `backend.src.models.storage` - ƒ **list_files** (`Function`) - 📝 List all files and directories in the storage system. @@ -1130,20 +1552,23 @@ - 📦 **backend.src.models.task** (`Module`) - 📝 Defines the database schema for task execution records. - 🏗️ Layer: Domain + - 🔒 Invariant: All primary keys are UUID strings. - 🔗 DEPENDS_ON -> `sqlalchemy` - ℂ **TaskRecord** (`Class`) - 📝 Represents a persistent record of a task execution. - 📦 **backend.src.models.connection** (`Module`) - 📝 Defines the database schema for external database connection configurations. - 🏗️ Layer: Domain + - 🔒 Invariant: All primary keys are UUID strings. - 🔗 DEPENDS_ON -> `sqlalchemy` - ℂ **ConnectionConfig** (`Class`) - 📝 Stores credentials for external databases used for column mapping. - 📦 **backend.src.models.mapping** (`Module`) - 📝 Defines the database schema for environment metadata and database mappings using SQLAlchemy. - 🏗️ Layer: Domain + - 🔒 Invariant: All primary keys are UUID strings. - 🔗 DEPENDS_ON -> `sqlalchemy` - - ℂ **MigrationStatus** (`Class`) + - ℂ **MigrationStatus** (`Class`) `[TRIVIAL]` - 📝 Enumeration of possible migration job statuses. - ℂ **Environment** (`Class`) - 📝 Represents a Superset instance environment. @@ -1160,14 +1585,47 @@ - 📦 **backend.src.models.dashboard** (`Module`) - 📝 Defines data models for dashboard metadata and selection. - 🏗️ Layer: Model - - ℂ **DashboardMetadata** (`Class`) + - ℂ **DashboardMetadata** (`Class`) `[TRIVIAL]` - 📝 Represents a dashboard available for migration. - - ℂ **DashboardSelection** (`Class`) + - ℂ **DashboardSelection** (`Class`) `[TRIVIAL]` - 📝 Represents the user's selection of dashboards to migrate. +- 📦 **backend.src.models.auth** (`Module`) + - 📝 SQLAlchemy models for multi-user authentication and authorization. + - 🏗️ Layer: Domain + - 🔒 Invariant: Usernames and emails must be unique. + - ƒ **generate_uuid** (`Function`) + - 📝 Generates a unique UUID string. + - 📦 **user_roles** (`Table`) + - 📝 Association table for many-to-many relationship between Users and Roles. + - 📦 **role_permissions** (`Table`) + - 📝 Association table for many-to-many relationship between Roles and Permissions. + - ℂ **User** (`Class`) + - 📝 Represents an identity that can authenticate to the system. + - ℂ **Role** (`Class`) + - 📝 Represents a collection of permissions. + - ℂ **Permission** (`Class`) + - 📝 Represents a specific capability within the system. + - ℂ **ADGroupMapping** (`Class`) + - 📝 Maps an Active Directory group to a local System Role. + - 🔗 DEPENDS_ON -> `Role` +- 📦 **backend.src.services.auth_service** (`Module`) + - 📝 Orchestrates authentication business logic. + - 🏗️ Layer: Service + - 🔒 Invariant: Authentication must verify both credentials and account status. + - ℂ **AuthService** (`Class`) + - 📝 Provides high-level authentication services. + - ƒ **__init__** (`Function`) + - 📝 Initializes the service with a database session. + - ƒ **authenticate_user** (`Function`) + - 📝 Authenticates a user with username and password. + - ƒ **create_session** (`Function`) + - 📝 Creates a JWT session for an authenticated user. + - ƒ **provision_adfs_user** (`Function`) + - 📝 Just-In-Time (JIT) provisioning for ADFS users based on group mappings. - 📦 **backend.src.services.git_service** (`Module`) - 📝 Core Git logic using GitPython to manage dashboard repositories. - 🏗️ Layer: Service - - 🔗 INHERITS_FROM -> `None` + - 🔒 Invariant: All Git operations must be performed on a valid local directory. - ℂ **GitService** (`Class`) - 📝 Wrapper for GitPython operations with semantic logging and error handling. - ƒ **__init__** (`Function`) @@ -1201,6 +1659,7 @@ - 📦 **backend.src.services.mapping_service** (`Module`) - 📝 Orchestrates database fetching and fuzzy matching suggestions. - 🏗️ Layer: Service + - 🔒 Invariant: Suggestions are based on database names. - 🔗 DEPENDS_ON -> `backend.src.core.superset_client` - 🔗 DEPENDS_ON -> `backend.src.core.utils.matching` - ℂ **MappingService** (`Class`) @@ -1214,6 +1673,7 @@ - 📦 **BackupPlugin** (`Module`) - 📝 A plugin that provides functionality to back up Superset dashboards. - 🏗️ Layer: App + - 🔗 IMPLEMENTS -> `PluginBase` - 🔗 DEPENDS_ON -> `superset_tool.client` - 🔗 DEPENDS_ON -> `superset_tool.utils` - ℂ **BackupPlugin** (`Class`) @@ -1226,6 +1686,8 @@ - 📝 Returns a description of the backup plugin. - ƒ **version** (`Function`) - 📝 Returns the version of the backup plugin. + - ƒ **ui_route** (`Function`) + - 📝 Returns the frontend route for the backup plugin. - ƒ **get_schema** (`Function`) - 📝 Returns the JSON schema for backup plugin parameters. - ƒ **execute** (`Function`) @@ -1243,6 +1705,8 @@ - 📝 Returns a description of the debug plugin. - ƒ **version** (`Function`) - 📝 Returns the version of the debug plugin. + - ƒ **ui_route** (`Function`) + - 📝 Returns the frontend route for the debug plugin. - ƒ **get_schema** (`Function`) - 📝 Returns the JSON schema for the debug plugin parameters. - ƒ **execute** (`Function`) @@ -1264,6 +1728,8 @@ - 📝 Returns a description of the search plugin. - ƒ **version** (`Function`) - 📝 Returns the version of the search plugin. + - ƒ **ui_route** (`Function`) + - 📝 Returns the frontend route for the search plugin. - ƒ **get_schema** (`Function`) - 📝 Returns the JSON schema for the search plugin parameters. - ƒ **execute** (`Function`) @@ -1283,6 +1749,8 @@ - 📝 Returns a description of the mapper plugin. - ƒ **version** (`Function`) - 📝 Returns the version of the mapper plugin. + - ƒ **ui_route** (`Function`) + - 📝 Returns the frontend route for the mapper plugin. - ƒ **get_schema** (`Function`) - 📝 Returns the JSON schema for the mapper plugin parameters. - ƒ **execute** (`Function`) @@ -1290,7 +1758,7 @@ - 📦 **backend.src.plugins.git_plugin** (`Module`) - 📝 Предоставляет плагин для версионирования и развертывания дашбордов Superset. - 🏗️ Layer: Plugin - - 🔗 INHERITS_FROM -> `src.core.plugin_base.PluginBase` + - 🔒 Invariant: Все операции с Git должны выполняться через GitService. - ℂ **GitPlugin** (`Class`) - 📝 Реализация плагина Git Integration для управления версиями дашбордов. - ƒ **__init__** (`Function`) @@ -1303,13 +1771,29 @@ - 📝 Returns the plugin description. - ƒ **version** (`Function`) - 📝 Returns the plugin version. + - ƒ **ui_route** (`Function`) + - 📝 Returns the frontend route for the git plugin. - ƒ **get_schema** (`Function`) - 📝 Возвращает JSON-схему параметров для выполнения задач плагина. - ƒ **initialize** (`Function`) - 📝 Выполняет начальную настройку плагина. + - ƒ **execute** (`Function`) + - 📝 Основной метод выполнения задач плагина. + - 🔗 CALLS -> `self._handle_sync` + - 🔗 CALLS -> `self._handle_deploy` + - ƒ **_handle_sync** (`Function`) + - 📝 Экспортирует дашборд из Superset и распаковывает в Git-репозиторий. + - 🔗 CALLS -> `src.services.git_service.GitService.get_repo` + - 🔗 CALLS -> `src.core.superset_client.SupersetClient.export_dashboard` + - ƒ **_handle_deploy** (`Function`) + - 📝 Упаковывает репозиторий в ZIP и импортирует в целевое окружение Superset. + - 🔗 CALLS -> `src.core.superset_client.SupersetClient.import_dashboard` + - ƒ **_get_env** (`Function`) + - 📝 Вспомогательный метод для получения конфигурации окружения. - 📦 **MigrationPlugin** (`Module`) - 📝 A plugin that provides functionality to migrate Superset dashboards between environments. - 🏗️ Layer: App + - 🔗 IMPLEMENTS -> `PluginBase` - 🔗 DEPENDS_ON -> `superset_tool.client` - 🔗 DEPENDS_ON -> `superset_tool.utils` - ℂ **MigrationPlugin** (`Class`) @@ -1322,13 +1806,19 @@ - 📝 Returns a description of the migration plugin. - ƒ **version** (`Function`) - 📝 Returns the version of the migration plugin. + - ƒ **ui_route** (`Function`) + - 📝 Returns the frontend route for the migration plugin. - ƒ **get_schema** (`Function`) - 📝 Returns the JSON schema for migration plugin parameters. - ƒ **execute** (`Function`) - 📝 Executes the dashboard migration logic. + - 📦 **MigrationPlugin.execute** (`Action`) + - 📝 Execute the migration logic with proper task logging. - 📦 **StoragePlugin** (`Module`) - 📝 Provides core filesystem operations for managing backups and repositories. - 🏗️ Layer: App + - 🔒 Invariant: All file operations must be restricted to the configured storage root. + - 🔗 IMPLEMENTS -> `PluginBase` - 🔗 DEPENDS_ON -> `backend.src.models.storage` - ℂ **StoragePlugin** (`Class`) - 📝 Implementation of the storage management plugin. @@ -1342,6 +1832,8 @@ - 📝 Returns a description of the storage plugin. - ƒ **version** (`Function`) - 📝 Returns the version of the storage plugin. + - ƒ **ui_route** (`Function`) + - 📝 Returns the frontend route for the storage plugin. - ƒ **get_schema** (`Function`) - 📝 Returns the JSON schema for storage plugin parameters. - ƒ **execute** (`Function`) @@ -1370,3 +1862,24 @@ - 📝 Test that belief_scope logs Coherence:Failed on exception. - ƒ **test_belief_scope_success_coherence** (`Function`) - 📝 Test that belief_scope logs Coherence:OK on success. +- 📦 **test_auth** (`Module`) `[TRIVIAL]` + - 📝 Auto-generated module for backend/tests/test_auth.py + - 🏗️ Layer: Unknown + - ƒ **db_session** (`Function`) `[TRIVIAL]` + - 📝 Auto-detected function (orphan) + - ƒ **auth_service** (`Function`) `[TRIVIAL]` + - 📝 Auto-detected function (orphan) + - ƒ **auth_repo** (`Function`) `[TRIVIAL]` + - 📝 Auto-detected function (orphan) + - ƒ **test_create_user** (`Function`) `[TRIVIAL]` + - 📝 Auto-detected function (orphan) + - ƒ **test_authenticate_user** (`Function`) `[TRIVIAL]` + - 📝 Auto-detected function (orphan) + - ƒ **test_create_session** (`Function`) `[TRIVIAL]` + - 📝 Auto-detected function (orphan) + - ƒ **test_role_permission_association** (`Function`) `[TRIVIAL]` + - 📝 Auto-detected function (orphan) + - ƒ **test_user_role_association** (`Function`) `[TRIVIAL]` + - 📝 Auto-detected function (orphan) + - ƒ **test_ad_group_mapping** (`Function`) `[TRIVIAL]` + - 📝 Auto-detected function (orphan)