From 51e9ee3fcc7c8650199f126771c7fd921becb6f5 Mon Sep 17 00:00:00 2001 From: busya Date: Mon, 26 Jan 2026 11:57:36 +0300 Subject: [PATCH] semantic update --- backend/src/core/logger.py | 12 + backend/src/models/storage.py | 3 + backend/src/plugins/storage/plugin.py | 42 +- .../src/components/storage/FileList.svelte | 21 + .../src/routes/tools/storage/+page.svelte | 11 + frontend/src/services/storageService.js | 9 + generate_semantic_map.py | 3 +- .../semantic_report_20260126_112020.md | 124 + .../semantic_report_20260126_114128.md | 117 + semantics/semantic_map.json | 13798 +++++++++------- specs/project_map.md | 1664 +- 11 files changed, 8634 insertions(+), 7170 deletions(-) create mode 100644 semantics/reports/semantic_report_20260126_112020.md create mode 100644 semantics/reports/semantic_report_20260126_114128.md diff --git a/backend/src/core/logger.py b/backend/src/core/logger.py index 7177c7d..6d089b9 100755 --- a/backend/src/core/logger.py +++ b/backend/src/core/logger.py @@ -28,6 +28,7 @@ class BeliefFormatter(logging.Formatter): # @POST: Returns formatted string. # @PARAM: record (logging.LogRecord) - The log record to format. # @RETURN: str - The formatted log message. + # @SEMANTICS: logging, formatter, context def format(self, record): anchor_id = getattr(_belief_state, 'anchor_id', None) if anchor_id: @@ -54,6 +55,7 @@ class LogEntry(BaseModel): # @PARAM: message (str) - Optional entry message. # @PRE: anchor_id must be provided. # @POST: Thread-local belief state is updated and entry/exit logs are generated. +# @SEMANTICS: logging, context, belief_state @contextmanager def belief_scope(anchor_id: str, message: str = ""): # Log Entry if enabled @@ -88,6 +90,7 @@ def belief_scope(anchor_id: str, message: str = ""): # @PRE: config is a valid LoggingConfig instance. # @POST: Logger level, handlers, and belief state flag are updated. # @PARAM: config (LoggingConfig) - The logging configuration. +# @SEMANTICS: logging, configuration, initialization def configure_logger(config): global _enable_belief_state _enable_belief_state = config.enable_belief_state @@ -140,6 +143,7 @@ class WebSocketLogHandler(logging.Handler): # @PRE: capacity is an integer. # @POST: Instance initialized with empty deque. # @PARAM: capacity (int) - Maximum number of logs to keep in memory. + # @SEMANTICS: logging, initialization, buffer def __init__(self, capacity: int = 1000): super().__init__() self.log_buffer: deque[LogEntry] = deque(maxlen=capacity) @@ -152,6 +156,7 @@ class WebSocketLogHandler(logging.Handler): # @PRE: record is a logging.LogRecord. # @POST: Log is added to the log_buffer. # @PARAM: record (logging.LogRecord) - The log record to emit. + # @SEMANTICS: logging, handler, buffer def emit(self, record: logging.LogRecord): try: log_entry = LogEntry( @@ -179,6 +184,7 @@ class WebSocketLogHandler(logging.Handler): # @PRE: None. # @POST: Returns list of LogEntry objects. # @RETURN: List[LogEntry] - List of buffered log entries. + # @SEMANTICS: logging, buffer, retrieval def get_recent_logs(self) -> List[LogEntry]: """ Returns a list of recent log entries from the buffer. @@ -196,12 +202,18 @@ logger = logging.getLogger("superset_tools_app") # [DEF:believed:Function] # @PURPOSE: A decorator that wraps a function in a belief scope. # @PARAM: anchor_id (str) - The identifier for the semantic block. +# @PRE: anchor_id must be a string. +# @POST: Returns a decorator function. def believed(anchor_id: str): # [DEF:decorator:Function] # @PURPOSE: Internal decorator for belief scope. + # @PRE: func must be a callable. + # @POST: Returns the wrapped function. def decorator(func): # [DEF:wrapper:Function] # @PURPOSE: Internal wrapper that enters belief scope. + # @PRE: None. + # @POST: Executes the function within a belief scope. def wrapper(*args, **kwargs): with belief_scope(anchor_id): return func(*args, **kwargs) diff --git a/backend/src/models/storage.py b/backend/src/models/storage.py index fc71eb4..00662bf 100644 --- a/backend/src/models/storage.py +++ b/backend/src/models/storage.py @@ -4,12 +4,14 @@ from typing import Optional from pydantic import BaseModel, Field # [DEF:FileCategory:Class] +# @PURPOSE: Enumeration of supported file categories in the storage system. class FileCategory(str, Enum): BACKUP = "backups" REPOSITORY = "repositorys" # [/DEF:FileCategory:Class] # [DEF:StorageConfig:Class] +# @PURPOSE: Configuration model for the storage system, defining paths and naming patterns. class StorageConfig(BaseModel): root_path: str = Field(default="backups", description="Absolute path to the storage root directory.") backup_structure_pattern: str = Field(default="{category}/", description="Pattern for backup directory structure.") @@ -18,6 +20,7 @@ class StorageConfig(BaseModel): # [/DEF:StorageConfig:Class] # [DEF:StoredFile:Class] +# @PURPOSE: Data model representing metadata for a file stored in the system. class StoredFile(BaseModel): name: str = Field(..., description="Name of the file (including extension).") path: str = Field(..., description="Relative path from storage root.") diff --git a/backend/src/plugins/storage/plugin.py b/backend/src/plugins/storage/plugin.py index 67a8d0e..8fd20b4 100644 --- a/backend/src/plugins/storage/plugin.py +++ b/backend/src/plugins/storage/plugin.py @@ -31,6 +31,8 @@ class StoragePlugin(PluginBase): # [DEF:__init__:Function] # @PURPOSE: Initializes the StoragePlugin and ensures required directories exist. + # @PRE: Configuration manager must be accessible. + # @POST: Storage root and category directories are created on disk. def __init__(self): with belief_scope("StoragePlugin:init"): self.ensure_directories() @@ -39,40 +41,55 @@ class StoragePlugin(PluginBase): @property # [DEF:id:Function] # @PURPOSE: Returns the unique identifier for the storage plugin. + # @PRE: None. + # @POST: Returns the plugin ID string. # @RETURN: str - "storage-manager" def id(self) -> str: - return "storage-manager" + with belief_scope("StoragePlugin:id"): + return "storage-manager" # [/DEF:id:Function] @property # [DEF:name:Function] # @PURPOSE: Returns the human-readable name of the storage plugin. + # @PRE: None. + # @POST: Returns the plugin name string. # @RETURN: str - "Storage Manager" def name(self) -> str: - return "Storage Manager" + with belief_scope("StoragePlugin:name"): + return "Storage Manager" # [/DEF:name:Function] @property # [DEF:description:Function] # @PURPOSE: Returns a description of the storage plugin. + # @PRE: None. + # @POST: Returns the plugin description string. # @RETURN: str - Plugin description. def description(self) -> str: - return "Manages local file storage for backups and repositories." + with belief_scope("StoragePlugin:description"): + return "Manages local file storage for backups and repositories." # [/DEF:description:Function] @property # [DEF:version:Function] # @PURPOSE: Returns the version of the storage plugin. + # @PRE: None. + # @POST: Returns the version string. # @RETURN: str - "1.0.0" def version(self) -> str: - return "1.0.0" + with belief_scope("StoragePlugin:version"): + return "1.0.0" # [/DEF:version:Function] # [DEF:get_schema:Function] # @PURPOSE: Returns the JSON schema for storage plugin parameters. + # @PRE: None. + # @POST: Returns a dictionary representing the JSON schema. # @RETURN: Dict[str, Any] - JSON schema. def get_schema(self) -> Dict[str, Any]: - return { + with belief_scope("StoragePlugin:get_schema"): + return { "type": "object", "properties": { "category": { @@ -87,6 +104,8 @@ class StoragePlugin(PluginBase): # [DEF:execute:Function] # @PURPOSE: Executes storage-related tasks (placeholder for PluginBase compliance). + # @PRE: params must match the plugin schema. + # @POST: Task is executed and logged. async def execute(self, params: Dict[str, Any]): with belief_scope("StoragePlugin:execute"): logger.info(f"[StoragePlugin][Action] Executing with params: {params}") @@ -94,6 +113,7 @@ class StoragePlugin(PluginBase): # [DEF:get_storage_root:Function] # @PURPOSE: Resolves the absolute path to the storage root. + # @PRE: Settings must define a storage root path. # @POST: Returns a Path object representing the storage root. def get_storage_root(self) -> Path: with belief_scope("StoragePlugin:get_storage_root"): @@ -117,6 +137,8 @@ class StoragePlugin(PluginBase): # @PURPOSE: Resolves a dynamic path pattern using provided variables. # @PARAM: pattern (str) - The path pattern to resolve. # @PARAM: variables (Dict[str, str]) - Variables to substitute in the pattern. + # @PRE: pattern must be a valid format string. + # @POST: Returns the resolved path string. # @RETURN: str - The resolved path. def resolve_path(self, pattern: str, variables: Dict[str, str]) -> str: with belief_scope("StoragePlugin:resolve_path"): @@ -137,6 +159,8 @@ class StoragePlugin(PluginBase): # [DEF:ensure_directories:Function] # @PURPOSE: Creates the storage root and category subdirectories if they don't exist. + # @PRE: Storage root must be resolvable. + # @POST: Directories are created on the filesystem. # @SIDE_EFFECT: Creates directories on the filesystem. def ensure_directories(self): with belief_scope("StoragePlugin:ensure_directories"): @@ -168,6 +192,8 @@ class StoragePlugin(PluginBase): # @PURPOSE: Lists all files and directories in a specific category and subpath. # @PARAM: category (Optional[FileCategory]) - The category to list. # @PARAM: subpath (Optional[str]) - Nested path within the category. + # @PRE: Storage root must exist. + # @POST: Returns a list of StoredFile objects. # @RETURN: List[StoredFile] - List of file and directory metadata objects. def list_files(self, category: Optional[FileCategory] = None, subpath: Optional[str] = None) -> List[StoredFile]: with belief_scope("StoragePlugin:list_files"): @@ -218,6 +244,8 @@ class StoragePlugin(PluginBase): # @PARAM: file (UploadFile) - The uploaded file. # @PARAM: category (FileCategory) - The target category. # @PARAM: subpath (Optional[str]) - The target subpath. + # @PRE: file must be a valid UploadFile; category must be valid. + # @POST: File is written to disk and metadata is returned. # @RETURN: StoredFile - Metadata of the saved file. # @SIDE_EFFECT: Writes file to disk. async def save_file(self, file: UploadFile, category: FileCategory, subpath: Optional[str] = None) -> StoredFile: @@ -249,6 +277,8 @@ class StoragePlugin(PluginBase): # @PURPOSE: Deletes a file or directory from the specified category and path. # @PARAM: category (FileCategory) - The category. # @PARAM: path (str) - The relative path of the file or directory. + # @PRE: path must belong to the specified category and exist on disk. + # @POST: The file or directory is removed from disk. # @SIDE_EFFECT: Removes item from disk. def delete_file(self, category: FileCategory, path: str): with belief_scope("StoragePlugin:delete_file"): @@ -273,6 +303,8 @@ class StoragePlugin(PluginBase): # @PURPOSE: Returns the absolute path of a file for download. # @PARAM: category (FileCategory) - The category. # @PARAM: path (str) - The relative path of the file. + # @PRE: path must belong to the specified category and be a file. + # @POST: Returns the absolute Path to the file. # @RETURN: Path - Absolute path to the file. def get_file_path(self, category: FileCategory, path: str) -> Path: with belief_scope("StoragePlugin:get_file_path"): diff --git a/frontend/src/components/storage/FileList.svelte b/frontend/src/components/storage/FileList.svelte index c5a7903..7288d9b 100644 --- a/frontend/src/components/storage/FileList.svelte +++ b/frontend/src/components/storage/FileList.svelte @@ -19,10 +19,23 @@ export let files = []; const dispatch = createEventDispatcher(); + // [DEF:isDirectory:Function] + /** + * @purpose Checks if a file object represents a directory. + * @param {Object} file - The file object to check. + * @return {boolean} True if it's a directory, false otherwise. + */ function isDirectory(file) { return file.mime_type === 'directory'; } + // [/DEF:isDirectory:Function] + // [DEF:formatSize:Function] + /** + * @purpose Formats file size in bytes into a human-readable string. + * @param {number} bytes - The size in bytes. + * @return {string} Formatted size (e.g., "1.2 MB"). + */ function formatSize(bytes) { if (bytes === 0) return '0 B'; const k = 1024; @@ -30,10 +43,18 @@ const i = Math.floor(Math.log(bytes) / Math.log(k)); return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i]; } + // [/DEF:formatSize:Function] + // [DEF:formatDate:Function] + /** + * @purpose Formats an ISO date string into a localized readable format. + * @param {string} dateStr - The date string to format. + * @return {string} Localized date and time. + */ function formatDate(dateStr) { return new Date(dateStr).toLocaleString(); } + // [/DEF:formatDate:Function] diff --git a/frontend/src/routes/tools/storage/+page.svelte b/frontend/src/routes/tools/storage/+page.svelte index 76f1f63..294dfe0 100644 --- a/frontend/src/routes/tools/storage/+page.svelte +++ b/frontend/src/routes/tools/storage/+page.svelte @@ -76,11 +76,21 @@ } // [/DEF:handleDelete:Function] + // [DEF:handleNavigate:Function] + /** + * @purpose Updates the current path and reloads files when navigating into a directory. + * @param {CustomEvent} event - The navigation event containing the new path. + */ function handleNavigate(event) { currentPath = event.detail; loadFiles(); } + // [/DEF:handleNavigate:Function] + // [DEF:navigateUp:Function] + /** + * @purpose Navigates one level up in the directory structure. + */ function navigateUp() { if (!currentPath || currentPath === activeTab) return; const parts = currentPath.split('/'); @@ -88,6 +98,7 @@ currentPath = parts.join('/') || ''; loadFiles(); } + // [/DEF:navigateUp:Function] onMount(loadFiles); diff --git a/frontend/src/services/storageService.js b/frontend/src/services/storageService.js index fab7e41..9b193f9 100644 --- a/frontend/src/services/storageService.js +++ b/frontend/src/services/storageService.js @@ -3,6 +3,7 @@ * @purpose Frontend API client for file storage management. * @layer Service * @relation DEPENDS_ON -> backend.api.storage + * @SEMANTICS: storage, api, client */ const API_BASE = '/api/storage'; @@ -13,6 +14,8 @@ const API_BASE = '/api/storage'; * @param {string} [category] - Optional category filter. * @param {string} [path] - Optional subpath filter. * @returns {Promise} + * @PRE category and path should be valid strings if provided. + * @POST Returns a promise resolving to an array of StoredFile objects. */ export async function listFiles(category, path) { const params = new URLSearchParams(); @@ -37,6 +40,8 @@ export async function listFiles(category, path) { * @param {string} category - Target category. * @param {string} [path] - Target subpath. * @returns {Promise} + * @PRE file must be a valid File object; category must be specified. + * @POST Returns a promise resolving to the metadata of the uploaded file. */ export async function uploadFile(file, category, path) { const formData = new FormData(); @@ -65,6 +70,8 @@ export async function uploadFile(file, category, path) { * @param {string} category - File category. * @param {string} path - Relative path of the item. * @returns {Promise} + * @PRE category and path must identify an existing file or directory. + * @POST The specified file or directory is removed from storage. */ export async function deleteFile(category, path) { const response = await fetch(`${API_BASE}/files/${category}/${path}`, { @@ -84,6 +91,8 @@ export async function deleteFile(category, path) { * @param {string} category - File category. * @param {string} path - Relative path of the file. * @returns {string} + * @PRE category and path must identify an existing file. + * @POST Returns a valid API URL for file download. */ export function downloadFileUrl(category, path) { return `${API_BASE}/download/${category}/${path}`; diff --git a/generate_semantic_map.py b/generate_semantic_map.py index 4438f7a..f74b718 100644 --- a/generate_semantic_map.py +++ b/generate_semantic_map.py @@ -130,7 +130,8 @@ class SemanticEntity: self.compliance_issues.append(f"Missing Mandatory Tag: @{req_tag}") # 3. Check for Belief State Logging (Python only) - if self.type == "Function" and self.file_path.endswith(".py"): + # Skip check for logger.py to avoid circular dependencies + if self.type == "Function" and self.file_path.endswith(".py") and "backend/src/core/logger.py" not in self.file_path: if not getattr(self, 'has_belief_scope', False): self.compliance_issues.append("Missing Belief State Logging: Function should use belief_scope context manager.") diff --git a/semantics/reports/semantic_report_20260126_112020.md b/semantics/reports/semantic_report_20260126_112020.md new file mode 100644 index 0000000..19b468a --- /dev/null +++ b/semantics/reports/semantic_report_20260126_112020.md @@ -0,0 +1,124 @@ +# Semantic Compliance Report + +**Generated At:** 2026-01-26T11:20:20.785724 +**Global Compliance Score:** 98.5% +**Scanned Files:** 108 + +## Critical Parsing Errors +- 🔴 frontend/src/routes/tools/storage/+page.svelte:79 Function 'handleNavigate' implementation found without matching [DEF:handleNavigate:Function] contract. +- 🔴 frontend/src/routes/tools/storage/+page.svelte:84 Function 'navigateUp' implementation found without matching [DEF:navigateUp:Function] contract. +- 🔴 frontend/src/components/storage/FileList.svelte:22 Function 'isDirectory' implementation found without matching [DEF:isDirectory:Function] contract. +- 🔴 frontend/src/components/storage/FileList.svelte:26 Function 'formatSize' implementation found without matching [DEF:formatSize:Function] contract. +- 🔴 frontend/src/components/storage/FileList.svelte:34 Function 'formatDate' implementation found without matching [DEF:formatDate:Function] contract. + +## File Compliance Status +| File | Score | Issues | +|------|-------|--------| +| backend/src/models/storage.py | 🔴 50% | [FileCategory] Missing Mandatory Tag: @PURPOSE
[StorageConfig] Missing Mandatory Tag: @PURPOSE
[StoredFile] Missing Mandatory Tag: @PURPOSE | +| frontend/src/services/storageService.js | 🟡 70% | [storageService] Missing Mandatory Tag: @SEMANTICS
[listFiles] Missing Mandatory Tag: @PRE
[listFiles] Missing Mandatory Tag: @POST
[listFiles] Missing Mandatory Tag: @PRE
[listFiles] Missing Mandatory Tag: @POST
[uploadFile] Missing Mandatory Tag: @PRE
[uploadFile] Missing Mandatory Tag: @POST
[uploadFile] Missing Mandatory Tag: @PRE
[uploadFile] Missing Mandatory Tag: @POST
[deleteFile] Missing Mandatory Tag: @PRE
[deleteFile] Missing Mandatory Tag: @POST
[deleteFile] Missing Mandatory Tag: @PRE
[deleteFile] Missing Mandatory Tag: @POST
[downloadFileUrl] Missing Mandatory Tag: @PRE
[downloadFileUrl] Missing Mandatory Tag: @POST
[downloadFileUrl] Missing Mandatory Tag: @PRE
[downloadFileUrl] Missing Mandatory Tag: @POST | +| backend/src/plugins/storage/plugin.py | 🟡 74% | [__init__] Missing Mandatory Tag: @PRE
[__init__] Missing Mandatory Tag: @POST
[__init__] Missing Mandatory Tag: @PRE
[__init__] Missing Mandatory Tag: @POST
[__init__] Missing Mandatory Tag: @PRE
[__init__] Missing Mandatory Tag: @POST
[id] Missing Mandatory Tag: @PRE
[id] Missing Mandatory Tag: @POST
[id] Missing Belief State Logging: Function should use belief_scope context manager.
[id] Missing Mandatory Tag: @PRE
[id] Missing Mandatory Tag: @POST
[id] Missing Belief State Logging: Function should use belief_scope context manager.
[id] Missing Mandatory Tag: @PRE
[id] Missing Mandatory Tag: @POST
[id] Missing Belief State Logging: Function should use belief_scope context manager.
[name] Missing Mandatory Tag: @PRE
[name] Missing Mandatory Tag: @POST
[name] Missing Belief State Logging: Function should use belief_scope context manager.
[name] Missing Mandatory Tag: @PRE
[name] Missing Mandatory Tag: @POST
[name] Missing Belief State Logging: Function should use belief_scope context manager.
[name] Missing Mandatory Tag: @PRE
[name] Missing Mandatory Tag: @POST
[name] Missing Belief State Logging: Function should use belief_scope context manager.
[description] Missing Mandatory Tag: @PRE
[description] Missing Mandatory Tag: @POST
[description] Missing Belief State Logging: Function should use belief_scope context manager.
[description] Missing Mandatory Tag: @PRE
[description] Missing Mandatory Tag: @POST
[description] Missing Belief State Logging: Function should use belief_scope context manager.
[description] Missing Mandatory Tag: @PRE
[description] Missing Mandatory Tag: @POST
[description] Missing Belief State Logging: Function should use belief_scope context manager.
[version] Missing Mandatory Tag: @PRE
[version] Missing Mandatory Tag: @POST
[version] Missing Belief State Logging: Function should use belief_scope context manager.
[version] Missing Mandatory Tag: @PRE
[version] Missing Mandatory Tag: @POST
[version] Missing Belief State Logging: Function should use belief_scope context manager.
[version] Missing Mandatory Tag: @PRE
[version] Missing Mandatory Tag: @POST
[version] Missing Belief State Logging: Function should use belief_scope context manager.
[get_schema] Missing Mandatory Tag: @PRE
[get_schema] Missing Mandatory Tag: @POST
[get_schema] Missing Belief State Logging: Function should use belief_scope context manager.
[get_schema] Missing Mandatory Tag: @PRE
[get_schema] Missing Mandatory Tag: @POST
[get_schema] Missing Belief State Logging: Function should use belief_scope context manager.
[get_schema] Missing Mandatory Tag: @PRE
[get_schema] Missing Mandatory Tag: @POST
[get_schema] Missing Belief State Logging: Function should use belief_scope context manager.
[execute] Missing Mandatory Tag: @PRE
[execute] Missing Mandatory Tag: @POST
[execute] Missing Mandatory Tag: @PRE
[execute] Missing Mandatory Tag: @POST
[execute] Missing Mandatory Tag: @PRE
[execute] Missing Mandatory Tag: @POST
[get_storage_root] Missing Mandatory Tag: @PRE
[get_storage_root] Missing Mandatory Tag: @PRE
[get_storage_root] Missing Mandatory Tag: @PRE
[resolve_path] Missing Mandatory Tag: @PRE
[resolve_path] Missing Mandatory Tag: @POST
[resolve_path] Missing Mandatory Tag: @PRE
[resolve_path] Missing Mandatory Tag: @POST
[resolve_path] Missing Mandatory Tag: @PRE
[resolve_path] Missing Mandatory Tag: @POST
[ensure_directories] Missing Mandatory Tag: @PRE
[ensure_directories] Missing Mandatory Tag: @POST
[ensure_directories] Missing Mandatory Tag: @PRE
[ensure_directories] Missing Mandatory Tag: @POST
[ensure_directories] Missing Mandatory Tag: @PRE
[ensure_directories] Missing Mandatory Tag: @POST
[list_files] Missing Mandatory Tag: @PRE
[list_files] Missing Mandatory Tag: @POST
[list_files] Missing Mandatory Tag: @PRE
[list_files] Missing Mandatory Tag: @POST
[list_files] Missing Mandatory Tag: @PRE
[list_files] Missing Mandatory Tag: @POST
[save_file] Missing Mandatory Tag: @PRE
[save_file] Missing Mandatory Tag: @POST
[save_file] Missing Mandatory Tag: @PRE
[save_file] Missing Mandatory Tag: @POST
[save_file] Missing Mandatory Tag: @PRE
[save_file] Missing Mandatory Tag: @POST
[delete_file] Missing Mandatory Tag: @PRE
[delete_file] Missing Mandatory Tag: @POST
[delete_file] Missing Mandatory Tag: @PRE
[delete_file] Missing Mandatory Tag: @POST
[delete_file] Missing Mandatory Tag: @PRE
[delete_file] Missing Mandatory Tag: @POST
[get_file_path] Missing Mandatory Tag: @PRE
[get_file_path] Missing Mandatory Tag: @POST
[get_file_path] Missing Mandatory Tag: @PRE
[get_file_path] Missing Mandatory Tag: @POST
[get_file_path] Missing Mandatory Tag: @PRE
[get_file_path] Missing Mandatory Tag: @POST | +| frontend/src/routes/tools/storage/+page.svelte | 🟡 83% | [loadFiles] Missing Mandatory Tag: @PRE
[loadFiles] Missing Mandatory Tag: @PRE
[handleDelete] Missing Mandatory Tag: @PRE
[handleDelete] Missing Mandatory Tag: @POST
[handleDelete] Missing Mandatory Tag: @PRE
[handleDelete] Missing Mandatory Tag: @POST | +| frontend/src/components/storage/FileUpload.svelte | 🟡 89% | [handleDrop] Missing Mandatory Tag: @PRE
[handleDrop] Missing Mandatory Tag: @POST
[handleDrop] Missing Mandatory Tag: @PRE
[handleDrop] Missing Mandatory Tag: @POST | +| backend/src/core/logger.py | 🟡 93% | [format] Missing Belief State Logging: Function should use belief_scope context manager.
[format] Missing Belief State Logging: Function should use belief_scope context manager.
[format] Missing Belief State Logging: Function should use belief_scope context manager.
[belief_scope] Missing Belief State Logging: Function should use belief_scope context manager.
[belief_scope] Missing Belief State Logging: Function should use belief_scope context manager.
[configure_logger] Missing Belief State Logging: Function should use belief_scope context manager.
[configure_logger] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[emit] Missing Belief State Logging: Function should use belief_scope context manager.
[emit] Missing Belief State Logging: Function should use belief_scope context manager.
[emit] Missing Belief State Logging: Function should use belief_scope context manager.
[get_recent_logs] Missing Belief State Logging: Function should use belief_scope context manager.
[get_recent_logs] Missing Belief State Logging: Function should use belief_scope context manager.
[get_recent_logs] Missing Belief State Logging: Function should use belief_scope context manager.
[believed] Missing Mandatory Tag: @PRE
[believed] Missing Mandatory Tag: @POST
[believed] Missing Belief State Logging: Function should use belief_scope context manager.
[believed] Missing Mandatory Tag: @PRE
[believed] Missing Mandatory Tag: @POST
[believed] Missing Belief State Logging: Function should use belief_scope context manager.
[believed] Missing Mandatory Tag: @PRE
[believed] Missing Mandatory Tag: @POST
[believed] Missing Belief State Logging: Function should use belief_scope context manager.
[decorator] Missing Mandatory Tag: @PRE
[decorator] Missing Mandatory Tag: @POST
[decorator] Missing Belief State Logging: Function should use belief_scope context manager.
[decorator] Missing Mandatory Tag: @PRE
[decorator] Missing Mandatory Tag: @POST
[decorator] Missing Belief State Logging: Function should use belief_scope context manager.
[decorator] Missing Mandatory Tag: @PRE
[decorator] Missing Mandatory Tag: @POST
[decorator] Missing Belief State Logging: Function should use belief_scope context manager.
[decorator] Missing Mandatory Tag: @PRE
[decorator] Missing Mandatory Tag: @POST
[decorator] Missing Belief State Logging: Function should use belief_scope context manager.
[wrapper] Missing Mandatory Tag: @PRE
[wrapper] Missing Mandatory Tag: @POST
[wrapper] Missing Mandatory Tag: @PRE
[wrapper] Missing Mandatory Tag: @POST
[wrapper] Missing Mandatory Tag: @PRE
[wrapper] Missing Mandatory Tag: @POST
[wrapper] Missing Mandatory Tag: @PRE
[wrapper] Missing Mandatory Tag: @POST
[wrapper] Missing Mandatory Tag: @PRE
[wrapper] Missing Mandatory Tag: @POST | +| frontend/src/components/git/CommitModal.svelte | 🟡 94% | [loadStatus] Missing Mandatory Tag: @POST
[loadStatus] Missing Mandatory Tag: @POST | +| frontend/src/components/DashboardGrid.svelte | 🟡 94% | [openGit] Missing Mandatory Tag: @PRE
[openGit] Missing Mandatory Tag: @POST
[openGit] Missing Mandatory Tag: @PRE
[openGit] Missing Mandatory Tag: @POST | +| backend/src/api/routes/settings.py | 🟡 95% | [get_storage_settings] Missing Mandatory Tag: @PRE
[get_storage_settings] Missing Mandatory Tag: @POST
[get_storage_settings] Missing Mandatory Tag: @PRE
[get_storage_settings] Missing Mandatory Tag: @POST
[update_storage_settings] Missing Mandatory Tag: @PRE
[update_storage_settings] Missing Mandatory Tag: @PRE | +| frontend/src/components/git/DeploymentModal.svelte | 🟡 96% | [loadEnvironments] Missing Mandatory Tag: @PRE
[loadEnvironments] Missing Mandatory Tag: @PRE | +| frontend/src/components/git/BranchSelector.svelte | 🟡 97% | [handleCheckout] Missing Mandatory Tag: @PRE
[handleCheckout] Missing Mandatory Tag: @PRE | +| backend/src/core/utils/dataset_mapper.py | 🟡 97% | [__init__] Missing Mandatory Tag: @PRE
[__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Mandatory Tag: @PRE
[__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Mandatory Tag: @PRE
[__init__] Missing Belief State Logging: Function should use belief_scope context manager. | +| generate_semantic_map.py | 🟢 100% | [__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__enter__] Missing Belief State Logging: Function should use belief_scope context manager.
[__enter__] Missing Belief State Logging: Function should use belief_scope context manager.
[__exit__] Missing Belief State Logging: Function should use belief_scope context manager.
[__exit__] Missing Belief State Logging: Function should use belief_scope context manager. | +| frontend/src/lib/stores.js | 🟢 100% | OK | +| frontend/src/lib/toasts.js | 🟢 100% | OK | +| frontend/src/lib/api.js | 🟢 100% | OK | +| frontend/src/lib/ui/Select.svelte | 🟢 100% | OK | +| frontend/src/lib/ui/index.ts | 🟢 100% | OK | +| frontend/src/lib/ui/PageHeader.svelte | 🟢 100% | OK | +| frontend/src/lib/ui/Card.svelte | 🟢 100% | OK | +| frontend/src/lib/ui/Button.svelte | 🟢 100% | OK | +| frontend/src/lib/ui/Input.svelte | 🟢 100% | OK | +| frontend/src/lib/ui/LanguageSwitcher.svelte | 🟢 100% | OK | +| frontend/src/lib/i18n/index.ts | 🟢 100% | OK | +| frontend/src/routes/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/+page.ts | 🟢 100% | OK | +| frontend/src/routes/tasks/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/migration/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/migration/mappings/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/search/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/mapper/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/debug/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/settings/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/settings/+page.ts | 🟢 100% | OK | +| frontend/src/routes/settings/connections/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/settings/git/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/git/+page.svelte | 🟢 100% | OK | +| frontend/src/pages/Dashboard.svelte | 🟢 100% | OK | +| frontend/src/pages/Settings.svelte | 🟢 100% | OK | +| frontend/src/services/connectionService.js | 🟢 100% | OK | +| frontend/src/services/gitService.js | 🟢 100% | OK | +| frontend/src/services/toolsService.js | 🟢 100% | OK | +| frontend/src/services/taskService.js | 🟢 100% | OK | +| frontend/src/components/PasswordPrompt.svelte | 🟢 100% | OK | +| frontend/src/components/MappingTable.svelte | 🟢 100% | OK | +| frontend/src/components/TaskLogViewer.svelte | 🟢 100% | OK | +| frontend/src/components/Footer.svelte | 🟢 100% | OK | +| frontend/src/components/MissingMappingModal.svelte | 🟢 100% | OK | +| frontend/src/components/Navbar.svelte | 🟢 100% | OK | +| frontend/src/components/TaskHistory.svelte | 🟢 100% | OK | +| frontend/src/components/Toast.svelte | 🟢 100% | OK | +| frontend/src/components/TaskRunner.svelte | 🟢 100% | OK | +| frontend/src/components/TaskList.svelte | 🟢 100% | OK | +| frontend/src/components/DynamicForm.svelte | 🟢 100% | OK | +| frontend/src/components/EnvSelector.svelte | 🟢 100% | OK | +| frontend/src/components/storage/FileList.svelte | 🟢 100% | OK | +| frontend/src/components/tools/ConnectionForm.svelte | 🟢 100% | OK | +| frontend/src/components/tools/ConnectionList.svelte | 🟢 100% | OK | +| frontend/src/components/tools/MapperTool.svelte | 🟢 100% | OK | +| frontend/src/components/tools/DebugTool.svelte | 🟢 100% | OK | +| frontend/src/components/tools/SearchTool.svelte | 🟢 100% | OK | +| frontend/src/components/git/CommitHistory.svelte | 🟢 100% | OK | +| frontend/src/components/git/ConflictResolver.svelte | 🟢 100% | OK | +| frontend/src/components/git/GitManager.svelte | 🟢 100% | OK | +| backend/delete_running_tasks.py | 🟢 100% | [delete_running_tasks] Missing Belief State Logging: Function should use belief_scope context manager.
[delete_running_tasks] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/app.py | 🟢 100% | OK | +| backend/src/dependencies.py | 🟢 100% | OK | +| backend/src/core/superset_client.py | 🟢 100% | OK | +| backend/src/core/config_manager.py | 🟢 100% | OK | +| backend/src/core/scheduler.py | 🟢 100% | OK | +| backend/src/core/config_models.py | 🟢 100% | OK | +| backend/src/core/database.py | 🟢 100% | OK | +| backend/src/core/plugin_loader.py | 🟢 100% | OK | +| backend/src/core/migration_engine.py | 🟢 100% | [_transform_yaml] Missing Belief State Logging: Function should use belief_scope context manager.
[_transform_yaml] Missing Belief State Logging: Function should use belief_scope context manager.
[_transform_yaml] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/core/plugin_base.py | 🟢 100% | OK | +| backend/src/core/utils/fileio.py | 🟢 100% | [replacer] Missing Belief State Logging: Function should use belief_scope context manager.
[replacer] Missing Belief State Logging: Function should use belief_scope context manager.
[replacer] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/core/utils/network.py | 🟢 100% | OK | +| backend/src/core/utils/matching.py | 🟢 100% | [suggest_mappings] Missing Belief State Logging: Function should use belief_scope context manager.
[suggest_mappings] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/core/task_manager/persistence.py | 🟢 100% | OK | +| backend/src/core/task_manager/manager.py | 🟢 100% | OK | +| backend/src/core/task_manager/models.py | 🟢 100% | [__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/core/task_manager/cleanup.py | 🟢 100% | [__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/core/task_manager/__init__.py | 🟢 100% | OK | +| backend/src/api/auth.py | 🟢 100% | [get_current_user] Missing Belief State Logging: Function should use belief_scope context manager.
[get_current_user] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/api/routes/git.py | 🟢 100% | OK | +| backend/src/api/routes/connections.py | 🟢 100% | OK | +| backend/src/api/routes/environments.py | 🟢 100% | OK | +| backend/src/api/routes/migration.py | 🟢 100% | OK | +| backend/src/api/routes/plugins.py | 🟢 100% | OK | +| backend/src/api/routes/mappings.py | 🟢 100% | OK | +| backend/src/api/routes/git_schemas.py | 🟢 100% | OK | +| backend/src/api/routes/storage.py | 🟢 100% | OK | +| backend/src/api/routes/tasks.py | 🟢 100% | OK | +| backend/src/models/git.py | 🟢 100% | OK | +| backend/src/models/task.py | 🟢 100% | OK | +| backend/src/models/connection.py | 🟢 100% | OK | +| backend/src/models/mapping.py | 🟢 100% | OK | +| backend/src/models/dashboard.py | 🟢 100% | OK | +| backend/src/services/git_service.py | 🟢 100% | OK | +| backend/src/services/mapping_service.py | 🟢 100% | OK | +| backend/src/plugins/backup.py | 🟢 100% | OK | +| backend/src/plugins/debug.py | 🟢 100% | OK | +| backend/src/plugins/search.py | 🟢 100% | OK | +| backend/src/plugins/mapper.py | 🟢 100% | OK | +| backend/src/plugins/git_plugin.py | 🟢 100% | OK | +| backend/src/plugins/migration.py | 🟢 100% | OK | +| backend/tests/test_models.py | 🟢 100% | OK | +| backend/tests/test_logger.py | 🟢 100% | OK | diff --git a/semantics/reports/semantic_report_20260126_114128.md b/semantics/reports/semantic_report_20260126_114128.md new file mode 100644 index 0000000..8fc399d --- /dev/null +++ b/semantics/reports/semantic_report_20260126_114128.md @@ -0,0 +1,117 @@ +# Semantic Compliance Report + +**Generated At:** 2026-01-26T11:41:28.355350 +**Global Compliance Score:** 99.2% +**Scanned Files:** 108 + +## File Compliance Status +| File | Score | Issues | +|------|-------|--------| +| frontend/src/components/storage/FileList.svelte | 🟡 75% | [isDirectory] Missing Mandatory Tag: @PRE
[isDirectory] Missing Mandatory Tag: @POST
[isDirectory] Missing Mandatory Tag: @PRE
[isDirectory] Missing Mandatory Tag: @POST
[formatSize] Missing Mandatory Tag: @PRE
[formatSize] Missing Mandatory Tag: @POST
[formatSize] Missing Mandatory Tag: @PRE
[formatSize] Missing Mandatory Tag: @POST
[formatDate] Missing Mandatory Tag: @PRE
[formatDate] Missing Mandatory Tag: @POST
[formatDate] Missing Mandatory Tag: @PRE
[formatDate] Missing Mandatory Tag: @POST | +| frontend/src/routes/tools/storage/+page.svelte | 🟡 77% | [loadFiles] Missing Mandatory Tag: @PRE
[loadFiles] Missing Mandatory Tag: @PRE
[handleDelete] Missing Mandatory Tag: @PRE
[handleDelete] Missing Mandatory Tag: @POST
[handleDelete] Missing Mandatory Tag: @PRE
[handleDelete] Missing Mandatory Tag: @POST
[handleNavigate] Missing Mandatory Tag: @PRE
[handleNavigate] Missing Mandatory Tag: @POST
[handleNavigate] Missing Mandatory Tag: @PRE
[handleNavigate] Missing Mandatory Tag: @POST
[navigateUp] Missing Mandatory Tag: @PRE
[navigateUp] Missing Mandatory Tag: @POST
[navigateUp] Missing Mandatory Tag: @PRE
[navigateUp] Missing Mandatory Tag: @POST | +| frontend/src/components/storage/FileUpload.svelte | 🟡 89% | [handleDrop] Missing Mandatory Tag: @PRE
[handleDrop] Missing Mandatory Tag: @POST
[handleDrop] Missing Mandatory Tag: @PRE
[handleDrop] Missing Mandatory Tag: @POST | +| frontend/src/components/git/CommitModal.svelte | 🟡 94% | [loadStatus] Missing Mandatory Tag: @POST
[loadStatus] Missing Mandatory Tag: @POST | +| frontend/src/components/DashboardGrid.svelte | 🟡 94% | [openGit] Missing Mandatory Tag: @PRE
[openGit] Missing Mandatory Tag: @POST
[openGit] Missing Mandatory Tag: @PRE
[openGit] Missing Mandatory Tag: @POST | +| backend/src/api/routes/settings.py | 🟡 95% | [get_storage_settings] Missing Mandatory Tag: @PRE
[get_storage_settings] Missing Mandatory Tag: @POST
[get_storage_settings] Missing Mandatory Tag: @PRE
[get_storage_settings] Missing Mandatory Tag: @POST
[update_storage_settings] Missing Mandatory Tag: @PRE
[update_storage_settings] Missing Mandatory Tag: @PRE | +| frontend/src/components/git/DeploymentModal.svelte | 🟡 96% | [loadEnvironments] Missing Mandatory Tag: @PRE
[loadEnvironments] Missing Mandatory Tag: @PRE | +| frontend/src/components/git/BranchSelector.svelte | 🟡 97% | [handleCheckout] Missing Mandatory Tag: @PRE
[handleCheckout] Missing Mandatory Tag: @PRE | +| backend/src/core/utils/dataset_mapper.py | 🟡 97% | [__init__] Missing Mandatory Tag: @PRE
[__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Mandatory Tag: @PRE
[__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Mandatory Tag: @PRE
[__init__] Missing Belief State Logging: Function should use belief_scope context manager. | +| generate_semantic_map.py | 🟢 100% | [__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__enter__] Missing Belief State Logging: Function should use belief_scope context manager.
[__enter__] Missing Belief State Logging: Function should use belief_scope context manager.
[__exit__] Missing Belief State Logging: Function should use belief_scope context manager.
[__exit__] Missing Belief State Logging: Function should use belief_scope context manager. | +| frontend/src/lib/stores.js | 🟢 100% | OK | +| frontend/src/lib/toasts.js | 🟢 100% | OK | +| frontend/src/lib/api.js | 🟢 100% | OK | +| frontend/src/lib/ui/Select.svelte | 🟢 100% | OK | +| frontend/src/lib/ui/index.ts | 🟢 100% | OK | +| frontend/src/lib/ui/PageHeader.svelte | 🟢 100% | OK | +| frontend/src/lib/ui/Card.svelte | 🟢 100% | OK | +| frontend/src/lib/ui/Button.svelte | 🟢 100% | OK | +| frontend/src/lib/ui/Input.svelte | 🟢 100% | OK | +| frontend/src/lib/ui/LanguageSwitcher.svelte | 🟢 100% | OK | +| frontend/src/lib/i18n/index.ts | 🟢 100% | OK | +| frontend/src/routes/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/+page.ts | 🟢 100% | OK | +| frontend/src/routes/tasks/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/migration/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/migration/mappings/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/search/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/mapper/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/tools/debug/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/settings/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/settings/+page.ts | 🟢 100% | OK | +| frontend/src/routes/settings/connections/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/settings/git/+page.svelte | 🟢 100% | OK | +| frontend/src/routes/git/+page.svelte | 🟢 100% | OK | +| frontend/src/pages/Dashboard.svelte | 🟢 100% | OK | +| frontend/src/pages/Settings.svelte | 🟢 100% | OK | +| frontend/src/services/connectionService.js | 🟢 100% | OK | +| frontend/src/services/gitService.js | 🟢 100% | OK | +| frontend/src/services/toolsService.js | 🟢 100% | OK | +| frontend/src/services/taskService.js | 🟢 100% | OK | +| frontend/src/services/storageService.js | 🟢 100% | OK | +| frontend/src/components/PasswordPrompt.svelte | 🟢 100% | OK | +| frontend/src/components/MappingTable.svelte | 🟢 100% | OK | +| frontend/src/components/TaskLogViewer.svelte | 🟢 100% | OK | +| frontend/src/components/Footer.svelte | 🟢 100% | OK | +| frontend/src/components/MissingMappingModal.svelte | 🟢 100% | OK | +| frontend/src/components/Navbar.svelte | 🟢 100% | OK | +| frontend/src/components/TaskHistory.svelte | 🟢 100% | OK | +| frontend/src/components/Toast.svelte | 🟢 100% | OK | +| frontend/src/components/TaskRunner.svelte | 🟢 100% | OK | +| frontend/src/components/TaskList.svelte | 🟢 100% | OK | +| frontend/src/components/DynamicForm.svelte | 🟢 100% | OK | +| frontend/src/components/EnvSelector.svelte | 🟢 100% | OK | +| frontend/src/components/tools/ConnectionForm.svelte | 🟢 100% | OK | +| frontend/src/components/tools/ConnectionList.svelte | 🟢 100% | OK | +| frontend/src/components/tools/MapperTool.svelte | 🟢 100% | OK | +| frontend/src/components/tools/DebugTool.svelte | 🟢 100% | OK | +| frontend/src/components/tools/SearchTool.svelte | 🟢 100% | OK | +| frontend/src/components/git/CommitHistory.svelte | 🟢 100% | OK | +| frontend/src/components/git/ConflictResolver.svelte | 🟢 100% | OK | +| frontend/src/components/git/GitManager.svelte | 🟢 100% | OK | +| backend/delete_running_tasks.py | 🟢 100% | [delete_running_tasks] Missing Belief State Logging: Function should use belief_scope context manager.
[delete_running_tasks] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/app.py | 🟢 100% | OK | +| backend/src/dependencies.py | 🟢 100% | OK | +| backend/src/core/superset_client.py | 🟢 100% | OK | +| backend/src/core/config_manager.py | 🟢 100% | OK | +| backend/src/core/scheduler.py | 🟢 100% | OK | +| backend/src/core/config_models.py | 🟢 100% | OK | +| backend/src/core/database.py | 🟢 100% | OK | +| backend/src/core/logger.py | 🟢 100% | OK | +| backend/src/core/plugin_loader.py | 🟢 100% | OK | +| backend/src/core/migration_engine.py | 🟢 100% | [_transform_yaml] Missing Belief State Logging: Function should use belief_scope context manager.
[_transform_yaml] Missing Belief State Logging: Function should use belief_scope context manager.
[_transform_yaml] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/core/plugin_base.py | 🟢 100% | OK | +| backend/src/core/utils/fileio.py | 🟢 100% | [replacer] Missing Belief State Logging: Function should use belief_scope context manager.
[replacer] Missing Belief State Logging: Function should use belief_scope context manager.
[replacer] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/core/utils/network.py | 🟢 100% | OK | +| backend/src/core/utils/matching.py | 🟢 100% | [suggest_mappings] Missing Belief State Logging: Function should use belief_scope context manager.
[suggest_mappings] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/core/task_manager/persistence.py | 🟢 100% | OK | +| backend/src/core/task_manager/manager.py | 🟢 100% | OK | +| backend/src/core/task_manager/models.py | 🟢 100% | [__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/core/task_manager/cleanup.py | 🟢 100% | [__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Belief State Logging: Function should use belief_scope context manager.
[__init__] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/core/task_manager/__init__.py | 🟢 100% | OK | +| backend/src/api/auth.py | 🟢 100% | [get_current_user] Missing Belief State Logging: Function should use belief_scope context manager.
[get_current_user] Missing Belief State Logging: Function should use belief_scope context manager. | +| backend/src/api/routes/git.py | 🟢 100% | OK | +| backend/src/api/routes/connections.py | 🟢 100% | OK | +| backend/src/api/routes/environments.py | 🟢 100% | OK | +| backend/src/api/routes/migration.py | 🟢 100% | OK | +| backend/src/api/routes/plugins.py | 🟢 100% | OK | +| backend/src/api/routes/mappings.py | 🟢 100% | OK | +| backend/src/api/routes/git_schemas.py | 🟢 100% | OK | +| backend/src/api/routes/storage.py | 🟢 100% | OK | +| backend/src/api/routes/tasks.py | 🟢 100% | OK | +| backend/src/models/git.py | 🟢 100% | OK | +| backend/src/models/task.py | 🟢 100% | OK | +| backend/src/models/connection.py | 🟢 100% | OK | +| backend/src/models/mapping.py | 🟢 100% | OK | +| backend/src/models/storage.py | 🟢 100% | OK | +| backend/src/models/dashboard.py | 🟢 100% | OK | +| backend/src/services/git_service.py | 🟢 100% | OK | +| backend/src/services/mapping_service.py | 🟢 100% | OK | +| backend/src/plugins/backup.py | 🟢 100% | OK | +| backend/src/plugins/debug.py | 🟢 100% | OK | +| backend/src/plugins/search.py | 🟢 100% | OK | +| backend/src/plugins/mapper.py | 🟢 100% | OK | +| backend/src/plugins/git_plugin.py | 🟢 100% | OK | +| backend/src/plugins/migration.py | 🟢 100% | OK | +| backend/src/plugins/storage/plugin.py | 🟢 100% | OK | +| backend/tests/test_models.py | 🟢 100% | OK | +| backend/tests/test_logger.py | 🟢 100% | OK | diff --git a/semantics/semantic_map.json b/semantics/semantic_map.json index eb3f209..d00fae9 100644 --- a/semantics/semantic_map.json +++ b/semantics/semantic_map.json @@ -1,12 +1,12 @@ { "project_root": ".", - "generated_at": "2026-01-23T21:57:37.591426", + "generated_at": "2026-01-26T11:41:28.347227", "modules": [ { "name": "generate_semantic_map", "type": "Module", "start_line": 1, - "end_line": 613, + "end_line": 614, "tags": { "SEMANTICS": "semantic_analysis, parser, map_generator, compliance_checker", "PURPOSE": "Scans the codebase to generate a Semantic Map and Compliance Report based on the System Standard.", @@ -95,7 +95,7 @@ "name": "SemanticEntity", "type": "Class", "start_line": 67, - "end_line": 167, + "end_line": 168, "tags": { "PURPOSE": "Represents a code entity (Module, Function, Component) found during parsing.", "INVARIANT": "start_line is always set; end_line is set upon closure." @@ -141,7 +141,7 @@ "name": "validate", "type": "Function", "start_line": 111, - "end_line": 140, + "end_line": 141, "tags": { "PURPOSE": "Checks for semantic compliance (closure, mandatory tags, belief state).", "PRE": "Entity structure is complete.", @@ -157,8 +157,8 @@ { "name": "get_score", "type": "Function", - "start_line": 142, - "end_line": 166, + "start_line": 143, + "end_line": 167, "tags": { "PURPOSE": "Calculates a compliance score (0.0 to 1.0).", "PRE": "validate() has been called.", @@ -181,8 +181,8 @@ { "name": "get_patterns", "type": "Function", - "start_line": 170, - "end_line": 198, + "start_line": 171, + "end_line": 199, "tags": { "PURPOSE": "Returns regex patterns for a specific language.", "PRE": "lang is either 'python' or 'svelte_js'.", @@ -200,8 +200,8 @@ { "name": "parse_file", "type": "Function", - "start_line": 201, - "end_line": 324, + "start_line": 202, + "end_line": 325, "tags": { "PURPOSE": "Parses a single file to extract semantic entities.", "PRE": "full_path, rel_path, lang are valid strings.", @@ -219,8 +219,8 @@ { "name": "SemanticMapGenerator", "type": "Class", - "start_line": 327, - "end_line": 607, + "start_line": 328, + "end_line": 608, "tags": { "PURPOSE": "Orchestrates the mapping process." }, @@ -229,8 +229,8 @@ { "name": "__init__", "type": "Function", - "start_line": 330, - "end_line": 341, + "start_line": 331, + "end_line": 342, "tags": { "PURPOSE": "Initializes the generator with a root directory.", "PRE": "root_dir is a valid path string.", @@ -246,8 +246,8 @@ { "name": "_load_gitignore", "type": "Function", - "start_line": 343, - "end_line": 359, + "start_line": 344, + "end_line": 360, "tags": { "PURPOSE": "Loads patterns from .gitignore file.", "PRE": ".gitignore exists in root_dir.", @@ -264,8 +264,8 @@ { "name": "_is_ignored", "type": "Function", - "start_line": 361, - "end_line": 402, + "start_line": 362, + "end_line": 403, "tags": { "PURPOSE": "Checks if a path should be ignored based on .gitignore or hardcoded defaults.", "PRE": "rel_path is a valid relative path string.", @@ -283,8 +283,8 @@ { "name": "run", "type": "Function", - "start_line": 404, - "end_line": 416, + "start_line": 405, + "end_line": 417, "tags": { "PURPOSE": "Main execution flow.", "PRE": "Generator is initialized.", @@ -309,8 +309,8 @@ { "name": "_walk_and_parse", "type": "Function", - "start_line": 418, - "end_line": 447, + "start_line": 419, + "end_line": 448, "tags": { "PURPOSE": "Recursively walks directories and triggers parsing.", "PRE": "root_dir exists.", @@ -326,8 +326,8 @@ { "name": "_process_file_results", "type": "Function", - "start_line": 449, - "end_line": 476, + "start_line": 450, + "end_line": 477, "tags": { "PURPOSE": "Validates entities and calculates file scores.", "PRE": "Entities have been parsed from the file.", @@ -338,8 +338,8 @@ { "name": "validate_recursive", "type": "Function", - "start_line": 458, - "end_line": 470, + "start_line": 459, + "end_line": 471, "tags": { "PURPOSE": "Recursively validates a list of entities.", "PRE": "ent_list is a list of SemanticEntity objects.", @@ -361,8 +361,8 @@ { "name": "_generate_artifacts", "type": "Function", - "start_line": 478, - "end_line": 501, + "start_line": 479, + "end_line": 502, "tags": { "PURPOSE": "Writes output files.", "PRE": "Parsing and validation are complete.", @@ -378,8 +378,8 @@ { "name": "_generate_report", "type": "Function", - "start_line": 503, - "end_line": 543, + "start_line": 504, + "end_line": 544, "tags": { "PURPOSE": "Generates the Markdown compliance report.", "PRE": "File scores and issues are available.", @@ -395,8 +395,8 @@ { "name": "_collect_issues", "type": "Function", - "start_line": 545, - "end_line": 555, + "start_line": 546, + "end_line": 556, "tags": { "PURPOSE": "Helper to collect issues for a specific file from the entity tree.", "PRE": "entities list and file_path are valid.", @@ -412,8 +412,8 @@ { "name": "_generate_compressed_map", "type": "Function", - "start_line": 557, - "end_line": 573, + "start_line": 558, + "end_line": 574, "tags": { "PURPOSE": "Generates the token-optimized project map.", "PRE": "Entities have been processed.", @@ -429,8 +429,8 @@ { "name": "_write_entity_md", "type": "Function", - "start_line": 575, - "end_line": 605, + "start_line": 576, + "end_line": 606, "tags": { "PURPOSE": "Recursive helper to write entity tree to Markdown.", "PRE": "f is an open file handle, entity is valid.", @@ -455,2083 +455,6 @@ "issues": [] } }, - { - "name": "DashboardGrid", - "type": "Component", - "start_line": 1, - "end_line": 258, - "tags": { - "SEMANTICS": "dashboard, grid, selection, pagination", - "PURPOSE": "Displays a grid of dashboards with selection and pagination.", - "LAYER": "Component", - "RELATION": "USED_BY -> frontend/src/routes/migration/+page.svelte", - "INVARIANT": "Selected IDs must be a subset of available dashboards." - }, - "relations": [], - "children": [ - { - "name": "handleSort", - "type": "Function", - "start_line": 71, - "end_line": 83, - "tags": { - "PURPOSE": "Toggles sort direction or changes sort column.", - "PRE": "column name is provided.", - "POST": "sortColumn and sortDirection state updated." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleSelectionChange", - "type": "Function", - "start_line": 85, - "end_line": 99, - "tags": { - "PURPOSE": "Handles individual checkbox changes.", - "PRE": "dashboard ID and checked status provided.", - "POST": "selectedIds array updated and selectionChanged event dispatched." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleSelectAll", - "type": "Function", - "start_line": 101, - "end_line": 119, - "tags": { - "PURPOSE": "Handles select all checkbox.", - "PRE": "checked status provided.", - "POST": "selectedIds array updated for all paginated items and event dispatched." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "goToPage", - "type": "Function", - "start_line": 121, - "end_line": 130, - "tags": { - "PURPOSE": "Changes current page.", - "PRE": "page index is provided.", - "POST": "currentPage state updated if within valid range." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "openGit", - "type": "Function", - "start_line": 132, - "end_line": 141, - "tags": { - "PURPOSE": "Opens the Git management modal for a dashboard." - }, - "relations": [], - "children": [], - "compliance": { - "valid": false, - "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST" - ] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TaskHistory", - "type": "Component", - "start_line": 1, - "end_line": 209, - "tags": { - "SEMANTICS": "task, history, list, status, monitoring", - "PURPOSE": "Displays a list of recent tasks with their status and allows selecting them for viewing logs.", - "LAYER": "UI", - "RELATION": "USES -> frontend/src/lib/api.js (inferred)" - }, - "relations": [], - "children": [ - { - "name": "fetchTasks", - "type": "Function", - "start_line": 18, - "end_line": 48, - "tags": { - "PURPOSE": "Fetches the list of recent tasks from the API.", - "PRE": "None.", - "POST": "tasks array is updated and selectedTask status synchronized." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "clearTasks", - "type": "Function", - "start_line": 50, - "end_line": 69, - "tags": { - "PURPOSE": "Clears tasks from the history, optionally filtered by status.", - "PRE": "User confirms deletion via prompt.", - "POST": "Tasks are deleted from backend and list is re-fetched." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "selectTask", - "type": "Function", - "start_line": 71, - "end_line": 91, - "tags": { - "PURPOSE": "Selects a task and fetches its full details.", - "PRE": "task object is provided.", - "POST": "selectedTask store is updated with full task details." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "getStatusColor", - "type": "Function", - "start_line": 93, - "end_line": 107, - "tags": { - "PURPOSE": "Returns the CSS color class for a given task status.", - "PRE": "status string is provided.", - "POST": "Returns tailwind color class string." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "onMount", - "type": "Function", - "start_line": 109, - "end_line": 117, - "tags": { - "PURPOSE": "Initializes the component by fetching tasks and starting polling.", - "PRE": "Component is mounting.", - "POST": "Tasks are fetched and 5s polling interval is started." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "onDestroy", - "type": "Function", - "start_line": 119, - "end_line": 126, - "tags": { - "PURPOSE": "Cleans up the polling interval when the component is destroyed.", - "PRE": "Component is being destroyed.", - "POST": "Polling interval is cleared." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "MappingTable", - "type": "Component", - "start_line": 1, - "end_line": 98, - "tags": { - "SEMANTICS": "mapping, table, database, editor", - "PURPOSE": "Displays and allows editing of database mappings.", - "LAYER": "Feature", - "RELATION": "BINDS_TO -> mappings state", - "INVARIANT": "Each source database can be mapped to one target database." - }, - "relations": [], - "children": [ - { - "name": "updateMapping", - "type": "Function", - "start_line": 25, - "end_line": 34, - "tags": { - "PURPOSE": "Updates a mapping for a specific source database.", - "PRE": "sourceUuid and targetUuid are provided.", - "POST": "'update' event is dispatched." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "getSuggestion", - "type": "Function", - "start_line": 36, - "end_line": 45, - "tags": { - "PURPOSE": "Finds a suggestion for a source database.", - "PRE": "sourceUuid is provided.", - "POST": "Returns matching suggestion object or undefined." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "EnvSelector", - "type": "Component", - "start_line": 1, - "end_line": 60, - "tags": { - "SEMANTICS": "environment, selector, dropdown, migration", - "PURPOSE": "Provides a UI component for selecting source and target environments.", - "LAYER": "Feature", - "RELATION": "BINDS_TO -> environments store", - "INVARIANT": "Source and target environments must be selectable from the list of configured environments." - }, - "relations": [], - "children": [ - { - "name": "handleSelect", - "type": "Function", - "start_line": 24, - "end_line": 36, - "tags": { - "PURPOSE": "Dispatches the selection change event.", - "PRE": "event.target must be an HTMLSelectElement.", - "POST": "selectedId is updated and 'change' event is dispatched.", - "PARAM": "{Event} event - The change event from the select element." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TaskList", - "type": "Component", - "start_line": 1, - "end_line": 110, - "tags": { - "SEMANTICS": "tasks, list, status, history", - "PURPOSE": "Displays a list of tasks with their status and execution details.", - "LAYER": "Component", - "RELATION": "USES -> api.js" - }, - "relations": [], - "children": [ - { - "name": "getStatusColor", - "type": "Function", - "start_line": 19, - "end_line": 34, - "tags": { - "PURPOSE": "Returns the CSS color class for a given task status.", - "PRE": "status string is provided.", - "POST": "Returns tailwind color class string." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "formatTime", - "type": "Function", - "start_line": 36, - "end_line": 48, - "tags": { - "PURPOSE": "Formats a date string using date-fns.", - "PRE": "dateStr is a valid date string or null.", - "POST": "Returns human-readable relative time string." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleTaskClick", - "type": "Function", - "start_line": 50, - "end_line": 57, - "tags": { - "PURPOSE": "Dispatches a select event when a task is clicked.", - "PRE": "taskId is provided.", - "POST": "'select' event is dispatched with task ID." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DynamicForm", - "type": "Component", - "start_line": 1, - "end_line": 92, - "tags": { - "SEMANTICS": "form, schema, dynamic, json-schema", - "PURPOSE": "Generates a form dynamically based on a JSON schema.", - "LAYER": "UI", - "RELATION": "DEPENDS_ON -> svelte:createEventDispatcher", - "PROPS": "", - "EVENTS": "" - }, - "relations": [], - "children": [ - { - "name": "handleSubmit", - "type": "Function", - "start_line": 23, - "end_line": 33, - "tags": { - "PURPOSE": "Dispatches the submit event with the form data.", - "PRE": "formData contains user input.", - "POST": "'submit' event is dispatched with formData." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "initializeForm", - "type": "Function", - "start_line": 35, - "end_line": 48, - "tags": { - "PURPOSE": "Initialize form data with default values from the schema.", - "PRE": "schema is provided and contains properties.", - "POST": "formData is initialized with default values or empty strings." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Footer", - "type": "Component", - "start_line": 1, - "end_line": 10, - "tags": { - "SEMANTICS": "footer, layout, copyright", - "PURPOSE": "Displays the application footer with copyright information.", - "LAYER": "UI" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Navbar", - "type": "Component", - "start_line": 1, - "end_line": 70, - "tags": { - "SEMANTICS": "navbar, navigation, header, layout", - "PURPOSE": "Main navigation bar for the application.", - "LAYER": "UI", - "RELATION": "USES -> $app/stores" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TaskRunner", - "type": "Component", - "start_line": 1, - "end_line": 395, - "tags": { - "SEMANTICS": "task, runner, logs, websocket", - "PURPOSE": "Connects to a WebSocket to display real-time logs for a running task.", - "LAYER": "UI", - "RELATION": "DEPENDS_ON -> frontend/src/lib/stores.js", - "PROPS": "None", - "EVENTS": "None" - }, - "relations": [], - "children": [ - { - "name": "connect", - "type": "Function", - "start_line": 38, - "end_line": 132, - "tags": { - "PURPOSE": "Establishes WebSocket connection with exponential backoff.", - "PRE": "selectedTask must be set in the store.", - "POST": "WebSocket instance created and listeners attached." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "fetchTargetDatabases", - "type": "Function", - "start_line": 134, - "end_line": 156, - "tags": { - "PURPOSE": "Fetches the list of databases in the target environment.", - "PRE": "task must be selected and have a target environment parameter.", - "POST": "targetDatabases array is populated with database objects." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleMappingResolve", - "type": "Function", - "start_line": 158, - "end_line": 201, - "tags": { - "PURPOSE": "Handles the resolution of a missing database mapping.", - "PRE": "event.detail contains sourceDbUuid, targetDbUuid, and targetDbName.", - "POST": "Mapping is saved and task is resumed." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handlePasswordResume", - "type": "Function", - "start_line": 203, - "end_line": 225, - "tags": { - "PURPOSE": "Handles the submission of database passwords to resume a task.", - "PRE": "event.detail contains passwords dictionary.", - "POST": "Task resume endpoint is called with passwords." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "startDataTimeout", - "type": "Function", - "start_line": 227, - "end_line": 239, - "tags": { - "PURPOSE": "Starts a timeout to detect when the log stream has stalled.", - "PRE": "None.", - "POST": "dataTimeout is set to check connection status after 5s." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "resetDataTimeout", - "type": "Function", - "start_line": 241, - "end_line": 250, - "tags": { - "PURPOSE": "Resets the data stall timeout.", - "PRE": "dataTimeout must be active.", - "POST": "dataTimeout is cleared and restarted." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "onMount", - "type": "Function", - "start_line": 252, - "end_line": 279, - "tags": { - "PURPOSE": "Initializes the component and subscribes to task selection changes.", - "PRE": "Svelte component is mounting.", - "POST": "Store subscription is created and returned for cleanup." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "onDestroy", - "type": "Function", - "start_line": 281, - "end_line": 295, - "tags": { - "PURPOSE": "Close WebSocket connection when the component is destroyed.", - "PRE": "Component is being destroyed.", - "POST": "WebSocket is closed and timeouts are cleared." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TaskLogViewer", - "type": "Component", - "start_line": 1, - "end_line": 244, - "tags": { - "SEMANTICS": "task, log, viewer, modal, inline", - "PURPOSE": "Displays detailed logs for a specific task in a modal or inline.", - "LAYER": "UI", - "RELATION": "USES -> frontend/src/services/taskService.js" - }, - "relations": [], - "children": [ - { - "name": "fetchLogs", - "type": "Function", - "start_line": 30, - "end_line": 53, - "tags": { - "PURPOSE": "Fetches logs for the current task.", - "PRE": "taskId must be set.", - "POST": "logs array is updated with data from taskService." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "scrollToBottom", - "type": "Function", - "start_line": 55, - "end_line": 68, - "tags": { - "PURPOSE": "Scrolls the log container to the bottom.", - "PRE": "logContainer element must be bound.", - "POST": "logContainer scrollTop is set to scrollHeight." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleScroll", - "type": "Function", - "start_line": 70, - "end_line": 83, - "tags": { - "PURPOSE": "Updates auto-scroll preference based on scroll position.", - "PRE": "logContainer scroll event fired.", - "POST": "autoScroll boolean is updated." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "close", - "type": "Function", - "start_line": 85, - "end_line": 95, - "tags": { - "PURPOSE": "Closes the log viewer modal.", - "PRE": "Modal is open.", - "POST": "Modal is closed and close event is dispatched." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "getLogLevelColor", - "type": "Function", - "start_line": 97, - "end_line": 112, - "tags": { - "PURPOSE": "Returns the CSS color class for a given log level.", - "PRE": "level string is provided.", - "POST": "Returns tailwind color class string." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "onDestroy", - "type": "Function", - "start_line": 131, - "end_line": 140, - "tags": { - "PURPOSE": "Cleans up the polling interval.", - "PRE": "Component is being destroyed.", - "POST": "Polling interval is cleared." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "PasswordPrompt", - "type": "Component", - "start_line": 1, - "end_line": 133, - "tags": { - "SEMANTICS": "password, prompt, modal, input, security", - "PURPOSE": "A modal component to prompt the user for database passwords when a migration task is paused.", - "LAYER": "UI", - "RELATION": "EMITS -> resume, cancel" - }, - "relations": [], - "children": [ - { - "name": "handleSubmit", - "type": "Function", - "start_line": 21, - "end_line": 39, - "tags": { - "PURPOSE": "Validates and dispatches the passwords to resume the task.", - "PRE": "All database passwords must be entered.", - "POST": "'resume' event is dispatched with passwords." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleCancel", - "type": "Function", - "start_line": 41, - "end_line": 49, - "tags": { - "PURPOSE": "Cancels the password prompt.", - "PRE": "Modal is open.", - "POST": "'cancel' event is dispatched and show is set to false." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "MissingMappingModal", - "type": "Component", - "start_line": 1, - "end_line": 118, - "tags": { - "SEMANTICS": "modal, mapping, prompt, migration", - "PURPOSE": "Prompts the user to provide a database mapping when one is missing during migration.", - "LAYER": "Feature", - "RELATION": "DISPATCHES -> resolve", - "INVARIANT": "Modal blocks migration progress until resolved or cancelled." - }, - "relations": [], - "children": [ - { - "name": "resolve", - "type": "Function", - "start_line": 26, - "end_line": 39, - "tags": { - "PURPOSE": "Dispatches the resolution event with the selected mapping.", - "PRE": "selectedTargetUuid must be set.", - "POST": "'resolve' event is dispatched and modal is hidden." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "cancel", - "type": "Function", - "start_line": 41, - "end_line": 49, - "tags": { - "PURPOSE": "Cancels the mapping resolution modal.", - "PRE": "Modal is open.", - "POST": "'cancel' event is dispatched and modal is hidden." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Toast", - "type": "Component", - "start_line": 1, - "end_line": 31, - "tags": { - "SEMANTICS": "toast, notification, feedback, ui", - "PURPOSE": "Displays transient notifications (toasts) in the bottom-right corner.", - "LAYER": "UI", - "RELATION": "DEPENDS_ON -> frontend/src/lib/toasts.js", - "PROPS": "None", - "EVENTS": "None" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "GitManager", - "type": "Component", - "start_line": 1, - "end_line": 300, - "tags": { - "SEMANTICS": "git, manager, dashboard, version_control, initialization", - "PURPOSE": "\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Git-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430.", - "LAYER": "Component", - "RELATION": "CALLS -> gitService" - }, - "relations": [], - "children": [ - { - "name": "checkStatus", - "type": "Function", - "start_line": 51, - "end_line": 72, - "tags": { - "PURPOSE": "\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430.", - "PRE": "Component is mounted and has dashboardId.", - "POST": "initialized state is set; configs loaded if not initialized." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleInit", - "type": "Function", - "start_line": 74, - "end_line": 96, - "tags": { - "PURPOSE": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0434\u043b\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430.", - "PRE": "selectedConfigId and remoteUrl are provided.", - "POST": "Repository is created on backend; initialized set to true." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleSync", - "type": "Function", - "start_line": 98, - "end_line": 117, - "tags": { - "PURPOSE": "\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 Superset \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c Git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c.", - "PRE": "Repository is initialized.", - "POST": "Dashboard YAMLs are exported to Git and staged." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handlePush", - "type": "Function", - "start_line": 119, - "end_line": 136, - "tags": { - "PURPOSE": "Pushes local commits to the remote repository.", - "PRE": "Repository is initialized and has commits.", - "POST": "Changes are pushed to origin." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handlePull", - "type": "Function", - "start_line": 138, - "end_line": 155, - "tags": { - "PURPOSE": "Pulls changes from the remote repository.", - "PRE": "Repository is initialized.", - "POST": "Local branch is updated with remote changes." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "BranchSelector", - "type": "Component", - "start_line": 1, - "end_line": 178, - "tags": { - "SEMANTICS": "git, branch, selection, checkout", - "PURPOSE": "UI \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0435\u0442\u043e\u043a Git.", - "LAYER": "Component", - "RELATION": "DISPATCHES -> change" - }, - "relations": [], - "children": [ - { - "name": "onMount", - "type": "Function", - "start_line": 35, - "end_line": 44, - "tags": { - "PURPOSE": "Load branches when component is mounted.", - "PRE": "Component is initialized.", - "POST": "loadBranches is called." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "loadBranches", - "type": "Function", - "start_line": 46, - "end_line": 65, - "tags": { - "PURPOSE": "\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430.", - "PRE": "dashboardId is provided.", - "POST": "branches \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleSelect", - "type": "Function", - "start_line": 67, - "end_line": 76, - "tags": { - "PURPOSE": "Handles branch selection from dropdown.", - "PRE": "event contains branch name.", - "POST": "handleCheckout is called with selected branch." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleCheckout", - "type": "Function", - "start_line": 78, - "end_line": 97, - "tags": { - "PURPOSE": "\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0432\u0435\u0442\u043a\u0443.", - "PARAM": "{string} branchName - \u0418\u043c\u044f \u0432\u0435\u0442\u043a\u0438.", - "POST": "currentBranch \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d, \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e." - }, - "relations": [], - "children": [], - "compliance": { - "valid": false, - "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @PRE" - ] - } - }, - { - "name": "handleCreate", - "type": "Function", - "start_line": 99, - "end_line": 120, - "tags": { - "PURPOSE": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0442\u043a\u0443.", - "PRE": "newBranchName is not empty.", - "POST": "\u041d\u043e\u0432\u0430\u044f \u0432\u0435\u0442\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430; showCreate reset." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DeploymentModal", - "type": "Component", - "start_line": 1, - "end_line": 148, - "tags": { - "SEMANTICS": "deployment, git, environment, modal", - "PURPOSE": "Modal for deploying a dashboard to a target environment.", - "LAYER": "Component", - "RELATION": "DISPATCHES -> deploy", - "INVARIANT": "Cannot deploy without a selected environment." - }, - "relations": [], - "children": [ - { - "name": "loadStatus", - "type": "Watcher", - "start_line": 33, - "end_line": 35, - "tags": {}, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "loadEnvironments", - "type": "Function", - "start_line": 37, - "end_line": 59, - "tags": { - "PURPOSE": "Fetch available environments from API.", - "POST": "environments state is populated." - }, - "relations": [], - "children": [], - "compliance": { - "valid": false, - "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @PRE" - ] - } - }, - { - "name": "handleDeploy", - "type": "Function", - "start_line": 61, - "end_line": 85, - "tags": { - "PURPOSE": "Trigger deployment to selected environment.", - "PRE": "selectedEnv must be set.", - "POST": "deploy event dispatched on success." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "ConflictResolver", - "type": "Component", - "start_line": 1, - "end_line": 142, - "tags": { - "SEMANTICS": "git, conflict, resolution, merge", - "PURPOSE": "UI for resolving merge conflicts (Keep Mine / Keep Theirs).", - "LAYER": "Component", - "RELATION": "DISPATCHES -> resolve", - "INVARIANT": "User must resolve all conflicts before saving.", - "TYPE": "{Object.} */" - }, - "relations": [], - "children": [ - { - "name": "resolve", - "type": "Function", - "start_line": 29, - "end_line": 43, - "tags": { - "PURPOSE": "Set resolution strategy for a file.", - "PRE": "file path must exist in conflicts array.", - "POST": "resolutions state is updated for the given file.", - "PARAM": "{'mine'|'theirs'} strategy - Resolution strategy." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleSave", - "type": "Function", - "start_line": 45, - "end_line": 66, - "tags": { - "PURPOSE": "Validate and submit resolutions.", - "PRE": "All conflicts must have a resolution.", - "POST": "'resolve' event dispatched if valid." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "CommitModal", - "type": "Component", - "start_line": 1, - "end_line": 175, - "tags": { - "SEMANTICS": "git, commit, modal, version_control, diff", - "PURPOSE": "\u041c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0438\u0442\u0430 \u0441 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 (diff).", - "LAYER": "Component", - "RELATION": "DISPATCHES -> commit" - }, - "relations": [], - "children": [ - { - "name": "loadStatus", - "type": "Function", - "start_line": 34, - "end_line": 61, - "tags": { - "PURPOSE": "\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 diff.", - "PRE": "dashboardId \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c." - }, - "relations": [], - "children": [], - "compliance": { - "valid": false, - "issues": [ - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @POST" - ] - } - }, - { - "name": "handleCommit", - "type": "Function", - "start_line": 63, - "end_line": 87, - "tags": { - "PURPOSE": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043c\u043c\u0438\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c.", - "PRE": "message \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u043c.", - "POST": "\u041a\u043e\u043c\u043c\u0438\u0442 \u0441\u043e\u0437\u0434\u0430\u043d, \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e, \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u043e." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "CommitHistory", - "type": "Component", - "start_line": 1, - "end_line": 95, - "tags": { - "SEMANTICS": "git, history, commits, audit", - "PURPOSE": "Displays the commit history for a specific dashboard.", - "LAYER": "Component", - "RELATION": "CALLS -> gitService.getHistory" - }, - "relations": [], - "children": [ - { - "name": "onMount", - "type": "Function", - "start_line": 27, - "end_line": 36, - "tags": { - "PURPOSE": "Load history when component is mounted.", - "PRE": "Component is initialized with dashboardId.", - "POST": "loadHistory is called." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "loadHistory", - "type": "Function", - "start_line": 38, - "end_line": 57, - "tags": { - "PURPOSE": "Fetch commit history from the backend.", - "PRE": "dashboardId is valid.", - "POST": "history state is updated." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DebugTool", - "type": "Component", - "start_line": 1, - "end_line": 190, - "tags": { - "SEMANTICS": "debug, tool, api, structure", - "PURPOSE": "UI component for system diagnostics and debugging API responses.", - "LAYER": "UI", - "RELATION": "USES -> frontend/src/services/toolsService.js" - }, - "relations": [], - "children": [ - { - "name": "fetchEnvironments", - "type": "Function", - "start_line": 26, - "end_line": 41, - "tags": { - "PURPOSE": "Fetches available environments.", - "PRE": "API is available.", - "POST": "envs variable is populated.", - "RETURNS": "{Promise}" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleRunDebug", - "type": "Function", - "start_line": 43, - "end_line": 84, - "tags": { - "PURPOSE": "Triggers the debug task.", - "PRE": "Required fields are selected.", - "POST": "Task is started and polling begins.", - "RETURNS": "{Promise}" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "startPolling", - "type": "Function", - "start_line": 86, - "end_line": 116, - "tags": { - "PURPOSE": "Polls for task completion.", - "PRE": "Task ID is valid.", - "POST": "Polls until success/failure.", - "PARAM": "{string} taskId - ID of the task.", - "RETURNS": "{void}" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "ConnectionForm", - "type": "Component", - "start_line": 1, - "end_line": 95, - "tags": { - "SEMANTICS": "connection, form, settings", - "PURPOSE": "UI component for creating a new database connection configuration.", - "LAYER": "UI", - "RELATION": "USES -> frontend/src/services/connectionService.js" - }, - "relations": [], - "children": [ - { - "name": "handleSubmit", - "type": "Function", - "start_line": 28, - "end_line": 52, - "tags": { - "PURPOSE": "Submits the connection form to the backend.", - "PRE": "All required fields (name, host, database, username, password) must be filled.", - "POST": "A new connection is created via the connection service and a success event is dispatched." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "resetForm", - "type": "Function", - "start_line": 54, - "end_line": 67, - "tags": { - "PURPOSE": "Resets the connection form fields to their default values.", - "PRE": "None.", - "POST": "All form input variables are reset." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "MapperTool", - "type": "Component", - "start_line": 1, - "end_line": 165, - "tags": { - "SEMANTICS": "mapper, tool, dataset, postgresql, excel", - "PURPOSE": "UI component for mapping dataset column verbose names using the MapperPlugin.", - "LAYER": "UI", - "RELATION": "USES -> frontend/src/services/connectionService.js" - }, - "relations": [], - "children": [ - { - "name": "fetchData", - "type": "Function", - "start_line": 29, - "end_line": 42, - "tags": { - "PURPOSE": "Fetches environments and saved connections.", - "PRE": "None.", - "POST": "envs and connections arrays are populated." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleRunMapper", - "type": "Function", - "start_line": 44, - "end_line": 85, - "tags": { - "PURPOSE": "Triggers the MapperPlugin task.", - "PRE": "selectedEnv and datasetId are set; source-specific fields are valid.", - "POST": "Mapper task is started and selectedTask is updated." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "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": [] - } - }, - { - "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": [] - } - }, - { - "name": "ConnectionList", - "type": "Component", - "start_line": 1, - "end_line": 88, - "tags": { - "SEMANTICS": "connection, list, settings", - "PURPOSE": "UI component for listing and deleting saved database connection configurations.", - "LAYER": "UI", - "RELATION": "USES -> frontend/src/services/connectionService.js" - }, - "relations": [], - "children": [ - { - "name": "fetchConnections", - "type": "Function", - "start_line": 22, - "end_line": 36, - "tags": { - "PURPOSE": "Fetches the list of connections from the backend.", - "PRE": "None.", - "POST": "connections array is populated." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleDelete", - "type": "Function", - "start_line": 38, - "end_line": 53, - "tags": { - "PURPOSE": "Deletes a connection configuration.", - "PRE": "id is provided and user confirms deletion.", - "POST": "Connection is deleted from backend and list is reloaded." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Settings", - "type": "Component", - "start_line": 1, - "end_line": 347, - "tags": { - "SEMANTICS": "settings, ui, configuration", - "PURPOSE": "The main settings page for the application, allowing management of environments and global settings.", - "LAYER": "UI", - "RELATION": "USES -> stores.js", - "PROPS": "None", - "EVENTS": "None", - "INVARIANT": "Settings changes must be saved to the backend." - }, - "relations": [], - "children": [ - { - "name": "loadSettings", - "type": "Function", - "start_line": 50, - "end_line": 67, - "tags": { - "PURPOSE": "Loads settings from the backend.", - "PRE": "Component mounted or refresh requested.", - "POST": "settings object is populated with backend data." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleSaveGlobal", - "type": "Function", - "start_line": 69, - "end_line": 86, - "tags": { - "PURPOSE": "Saves global settings to the backend.", - "PRE": "settings.settings contains valid configuration.", - "POST": "Backend global settings are updated." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleAddOrUpdateEnv", - "type": "Function", - "start_line": 88, - "end_line": 112, - "tags": { - "PURPOSE": "Adds or updates an environment.", - "PRE": "newEnv contains valid environment details.", - "POST": "Environment list is updated on backend and reloaded locally." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleDeleteEnv", - "type": "Function", - "start_line": 114, - "end_line": 135, - "tags": { - "PURPOSE": "Deletes an environment.", - "PRE": "id of environment to delete is provided.", - "POST": "Environment is removed from backend and list is reloaded.", - "PARAM": "{string} id - The ID of the environment to delete." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleTestEnv", - "type": "Function", - "start_line": 137, - "end_line": 160, - "tags": { - "PURPOSE": "Tests the connection to an environment.", - "PRE": "Environment ID is valid.", - "POST": "Connection test result is displayed via toast.", - "PARAM": "{string} id - The ID of the environment to test." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "editEnv", - "type": "Function", - "start_line": 162, - "end_line": 173, - "tags": { - "PURPOSE": "Sets the form to edit an existing environment.", - "PRE": "env object is provided.", - "POST": "newEnv is populated with env data and editingEnvId is set.", - "PARAM": "{Object} env - The environment object to edit." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "resetEnvForm", - "type": "Function", - "start_line": 175, - "end_line": 196, - "tags": { - "PURPOSE": "Resets the environment form.", - "PRE": "None.", - "POST": "newEnv is reset to initial state and editingEnvId is cleared." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Dashboard", - "type": "Component", - "start_line": 1, - "end_line": 64, - "tags": { - "SEMANTICS": "dashboard, plugins, tools, list", - "PURPOSE": "Displays the list of available plugins and allows selecting one.", - "LAYER": "UI", - "RELATION": "DEPENDS_ON -> frontend/src/lib/stores.js", - "PROPS": "None", - "EVENTS": "None" - }, - "relations": [], - "children": [ - { - "name": "onMount", - "type": "Function", - "start_line": 17, - "end_line": 27, - "tags": { - "PURPOSE": "Fetch plugins when the component mounts.", - "PRE": "Component is mounting.", - "POST": "plugins store is populated with available tools." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "selectPlugin", - "type": "Function", - "start_line": 29, - "end_line": 40, - "tags": { - "PURPOSE": "Selects a plugin to display its form.", - "PRE": "plugin object is provided.", - "POST": "selectedPlugin store is updated.", - "PARAM": "{Object} plugin - The plugin object to select." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "GitServiceClient", - "type": "Module", - "start_line": 1, - "end_line": 325, - "tags": { - "SEMANTICS": "git, service, api, client", - "PURPOSE": "API client for Git operations, managing the communication between frontend and backend.", - "LAYER": "Service", - "RELATION": "DEPENDS_ON -> specs/011-git-integration-dashboard/contracts/api.md" - }, - "relations": [], - "children": [ - { - "name": "gitService", - "type": "Action", - "start_line": 11, - "end_line": 323, - "tags": { - "PURPOSE": "Retrieves the diff for specific files or the whole repository.", - "PRE": "dashboardId must be a valid integer.", - "POST": "Returns the Git diff string.", - "RETURNS": "{Promise} The diff content.", - "PARAM": "{boolean} staged - Whether to show staged changes." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "getConnections", - "type": "Function", - "start_line": 7, - "end_line": 23, - "tags": { - "PURPOSE": "Fetch a list of saved connections.", - "PRE": "None.", - "POST": "Returns a promise resolving to an array of connections.", - "RETURNS": "{Promise} List of connections." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "createConnection", - "type": "Function", - "start_line": 25, - "end_line": 50, - "tags": { - "PURPOSE": "Create a new connection configuration.", - "PRE": "connectionData must be a valid object.", - "POST": "Returns a promise resolving to the created connection.", - "PARAM": "{Object} connectionData - The connection data.", - "RETURNS": "{Promise} The created connection instance." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "deleteConnection", - "type": "Function", - "start_line": 52, - "end_line": 70, - "tags": { - "PURPOSE": "Delete a connection configuration.", - "PRE": "connectionId must be a valid string.", - "POST": "Returns a promise that resolves when deletion is complete.", - "PARAM": "{string} connectionId - The ID of the connection to delete." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "getTasks", - "type": "Function", - "start_line": 7, - "end_line": 34, - "tags": { - "PURPOSE": "Fetch a list of tasks with pagination and optional status filter.", - "PRE": "limit and offset are numbers.", - "POST": "Returns a promise resolving to a list of tasks.", - "PARAM": "{string|null} status - Filter by task status (optional).", - "RETURNS": "{Promise} List of tasks." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "getTask", - "type": "Function", - "start_line": 36, - "end_line": 53, - "tags": { - "PURPOSE": "Fetch details for a specific task.", - "PRE": "taskId must be provided.", - "POST": "Returns a promise resolving to task details.", - "PARAM": "{string} taskId - The ID of the task.", - "RETURNS": "{Promise} Task details." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "getTaskLogs", - "type": "Function", - "start_line": 55, - "end_line": 75, - "tags": { - "PURPOSE": "Fetch logs for a specific task.", - "PRE": "taskId must be provided.", - "POST": "Returns a promise resolving to a list of log entries.", - "PARAM": "{string} taskId - The ID of the task.", - "RETURNS": "{Promise} List of log entries." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "resumeTask", - "type": "Function", - "start_line": 77, - "end_line": 103, - "tags": { - "PURPOSE": "Resume a task that is awaiting input (e.g., passwords).", - "PRE": "taskId and passwords must be provided.", - "POST": "Returns a promise resolving to the updated task object.", - "PARAM": "{Object} passwords - Map of database names to passwords.", - "RETURNS": "{Promise} Updated task object." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "resolveTask", - "type": "Function", - "start_line": 105, - "end_line": 131, - "tags": { - "PURPOSE": "Resolve a task that is awaiting mapping.", - "PRE": "taskId and resolutionParams must be provided.", - "POST": "Returns a promise resolving to the updated task object.", - "PARAM": "{Object} resolutionParams - Resolution parameters.", - "RETURNS": "{Promise} Updated task object." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "clearTasks", - "type": "Function", - "start_line": 133, - "end_line": 156, - "tags": { - "PURPOSE": "Clear tasks based on status.", - "PRE": "status is a string or null.", - "POST": "Returns a promise that resolves when tasks are cleared.", - "PARAM": "{string|null} status - Filter by task status (optional)." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "runTask", - "type": "Function", - "start_line": 7, - "end_line": 33, - "tags": { - "PURPOSE": "Start a new task for a given plugin.", - "PRE": "pluginId and params must be provided.", - "POST": "Returns a promise resolving to the task instance.", - "PARAM": "{Object} params - Parameters for the plugin.", - "RETURNS": "{Promise} The created task instance." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "getTaskStatus", - "type": "Function", - "start_line": 35, - "end_line": 52, - "tags": { - "PURPOSE": "Fetch details for a specific task (to poll status or get result).", - "PRE": "taskId must be provided.", - "POST": "Returns a promise resolving to task details.", - "PARAM": "{string} taskId - The ID of the task.", - "RETURNS": "{Promise} Task details." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, { "name": "stores_module", "type": "Module", @@ -2747,7 +670,7 @@ "name": "api_module", "type": "Module", "start_line": 1, - "end_line": 130, + "end_line": 132, "tags": { "SEMANTICS": "api, client, fetch, rest", "PURPOSE": "Handles all communication with the backend API.", @@ -2833,7 +756,7 @@ "name": "api", "type": "Data", "start_line": 109, - "end_line": 128, + "end_line": 130, "tags": { "PURPOSE": "API client object with specific methods." }, @@ -2851,15 +774,14 @@ } }, { - "name": "load", - "type": "Function", - "start_line": 3, - "end_line": 23, + "name": "Select", + "type": "Component", + "start_line": 1, + "end_line": 40, "tags": { - "PURPOSE": "Loads initial plugin data for the dashboard.", - "PRE": "None.", - "POST": "Returns an object with plugins or an error message.", - "TYPE": "{import('./$types').PageLoad} */" + "SEMANTICS": "select, dropdown, form-field, ui-atom", + "PURPOSE": "Standardized dropdown selection component.", + "LAYER": "Atom" }, "relations": [], "children": [], @@ -2868,6 +790,172 @@ "issues": [] } }, + { + "name": "ui", + "type": "Module", + "start_line": 1, + "end_line": 18, + "tags": { + "SEMANTICS": "ui, components, library, atomic-design", + "PURPOSE": "Central export point for standardized UI components.", + "LAYER": "Atom", + "INVARIANT": "All components exported here must follow Semantic Protocol." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "PageHeader", + "type": "Component", + "start_line": 1, + "end_line": 26, + "tags": { + "SEMANTICS": "page-header, layout-atom", + "PURPOSE": "Standardized page header with title and action area.", + "LAYER": "Atom" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Card", + "type": "Component", + "start_line": 1, + "end_line": 35, + "tags": { + "SEMANTICS": "card, container, ui-atom", + "PURPOSE": "Standardized container with padding and elevation.", + "LAYER": "Atom" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Button", + "type": "Component", + "start_line": 1, + "end_line": 61, + "tags": { + "SEMANTICS": "button, ui-atom, interactive", + "PURPOSE": "Define component interface and default values.", + "LAYER": "Atom", + "INVARIANT": "Supports accessible labels and keyboard navigation." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Input", + "type": "Component", + "start_line": 1, + "end_line": 46, + "tags": { + "SEMANTICS": "input, form-field, ui-atom", + "PURPOSE": "Standardized text input component with label and error handling.", + "LAYER": "Atom", + "INVARIANT": "Consistent spacing and focus states." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "LanguageSwitcher", + "type": "Component", + "start_line": 1, + "end_line": 30, + "tags": { + "SEMANTICS": "language-switcher, i18n-ui, ui-atom", + "PURPOSE": "Dropdown component to switch between supported languages.", + "LAYER": "Atom", + "RELATION": "BINDS_TO -> i18n.locale" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "i18n", + "type": "Module", + "start_line": 1, + "end_line": 56, + "tags": { + "SEMANTICS": "i18n, localization, svelte-store, translation", + "PURPOSE": "Determines the starting locale.", + "LAYER": "Infra", + "INVARIANT": "Persistence is handled via LocalStorage.", + "RETURNS": "{Locale}" + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "locales/ru.json" + }, + { + "type": "DEPENDS_ON", + "target": "locales/en.json" + } + ], + "children": [ + { + "name": "locale", + "type": "Store", + "start_line": 33, + "end_line": 43, + "tags": { + "PURPOSE": "Holds the current active locale string." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "t", + "type": "Store", + "start_line": 45, + "end_line": 54, + "tags": { + "PURPOSE": "Derived store providing the translation dictionary.", + "RELATION": "BINDS_TO -> locale" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "selectPlugin", "type": "Function", @@ -2902,6 +990,24 @@ "issues": [] } }, + { + "name": "load", + "type": "Function", + "start_line": 3, + "end_line": 23, + "tags": { + "PURPOSE": "Loads initial plugin data for the dashboard.", + "PRE": "None.", + "POST": "Returns an object with plugins or an error message.", + "TYPE": "{import('./$types').PageLoad} */" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "TaskManagementPage", "type": "Component", @@ -2989,353 +1095,6 @@ "issues": [] } }, - { - "name": "GitDashboardPage", - "type": "Component", - "start_line": 1, - "end_line": 96, - "tags": { - "PURPOSE": "Dashboard management page for Git integration.", - "LAYER": "Page", - "SEMANTICS": "git, dashboard, management, ui" - }, - "relations": [], - "children": [ - { - "name": "fetchEnvironments", - "type": "Function", - "start_line": 21, - "end_line": 39, - "tags": { - "PURPOSE": "Fetches the list of deployment environments from the API.", - "PRE": "Component is mounted.", - "POST": "`environments` array is populated with data from /api/environments." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "fetchDashboards", - "type": "Function", - "start_line": 41, - "end_line": 59, - "tags": { - "PURPOSE": "Fetches dashboards for a specific environment.", - "PRE": "`envId` is a valid environment ID.", - "POST": "`dashboards` array is updated with results from the environment." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "load", - "type": "Function", - "start_line": 3, - "end_line": 29, - "tags": { - "PURPOSE": "Loads application settings and environment list.", - "PRE": "API must be reachable.", - "POST": "Returns settings object or default values on error.", - "TYPE": "{import('./$types').PageLoad} */" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleSaveGlobal", - "type": "Function", - "start_line": 26, - "end_line": 42, - "tags": { - "PURPOSE": "Saves global application settings.", - "PRE": "settings.settings must contain valid configuration.", - "POST": "Global settings are updated via API." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleAddOrUpdateEnv", - "type": "Function", - "start_line": 44, - "end_line": 70, - "tags": { - "PURPOSE": "Adds a new environment or updates an existing one.", - "PRE": "newEnv must contain valid environment details.", - "POST": "Environment is saved and page is reloaded to reflect changes." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleDeleteEnv", - "type": "Function", - "start_line": 72, - "end_line": 91, - "tags": { - "PURPOSE": "Deletes a Superset environment.", - "PRE": "id must be a valid environment ID.", - "POST": "Environment is removed and page is reloaded." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleTestEnv", - "type": "Function", - "start_line": 93, - "end_line": 114, - "tags": { - "PURPOSE": "Tests the connection to a Superset environment.", - "PRE": "id must be a valid environment ID.", - "POST": "Displays success or error toast based on connection result." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "editEnv", - "type": "Function", - "start_line": 116, - "end_line": 125, - "tags": { - "PURPOSE": "Populates the environment form for editing.", - "PRE": "env object must be provided.", - "POST": "newEnv and editingEnvId are updated." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "resetEnvForm", - "type": "Function", - "start_line": 127, - "end_line": 143, - "tags": { - "PURPOSE": "Resets the environment creation/edit form to default state.", - "PRE": "None.", - "POST": "newEnv is cleared and editingEnvId is set to null." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "GitSettingsPage", - "type": "Component", - "start_line": 1, - "end_line": 182, - "tags": { - "SEMANTICS": "git, settings, configuration, integration", - "PURPOSE": "Manage Git server configurations for dashboard versioning.", - "LAYER": "Page", - "RELATION": "USES -> Button, Input, Card, PageHeader, Select", - "INVARIANT": "All configurations must be validated via connection test." - }, - "relations": [], - "children": [ - { - "name": "loadConfigs", - "type": "Function", - "start_line": 33, - "end_line": 46, - "tags": { - "PURPOSE": "Fetches existing git configurations.", - "PRE": "Component is mounted.", - "POST": "configs state is populated." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleTest", - "type": "Function", - "start_line": 50, - "end_line": 71, - "tags": { - "PURPOSE": "Tests connection to a git server with current form data.", - "PRE": "newConfig contains valid provider, url, and pat.", - "POST": "testing state is managed; toast shown with result." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleSave", - "type": "Function", - "start_line": 73, - "end_line": 89, - "tags": { - "PURPOSE": "Saves a new git configuration.", - "PRE": "newConfig is valid and tested.", - "POST": "New config is saved to DB and added to configs list." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "handleDelete", - "type": "Function", - "start_line": 91, - "end_line": 108, - "tags": { - "PURPOSE": "Deletes a git configuration by ID.", - "PARAM": "{string} id - Configuration ID.", - "PRE": "id is valid; user confirmed deletion.", - "POST": "Configuration is removed from DB and local state." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "ConnectionsSettingsPage", - "type": "Component", - "start_line": 1, - "end_line": 40, - "tags": { - "SEMANTICS": "settings, connections, page", - "PURPOSE": "Page for managing database connection configurations.", - "LAYER": "UI" - }, - "relations": [], - "children": [ - { - "name": "handleSuccess", - "type": "Function", - "start_line": 13, - "end_line": 23, - "tags": { - "PURPOSE": "Refreshes the connection list after a successful creation.", - "PRE": "listComponent must be bound.", - "POST": "Triggers the fetchConnections method on the list component." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "MapperPage", - "type": "Component", - "start_line": 1, - "end_line": 25, - "tags": { - "SEMANTICS": "mapper, page, tool", - "PURPOSE": "Page for the dataset column mapper tool.", - "LAYER": "UI" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DebugPage", - "type": "Component", - "start_line": 1, - "end_line": 25, - "tags": { - "SEMANTICS": "debug, page, tool", - "PURPOSE": "Page for system diagnostics and debugging.", - "LAYER": "UI" - }, - "relations": [], - "children": [], - "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" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, { "name": "MigrationDashboard", "type": "Component", @@ -3564,6 +1323,2789 @@ "issues": [] } }, + { + "name": "StoragePage", + "type": "Component", + "start_line": 1, + "end_line": 198, + "tags": { + "SEMANTICS": "storage, files, management", + "PURPOSE": "Main page for file storage management.", + "LAYER": "Feature", + "RELATION": "CONTAINS -> FileUpload", + "INVARIANT": "Always displays tabs for Backups and Repositories." + }, + "relations": [], + "children": [ + { + "name": "loadFiles", + "type": "Function", + "start_line": 23, + "end_line": 58, + "tags": { + "PURPOSE": "Fetches the list of files from the server.", + "POST": "Updates the `files` array with the latest data." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @PRE" + ] + } + }, + { + "name": "handleDelete", + "type": "Function", + "start_line": 60, + "end_line": 77, + "tags": { + "PURPOSE": "Handles the file deletion process.", + "PARAM": "{CustomEvent} event - The delete event containing category and path." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] + } + }, + { + "name": "handleNavigate", + "type": "Function", + "start_line": 79, + "end_line": 88, + "tags": { + "PURPOSE": "Updates the current path and reloads files when navigating into a directory.", + "PARAM": "{CustomEvent} event - The navigation event containing the new path." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] + } + }, + { + "name": "navigateUp", + "type": "Function", + "start_line": 90, + "end_line": 101, + "tags": { + "PURPOSE": "Navigates one level up in the directory structure." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] + } + } + ], + "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" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MapperPage", + "type": "Component", + "start_line": 1, + "end_line": 25, + "tags": { + "SEMANTICS": "mapper, page, tool", + "PURPOSE": "Page for the dataset column mapper tool.", + "LAYER": "UI" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DebugPage", + "type": "Component", + "start_line": 1, + "end_line": 25, + "tags": { + "SEMANTICS": "debug, page, tool", + "PURPOSE": "Page for system diagnostics and debugging.", + "LAYER": "UI" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleSaveGlobal", + "type": "Function", + "start_line": 26, + "end_line": 42, + "tags": { + "PURPOSE": "Saves global application settings.", + "PRE": "settings.settings must contain valid configuration.", + "POST": "Global settings are updated via API." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleSaveStorage", + "type": "Function", + "start_line": 44, + "end_line": 60, + "tags": { + "PURPOSE": "Saves storage-specific settings.", + "PRE": "settings.settings.storage must contain valid configuration.", + "POST": "Storage settings are updated via API." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleAddOrUpdateEnv", + "type": "Function", + "start_line": 62, + "end_line": 88, + "tags": { + "PURPOSE": "Adds a new environment or updates an existing one.", + "PRE": "newEnv must contain valid environment details.", + "POST": "Environment is saved and page is reloaded to reflect changes." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleDeleteEnv", + "type": "Function", + "start_line": 90, + "end_line": 109, + "tags": { + "PURPOSE": "Deletes a Superset environment.", + "PRE": "id must be a valid environment ID.", + "POST": "Environment is removed and page is reloaded." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleTestEnv", + "type": "Function", + "start_line": 111, + "end_line": 132, + "tags": { + "PURPOSE": "Tests the connection to a Superset environment.", + "PRE": "id must be a valid environment ID.", + "POST": "Displays success or error toast based on connection result." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "editEnv", + "type": "Function", + "start_line": 134, + "end_line": 143, + "tags": { + "PURPOSE": "Populates the environment form for editing.", + "PRE": "env object must be provided.", + "POST": "newEnv and editingEnvId are updated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "resetEnvForm", + "type": "Function", + "start_line": 145, + "end_line": 161, + "tags": { + "PURPOSE": "Resets the environment creation/edit form to default state.", + "PRE": "None.", + "POST": "newEnv is cleared and editingEnvId is set to null." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "load", + "type": "Function", + "start_line": 3, + "end_line": 28, + "tags": { + "PURPOSE": "Loads application settings and environment list.", + "PRE": "API must be reachable.", + "POST": "Returns settings object or default values on error.", + "TYPE": "{import('./$types').PageLoad} */" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "ConnectionsSettingsPage", + "type": "Component", + "start_line": 1, + "end_line": 40, + "tags": { + "SEMANTICS": "settings, connections, page", + "PURPOSE": "Page for managing database connection configurations.", + "LAYER": "UI" + }, + "relations": [], + "children": [ + { + "name": "handleSuccess", + "type": "Function", + "start_line": 13, + "end_line": 23, + "tags": { + "PURPOSE": "Refreshes the connection list after a successful creation.", + "PRE": "listComponent must be bound.", + "POST": "Triggers the fetchConnections method on the list component." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "GitSettingsPage", + "type": "Component", + "start_line": 1, + "end_line": 182, + "tags": { + "SEMANTICS": "git, settings, configuration, integration", + "PURPOSE": "Manage Git server configurations for dashboard versioning.", + "LAYER": "Page", + "RELATION": "USES -> Button, Input, Card, PageHeader, Select", + "INVARIANT": "All configurations must be validated via connection test." + }, + "relations": [], + "children": [ + { + "name": "loadConfigs", + "type": "Function", + "start_line": 33, + "end_line": 46, + "tags": { + "PURPOSE": "Fetches existing git configurations.", + "PRE": "Component is mounted.", + "POST": "configs state is populated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleTest", + "type": "Function", + "start_line": 50, + "end_line": 71, + "tags": { + "PURPOSE": "Tests connection to a git server with current form data.", + "PRE": "newConfig contains valid provider, url, and pat.", + "POST": "testing state is managed; toast shown with result." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleSave", + "type": "Function", + "start_line": 73, + "end_line": 89, + "tags": { + "PURPOSE": "Saves a new git configuration.", + "PRE": "newConfig is valid and tested.", + "POST": "New config is saved to DB and added to configs list." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleDelete", + "type": "Function", + "start_line": 91, + "end_line": 108, + "tags": { + "PURPOSE": "Deletes a git configuration by ID.", + "PARAM": "{string} id - Configuration ID.", + "PRE": "id is valid; user confirmed deletion.", + "POST": "Configuration is removed from DB and local state." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "GitDashboardPage", + "type": "Component", + "start_line": 1, + "end_line": 96, + "tags": { + "PURPOSE": "Dashboard management page for Git integration.", + "LAYER": "Page", + "SEMANTICS": "git, dashboard, management, ui" + }, + "relations": [], + "children": [ + { + "name": "fetchEnvironments", + "type": "Function", + "start_line": 21, + "end_line": 39, + "tags": { + "PURPOSE": "Fetches the list of deployment environments from the API.", + "PRE": "Component is mounted.", + "POST": "`environments` array is populated with data from /api/environments." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "fetchDashboards", + "type": "Function", + "start_line": 41, + "end_line": 59, + "tags": { + "PURPOSE": "Fetches dashboards for a specific environment.", + "PRE": "`envId` is a valid environment ID.", + "POST": "`dashboards` array is updated with results from the environment." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Dashboard", + "type": "Component", + "start_line": 1, + "end_line": 64, + "tags": { + "SEMANTICS": "dashboard, plugins, tools, list", + "PURPOSE": "Displays the list of available plugins and allows selecting one.", + "LAYER": "UI", + "RELATION": "DEPENDS_ON -> frontend/src/lib/stores.js", + "PROPS": "None", + "EVENTS": "None" + }, + "relations": [], + "children": [ + { + "name": "onMount", + "type": "Function", + "start_line": 17, + "end_line": 27, + "tags": { + "PURPOSE": "Fetch plugins when the component mounts.", + "PRE": "Component is mounting.", + "POST": "plugins store is populated with available tools." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "selectPlugin", + "type": "Function", + "start_line": 29, + "end_line": 40, + "tags": { + "PURPOSE": "Selects a plugin to display its form.", + "PRE": "plugin object is provided.", + "POST": "selectedPlugin store is updated.", + "PARAM": "{Object} plugin - The plugin object to select." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Settings", + "type": "Component", + "start_line": 1, + "end_line": 340, + "tags": { + "SEMANTICS": "settings, ui, configuration", + "PURPOSE": "The main settings page for the application, allowing management of environments and global settings.", + "LAYER": "UI", + "RELATION": "USES -> stores.js", + "PROPS": "None", + "EVENTS": "None", + "INVARIANT": "Settings changes must be saved to the backend." + }, + "relations": [], + "children": [ + { + "name": "loadSettings", + "type": "Function", + "start_line": 49, + "end_line": 66, + "tags": { + "PURPOSE": "Loads settings from the backend.", + "PRE": "Component mounted or refresh requested.", + "POST": "settings object is populated with backend data." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleSaveGlobal", + "type": "Function", + "start_line": 68, + "end_line": 85, + "tags": { + "PURPOSE": "Saves global settings to the backend.", + "PRE": "settings.settings contains valid configuration.", + "POST": "Backend global settings are updated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleAddOrUpdateEnv", + "type": "Function", + "start_line": 87, + "end_line": 111, + "tags": { + "PURPOSE": "Adds or updates an environment.", + "PRE": "newEnv contains valid environment details.", + "POST": "Environment list is updated on backend and reloaded locally." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleDeleteEnv", + "type": "Function", + "start_line": 113, + "end_line": 134, + "tags": { + "PURPOSE": "Deletes an environment.", + "PRE": "id of environment to delete is provided.", + "POST": "Environment is removed from backend and list is reloaded.", + "PARAM": "{string} id - The ID of the environment to delete." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleTestEnv", + "type": "Function", + "start_line": 136, + "end_line": 159, + "tags": { + "PURPOSE": "Tests the connection to an environment.", + "PRE": "Environment ID is valid.", + "POST": "Connection test result is displayed via toast.", + "PARAM": "{string} id - The ID of the environment to test." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "editEnv", + "type": "Function", + "start_line": 161, + "end_line": 172, + "tags": { + "PURPOSE": "Sets the form to edit an existing environment.", + "PRE": "env object is provided.", + "POST": "newEnv is populated with env data and editingEnvId is set.", + "PARAM": "{Object} env - The environment object to edit." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "resetEnvForm", + "type": "Function", + "start_line": 174, + "end_line": 195, + "tags": { + "PURPOSE": "Resets the environment form.", + "PRE": "None.", + "POST": "newEnv is reset to initial state and editingEnvId is cleared." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "getConnections", + "type": "Function", + "start_line": 7, + "end_line": 23, + "tags": { + "PURPOSE": "Fetch a list of saved connections.", + "PRE": "None.", + "POST": "Returns a promise resolving to an array of connections.", + "RETURNS": "{Promise} List of connections." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "createConnection", + "type": "Function", + "start_line": 25, + "end_line": 50, + "tags": { + "PURPOSE": "Create a new connection configuration.", + "PRE": "connectionData must be a valid object.", + "POST": "Returns a promise resolving to the created connection.", + "PARAM": "{Object} connectionData - The connection data.", + "RETURNS": "{Promise} The created connection instance." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "deleteConnection", + "type": "Function", + "start_line": 52, + "end_line": 70, + "tags": { + "PURPOSE": "Delete a connection configuration.", + "PRE": "connectionId must be a valid string.", + "POST": "Returns a promise that resolves when deletion is complete.", + "PARAM": "{string} connectionId - The ID of the connection to delete." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "GitServiceClient", + "type": "Module", + "start_line": 1, + "end_line": 325, + "tags": { + "SEMANTICS": "git, service, api, client", + "PURPOSE": "API client for Git operations, managing the communication between frontend and backend.", + "LAYER": "Service", + "RELATION": "DEPENDS_ON -> specs/011-git-integration-dashboard/contracts/api.md" + }, + "relations": [], + "children": [ + { + "name": "gitService", + "type": "Action", + "start_line": 11, + "end_line": 323, + "tags": { + "PURPOSE": "Retrieves the diff for specific files or the whole repository.", + "PRE": "dashboardId must be a valid integer.", + "POST": "Returns the Git diff string.", + "RETURNS": "{Promise} The diff content.", + "PARAM": "{boolean} staged - Whether to show staged changes." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "runTask", + "type": "Function", + "start_line": 7, + "end_line": 33, + "tags": { + "PURPOSE": "Start a new task for a given plugin.", + "PRE": "pluginId and params must be provided.", + "POST": "Returns a promise resolving to the task instance.", + "PARAM": "{Object} params - Parameters for the plugin.", + "RETURNS": "{Promise} The created task instance." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "getTaskStatus", + "type": "Function", + "start_line": 35, + "end_line": 52, + "tags": { + "PURPOSE": "Fetch details for a specific task (to poll status or get result).", + "PRE": "taskId must be provided.", + "POST": "Returns a promise resolving to task details.", + "PARAM": "{string} taskId - The ID of the task.", + "RETURNS": "{Promise} Task details." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "getTasks", + "type": "Function", + "start_line": 7, + "end_line": 34, + "tags": { + "PURPOSE": "Fetch a list of tasks with pagination and optional status filter.", + "PRE": "limit and offset are numbers.", + "POST": "Returns a promise resolving to a list of tasks.", + "PARAM": "{string|null} status - Filter by task status (optional).", + "RETURNS": "{Promise} List of tasks." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "getTask", + "type": "Function", + "start_line": 36, + "end_line": 53, + "tags": { + "PURPOSE": "Fetch details for a specific task.", + "PRE": "taskId must be provided.", + "POST": "Returns a promise resolving to task details.", + "PARAM": "{string} taskId - The ID of the task.", + "RETURNS": "{Promise} Task details." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "getTaskLogs", + "type": "Function", + "start_line": 55, + "end_line": 75, + "tags": { + "PURPOSE": "Fetch logs for a specific task.", + "PRE": "taskId must be provided.", + "POST": "Returns a promise resolving to a list of log entries.", + "PARAM": "{string} taskId - The ID of the task.", + "RETURNS": "{Promise} List of log entries." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "resumeTask", + "type": "Function", + "start_line": 77, + "end_line": 103, + "tags": { + "PURPOSE": "Resume a task that is awaiting input (e.g., passwords).", + "PRE": "taskId and passwords must be provided.", + "POST": "Returns a promise resolving to the updated task object.", + "PARAM": "{Object} passwords - Map of database names to passwords.", + "RETURNS": "{Promise} Updated task object." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "resolveTask", + "type": "Function", + "start_line": 105, + "end_line": 131, + "tags": { + "PURPOSE": "Resolve a task that is awaiting mapping.", + "PRE": "taskId and resolutionParams must be provided.", + "POST": "Returns a promise resolving to the updated task object.", + "PARAM": "{Object} resolutionParams - Resolution parameters.", + "RETURNS": "{Promise} Updated task object." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "clearTasks", + "type": "Function", + "start_line": 133, + "end_line": 156, + "tags": { + "PURPOSE": "Clear tasks based on status.", + "PRE": "status is a string or null.", + "POST": "Returns a promise that resolves when tasks are cleared.", + "PARAM": "{string|null} status - Filter by task status (optional)." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "storageService", + "type": "Module", + "start_line": 1, + "end_line": 109, + "tags": { + "PURPOSE": "Frontend API client for file storage management.", + "LAYER": "Service", + "RELATION": "DEPENDS_ON -> backend.api.storage", + "SEMANTICS": "storage, api, client" + }, + "relations": [], + "children": [ + { + "name": "listFiles", + "type": "Function", + "start_line": 11, + "end_line": 34, + "tags": { + "PURPOSE": "Fetches the list of files for a given category and subpath.", + "PARAM": "{string} [path] - Optional subpath filter.", + "RETURNS": "{Promise}", + "PRE": "category and path should be valid strings if provided.", + "POST": "Returns a promise resolving to an array of StoredFile objects." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "uploadFile", + "type": "Function", + "start_line": 36, + "end_line": 65, + "tags": { + "PURPOSE": "Uploads a file to the storage system.", + "PARAM": "{string} [path] - Target subpath.", + "RETURNS": "{Promise}", + "PRE": "file must be a valid File object; category must be specified.", + "POST": "Returns a promise resolving to the metadata of the uploaded file." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "deleteFile", + "type": "Function", + "start_line": 67, + "end_line": 86, + "tags": { + "PURPOSE": "Deletes a file or directory from storage.", + "PARAM": "{string} path - Relative path of the item.", + "RETURNS": "{Promise}", + "PRE": "category and path must identify an existing file or directory.", + "POST": "The specified file or directory is removed from storage." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "downloadFileUrl", + "type": "Function", + "start_line": 88, + "end_line": 100, + "tags": { + "PURPOSE": "Returns the URL for downloading a file.", + "PARAM": "{string} path - Relative path of the file.", + "RETURNS": "{string}", + "PRE": "category and path must identify an existing file.", + "POST": "Returns a valid API URL for file download." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "PasswordPrompt", + "type": "Component", + "start_line": 1, + "end_line": 133, + "tags": { + "SEMANTICS": "password, prompt, modal, input, security", + "PURPOSE": "A modal component to prompt the user for database passwords when a migration task is paused.", + "LAYER": "UI", + "RELATION": "EMITS -> resume, cancel" + }, + "relations": [], + "children": [ + { + "name": "handleSubmit", + "type": "Function", + "start_line": 21, + "end_line": 39, + "tags": { + "PURPOSE": "Validates and dispatches the passwords to resume the task.", + "PRE": "All database passwords must be entered.", + "POST": "'resume' event is dispatched with passwords." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleCancel", + "type": "Function", + "start_line": 41, + "end_line": 49, + "tags": { + "PURPOSE": "Cancels the password prompt.", + "PRE": "Modal is open.", + "POST": "'cancel' event is dispatched and show is set to false." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MappingTable", + "type": "Component", + "start_line": 1, + "end_line": 98, + "tags": { + "SEMANTICS": "mapping, table, database, editor", + "PURPOSE": "Displays and allows editing of database mappings.", + "LAYER": "Feature", + "RELATION": "BINDS_TO -> mappings state", + "INVARIANT": "Each source database can be mapped to one target database." + }, + "relations": [], + "children": [ + { + "name": "updateMapping", + "type": "Function", + "start_line": 25, + "end_line": 34, + "tags": { + "PURPOSE": "Updates a mapping for a specific source database.", + "PRE": "sourceUuid and targetUuid are provided.", + "POST": "'update' event is dispatched." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "getSuggestion", + "type": "Function", + "start_line": 36, + "end_line": 45, + "tags": { + "PURPOSE": "Finds a suggestion for a source database.", + "PRE": "sourceUuid is provided.", + "POST": "Returns matching suggestion object or undefined." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TaskLogViewer", + "type": "Component", + "start_line": 1, + "end_line": 244, + "tags": { + "SEMANTICS": "task, log, viewer, modal, inline", + "PURPOSE": "Displays detailed logs for a specific task in a modal or inline.", + "LAYER": "UI", + "RELATION": "USES -> frontend/src/services/taskService.js" + }, + "relations": [], + "children": [ + { + "name": "fetchLogs", + "type": "Function", + "start_line": 30, + "end_line": 53, + "tags": { + "PURPOSE": "Fetches logs for the current task.", + "PRE": "taskId must be set.", + "POST": "logs array is updated with data from taskService." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "scrollToBottom", + "type": "Function", + "start_line": 55, + "end_line": 68, + "tags": { + "PURPOSE": "Scrolls the log container to the bottom.", + "PRE": "logContainer element must be bound.", + "POST": "logContainer scrollTop is set to scrollHeight." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleScroll", + "type": "Function", + "start_line": 70, + "end_line": 83, + "tags": { + "PURPOSE": "Updates auto-scroll preference based on scroll position.", + "PRE": "logContainer scroll event fired.", + "POST": "autoScroll boolean is updated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "close", + "type": "Function", + "start_line": 85, + "end_line": 95, + "tags": { + "PURPOSE": "Closes the log viewer modal.", + "PRE": "Modal is open.", + "POST": "Modal is closed and close event is dispatched." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "getLogLevelColor", + "type": "Function", + "start_line": 97, + "end_line": 112, + "tags": { + "PURPOSE": "Returns the CSS color class for a given log level.", + "PRE": "level string is provided.", + "POST": "Returns tailwind color class string." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "onDestroy", + "type": "Function", + "start_line": 131, + "end_line": 140, + "tags": { + "PURPOSE": "Cleans up the polling interval.", + "PRE": "Component is being destroyed.", + "POST": "Polling interval is cleared." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Footer", + "type": "Component", + "start_line": 1, + "end_line": 10, + "tags": { + "SEMANTICS": "footer, layout, copyright", + "PURPOSE": "Displays the application footer with copyright information.", + "LAYER": "UI" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MissingMappingModal", + "type": "Component", + "start_line": 1, + "end_line": 118, + "tags": { + "SEMANTICS": "modal, mapping, prompt, migration", + "PURPOSE": "Prompts the user to provide a database mapping when one is missing during migration.", + "LAYER": "Feature", + "RELATION": "DISPATCHES -> resolve", + "INVARIANT": "Modal blocks migration progress until resolved or cancelled." + }, + "relations": [], + "children": [ + { + "name": "resolve", + "type": "Function", + "start_line": 26, + "end_line": 39, + "tags": { + "PURPOSE": "Dispatches the resolution event with the selected mapping.", + "PRE": "selectedTargetUuid must be set.", + "POST": "'resolve' event is dispatched and modal is hidden." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "cancel", + "type": "Function", + "start_line": 41, + "end_line": 49, + "tags": { + "PURPOSE": "Cancels the mapping resolution modal.", + "PRE": "Modal is open.", + "POST": "'cancel' event is dispatched and modal is hidden." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DashboardGrid", + "type": "Component", + "start_line": 1, + "end_line": 258, + "tags": { + "SEMANTICS": "dashboard, grid, selection, pagination", + "PURPOSE": "Displays a grid of dashboards with selection and pagination.", + "LAYER": "Component", + "RELATION": "USED_BY -> frontend/src/routes/migration/+page.svelte", + "INVARIANT": "Selected IDs must be a subset of available dashboards." + }, + "relations": [], + "children": [ + { + "name": "handleSort", + "type": "Function", + "start_line": 71, + "end_line": 83, + "tags": { + "PURPOSE": "Toggles sort direction or changes sort column.", + "PRE": "column name is provided.", + "POST": "sortColumn and sortDirection state updated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleSelectionChange", + "type": "Function", + "start_line": 85, + "end_line": 99, + "tags": { + "PURPOSE": "Handles individual checkbox changes.", + "PRE": "dashboard ID and checked status provided.", + "POST": "selectedIds array updated and selectionChanged event dispatched." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleSelectAll", + "type": "Function", + "start_line": 101, + "end_line": 119, + "tags": { + "PURPOSE": "Handles select all checkbox.", + "PRE": "checked status provided.", + "POST": "selectedIds array updated for all paginated items and event dispatched." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "goToPage", + "type": "Function", + "start_line": 121, + "end_line": 130, + "tags": { + "PURPOSE": "Changes current page.", + "PRE": "page index is provided.", + "POST": "currentPage state updated if within valid range." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "openGit", + "type": "Function", + "start_line": 132, + "end_line": 141, + "tags": { + "PURPOSE": "Opens the Git management modal for a dashboard." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Navbar", + "type": "Component", + "start_line": 1, + "end_line": 71, + "tags": { + "SEMANTICS": "navbar, navigation, header, layout", + "PURPOSE": "Main navigation bar for the application.", + "LAYER": "UI", + "RELATION": "USES -> $app/stores" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TaskHistory", + "type": "Component", + "start_line": 1, + "end_line": 209, + "tags": { + "SEMANTICS": "task, history, list, status, monitoring", + "PURPOSE": "Displays a list of recent tasks with their status and allows selecting them for viewing logs.", + "LAYER": "UI", + "RELATION": "USES -> frontend/src/lib/api.js (inferred)" + }, + "relations": [], + "children": [ + { + "name": "fetchTasks", + "type": "Function", + "start_line": 18, + "end_line": 48, + "tags": { + "PURPOSE": "Fetches the list of recent tasks from the API.", + "PRE": "None.", + "POST": "tasks array is updated and selectedTask status synchronized." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "clearTasks", + "type": "Function", + "start_line": 50, + "end_line": 69, + "tags": { + "PURPOSE": "Clears tasks from the history, optionally filtered by status.", + "PRE": "User confirms deletion via prompt.", + "POST": "Tasks are deleted from backend and list is re-fetched." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "selectTask", + "type": "Function", + "start_line": 71, + "end_line": 91, + "tags": { + "PURPOSE": "Selects a task and fetches its full details.", + "PRE": "task object is provided.", + "POST": "selectedTask store is updated with full task details." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "getStatusColor", + "type": "Function", + "start_line": 93, + "end_line": 107, + "tags": { + "PURPOSE": "Returns the CSS color class for a given task status.", + "PRE": "status string is provided.", + "POST": "Returns tailwind color class string." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "onMount", + "type": "Function", + "start_line": 109, + "end_line": 117, + "tags": { + "PURPOSE": "Initializes the component by fetching tasks and starting polling.", + "PRE": "Component is mounting.", + "POST": "Tasks are fetched and 5s polling interval is started." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "onDestroy", + "type": "Function", + "start_line": 119, + "end_line": 126, + "tags": { + "PURPOSE": "Cleans up the polling interval when the component is destroyed.", + "PRE": "Component is being destroyed.", + "POST": "Polling interval is cleared." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Toast", + "type": "Component", + "start_line": 1, + "end_line": 31, + "tags": { + "SEMANTICS": "toast, notification, feedback, ui", + "PURPOSE": "Displays transient notifications (toasts) in the bottom-right corner.", + "LAYER": "UI", + "RELATION": "DEPENDS_ON -> frontend/src/lib/toasts.js", + "PROPS": "None", + "EVENTS": "None" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TaskRunner", + "type": "Component", + "start_line": 1, + "end_line": 395, + "tags": { + "SEMANTICS": "task, runner, logs, websocket", + "PURPOSE": "Connects to a WebSocket to display real-time logs for a running task.", + "LAYER": "UI", + "RELATION": "DEPENDS_ON -> frontend/src/lib/stores.js", + "PROPS": "None", + "EVENTS": "None" + }, + "relations": [], + "children": [ + { + "name": "connect", + "type": "Function", + "start_line": 38, + "end_line": 132, + "tags": { + "PURPOSE": "Establishes WebSocket connection with exponential backoff.", + "PRE": "selectedTask must be set in the store.", + "POST": "WebSocket instance created and listeners attached." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "fetchTargetDatabases", + "type": "Function", + "start_line": 134, + "end_line": 156, + "tags": { + "PURPOSE": "Fetches the list of databases in the target environment.", + "PRE": "task must be selected and have a target environment parameter.", + "POST": "targetDatabases array is populated with database objects." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleMappingResolve", + "type": "Function", + "start_line": 158, + "end_line": 201, + "tags": { + "PURPOSE": "Handles the resolution of a missing database mapping.", + "PRE": "event.detail contains sourceDbUuid, targetDbUuid, and targetDbName.", + "POST": "Mapping is saved and task is resumed." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handlePasswordResume", + "type": "Function", + "start_line": 203, + "end_line": 225, + "tags": { + "PURPOSE": "Handles the submission of database passwords to resume a task.", + "PRE": "event.detail contains passwords dictionary.", + "POST": "Task resume endpoint is called with passwords." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "startDataTimeout", + "type": "Function", + "start_line": 227, + "end_line": 239, + "tags": { + "PURPOSE": "Starts a timeout to detect when the log stream has stalled.", + "PRE": "None.", + "POST": "dataTimeout is set to check connection status after 5s." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "resetDataTimeout", + "type": "Function", + "start_line": 241, + "end_line": 250, + "tags": { + "PURPOSE": "Resets the data stall timeout.", + "PRE": "dataTimeout must be active.", + "POST": "dataTimeout is cleared and restarted." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "onMount", + "type": "Function", + "start_line": 252, + "end_line": 279, + "tags": { + "PURPOSE": "Initializes the component and subscribes to task selection changes.", + "PRE": "Svelte component is mounting.", + "POST": "Store subscription is created and returned for cleanup." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "onDestroy", + "type": "Function", + "start_line": 281, + "end_line": 295, + "tags": { + "PURPOSE": "Close WebSocket connection when the component is destroyed.", + "PRE": "Component is being destroyed.", + "POST": "WebSocket is closed and timeouts are cleared." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TaskList", + "type": "Component", + "start_line": 1, + "end_line": 110, + "tags": { + "SEMANTICS": "tasks, list, status, history", + "PURPOSE": "Displays a list of tasks with their status and execution details.", + "LAYER": "Component", + "RELATION": "USES -> api.js" + }, + "relations": [], + "children": [ + { + "name": "getStatusColor", + "type": "Function", + "start_line": 19, + "end_line": 34, + "tags": { + "PURPOSE": "Returns the CSS color class for a given task status.", + "PRE": "status string is provided.", + "POST": "Returns tailwind color class string." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "formatTime", + "type": "Function", + "start_line": 36, + "end_line": 48, + "tags": { + "PURPOSE": "Formats a date string using date-fns.", + "PRE": "dateStr is a valid date string or null.", + "POST": "Returns human-readable relative time string." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleTaskClick", + "type": "Function", + "start_line": 50, + "end_line": 57, + "tags": { + "PURPOSE": "Dispatches a select event when a task is clicked.", + "PRE": "taskId is provided.", + "POST": "'select' event is dispatched with task ID." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DynamicForm", + "type": "Component", + "start_line": 1, + "end_line": 92, + "tags": { + "SEMANTICS": "form, schema, dynamic, json-schema", + "PURPOSE": "Generates a form dynamically based on a JSON schema.", + "LAYER": "UI", + "RELATION": "DEPENDS_ON -> svelte:createEventDispatcher", + "PROPS": "", + "EVENTS": "" + }, + "relations": [], + "children": [ + { + "name": "handleSubmit", + "type": "Function", + "start_line": 23, + "end_line": 33, + "tags": { + "PURPOSE": "Dispatches the submit event with the form data.", + "PRE": "formData contains user input.", + "POST": "'submit' event is dispatched with formData." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "initializeForm", + "type": "Function", + "start_line": 35, + "end_line": 48, + "tags": { + "PURPOSE": "Initialize form data with default values from the schema.", + "PRE": "schema is provided and contains properties.", + "POST": "formData is initialized with default values or empty strings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "EnvSelector", + "type": "Component", + "start_line": 1, + "end_line": 60, + "tags": { + "SEMANTICS": "environment, selector, dropdown, migration", + "PURPOSE": "Provides a UI component for selecting source and target environments.", + "LAYER": "Feature", + "RELATION": "BINDS_TO -> environments store", + "INVARIANT": "Source and target environments must be selectable from the list of configured environments." + }, + "relations": [], + "children": [ + { + "name": "handleSelect", + "type": "Function", + "start_line": 24, + "end_line": 36, + "tags": { + "PURPOSE": "Dispatches the selection change event.", + "PRE": "event.target must be an HTMLSelectElement.", + "POST": "selectedId is updated and 'change' event is dispatched.", + "PARAM": "{Event} event - The change event from the select element." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "FileList", + "type": "Component", + "start_line": 1, + "end_line": 134, + "tags": { + "SEMANTICS": "storage, files, list, table", + "PURPOSE": "Displays a table of files with metadata and actions.", + "LAYER": "Component", + "RELATION": "DEPENDS_ON -> storageService", + "PROPS": "files (Array) - List of StoredFile objects.", + "EVENTS": "delete (filename) - Dispatched when a file is deleted." + }, + "relations": [], + "children": [ + { + "name": "isDirectory", + "type": "Function", + "start_line": 22, + "end_line": 31, + "tags": { + "PURPOSE": "Checks if a file object represents a directory.", + "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" + ] + } + }, + { + "name": "formatSize", + "type": "Function", + "start_line": 33, + "end_line": 46, + "tags": { + "PURPOSE": "Formats file size in bytes into a human-readable string.", + "PARAM": "{number} bytes - The size in bytes.", + "RETURN": "{string} Formatted size (e.g., \"1.2 MB\")." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] + } + }, + { + "name": "formatDate", + "type": "Function", + "start_line": 48, + "end_line": 57, + "tags": { + "PURPOSE": "Formats an ISO date string into a localized readable format.", + "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" + ] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "FileUpload", + "type": "Component", + "start_line": 1, + "end_line": 134, + "tags": { + "SEMANTICS": "storage, upload, files", + "PURPOSE": "Provides a form for uploading files to a specific category.", + "LAYER": "Component", + "RELATION": "DEPENDS_ON -> storageService", + "PROPS": "None", + "EVENTS": "uploaded - Dispatched when a file is successfully uploaded." + }, + "relations": [], + "children": [ + { + "name": "handleUpload", + "type": "Function", + "start_line": 20, + "end_line": 55, + "tags": { + "PURPOSE": "Handles the file upload process.", + "PRE": "A file must be selected in the file input.", + "POST": "The file is uploaded to the server and a success toast is shown." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleDrop", + "type": "Function", + "start_line": 57, + "end_line": 71, + "tags": { + "PURPOSE": "Handles the file drop event for drag-and-drop.", + "PARAM": "{DragEvent} event - The drop event." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "ConnectionForm", + "type": "Component", + "start_line": 1, + "end_line": 95, + "tags": { + "SEMANTICS": "connection, form, settings", + "PURPOSE": "UI component for creating a new database connection configuration.", + "LAYER": "UI", + "RELATION": "USES -> frontend/src/services/connectionService.js" + }, + "relations": [], + "children": [ + { + "name": "handleSubmit", + "type": "Function", + "start_line": 28, + "end_line": 52, + "tags": { + "PURPOSE": "Submits the connection form to the backend.", + "PRE": "All required fields (name, host, database, username, password) must be filled.", + "POST": "A new connection is created via the connection service and a success event is dispatched." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "resetForm", + "type": "Function", + "start_line": 54, + "end_line": 67, + "tags": { + "PURPOSE": "Resets the connection form fields to their default values.", + "PRE": "None.", + "POST": "All form input variables are reset." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "ConnectionList", + "type": "Component", + "start_line": 1, + "end_line": 88, + "tags": { + "SEMANTICS": "connection, list, settings", + "PURPOSE": "UI component for listing and deleting saved database connection configurations.", + "LAYER": "UI", + "RELATION": "USES -> frontend/src/services/connectionService.js" + }, + "relations": [], + "children": [ + { + "name": "fetchConnections", + "type": "Function", + "start_line": 22, + "end_line": 36, + "tags": { + "PURPOSE": "Fetches the list of connections from the backend.", + "PRE": "None.", + "POST": "connections array is populated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleDelete", + "type": "Function", + "start_line": 38, + "end_line": 53, + "tags": { + "PURPOSE": "Deletes a connection configuration.", + "PRE": "id is provided and user confirms deletion.", + "POST": "Connection is deleted from backend and list is reloaded." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MapperTool", + "type": "Component", + "start_line": 1, + "end_line": 165, + "tags": { + "SEMANTICS": "mapper, tool, dataset, postgresql, excel", + "PURPOSE": "UI component for mapping dataset column verbose names using the MapperPlugin.", + "LAYER": "UI", + "RELATION": "USES -> frontend/src/services/connectionService.js" + }, + "relations": [], + "children": [ + { + "name": "fetchData", + "type": "Function", + "start_line": 29, + "end_line": 42, + "tags": { + "PURPOSE": "Fetches environments and saved connections.", + "PRE": "None.", + "POST": "envs and connections arrays are populated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleRunMapper", + "type": "Function", + "start_line": 44, + "end_line": 85, + "tags": { + "PURPOSE": "Triggers the MapperPlugin task.", + "PRE": "selectedEnv and datasetId are set; source-specific fields are valid.", + "POST": "Mapper task is started and selectedTask is updated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DebugTool", + "type": "Component", + "start_line": 1, + "end_line": 190, + "tags": { + "SEMANTICS": "debug, tool, api, structure", + "PURPOSE": "UI component for system diagnostics and debugging API responses.", + "LAYER": "UI", + "RELATION": "USES -> frontend/src/services/toolsService.js" + }, + "relations": [], + "children": [ + { + "name": "fetchEnvironments", + "type": "Function", + "start_line": 26, + "end_line": 41, + "tags": { + "PURPOSE": "Fetches available environments.", + "PRE": "API is available.", + "POST": "envs variable is populated.", + "RETURNS": "{Promise}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleRunDebug", + "type": "Function", + "start_line": 43, + "end_line": 84, + "tags": { + "PURPOSE": "Triggers the debug task.", + "PRE": "Required fields are selected.", + "POST": "Task is started and polling begins.", + "RETURNS": "{Promise}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "startPolling", + "type": "Function", + "start_line": 86, + "end_line": 116, + "tags": { + "PURPOSE": "Polls for task completion.", + "PRE": "Task ID is valid.", + "POST": "Polls until success/failure.", + "PARAM": "{string} taskId - ID of the task.", + "RETURNS": "{void}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "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": [] + } + }, + { + "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": [] + } + }, + { + "name": "CommitHistory", + "type": "Component", + "start_line": 1, + "end_line": 95, + "tags": { + "SEMANTICS": "git, history, commits, audit", + "PURPOSE": "Displays the commit history for a specific dashboard.", + "LAYER": "Component", + "RELATION": "CALLS -> gitService.getHistory" + }, + "relations": [], + "children": [ + { + "name": "onMount", + "type": "Function", + "start_line": 27, + "end_line": 36, + "tags": { + "PURPOSE": "Load history when component is mounted.", + "PRE": "Component is initialized with dashboardId.", + "POST": "loadHistory is called." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "loadHistory", + "type": "Function", + "start_line": 38, + "end_line": 57, + "tags": { + "PURPOSE": "Fetch commit history from the backend.", + "PRE": "dashboardId is valid.", + "POST": "history state is updated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DeploymentModal", + "type": "Component", + "start_line": 1, + "end_line": 148, + "tags": { + "SEMANTICS": "deployment, git, environment, modal", + "PURPOSE": "Modal for deploying a dashboard to a target environment.", + "LAYER": "Component", + "RELATION": "DISPATCHES -> deploy", + "INVARIANT": "Cannot deploy without a selected environment." + }, + "relations": [], + "children": [ + { + "name": "loadStatus", + "type": "Watcher", + "start_line": 33, + "end_line": 35, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "loadEnvironments", + "type": "Function", + "start_line": 37, + "end_line": 59, + "tags": { + "PURPOSE": "Fetch available environments from API.", + "POST": "environments state is populated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @PRE" + ] + } + }, + { + "name": "handleDeploy", + "type": "Function", + "start_line": 61, + "end_line": 85, + "tags": { + "PURPOSE": "Trigger deployment to selected environment.", + "PRE": "selectedEnv must be set.", + "POST": "deploy event dispatched on success." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "ConflictResolver", + "type": "Component", + "start_line": 1, + "end_line": 142, + "tags": { + "SEMANTICS": "git, conflict, resolution, merge", + "PURPOSE": "UI for resolving merge conflicts (Keep Mine / Keep Theirs).", + "LAYER": "Component", + "RELATION": "DISPATCHES -> resolve", + "INVARIANT": "User must resolve all conflicts before saving.", + "TYPE": "{Object.} */" + }, + "relations": [], + "children": [ + { + "name": "resolve", + "type": "Function", + "start_line": 29, + "end_line": 43, + "tags": { + "PURPOSE": "Set resolution strategy for a file.", + "PRE": "file path must exist in conflicts array.", + "POST": "resolutions state is updated for the given file.", + "PARAM": "{'mine'|'theirs'} strategy - Resolution strategy." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleSave", + "type": "Function", + "start_line": 45, + "end_line": 66, + "tags": { + "PURPOSE": "Validate and submit resolutions.", + "PRE": "All conflicts must have a resolution.", + "POST": "'resolve' event dispatched if valid." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "CommitModal", + "type": "Component", + "start_line": 1, + "end_line": 175, + "tags": { + "SEMANTICS": "git, commit, modal, version_control, diff", + "PURPOSE": "\u041c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0438\u0442\u0430 \u0441 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 (diff).", + "LAYER": "Component", + "RELATION": "DISPATCHES -> commit" + }, + "relations": [], + "children": [ + { + "name": "loadStatus", + "type": "Function", + "start_line": 34, + "end_line": 61, + "tags": { + "PURPOSE": "\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 diff.", + "PRE": "dashboardId \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @POST" + ] + } + }, + { + "name": "handleCommit", + "type": "Function", + "start_line": 63, + "end_line": 87, + "tags": { + "PURPOSE": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043c\u043c\u0438\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c.", + "PRE": "message \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u043c.", + "POST": "\u041a\u043e\u043c\u043c\u0438\u0442 \u0441\u043e\u0437\u0434\u0430\u043d, \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e, \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u043e." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "BranchSelector", + "type": "Component", + "start_line": 1, + "end_line": 178, + "tags": { + "SEMANTICS": "git, branch, selection, checkout", + "PURPOSE": "UI \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0435\u0442\u043e\u043a Git.", + "LAYER": "Component", + "RELATION": "DISPATCHES -> change" + }, + "relations": [], + "children": [ + { + "name": "onMount", + "type": "Function", + "start_line": 35, + "end_line": 44, + "tags": { + "PURPOSE": "Load branches when component is mounted.", + "PRE": "Component is initialized.", + "POST": "loadBranches is called." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "loadBranches", + "type": "Function", + "start_line": 46, + "end_line": 65, + "tags": { + "PURPOSE": "\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430.", + "PRE": "dashboardId is provided.", + "POST": "branches \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleSelect", + "type": "Function", + "start_line": 67, + "end_line": 76, + "tags": { + "PURPOSE": "Handles branch selection from dropdown.", + "PRE": "event contains branch name.", + "POST": "handleCheckout is called with selected branch." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleCheckout", + "type": "Function", + "start_line": 78, + "end_line": 97, + "tags": { + "PURPOSE": "\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0432\u0435\u0442\u043a\u0443.", + "PARAM": "{string} branchName - \u0418\u043c\u044f \u0432\u0435\u0442\u043a\u0438.", + "POST": "currentBranch \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d, \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @PRE" + ] + } + }, + { + "name": "handleCreate", + "type": "Function", + "start_line": 99, + "end_line": 120, + "tags": { + "PURPOSE": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0442\u043a\u0443.", + "PRE": "newBranchName is not empty.", + "POST": "\u041d\u043e\u0432\u0430\u044f \u0432\u0435\u0442\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430; showCreate reset." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "GitManager", + "type": "Component", + "start_line": 1, + "end_line": 300, + "tags": { + "SEMANTICS": "git, manager, dashboard, version_control, initialization", + "PURPOSE": "\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Git-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430.", + "LAYER": "Component", + "RELATION": "CALLS -> gitService" + }, + "relations": [], + "children": [ + { + "name": "checkStatus", + "type": "Function", + "start_line": 51, + "end_line": 72, + "tags": { + "PURPOSE": "\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430.", + "PRE": "Component is mounted and has dashboardId.", + "POST": "initialized state is set; configs loaded if not initialized." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleInit", + "type": "Function", + "start_line": 74, + "end_line": 96, + "tags": { + "PURPOSE": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0434\u043b\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430.", + "PRE": "selectedConfigId and remoteUrl are provided.", + "POST": "Repository is created on backend; initialized set to true." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handleSync", + "type": "Function", + "start_line": 98, + "end_line": 117, + "tags": { + "PURPOSE": "\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 Superset \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c Git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c.", + "PRE": "Repository is initialized.", + "POST": "Dashboard YAMLs are exported to Git and staged." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handlePush", + "type": "Function", + "start_line": 119, + "end_line": 136, + "tags": { + "PURPOSE": "Pushes local commits to the remote repository.", + "PRE": "Repository is initialized and has commits.", + "POST": "Changes are pushed to origin." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "handlePull", + "type": "Function", + "start_line": 138, + "end_line": 155, + "tags": { + "PURPOSE": "Pulls changes from the remote repository.", + "PRE": "Repository is initialized.", + "POST": "Local branch is updated with remote changes." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "backend.delete_running_tasks", "type": "Module", @@ -3602,6 +4144,161 @@ "issues": [] } }, + { + "name": "AppModule", + "type": "Module", + "start_line": 1, + "end_line": 190, + "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.", + "LAYER": "UI (API)", + "RELATION": "Depends on the dependency module and API route modules." + }, + "relations": [], + "children": [ + { + "name": "App", + "type": "Global", + "start_line": 24, + "end_line": 32, + "tags": { + "SEMANTICS": "app, fastapi, instance", + "PURPOSE": "The global FastAPI application instance." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "startup_event", + "type": "Function", + "start_line": 34, + "end_line": 44, + "tags": { + "PURPOSE": "Handles application startup tasks, such as starting the scheduler.", + "PRE": "None.", + "POST": "Scheduler is started." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "shutdown_event", + "type": "Function", + "start_line": 46, + "end_line": 56, + "tags": { + "PURPOSE": "Handles application shutdown tasks, such as stopping the scheduler.", + "PRE": "None.", + "POST": "Scheduler is stopped." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "log_requests", + "type": "Function", + "start_line": 68, + "end_line": 81, + "tags": { + "PURPOSE": "Middleware to log incoming HTTP requests and their response status.", + "PRE": "request is a FastAPI Request object.", + "POST": "Logs request and response details.", + "PARAM": "call_next (Callable) - The next middleware or route handler." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "websocket_endpoint", + "type": "Function", + "start_line": 94, + "end_line": 151, + "tags": { + "PURPOSE": "Provides a WebSocket endpoint for real-time log streaming of a task.", + "PRE": "task_id must be a valid task ID.", + "POST": "WebSocket connection is managed and logs are streamed until disconnect." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "StaticFiles", + "type": "Mount", + "start_line": 153, + "end_line": 189, + "tags": { + "SEMANTICS": "static, frontend, spa", + "PURPOSE": "Mounts the frontend build directory to serve static assets." + }, + "relations": [], + "children": [ + { + "name": "serve_spa", + "type": "Function", + "start_line": 161, + "end_line": 178, + "tags": { + "PURPOSE": "Serves frontend static files or index.html for SPA routing.", + "PRE": "file_path is requested by the client.", + "POST": "Returns the requested file or index.html as a fallback." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "read_root", + "type": "Function", + "start_line": 180, + "end_line": 188, + "tags": { + "PURPOSE": "A simple root endpoint to confirm that the API is running when frontend is missing.", + "PRE": "None.", + "POST": "Returns a JSON message indicating API status." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "Dependencies", "type": "Module", @@ -3693,1087 +4390,6 @@ "issues": [] } }, - { - "name": "AppModule", - "type": "Module", - "start_line": 1, - "end_line": 189, - "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.", - "LAYER": "UI (API)", - "RELATION": "Depends on the dependency module and API route modules." - }, - "relations": [], - "children": [ - { - "name": "App", - "type": "Global", - "start_line": 24, - "end_line": 32, - "tags": { - "SEMANTICS": "app, fastapi, instance", - "PURPOSE": "The global FastAPI application instance." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "startup_event", - "type": "Function", - "start_line": 34, - "end_line": 44, - "tags": { - "PURPOSE": "Handles application startup tasks, such as starting the scheduler.", - "PRE": "None.", - "POST": "Scheduler is started." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "shutdown_event", - "type": "Function", - "start_line": 46, - "end_line": 56, - "tags": { - "PURPOSE": "Handles application shutdown tasks, such as stopping the scheduler.", - "PRE": "None.", - "POST": "Scheduler is stopped." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "log_requests", - "type": "Function", - "start_line": 68, - "end_line": 81, - "tags": { - "PURPOSE": "Middleware to log incoming HTTP requests and their response status.", - "PRE": "request is a FastAPI Request object.", - "POST": "Logs request and response details.", - "PARAM": "call_next (Callable) - The next middleware or route handler." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "websocket_endpoint", - "type": "Function", - "start_line": 93, - "end_line": 150, - "tags": { - "PURPOSE": "Provides a WebSocket endpoint for real-time log streaming of a task.", - "PRE": "task_id must be a valid task ID.", - "POST": "WebSocket connection is managed and logs are streamed until disconnect." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "StaticFiles", - "type": "Mount", - "start_line": 152, - "end_line": 188, - "tags": { - "SEMANTICS": "static, frontend, spa", - "PURPOSE": "Mounts the frontend build directory to serve static assets." - }, - "relations": [], - "children": [ - { - "name": "serve_spa", - "type": "Function", - "start_line": 160, - "end_line": 177, - "tags": { - "PURPOSE": "Serves frontend static files or index.html for SPA routing.", - "PRE": "file_path is requested by the client.", - "POST": "Returns the requested file or index.html as a fallback." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "read_root", - "type": "Function", - "start_line": 179, - "end_line": 187, - "tags": { - "PURPOSE": "A simple root endpoint to confirm that the API is running when frontend is missing.", - "PRE": "None.", - "POST": "Returns a JSON message indicating API status." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "backend.src.models.mapping", - "type": "Module", - "start_line": 1, - "end_line": 70, - "tags": { - "SEMANTICS": "database, mapping, environment, migration, sqlalchemy, sqlite", - "PURPOSE": "Defines the database schema for environment metadata and database mappings using SQLAlchemy.", - "LAYER": "Domain", - "INVARIANT": "All primary keys are UUID strings.", - "CONSTRAINT": "source_env_id and target_env_id must be valid environment IDs." - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "sqlalchemy" - } - ], - "children": [ - { - "name": "MigrationStatus", - "type": "Class", - "start_line": 21, - "end_line": 29, - "tags": { - "PURPOSE": "Enumeration of possible migration job statuses." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Environment", - "type": "Class", - "start_line": 31, - "end_line": 40, - "tags": { - "PURPOSE": "Represents a Superset instance environment." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DatabaseMapping", - "type": "Class", - "start_line": 42, - "end_line": 55, - "tags": { - "PURPOSE": "Represents a mapping between source and target databases." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "MigrationJob", - "type": "Class", - "start_line": 57, - "end_line": 68, - "tags": { - "PURPOSE": "Represents a single migration execution job." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "GitModels", - "type": "Module", - "start_line": 1, - "end_line": 73, - "tags": { - "SEMANTICS": "git, models, sqlalchemy, database, schema", - "PURPOSE": "Git-specific SQLAlchemy models for configuration and repository tracking.", - "LAYER": "Model", - "RELATION": "specs/011-git-integration-dashboard/data-model.md" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "backend.src.models.dashboard", - "type": "Module", - "start_line": 1, - "end_line": 28, - "tags": { - "SEMANTICS": "dashboard, model, metadata, migration", - "PURPOSE": "Defines data models for dashboard metadata and selection.", - "LAYER": "Model" - }, - "relations": [ - { - "type": "USED_BY", - "target": "backend.src.api.routes.migration" - } - ], - "children": [ - { - "name": "DashboardMetadata", - "type": "Class", - "start_line": 10, - "end_line": 17, - "tags": { - "PURPOSE": "Represents a dashboard available for migration." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DashboardSelection", - "type": "Class", - "start_line": 19, - "end_line": 26, - "tags": { - "PURPOSE": "Represents the user's selection of dashboards to migrate." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "backend.src.models.task", - "type": "Module", - "start_line": 1, - "end_line": 35, - "tags": { - "SEMANTICS": "database, task, record, sqlalchemy, sqlite", - "PURPOSE": "Defines the database schema for task execution records.", - "LAYER": "Domain", - "INVARIANT": "All primary keys are UUID strings." - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "sqlalchemy" - } - ], - "children": [ - { - "name": "TaskRecord", - "type": "Class", - "start_line": 17, - "end_line": 33, - "tags": { - "PURPOSE": "Represents a persistent record of a task execution." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "backend.src.models.connection", - "type": "Module", - "start_line": 1, - "end_line": 34, - "tags": { - "SEMANTICS": "database, connection, configuration, sqlalchemy, sqlite", - "PURPOSE": "Defines the database schema for external database connection configurations.", - "LAYER": "Domain", - "INVARIANT": "All primary keys are UUID strings." - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "sqlalchemy" - } - ], - "children": [ - { - "name": "ConnectionConfig", - "type": "Class", - "start_line": 17, - "end_line": 32, - "tags": { - "PURPOSE": "Stores credentials for external databases used for column mapping." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "backend.src.services.mapping_service", - "type": "Module", - "start_line": 1, - "end_line": 71, - "tags": { - "SEMANTICS": "service, mapping, fuzzy-matching, superset", - "PURPOSE": "Orchestrates database fetching and fuzzy matching suggestions.", - "LAYER": "Service", - "INVARIANT": "Suggestions are based on database names." - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "backend.src.core.superset_client" - }, - { - "type": "DEPENDS_ON", - "target": "backend.src.core.utils.matching" - } - ], - "children": [ - { - "name": "MappingService", - "type": "Class", - "start_line": 18, - "end_line": 69, - "tags": { - "PURPOSE": "Service for handling database mapping logic." - }, - "relations": [], - "children": [ - { - "name": "__init__", - "type": "Function", - "start_line": 22, - "end_line": 30, - "tags": { - "PURPOSE": "Initializes the mapping service with a config manager.", - "PRE": "config_manager is provided.", - "PARAM": "config_manager (ConfigManager) - The configuration manager.", - "POST": "Service is initialized." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "_get_client", - "type": "Function", - "start_line": 32, - "end_line": 46, - "tags": { - "PURPOSE": "Helper to get an initialized SupersetClient for an environment.", - "PARAM": "env_id (str) - The ID of the environment.", - "PRE": "environment must exist in config.", - "POST": "Returns an initialized SupersetClient.", - "RETURN": "SupersetClient - Initialized client." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_suggestions", - "type": "Function", - "start_line": 48, - "end_line": 67, - "tags": { - "PURPOSE": "Fetches databases from both environments and returns fuzzy matching suggestions.", - "PARAM": "target_env_id (str) - Target environment ID.", - "PRE": "Both environments must be accessible.", - "POST": "Returns fuzzy-matched database suggestions.", - "RETURN": "List[Dict] - Suggested mappings." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "backend.src.services.git_service", - "type": "Module", - "start_line": 1, - "end_line": 407, - "tags": { - "SEMANTICS": "git, service, gitpython, repository, version_control", - "PURPOSE": "Core Git logic using GitPython to manage dashboard repositories.", - "LAYER": "Service", - "INVARIANT": "All Git operations must be performed on a valid local directory." - }, - "relations": [ - { - "type": "INHERITS_FROM", - "target": "None" - }, - { - "type": "USED_BY", - "target": "src.api.routes.git" - }, - { - "type": "USED_BY", - "target": "src.plugins.git_plugin" - } - ], - "children": [ - { - "name": "GitService", - "type": "Class", - "start_line": 22, - "end_line": 406, - "tags": { - "PURPOSE": "Wrapper for GitPython operations with semantic logging and error handling." - }, - "relations": [], - "children": [ - { - "name": "__init__", - "type": "Function", - "start_line": 29, - "end_line": 39, - "tags": { - "PURPOSE": "Initializes the GitService with a base path for repositories.", - "PARAM": "base_path (str) - Root directory for all Git clones.", - "PRE": "base_path is a valid string path.", - "POST": "GitService is initialized; base_path directory exists." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "_get_repo_path", - "type": "Function", - "start_line": 41, - "end_line": 50, - "tags": { - "PURPOSE": "Resolves the local filesystem path for a dashboard's repository.", - "PARAM": "dashboard_id (int)", - "PRE": "dashboard_id is an integer.", - "POST": "Returns the absolute or relative path to the dashboard's repo.", - "RETURN": "str" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "init_repo", - "type": "Function", - "start_line": 52, - "end_line": 77, - "tags": { - "PURPOSE": "Initialize or clone a repository for a dashboard.", - "PARAM": "pat (str) - Personal Access Token for authentication.", - "PRE": "dashboard_id is int, remote_url is valid Git URL, pat is provided.", - "POST": "Repository is cloned or opened at the local path.", - "RETURN": "Repo - GitPython Repo object." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_repo", - "type": "Function", - "start_line": 79, - "end_line": 95, - "tags": { - "PURPOSE": "Get Repo object for a dashboard.", - "PRE": "Repository must exist on disk for the given dashboard_id.", - "POST": "Returns a GitPython Repo instance for the dashboard.", - "RETURN": "Repo" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "list_branches", - "type": "Function", - "start_line": 97, - "end_line": 149, - "tags": { - "PURPOSE": "List all branches for a dashboard's repository.", - "PRE": "Repository for dashboard_id exists.", - "POST": "Returns a list of branch metadata dictionaries.", - "RETURN": "List[dict]" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "create_branch", - "type": "Function", - "start_line": 151, - "end_line": 185, - "tags": { - "PURPOSE": "Create a new branch from an existing one.", - "PARAM": "from_branch (str) - Source branch.", - "PRE": "Repository exists; name is valid; from_branch exists or repo is empty.", - "POST": "A new branch is created in the repository." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "checkout_branch", - "type": "Function", - "start_line": 187, - "end_line": 196, - "tags": { - "PURPOSE": "Switch to a specific branch.", - "PRE": "Repository exists and the specified branch name exists.", - "POST": "The repository working directory is updated to the specified branch." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "commit_changes", - "type": "Function", - "start_line": 198, - "end_line": 222, - "tags": { - "PURPOSE": "Stage and commit changes.", - "PARAM": "files (List[str]) - Optional list of specific files to stage.", - "PRE": "Repository exists and has changes (dirty) or files are specified.", - "POST": "Changes are staged and a new commit is created." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "push_changes", - "type": "Function", - "start_line": 224, - "end_line": 256, - "tags": { - "PURPOSE": "Push local commits to remote.", - "PRE": "Repository exists and has an 'origin' remote.", - "POST": "Local branch commits are pushed to origin." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "pull_changes", - "type": "Function", - "start_line": 258, - "end_line": 279, - "tags": { - "PURPOSE": "Pull changes from remote.", - "PRE": "Repository exists and has an 'origin' remote.", - "POST": "Changes from origin are pulled and merged into the active branch." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_status", - "type": "Function", - "start_line": 281, - "end_line": 305, - "tags": { - "PURPOSE": "Get current repository status (dirty files, untracked, etc.)", - "PRE": "Repository for dashboard_id exists.", - "POST": "Returns a dictionary representing the Git status.", - "RETURN": "dict" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_diff", - "type": "Function", - "start_line": 307, - "end_line": 324, - "tags": { - "PURPOSE": "Generate diff for a file or the whole repository.", - "PARAM": "staged (bool) - Whether to show staged changes.", - "PRE": "Repository for dashboard_id exists.", - "POST": "Returns the diff text as a string.", - "RETURN": "str" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_commit_history", - "type": "Function", - "start_line": 326, - "end_line": 354, - "tags": { - "PURPOSE": "Retrieve commit history for a repository.", - "PARAM": "limit (int) - Max number of commits to return.", - "PRE": "Repository for dashboard_id exists.", - "POST": "Returns a list of dictionaries for each commit in history.", - "RETURN": "List[dict]" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "test_connection", - "type": "Function", - "start_line": 356, - "end_line": 404, - "tags": { - "PURPOSE": "Test connection to Git provider using PAT.", - "PARAM": "pat (str)", - "PRE": "provider is valid; url is a valid HTTP(S) URL; pat is provided.", - "POST": "Returns True if connection to the provider's API succeeds.", - "RETURN": "bool" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "ConfigManagerModule", - "type": "Module", - "start_line": 1, - "end_line": 280, - "tags": { - "SEMANTICS": "config, manager, persistence, json", - "PURPOSE": "Manages application configuration, including loading/saving to JSON and CRUD for environments.", - "LAYER": "Core", - "INVARIANT": "Configuration must always be valid according to AppConfig model.", - "PUBLIC_API": "ConfigManager" - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "ConfigModels" - }, - { - "type": "CALLS", - "target": "logger" - }, - { - "type": "WRITES_TO", - "target": "config.json" - } - ], - "children": [ - { - "name": "ConfigManager", - "type": "Class", - "start_line": 22, - "end_line": 278, - "tags": { - "PURPOSE": "A class to handle application configuration persistence and management." - }, - "relations": [ - { - "type": "WRITES_TO", - "target": "config.json" - } - ], - "children": [ - { - "name": "__init__", - "type": "Function", - "start_line": 27, - "end_line": 50, - "tags": { - "PURPOSE": "Initializes the ConfigManager.", - "PRE": "isinstance(config_path, str) and len(config_path) > 0", - "POST": "self.config is an instance of AppConfig", - "PARAM": "config_path (str) - Path to the configuration file." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "_load_config", - "type": "Function", - "start_line": 52, - "end_line": 84, - "tags": { - "PURPOSE": "Loads the configuration from disk or creates a default one.", - "PRE": "self.config_path is set.", - "POST": "isinstance(return, AppConfig)", - "RETURN": "AppConfig - The loaded or default configuration." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "_save_config_to_disk", - "type": "Function", - "start_line": 86, - "end_line": 105, - "tags": { - "PURPOSE": "Saves the provided configuration object to disk.", - "PRE": "isinstance(config, AppConfig)", - "POST": "Configuration saved to disk.", - "PARAM": "config (AppConfig) - The configuration to save." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "save", - "type": "Function", - "start_line": 107, - "end_line": 114, - "tags": { - "PURPOSE": "Saves the current configuration state to disk.", - "PRE": "self.config is set.", - "POST": "self._save_config_to_disk called." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_config", - "type": "Function", - "start_line": 116, - "end_line": 124, - "tags": { - "PURPOSE": "Returns the current configuration.", - "PRE": "self.config is set.", - "POST": "Returns self.config.", - "RETURN": "AppConfig - The current configuration." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "update_global_settings", - "type": "Function", - "start_line": 126, - "end_line": 146, - "tags": { - "PURPOSE": "Updates the global settings and persists the change.", - "PRE": "isinstance(settings, GlobalSettings)", - "POST": "self.config.settings updated and saved.", - "PARAM": "settings (GlobalSettings) - The new global settings." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "validate_path", - "type": "Function", - "start_line": 148, - "end_line": 167, - "tags": { - "PURPOSE": "Validates if a path exists and is writable.", - "PRE": "path is a string.", - "POST": "Returns (bool, str) status.", - "PARAM": "path (str) - The path to validate.", - "RETURN": "tuple (bool, str) - (is_valid, message)" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_environments", - "type": "Function", - "start_line": 169, - "end_line": 177, - "tags": { - "PURPOSE": "Returns the list of configured environments.", - "PRE": "self.config is set.", - "POST": "Returns list of environments.", - "RETURN": "List[Environment] - List of environments." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "has_environments", - "type": "Function", - "start_line": 179, - "end_line": 187, - "tags": { - "PURPOSE": "Checks if at least one environment is configured.", - "PRE": "self.config is set.", - "POST": "Returns boolean indicating if environments exist.", - "RETURN": "bool - True if at least one environment exists." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_environment", - "type": "Function", - "start_line": 189, - "end_line": 201, - "tags": { - "PURPOSE": "Returns a single environment by ID.", - "PRE": "self.config is set and isinstance(env_id, str) and len(env_id) > 0.", - "POST": "Returns Environment object if found, None otherwise.", - "PARAM": "env_id (str) - The ID of the environment to retrieve.", - "RETURN": "Optional[Environment] - The environment with the given ID, or None." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "add_environment", - "type": "Function", - "start_line": 203, - "end_line": 222, - "tags": { - "PURPOSE": "Adds a new environment to the configuration.", - "PRE": "isinstance(env, Environment)", - "POST": "Environment added or updated in self.config.environments.", - "PARAM": "env (Environment) - The environment to add." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "update_environment", - "type": "Function", - "start_line": 224, - "end_line": 253, - "tags": { - "PURPOSE": "Updates an existing environment.", - "PRE": "isinstance(env_id, str) and len(env_id) > 0 and isinstance(updated_env, Environment)", - "POST": "Returns True if environment was found and updated.", - "PARAM": "updated_env (Environment) - The updated environment data.", - "RETURN": "bool - True if updated, False otherwise." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "delete_environment", - "type": "Function", - "start_line": 255, - "end_line": 276, - "tags": { - "PURPOSE": "Deletes an environment by ID.", - "PRE": "isinstance(env_id, str) and len(env_id) > 0", - "POST": "Environment removed from self.config.environments if it existed.", - "PARAM": "env_id (str) - The ID of the environment to delete." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, { "name": "backend.src.core.superset_client", "type": "Module", @@ -5234,44 +4850,57 @@ } }, { - "name": "backend.src.core.migration_engine", + "name": "ConfigManagerModule", "type": "Module", "start_line": 1, - "end_line": 104, + "end_line": 284, "tags": { - "SEMANTICS": "migration, engine, zip, yaml, transformation", - "PURPOSE": "Handles the interception and transformation of Superset asset ZIP archives.", + "SEMANTICS": "config, manager, persistence, json", + "PURPOSE": "Manages application configuration, including loading/saving to JSON and CRUD for environments.", "LAYER": "Core", - "INVARIANT": "ZIP structure must be preserved after transformation." + "INVARIANT": "Configuration must always be valid according to AppConfig model.", + "PUBLIC_API": "ConfigManager" }, "relations": [ { "type": "DEPENDS_ON", - "target": "PyYAML" + "target": "ConfigModels" + }, + { + "type": "CALLS", + "target": "logger" + }, + { + "type": "WRITES_TO", + "target": "config.json" } ], "children": [ { - "name": "MigrationEngine", + "name": "ConfigManager", "type": "Class", "start_line": 22, - "end_line": 102, + "end_line": 282, "tags": { - "PURPOSE": "Engine for transforming Superset export ZIPs." + "PURPOSE": "A class to handle application configuration persistence and management." }, - "relations": [], + "relations": [ + { + "type": "WRITES_TO", + "target": "config.json" + } + ], "children": [ { - "name": "transform_zip", + "name": "__init__", "type": "Function", - "start_line": 26, - "end_line": 78, + "start_line": 27, + "end_line": 50, "tags": { - "PURPOSE": "Extracts ZIP, replaces database UUIDs in YAMLs, and re-packages.", - "PARAM": "strip_databases (bool) - Whether to remove the databases directory from the archive.", - "PRE": "zip_path must point to a valid Superset export archive.", - "POST": "Transformed archive is saved to output_path.", - "RETURN": "bool - True if successful." + "PURPOSE": "Initializes the ConfigManager.", + "PRE": "isinstance(config_path, str) and len(config_path) > 0", + "POST": "self.config is an instance of AppConfig", + "PARAM": "config_path (str) - Path to the configuration file." }, "relations": [], "children": [], @@ -5281,25 +4910,221 @@ } }, { - "name": "_transform_yaml", + "name": "_load_config", "type": "Function", - "start_line": 80, - "end_line": 100, + "start_line": 52, + "end_line": 88, "tags": { - "PURPOSE": "Replaces database_uuid in a single YAML file.", - "PARAM": "db_mapping (Dict[str, str]) - UUID mapping dictionary.", - "PRE": "file_path must exist and be readable.", - "POST": "File is modified in-place if source UUID matches mapping." + "PURPOSE": "Loads the configuration from disk or creates a default one.", + "PRE": "self.config_path is set.", + "POST": "isinstance(return, AppConfig)", + "RETURN": "AppConfig - The loaded or default configuration." }, "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": [] + } + }, + { + "name": "_save_config_to_disk", + "type": "Function", + "start_line": 90, + "end_line": 109, + "tags": { + "PURPOSE": "Saves the provided configuration object to disk.", + "PRE": "isinstance(config, AppConfig)", + "POST": "Configuration saved to disk.", + "PARAM": "config (AppConfig) - The configuration to save." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "save", + "type": "Function", + "start_line": 111, + "end_line": 118, + "tags": { + "PURPOSE": "Saves the current configuration state to disk.", + "PRE": "self.config is set.", + "POST": "self._save_config_to_disk called." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_config", + "type": "Function", + "start_line": 120, + "end_line": 128, + "tags": { + "PURPOSE": "Returns the current configuration.", + "PRE": "self.config is set.", + "POST": "Returns self.config.", + "RETURN": "AppConfig - The current configuration." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "update_global_settings", + "type": "Function", + "start_line": 130, + "end_line": 150, + "tags": { + "PURPOSE": "Updates the global settings and persists the change.", + "PRE": "isinstance(settings, GlobalSettings)", + "POST": "self.config.settings updated and saved.", + "PARAM": "settings (GlobalSettings) - The new global settings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "validate_path", + "type": "Function", + "start_line": 152, + "end_line": 171, + "tags": { + "PURPOSE": "Validates if a path exists and is writable.", + "PRE": "path is a string.", + "POST": "Returns (bool, str) status.", + "PARAM": "path (str) - The path to validate.", + "RETURN": "tuple (bool, str) - (is_valid, message)" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_environments", + "type": "Function", + "start_line": 173, + "end_line": 181, + "tags": { + "PURPOSE": "Returns the list of configured environments.", + "PRE": "self.config is set.", + "POST": "Returns list of environments.", + "RETURN": "List[Environment] - List of environments." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "has_environments", + "type": "Function", + "start_line": 183, + "end_line": 191, + "tags": { + "PURPOSE": "Checks if at least one environment is configured.", + "PRE": "self.config is set.", + "POST": "Returns boolean indicating if environments exist.", + "RETURN": "bool - True if at least one environment exists." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_environment", + "type": "Function", + "start_line": 193, + "end_line": 205, + "tags": { + "PURPOSE": "Returns a single environment by ID.", + "PRE": "self.config is set and isinstance(env_id, str) and len(env_id) > 0.", + "POST": "Returns Environment object if found, None otherwise.", + "PARAM": "env_id (str) - The ID of the environment to retrieve.", + "RETURN": "Optional[Environment] - The environment with the given ID, or None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "add_environment", + "type": "Function", + "start_line": 207, + "end_line": 226, + "tags": { + "PURPOSE": "Adds a new environment to the configuration.", + "PRE": "isinstance(env, Environment)", + "POST": "Environment added or updated in self.config.environments.", + "PARAM": "env (Environment) - The environment to add." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "update_environment", + "type": "Function", + "start_line": 228, + "end_line": 257, + "tags": { + "PURPOSE": "Updates an existing environment.", + "PRE": "isinstance(env_id, str) and len(env_id) > 0 and isinstance(updated_env, Environment)", + "POST": "Returns True if environment was found and updated.", + "PARAM": "updated_env (Environment) - The updated environment data.", + "RETURN": "bool - True if updated, False otherwise." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "delete_environment", + "type": "Function", + "start_line": 259, + "end_line": 280, + "tags": { + "PURPOSE": "Deletes an environment by ID.", + "PRE": "isinstance(env_id, str) and len(env_id) > 0", + "POST": "Environment removed from self.config.environments if it existed.", + "PARAM": "env_id (str) - The ID of the environment to delete." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] } } ], @@ -5315,190 +5140,131 @@ } }, { - "name": "LoggerModule", + "name": "SchedulerModule", "type": "Module", "start_line": 1, - "end_line": 234, + "end_line": 119, "tags": { - "SEMANTICS": "logging, websocket, streaming, handler", - "PURPOSE": "Configures the application's logging system, including a custom handler for buffering logs and streaming them over WebSockets.", + "SEMANTICS": "scheduler, apscheduler, cron, backup", + "PURPOSE": "Manages scheduled tasks using APScheduler.", "LAYER": "Core", - "RELATION": "Used by the main application and other modules to log events. The WebSocketLogHandler is used by the WebSocket endpoint in app.py." + "RELATION": "Uses TaskManager to run scheduled backups." }, "relations": [], "children": [ { - "name": "BeliefFormatter", + "name": "SchedulerService", "type": "Class", - "start_line": 22, - "end_line": 37, + "start_line": 16, + "end_line": 118, "tags": { - "PURPOSE": "Custom logging formatter that adds belief state prefixes to log messages." - }, - "relations": [], - "children": [ - { - "name": "format", - "type": "Function", - "start_line": 25, - "end_line": 36, - "tags": { - "PURPOSE": "Formats the log record, adding belief state context if available.", - "PRE": "record is a logging.LogRecord.", - "POST": "Returns formatted string.", - "PARAM": "record (logging.LogRecord) - The log record to format.", - "RETURN": "str - The formatted log message." - }, - "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." - ] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "LogEntry", - "type": "Class", - "start_line": 40, - "end_line": 49, - "tags": { - "SEMANTICS": "log, entry, record, pydantic", - "PURPOSE": "A Pydantic model representing a single, structured log entry. This is a re-definition for consistency, as it's also defined in task_manager.py." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "belief_scope", - "type": "Function", - "start_line": 51, - "end_line": 84, - "tags": { - "PURPOSE": "Context manager for structured Belief State logging.", - "PARAM": "message (str) - Optional entry message.", - "PRE": "anchor_id must be provided.", - "POST": "Thread-local belief state is updated and entry/exit logs are generated." - }, - "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." - ] - } - }, - { - "name": "configure_logger", - "type": "Function", - "start_line": 86, - "end_line": 128, - "tags": { - "PURPOSE": "Configures the logger with the provided logging settings.", - "PRE": "config is a valid LoggingConfig instance.", - "POST": "Logger level, handlers, and belief state flag are updated.", - "PARAM": "config (LoggingConfig) - The logging configuration." - }, - "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." - ] - } - }, - { - "name": "WebSocketLogHandler", - "type": "Class", - "start_line": 130, - "end_line": 189, - "tags": { - "SEMANTICS": "logging, handler, websocket, buffer", - "PURPOSE": "A custom logging handler that captures log records into a buffer. It is designed to be extended for real-time log streaming over WebSockets." + "SEMANTICS": "scheduler, service, apscheduler", + "PURPOSE": "Provides a service to manage scheduled backup tasks." }, "relations": [], "children": [ { "name": "__init__", "type": "Function", - "start_line": 138, - "end_line": 148, + "start_line": 20, + "end_line": 30, "tags": { - "PURPOSE": "Initializes the handler with a fixed-capacity buffer.", - "PRE": "capacity is an integer.", - "POST": "Instance initialized with empty deque.", - "PARAM": "capacity (int) - Maximum number of logs to keep in memory." + "PURPOSE": "Initializes the scheduler service with task and config managers.", + "PRE": "task_manager and config_manager must be provided.", + "POST": "Scheduler instance is created but not started." }, "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": [] } }, { - "name": "emit", + "name": "start", "type": "Function", - "start_line": 150, - "end_line": 175, + "start_line": 32, + "end_line": 42, "tags": { - "PURPOSE": "Captures a log record, formats it, and stores it in the buffer.", - "PRE": "record is a logging.LogRecord.", - "POST": "Log is added to the log_buffer.", - "PARAM": "record (logging.LogRecord) - The log record to emit." + "PURPOSE": "Starts the background scheduler and loads initial schedules.", + "PRE": "Scheduler should be initialized.", + "POST": "Scheduler is running and schedules are loaded." }, "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": [] } }, { - "name": "get_recent_logs", + "name": "stop", "type": "Function", - "start_line": 177, - "end_line": 187, + "start_line": 44, + "end_line": 53, "tags": { - "PURPOSE": "Returns a list of recent log entries from the buffer.", - "PRE": "None.", - "POST": "Returns list of LogEntry objects.", - "RETURN": "List[LogEntry] - List of buffered log entries." + "PURPOSE": "Stops the background scheduler.", + "PRE": "Scheduler should be running.", + "POST": "Scheduler is shut down." }, "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": [] + } + }, + { + "name": "load_schedules", + "type": "Function", + "start_line": 55, + "end_line": 68, + "tags": { + "PURPOSE": "Loads backup schedules from configuration and registers them.", + "PRE": "config_manager must have valid configuration.", + "POST": "All enabled backup jobs are added to the scheduler." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "add_backup_job", + "type": "Function", + "start_line": 70, + "end_line": 90, + "tags": { + "PURPOSE": "Adds a scheduled backup job for an environment.", + "PRE": "env_id and cron_expression must be valid strings.", + "POST": "A new job is added to the scheduler or replaced if it already exists.", + "PARAM": "cron_expression (str) - The cron expression for the schedule." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "_trigger_backup", + "type": "Function", + "start_line": 92, + "end_line": 116, + "tags": { + "PURPOSE": "Triggered by the scheduler to start a backup task.", + "PRE": "env_id must be a valid environment ID.", + "POST": "A new backup task is created in the task manager if not already running.", + "PARAM": "env_id (str) - The ID of the environment." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] } } ], @@ -5506,101 +5272,104 @@ "valid": true, "issues": [] } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "ConfigModels", + "type": "Module", + "start_line": 1, + "end_line": 63, + "tags": { + "SEMANTICS": "config, models, pydantic", + "PURPOSE": "Defines the data models for application configuration using Pydantic.", + "LAYER": "Core" + }, + "relations": [ + { + "type": "READS_FROM", + "target": "config.json" }, { - "name": "Logger", - "type": "Global", - "start_line": 191, - "end_line": 233, + "type": "USED_BY", + "target": "ConfigManager" + } + ], + "children": [ + { + "name": "Schedule", + "type": "DataClass", + "start_line": 12, + "end_line": 17, "tags": { - "SEMANTICS": "logger, global, instance", - "PURPOSE": "The global logger instance for the application, configured with both a console handler and the custom WebSocket handler." + "PURPOSE": "Represents a backup schedule configuration." }, "relations": [], - "children": [ - { - "name": "believed", - "type": "Function", - "start_line": 196, - "end_line": 212, - "tags": { - "PURPOSE": "A decorator that wraps a function in a belief scope.", - "PARAM": "anchor_id (str) - The identifier for the semantic block." - }, - "relations": [], - "children": [ - { - "name": "decorator", - "type": "Function", - "start_line": 200, - "end_line": 210, - "tags": { - "PURPOSE": "Internal decorator for belief scope." - }, - "relations": [], - "children": [ - { - "name": "wrapper", - "type": "Function", - "start_line": 203, - "end_line": 208, - "tags": { - "PURPOSE": "Internal wrapper that enters belief scope." - }, - "relations": [], - "children": [], - "compliance": { - "valid": false, - "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST" - ] - } - } - ], - "compliance": { - "valid": false, - "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Belief State Logging: Function should use belief_scope context manager." - ] - } - } - ], - "compliance": { - "valid": false, - "issues": [ - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Belief State Logging: Function should use belief_scope context manager.", - "Missing Mandatory Tag: @PRE", - "Missing Mandatory Tag: @POST", - "Missing Belief State Logging: Function should use belief_scope context manager." - ] - } - } - ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Environment", + "type": "DataClass", + "start_line": 19, + "end_line": 31, + "tags": { + "PURPOSE": "Represents a Superset environment configuration." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "LoggingConfig", + "type": "DataClass", + "start_line": 33, + "end_line": 41, + "tags": { + "PURPOSE": "Defines the configuration for the application's logging system." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "GlobalSettings", + "type": "DataClass", + "start_line": 43, + "end_line": 54, + "tags": { + "PURPOSE": "Represents global application settings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "AppConfig", + "type": "DataClass", + "start_line": 56, + "end_line": 61, + "tags": { + "PURPOSE": "The root configuration model containing all application settings." + }, + "relations": [], + "children": [], "compliance": { "valid": true, "issues": [] @@ -5776,140 +5545,130 @@ } }, { - "name": "ConfigModels", + "name": "LoggerModule", "type": "Module", "start_line": 1, - "end_line": 62, + "end_line": 246, "tags": { - "SEMANTICS": "config, models, pydantic", - "PURPOSE": "Defines the data models for application configuration using Pydantic.", - "LAYER": "Core" - }, - "relations": [ - { - "type": "READS_FROM", - "target": "config.json" - }, - { - "type": "USED_BY", - "target": "ConfigManager" - } - ], - "children": [ - { - "name": "Schedule", - "type": "DataClass", - "start_line": 11, - "end_line": 16, - "tags": { - "PURPOSE": "Represents a backup schedule configuration." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "Environment", - "type": "DataClass", - "start_line": 18, - "end_line": 30, - "tags": { - "PURPOSE": "Represents a Superset environment configuration." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "LoggingConfig", - "type": "DataClass", - "start_line": 32, - "end_line": 40, - "tags": { - "PURPOSE": "Defines the configuration for the application's logging system." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "GlobalSettings", - "type": "DataClass", - "start_line": 42, - "end_line": 53, - "tags": { - "PURPOSE": "Represents global application settings." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "AppConfig", - "type": "DataClass", - "start_line": 55, - "end_line": 60, - "tags": { - "PURPOSE": "The root configuration model containing all application settings." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "SchedulerModule", - "type": "Module", - "start_line": 1, - "end_line": 119, - "tags": { - "SEMANTICS": "scheduler, apscheduler, cron, backup", - "PURPOSE": "Manages scheduled tasks using APScheduler.", + "SEMANTICS": "logging, websocket, streaming, handler", + "PURPOSE": "Configures the application's logging system, including a custom handler for buffering logs and streaming them over WebSockets.", "LAYER": "Core", - "RELATION": "Uses TaskManager to run scheduled backups." + "RELATION": "Used by the main application and other modules to log events. The WebSocketLogHandler is used by the WebSocket endpoint in app.py." }, "relations": [], "children": [ { - "name": "SchedulerService", + "name": "BeliefFormatter", "type": "Class", - "start_line": 16, - "end_line": 118, + "start_line": 22, + "end_line": 38, "tags": { - "SEMANTICS": "scheduler, service, apscheduler", - "PURPOSE": "Provides a service to manage scheduled backup tasks." + "PURPOSE": "Custom logging formatter that adds belief state prefixes to log messages." + }, + "relations": [], + "children": [ + { + "name": "format", + "type": "Function", + "start_line": 25, + "end_line": 37, + "tags": { + "PURPOSE": "Formats the log record, adding belief state context if available.", + "PRE": "record is a logging.LogRecord.", + "POST": "Returns formatted string.", + "PARAM": "record (logging.LogRecord) - The log record to format.", + "RETURN": "str - The formatted log message.", + "SEMANTICS": "logging, formatter, context" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "LogEntry", + "type": "Class", + "start_line": 41, + "end_line": 50, + "tags": { + "SEMANTICS": "log, entry, record, pydantic", + "PURPOSE": "A Pydantic model representing a single, structured log entry. This is a re-definition for consistency, as it's also defined in task_manager.py." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "belief_scope", + "type": "Function", + "start_line": 52, + "end_line": 86, + "tags": { + "PURPOSE": "Context manager for structured Belief State logging.", + "PARAM": "message (str) - Optional entry message.", + "PRE": "anchor_id must be provided.", + "POST": "Thread-local belief state is updated and entry/exit logs are generated.", + "SEMANTICS": "logging, context, belief_state" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "configure_logger", + "type": "Function", + "start_line": 88, + "end_line": 131, + "tags": { + "PURPOSE": "Configures the logger with the provided logging settings.", + "PRE": "config is a valid LoggingConfig instance.", + "POST": "Logger level, handlers, and belief state flag are updated.", + "PARAM": "config (LoggingConfig) - The logging configuration.", + "SEMANTICS": "logging, configuration, initialization" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "WebSocketLogHandler", + "type": "Class", + "start_line": 133, + "end_line": 195, + "tags": { + "SEMANTICS": "logging, handler, websocket, buffer", + "PURPOSE": "A custom logging handler that captures log records into a buffer. It is designed to be extended for real-time log streaming over WebSockets." }, "relations": [], "children": [ { "name": "__init__", "type": "Function", - "start_line": 20, - "end_line": 30, + "start_line": 141, + "end_line": 152, "tags": { - "PURPOSE": "Initializes the scheduler service with task and config managers.", - "PRE": "task_manager and config_manager must be provided.", - "POST": "Scheduler instance is created but not started." + "PURPOSE": "Initializes the handler with a fixed-capacity buffer.", + "PRE": "capacity is an integer.", + "POST": "Instance initialized with empty deque.", + "PARAM": "capacity (int) - Maximum number of logs to keep in memory.", + "SEMANTICS": "logging, initialization, buffer" }, "relations": [], "children": [], @@ -5919,14 +5678,16 @@ } }, { - "name": "start", + "name": "emit", "type": "Function", - "start_line": 32, - "end_line": 42, + "start_line": 154, + "end_line": 180, "tags": { - "PURPOSE": "Starts the background scheduler and loads initial schedules.", - "PRE": "Scheduler should be initialized.", - "POST": "Scheduler is running and schedules are loaded." + "PURPOSE": "Captures a log record, formats it, and stores it in the buffer.", + "PRE": "record is a logging.LogRecord.", + "POST": "Log is added to the log_buffer.", + "PARAM": "record (logging.LogRecord) - The log record to emit.", + "SEMANTICS": "logging, handler, buffer" }, "relations": [], "children": [], @@ -5936,14 +5697,16 @@ } }, { - "name": "stop", + "name": "get_recent_logs", "type": "Function", - "start_line": 44, - "end_line": 53, + "start_line": 182, + "end_line": 193, "tags": { - "PURPOSE": "Stops the background scheduler.", - "PRE": "Scheduler should be running.", - "POST": "Scheduler is shut down." + "PURPOSE": "Returns a list of recent log entries from the buffer.", + "PRE": "None.", + "POST": "Returns list of LogEntry objects.", + "RETURN": "List[LogEntry] - List of buffered log entries.", + "SEMANTICS": "logging, buffer, retrieval" }, "relations": [], "children": [], @@ -5951,55 +5714,73 @@ "valid": true, "issues": [] } - }, + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Logger", + "type": "Global", + "start_line": 197, + "end_line": 245, + "tags": { + "SEMANTICS": "logger, global, instance", + "PURPOSE": "The global logger instance for the application, configured with both a console handler and the custom WebSocket handler." + }, + "relations": [], + "children": [ { - "name": "load_schedules", + "name": "believed", "type": "Function", - "start_line": 55, - "end_line": 68, + "start_line": 202, + "end_line": 224, "tags": { - "PURPOSE": "Loads backup schedules from configuration and registers them.", - "PRE": "config_manager must have valid configuration.", - "POST": "All enabled backup jobs are added to the scheduler." + "PURPOSE": "A decorator that wraps a function in a belief scope.", + "PARAM": "anchor_id (str) - The identifier for the semantic block.", + "PRE": "anchor_id must be a string.", + "POST": "Returns a decorator function." }, "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "add_backup_job", - "type": "Function", - "start_line": 70, - "end_line": 90, - "tags": { - "PURPOSE": "Adds a scheduled backup job for an environment.", - "PRE": "env_id and cron_expression must be valid strings.", - "POST": "A new job is added to the scheduler or replaced if it already exists.", - "PARAM": "cron_expression (str) - The cron expression for the schedule." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "_trigger_backup", - "type": "Function", - "start_line": 92, - "end_line": 116, - "tags": { - "PURPOSE": "Triggered by the scheduler to start a backup task.", - "PRE": "env_id must be a valid environment ID.", - "POST": "A new backup task is created in the task manager if not already running.", - "PARAM": "env_id (str) - The ID of the environment." - }, - "relations": [], - "children": [], + "children": [ + { + "name": "decorator", + "type": "Function", + "start_line": 208, + "end_line": 222, + "tags": { + "PURPOSE": "Internal decorator for belief scope.", + "PRE": "func must be a callable.", + "POST": "Returns the wrapped function." + }, + "relations": [], + "children": [ + { + "name": "wrapper", + "type": "Function", + "start_line": 213, + "end_line": 220, + "tags": { + "PURPOSE": "Internal wrapper that enters belief scope.", + "PRE": "None.", + "POST": "Executes the function within a belief scope." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], "compliance": { "valid": true, "issues": [] @@ -6021,7 +5802,7 @@ "name": "PluginLoader", "type": "Class", "start_line": 9, - "end_line": 191, + "end_line": 200, "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.", @@ -6052,7 +5833,7 @@ "name": "_load_plugins", "type": "Function", "start_line": 33, - "end_line": 57, + "end_line": 66, "tags": { "PURPOSE": "Scans the plugin directory and loads all valid plugins.", "PRE": "plugin_dir exists or can be created.", @@ -6068,8 +5849,8 @@ { "name": "_load_module", "type": "Function", - "start_line": 59, - "end_line": 107, + "start_line": 68, + "end_line": 116, "tags": { "PURPOSE": "Loads a single Python module and discovers PluginBase implementations.", "PRE": "module_name and file_path are valid.", @@ -6086,8 +5867,8 @@ { "name": "_register_plugin", "type": "Function", - "start_line": 109, - "end_line": 147, + "start_line": 118, + "end_line": 156, "tags": { "PURPOSE": "Registers a PluginBase instance and its configuration.", "PRE": "plugin_instance is a valid implementation of PluginBase.", @@ -6104,8 +5885,8 @@ { "name": "get_plugin", "type": "Function", - "start_line": 150, - "end_line": 162, + "start_line": 159, + "end_line": 171, "tags": { "PURPOSE": "Retrieves a loaded plugin instance by its ID.", "PRE": "plugin_id is a string.", @@ -6123,8 +5904,8 @@ { "name": "get_all_plugin_configs", "type": "Function", - "start_line": 164, - "end_line": 175, + "start_line": 173, + "end_line": 184, "tags": { "PURPOSE": "Returns a list of all registered plugin configurations.", "PRE": "None.", @@ -6141,8 +5922,8 @@ { "name": "has_plugin", "type": "Function", - "start_line": 177, - "end_line": 189, + "start_line": 186, + "end_line": 198, "tags": { "PURPOSE": "Checks if a plugin with the given ID is registered.", "PRE": "plugin_id is a string.", @@ -6163,6 +5944,87 @@ "issues": [] } }, + { + "name": "backend.src.core.migration_engine", + "type": "Module", + "start_line": 1, + "end_line": 104, + "tags": { + "SEMANTICS": "migration, engine, zip, yaml, transformation", + "PURPOSE": "Handles the interception and transformation of Superset asset ZIP archives.", + "LAYER": "Core", + "INVARIANT": "ZIP structure must be preserved after transformation." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "PyYAML" + } + ], + "children": [ + { + "name": "MigrationEngine", + "type": "Class", + "start_line": 22, + "end_line": 102, + "tags": { + "PURPOSE": "Engine for transforming Superset export ZIPs." + }, + "relations": [], + "children": [ + { + "name": "transform_zip", + "type": "Function", + "start_line": 26, + "end_line": 78, + "tags": { + "PURPOSE": "Extracts ZIP, replaces database UUIDs in YAMLs, and re-packages.", + "PARAM": "strip_databases (bool) - Whether to remove the databases directory from the archive.", + "PRE": "zip_path must point to a valid Superset export archive.", + "POST": "Transformed archive is saved to output_path.", + "RETURN": "bool - True if successful." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "_transform_yaml", + "type": "Function", + "start_line": 80, + "end_line": 100, + "tags": { + "PURPOSE": "Replaces database_uuid in a single YAML file.", + "PARAM": "db_mapping (Dict[str, str]) - UUID mapping dictionary.", + "PRE": "file_path must exist and be readable.", + "POST": "File is modified in-place if source UUID matches mapping." + }, + "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." + ] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "PluginBase", "type": "Class", @@ -6310,43 +6172,340 @@ } }, { - "name": "backend.src.core.utils.matching", + "name": "backend.core.utils.fileio", "type": "Module", "start_line": 1, - "end_line": 53, + "end_line": 488, "tags": { - "SEMANTICS": "fuzzy, matching, rapidfuzz, database, mapping", - "PURPOSE": "Provides utility functions for fuzzy matching database names.", - "LAYER": "Core", - "INVARIANT": "Confidence scores are returned as floats between 0.0 and 1.0." + "SEMANTICS": "file, io, zip, yaml, temp, archive, utility", + "PURPOSE": "\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0443\u0442\u0438\u043b\u0438\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0430\u0440\u0445\u0438\u0432\u0430\u043c\u0438 ZIP, \u0444\u0430\u0439\u043b\u0430\u043c\u0438 YAML \u0438 \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439.", + "LAYER": "Infra", + "PUBLIC_API": "create_temp_file, remove_empty_directories, read_dashboard_from_disk, calculate_crc32, RetentionPolicy, archive_exports, save_and_unpack_dashboard, update_yamls, create_dashboard_export, sanitize_filename, get_filename_from_headers, consolidate_archive_folders" }, "relations": [ { "type": "DEPENDS_ON", - "target": "rapidfuzz" + "target": "backend.src.core.logger" + }, + { + "type": "DEPENDS_ON", + "target": "pyyaml" } ], "children": [ { - "name": "suggest_mappings", - "type": "Function", - "start_line": 15, - "end_line": 51, + "name": "InvalidZipFormatError", + "type": "Class", + "start_line": 26, + "end_line": 30, "tags": { - "PURPOSE": "Suggests mappings between source and target databases using fuzzy matching.", - "PRE": "source_databases and target_databases are lists of dictionaries with 'uuid' and 'database_name'.", - "POST": "Returns a list of suggested mappings with confidence scores.", - "PARAM": "threshold (int) - Minimum confidence score (0-100).", - "RETURN": "List[Dict] - Suggested mappings." + "PURPOSE": "Exception raised when a file is not a valid ZIP archive." }, "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": [] + } + }, + { + "name": "create_temp_file", + "type": "Function", + "start_line": 32, + "end_line": 71, + "tags": { + "PURPOSE": "\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c.", + "PRE": "suffix \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0435\u0439 \u0442\u0438\u043f \u0440\u0435\u0441\u0443\u0440\u0441\u0430.", + "POST": "\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0441\u043e\u0437\u0434\u0430\u043d \u0438 \u043f\u0443\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d; \u0440\u0435\u0441\u0443\u0440\u0441 \u0443\u0434\u0430\u043b\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.", + "PARAM": "mode (str) - \u0420\u0435\u0436\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0444\u0430\u0439\u043b (e.g., 'wb').", + "YIELDS": "Path - \u041f\u0443\u0442\u044c \u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u0443.", + "THROW": "IOError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "remove_empty_directories", + "type": "Function", + "start_line": 73, + "end_line": 96, + "tags": { + "PURPOSE": "\u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438.", + "PRE": "root_dir \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0443\u0442\u0435\u043c \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.", + "POST": "\u0412\u0441\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u043e \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e.", + "PARAM": "root_dir (str) - \u041f\u0443\u0442\u044c \u043a \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438.", + "RETURN": "int - \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "read_dashboard_from_disk", + "type": "Function", + "start_line": 98, + "end_line": 114, + "tags": { + "PURPOSE": "\u0427\u0438\u0442\u0430\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441 \u0434\u0438\u0441\u043a\u0430.", + "PRE": "file_path \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b.", + "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0431\u0430\u0439\u0442\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0438 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430.", + "PARAM": "file_path (str) - \u041f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443.", + "RETURN": "Tuple[bytes, str] - \u041a\u043e\u0440\u0442\u0435\u0436 (\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430).", + "THROW": "FileNotFoundError - \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "calculate_crc32", + "type": "Function", + "start_line": 116, + "end_line": 128, + "tags": { + "PURPOSE": "\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443 CRC32 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430.", + "PRE": "file_path \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c Path \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u0444\u0430\u0439\u043b\u0443.", + "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 8-\u0437\u043d\u0430\u0447\u043d\u0443\u044e hex-\u0441\u0442\u0440\u043e\u043a\u0443 CRC32.", + "PARAM": "file_path (Path) - \u041f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443.", + "RETURN": "str - 8-\u0437\u043d\u0430\u0447\u043d\u043e\u0435 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 CRC32.", + "THROW": "IOError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "RetentionPolicy", + "type": "DataClass", + "start_line": 131, + "end_line": 138, + "tags": { + "PURPOSE": "\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u043e\u0432 (\u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0435, \u0435\u0436\u0435\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0435, \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0435)." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "archive_exports", + "type": "Function", + "start_line": 141, + "end_line": 222, + "tags": { + "PURPOSE": "\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0440\u0445\u0438\u0432\u043e\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044e.", + "PRE": "output_dir \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0443\u0442\u0435\u043c \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.", + "POST": "\u0421\u0442\u0430\u0440\u044b\u0435 \u0438\u043b\u0438 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0435\u0441\u044f \u0430\u0440\u0445\u0438\u0432\u044b \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0435.", + "PARAM": "deduplicate (bool) - \u0424\u043b\u0430\u0433 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432 \u043f\u043e CRC32." + }, + "relations": [ + { + "type": "CALLS", + "target": "apply_retention_policy" + }, + { + "type": "CALLS", + "target": "calculate_crc32" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "apply_retention_policy", + "type": "Function", + "start_line": 224, + "end_line": 257, + "tags": { + "PURPOSE": "(Helper) \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a \u0441\u043f\u0438\u0441\u043a\u0443 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f \u0442\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c.", + "PRE": "files_with_dates is a list of (Path, date) tuples.", + "POST": "Returns a set of files to keep.", + "PARAM": "policy (RetentionPolicy) - \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.", + "RETURN": "set - \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u0442\u0435\u0439 \u043a \u0444\u0430\u0439\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "save_and_unpack_dashboard", + "type": "Function", + "start_line": 259, + "end_line": 288, + "tags": { + "PURPOSE": "\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 ZIP-\u0430\u0440\u0445\u0438\u0432\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a \u0438 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e.", + "PRE": "zip_content \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0433\u043e ZIP-\u0430\u0440\u0445\u0438\u0432\u0430.", + "POST": "ZIP-\u0444\u0430\u0439\u043b \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d, \u0438 \u0435\u0441\u043b\u0438 unpack=True, \u043e\u043d \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d \u0432 output_dir.", + "PARAM": "original_filename (Optional[str]) - \u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.", + "RETURN": "Tuple[Path, Optional[Path]] - \u041f\u0443\u0442\u044c \u043a ZIP-\u0444\u0430\u0439\u043b\u0443 \u0438, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e, \u043f\u0443\u0442\u044c \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u043e\u0439.", + "THROW": "InvalidZipFormatError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 ZIP." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "update_yamls", + "type": "Function", + "start_line": 290, + "end_line": 310, + "tags": { + "PURPOSE": "\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432 YAML-\u0444\u0430\u0439\u043b\u0430\u0445, \u0437\u0430\u043c\u0435\u043d\u044f\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f regex.", + "PRE": "path \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0435\u0439.", + "POST": "\u0412\u0441\u0435 YAML \u0444\u0430\u0439\u043b\u044b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c.", + "THROW": "FileNotFoundError - \u0415\u0441\u043b\u0438 `path` \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.", + "PARAM": "replace_string (Optional[LiteralString]) - \u0421\u0442\u0440\u043e\u043a\u0430 \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u043d\u044b." + }, + "relations": [ + { + "type": "CALLS", + "target": "_update_yaml_file" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "_update_yaml_file", + "type": "Function", + "start_line": 312, + "end_line": 377, + "tags": { + "PURPOSE": "(Helper) \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043e\u0434\u0438\u043d YAML \u0444\u0430\u0439\u043b.", + "PRE": "file_path \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c Path \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 YAML \u0444\u0430\u0439\u043b\u0443.", + "POST": "\u0424\u0430\u0439\u043b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c \u0438\u043b\u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u043c\u0443 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044e.", + "PARAM": "replace_string (Optional[str]) - \u0417\u0430\u043c\u0435\u043d\u0430." + }, + "relations": [], + "children": [ + { + "name": "replacer", + "type": "Function", + "start_line": 359, + "end_line": 368, + "tags": { + "PURPOSE": "\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043c\u0435\u043d\u044b, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0449\u0430\u044f \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438.", + "PRE": "match \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.", + "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043d\u043e\u0432\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0438 \u043a\u0430\u0432\u044b\u0447\u043a\u0438." + }, + "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." + ] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "create_dashboard_export", + "type": "Function", + "start_line": 379, + "end_line": 405, + "tags": { + "PURPOSE": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 ZIP-\u0430\u0440\u0445\u0438\u0432 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0443\u0442\u0435\u0439.", + "PRE": "source_paths \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0443\u0442\u0438.", + "POST": "ZIP-\u0430\u0440\u0445\u0438\u0432 \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u043e \u043f\u0443\u0442\u0438 zip_path.", + "PARAM": "exclude_extensions (Optional[List[str]]) - \u0421\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.", + "RETURN": "bool - `True` \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0445\u0435, `False` \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "sanitize_filename", + "type": "Function", + "start_line": 407, + "end_line": 416, + "tags": { + "PURPOSE": "\u041e\u0447\u0438\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0432 \u0438\u043c\u0435\u043d\u0430\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.", + "PRE": "filename \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439.", + "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0431\u0435\u0437 \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.", + "PARAM": "filename (str) - \u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430.", + "RETURN": "str - \u041e\u0447\u0438\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_filename_from_headers", + "type": "Function", + "start_line": 418, + "end_line": 430, + "tags": { + "PURPOSE": "\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u0437 HTTP \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 'Content-Disposition'.", + "PRE": "headers \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.", + "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 None, \u0435\u0441\u043b\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442.", + "PARAM": "headers (dict) - \u0421\u043b\u043e\u0432\u0430\u0440\u044c HTTP \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.", + "RETURN": "Optional[str] - \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 or `None`." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "consolidate_archive_folders", + "type": "Function", + "start_line": 432, + "end_line": 486, + "tags": { + "PURPOSE": "\u041a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u043b\u0430\u0433\u0430 \u0432 \u0438\u043c\u0435\u043d\u0438.", + "PRE": "root_directory \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c Path \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.", + "POST": "\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0432 \u043e\u0434\u043d\u0443.", + "THROW": "TypeError, ValueError - \u0415\u0441\u043b\u0438 `root_directory` \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u0435\u043d.", + "PARAM": "root_directory (Path) - \u041a\u043e\u0440\u043d\u0435\u0432\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0430\u0446\u0438\u0438." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] } } ], @@ -6769,6 +6928,52 @@ "issues": [] } }, + { + "name": "backend.src.core.utils.matching", + "type": "Module", + "start_line": 1, + "end_line": 53, + "tags": { + "SEMANTICS": "fuzzy, matching, rapidfuzz, database, mapping", + "PURPOSE": "Provides utility functions for fuzzy matching database names.", + "LAYER": "Core", + "INVARIANT": "Confidence scores are returned as floats between 0.0 and 1.0." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "rapidfuzz" + } + ], + "children": [ + { + "name": "suggest_mappings", + "type": "Function", + "start_line": 15, + "end_line": 51, + "tags": { + "PURPOSE": "Suggests mappings between source and target databases using fuzzy matching.", + "PRE": "source_databases and target_databases are lists of dictionaries with 'uuid' and 'database_name'.", + "POST": "Returns a list of suggested mappings with confidence scores.", + "PARAM": "threshold (int) - Minimum confidence score (0-100).", + "RETURN": "List[Dict] - Suggested mappings." + }, + "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." + ] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "backend.core.utils.dataset_mapper", "type": "Module", @@ -6916,258 +7121,118 @@ } }, { - "name": "backend.core.utils.fileio", + "name": "TaskPersistenceModule", "type": "Module", "start_line": 1, - "end_line": 488, + "end_line": 158, "tags": { - "SEMANTICS": "file, io, zip, yaml, temp, archive, utility", - "PURPOSE": "\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0443\u0442\u0438\u043b\u0438\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0430\u0440\u0445\u0438\u0432\u0430\u043c\u0438 ZIP, \u0444\u0430\u0439\u043b\u0430\u043c\u0438 YAML \u0438 \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439.", - "LAYER": "Infra", - "PUBLIC_API": "create_temp_file, remove_empty_directories, read_dashboard_from_disk, calculate_crc32, RetentionPolicy, archive_exports, save_and_unpack_dashboard, update_yamls, create_dashboard_export, sanitize_filename, get_filename_from_headers, consolidate_archive_folders" + "SEMANTICS": "persistence, sqlite, sqlalchemy, task, storage", + "PURPOSE": "Handles the persistence of tasks using SQLAlchemy and the tasks.db database.", + "LAYER": "Core", + "RELATION": "Used by TaskManager to save and load tasks.", + "INVARIANT": "Database schema must match the TaskRecord model structure." }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "backend.src.core.logger" - }, - { - "type": "DEPENDS_ON", - "target": "pyyaml" - } - ], + "relations": [], "children": [ { - "name": "InvalidZipFormatError", + "name": "TaskPersistenceService", "type": "Class", - "start_line": 26, - "end_line": 30, + "start_line": 20, + "end_line": 157, "tags": { - "PURPOSE": "Exception raised when a file is not a valid ZIP archive." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "create_temp_file", - "type": "Function", - "start_line": 32, - "end_line": 71, - "tags": { - "PURPOSE": "\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c.", - "PRE": "suffix \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0435\u0439 \u0442\u0438\u043f \u0440\u0435\u0441\u0443\u0440\u0441\u0430.", - "POST": "\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0441\u043e\u0437\u0434\u0430\u043d \u0438 \u043f\u0443\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d; \u0440\u0435\u0441\u0443\u0440\u0441 \u0443\u0434\u0430\u043b\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.", - "PARAM": "mode (str) - \u0420\u0435\u0436\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0444\u0430\u0439\u043b (e.g., 'wb').", - "YIELDS": "Path - \u041f\u0443\u0442\u044c \u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u0443.", - "THROW": "IOError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "remove_empty_directories", - "type": "Function", - "start_line": 73, - "end_line": 96, - "tags": { - "PURPOSE": "\u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438.", - "PRE": "root_dir \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0443\u0442\u0435\u043c \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.", - "POST": "\u0412\u0441\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u043e \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e.", - "PARAM": "root_dir (str) - \u041f\u0443\u0442\u044c \u043a \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438.", - "RETURN": "int - \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "read_dashboard_from_disk", - "type": "Function", - "start_line": 98, - "end_line": 114, - "tags": { - "PURPOSE": "\u0427\u0438\u0442\u0430\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441 \u0434\u0438\u0441\u043a\u0430.", - "PRE": "file_path \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b.", - "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0431\u0430\u0439\u0442\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0438 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430.", - "PARAM": "file_path (str) - \u041f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443.", - "RETURN": "Tuple[bytes, str] - \u041a\u043e\u0440\u0442\u0435\u0436 (\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430).", - "THROW": "FileNotFoundError - \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "calculate_crc32", - "type": "Function", - "start_line": 116, - "end_line": 128, - "tags": { - "PURPOSE": "\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443 CRC32 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430.", - "PRE": "file_path \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c Path \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u0444\u0430\u0439\u043b\u0443.", - "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 8-\u0437\u043d\u0430\u0447\u043d\u0443\u044e hex-\u0441\u0442\u0440\u043e\u043a\u0443 CRC32.", - "PARAM": "file_path (Path) - \u041f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443.", - "RETURN": "str - 8-\u0437\u043d\u0430\u0447\u043d\u043e\u0435 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 CRC32.", - "THROW": "IOError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "RetentionPolicy", - "type": "DataClass", - "start_line": 131, - "end_line": 138, - "tags": { - "PURPOSE": "\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u043e\u0432 (\u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0435, \u0435\u0436\u0435\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0435, \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0435)." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "archive_exports", - "type": "Function", - "start_line": 141, - "end_line": 222, - "tags": { - "PURPOSE": "\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0440\u0445\u0438\u0432\u043e\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044e.", - "PRE": "output_dir \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0443\u0442\u0435\u043c \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.", - "POST": "\u0421\u0442\u0430\u0440\u044b\u0435 \u0438\u043b\u0438 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0435\u0441\u044f \u0430\u0440\u0445\u0438\u0432\u044b \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0435.", - "PARAM": "deduplicate (bool) - \u0424\u043b\u0430\u0433 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432 \u043f\u043e CRC32." - }, - "relations": [ - { - "type": "CALLS", - "target": "apply_retention_policy" - }, - { - "type": "CALLS", - "target": "calculate_crc32" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "apply_retention_policy", - "type": "Function", - "start_line": 224, - "end_line": 257, - "tags": { - "PURPOSE": "(Helper) \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a \u0441\u043f\u0438\u0441\u043a\u0443 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f \u0442\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c.", - "PRE": "files_with_dates is a list of (Path, date) tuples.", - "POST": "Returns a set of files to keep.", - "PARAM": "policy (RetentionPolicy) - \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.", - "RETURN": "set - \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u0442\u0435\u0439 \u043a \u0444\u0430\u0439\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "save_and_unpack_dashboard", - "type": "Function", - "start_line": 259, - "end_line": 288, - "tags": { - "PURPOSE": "\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 ZIP-\u0430\u0440\u0445\u0438\u0432\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a \u0438 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e.", - "PRE": "zip_content \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0433\u043e ZIP-\u0430\u0440\u0445\u0438\u0432\u0430.", - "POST": "ZIP-\u0444\u0430\u0439\u043b \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d, \u0438 \u0435\u0441\u043b\u0438 unpack=True, \u043e\u043d \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d \u0432 output_dir.", - "PARAM": "original_filename (Optional[str]) - \u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.", - "RETURN": "Tuple[Path, Optional[Path]] - \u041f\u0443\u0442\u044c \u043a ZIP-\u0444\u0430\u0439\u043b\u0443 \u0438, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e, \u043f\u0443\u0442\u044c \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u043e\u0439.", - "THROW": "InvalidZipFormatError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 ZIP." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "update_yamls", - "type": "Function", - "start_line": 290, - "end_line": 310, - "tags": { - "PURPOSE": "\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432 YAML-\u0444\u0430\u0439\u043b\u0430\u0445, \u0437\u0430\u043c\u0435\u043d\u044f\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f regex.", - "PRE": "path \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0435\u0439.", - "POST": "\u0412\u0441\u0435 YAML \u0444\u0430\u0439\u043b\u044b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c.", - "THROW": "FileNotFoundError - \u0415\u0441\u043b\u0438 `path` \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.", - "PARAM": "replace_string (Optional[LiteralString]) - \u0421\u0442\u0440\u043e\u043a\u0430 \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u043d\u044b." - }, - "relations": [ - { - "type": "CALLS", - "target": "_update_yaml_file" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "_update_yaml_file", - "type": "Function", - "start_line": 312, - "end_line": 377, - "tags": { - "PURPOSE": "(Helper) \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043e\u0434\u0438\u043d YAML \u0444\u0430\u0439\u043b.", - "PRE": "file_path \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c Path \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 YAML \u0444\u0430\u0439\u043b\u0443.", - "POST": "\u0424\u0430\u0439\u043b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c \u0438\u043b\u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u043c\u0443 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044e.", - "PARAM": "replace_string (Optional[str]) - \u0417\u0430\u043c\u0435\u043d\u0430." + "SEMANTICS": "persistence, service, database, sqlalchemy", + "PURPOSE": "Provides methods to save and load tasks from the tasks.db database using SQLAlchemy." }, "relations": [], "children": [ { - "name": "replacer", + "name": "__init__", "type": "Function", - "start_line": 359, - "end_line": 368, + "start_line": 24, + "end_line": 32, "tags": { - "PURPOSE": "\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043c\u0435\u043d\u044b, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0449\u0430\u044f \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438.", - "PRE": "match \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.", - "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043d\u043e\u0432\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0438 \u043a\u0430\u0432\u044b\u0447\u043a\u0438." + "PURPOSE": "Initializes the persistence service.", + "PRE": "None.", + "POST": "Service is ready." }, "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": [] + } + }, + { + "name": "persist_task", + "type": "Function", + "start_line": 34, + "end_line": 77, + "tags": { + "PURPOSE": "Persists or updates a single task in the database.", + "PRE": "isinstance(task, Task)", + "POST": "Task record created or updated in database.", + "PARAM": "task (Task) - The task object to persist." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "persist_tasks", + "type": "Function", + "start_line": 79, + "end_line": 88, + "tags": { + "PURPOSE": "Persists multiple tasks.", + "PRE": "isinstance(tasks, list)", + "POST": "All tasks in list are persisted.", + "PARAM": "tasks (List[Task]) - The list of tasks to persist." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "load_tasks", + "type": "Function", + "start_line": 90, + "end_line": 135, + "tags": { + "PURPOSE": "Loads tasks from the database.", + "PRE": "limit is an integer.", + "POST": "Returns list of Task objects.", + "PARAM": "status (Optional[TaskStatus]) - Filter by status.", + "RETURN": "List[Task] - The loaded tasks." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "delete_tasks", + "type": "Function", + "start_line": 137, + "end_line": 155, + "tags": { + "PURPOSE": "Deletes specific tasks from the database.", + "PRE": "task_ids is a list of strings.", + "POST": "Specified task records deleted from database.", + "PARAM": "task_ids (List[str]) - List of task IDs to delete." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] } } ], @@ -7175,82 +7240,6 @@ "valid": true, "issues": [] } - }, - { - "name": "create_dashboard_export", - "type": "Function", - "start_line": 379, - "end_line": 405, - "tags": { - "PURPOSE": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 ZIP-\u0430\u0440\u0445\u0438\u0432 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0443\u0442\u0435\u0439.", - "PRE": "source_paths \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0443\u0442\u0438.", - "POST": "ZIP-\u0430\u0440\u0445\u0438\u0432 \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u043e \u043f\u0443\u0442\u0438 zip_path.", - "PARAM": "exclude_extensions (Optional[List[str]]) - \u0421\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.", - "RETURN": "bool - `True` \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0445\u0435, `False` \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "sanitize_filename", - "type": "Function", - "start_line": 407, - "end_line": 416, - "tags": { - "PURPOSE": "\u041e\u0447\u0438\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0432 \u0438\u043c\u0435\u043d\u0430\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.", - "PRE": "filename \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439.", - "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0431\u0435\u0437 \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.", - "PARAM": "filename (str) - \u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430.", - "RETURN": "str - \u041e\u0447\u0438\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_filename_from_headers", - "type": "Function", - "start_line": 418, - "end_line": 430, - "tags": { - "PURPOSE": "\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u0437 HTTP \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 'Content-Disposition'.", - "PRE": "headers \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.", - "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 None, \u0435\u0441\u043b\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442.", - "PARAM": "headers (dict) - \u0421\u043b\u043e\u0432\u0430\u0440\u044c HTTP \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.", - "RETURN": "Optional[str] - \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 or `None`." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "consolidate_archive_folders", - "type": "Function", - "start_line": 432, - "end_line": 486, - "tags": { - "PURPOSE": "\u041a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u043b\u0430\u0433\u0430 \u0432 \u0438\u043c\u0435\u043d\u0438.", - "PRE": "root_directory \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c Path \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.", - "POST": "\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0432 \u043e\u0434\u043d\u0443.", - "THROW": "TypeError, ValueError - \u0415\u0441\u043b\u0438 `root_directory` \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u0435\u043d.", - "PARAM": "root_directory (Path) - \u041a\u043e\u0440\u043d\u0435\u0432\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0430\u0446\u0438\u0438." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } } ], "compliance": { @@ -7611,97 +7600,6 @@ "issues": [] } }, - { - "name": "TaskManagerPackage", - "type": "Module", - "start_line": 1, - "end_line": 12, - "tags": { - "SEMANTICS": "task, manager, package, exports", - "PURPOSE": "Exports the public API of the task manager package.", - "LAYER": "Core", - "RELATION": "Aggregates models and manager." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TaskCleanupModule", - "type": "Module", - "start_line": 1, - "end_line": 47, - "tags": { - "SEMANTICS": "task, cleanup, retention", - "PURPOSE": "Implements task cleanup and retention policies.", - "LAYER": "Core", - "RELATION": "Uses TaskPersistenceService to delete old tasks." - }, - "relations": [], - "children": [ - { - "name": "TaskCleanupService", - "type": "Class", - "start_line": 12, - "end_line": 46, - "tags": { - "PURPOSE": "Provides methods to clean up old task records." - }, - "relations": [], - "children": [ - { - "name": "__init__", - "type": "Function", - "start_line": 15, - "end_line": 22, - "tags": { - "PURPOSE": "Initializes the cleanup service with dependencies.", - "PRE": "persistence_service and config_manager are valid.", - "POST": "Cleanup service is ready." - }, - "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." - ] - } - }, - { - "name": "run_cleanup", - "type": "Function", - "start_line": 24, - "end_line": 44, - "tags": { - "PURPOSE": "Deletes tasks older than the configured retention period.", - "PRE": "Config manager has valid settings.", - "POST": "Old tasks are deleted from persistence." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, { "name": "TaskManagerModels", "type": "Module", @@ -7795,276 +7693,58 @@ } }, { - "name": "TaskPersistenceModule", + "name": "TaskCleanupModule", "type": "Module", "start_line": 1, - "end_line": 158, + "end_line": 47, "tags": { - "SEMANTICS": "persistence, sqlite, sqlalchemy, task, storage", - "PURPOSE": "Handles the persistence of tasks using SQLAlchemy and the tasks.db database.", + "SEMANTICS": "task, cleanup, retention", + "PURPOSE": "Implements task cleanup and retention policies.", "LAYER": "Core", - "RELATION": "Used by TaskManager to save and load tasks.", - "INVARIANT": "Database schema must match the TaskRecord model structure." + "RELATION": "Uses TaskPersistenceService to delete old tasks." }, "relations": [], "children": [ { - "name": "TaskPersistenceService", + "name": "TaskCleanupService", "type": "Class", - "start_line": 20, - "end_line": 157, + "start_line": 12, + "end_line": 46, "tags": { - "SEMANTICS": "persistence, service, database, sqlalchemy", - "PURPOSE": "Provides methods to save and load tasks from the tasks.db database using SQLAlchemy." + "PURPOSE": "Provides methods to clean up old task records." }, "relations": [], "children": [ { "name": "__init__", "type": "Function", - "start_line": 24, - "end_line": 32, + "start_line": 15, + "end_line": 22, "tags": { - "PURPOSE": "Initializes the persistence service.", - "PRE": "None.", - "POST": "Service is ready." + "PURPOSE": "Initializes the cleanup service with dependencies.", + "PRE": "persistence_service and config_manager are valid.", + "POST": "Cleanup service is ready." }, "relations": [], "children": [], "compliance": { - "valid": true, - "issues": [] + "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." + ] } }, { - "name": "persist_task", - "type": "Function", - "start_line": 34, - "end_line": 77, - "tags": { - "PURPOSE": "Persists or updates a single task in the database.", - "PRE": "isinstance(task, Task)", - "POST": "Task record created or updated in database.", - "PARAM": "task (Task) - The task object to persist." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "persist_tasks", - "type": "Function", - "start_line": 79, - "end_line": 88, - "tags": { - "PURPOSE": "Persists multiple tasks.", - "PRE": "isinstance(tasks, list)", - "POST": "All tasks in list are persisted.", - "PARAM": "tasks (List[Task]) - The list of tasks to persist." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "load_tasks", - "type": "Function", - "start_line": 90, - "end_line": 135, - "tags": { - "PURPOSE": "Loads tasks from the database.", - "PRE": "limit is an integer.", - "POST": "Returns list of Task objects.", - "PARAM": "status (Optional[TaskStatus]) - Filter by status.", - "RETURN": "List[Task] - The loaded tasks." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "delete_tasks", - "type": "Function", - "start_line": 137, - "end_line": 155, - "tags": { - "PURPOSE": "Deletes specific tasks from the database.", - "PRE": "task_ids is a list of strings.", - "POST": "Specified task records deleted from database.", - "PARAM": "task_ids (List[str]) - List of task IDs to delete." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "SearchPluginModule", - "type": "Module", - "start_line": 1, - "end_line": 202, - "tags": { - "SEMANTICS": "plugin, search, datasets, regex, superset", - "PURPOSE": "Implements a plugin for searching text patterns across all datasets in a specific Superset environment.", - "LAYER": "Plugins", - "RELATION": "Inherits from PluginBase. Uses SupersetClient from core.", - "CONSTRAINT": "Must use belief_scope for logging." - }, - "relations": [], - "children": [ - { - "name": "SearchPlugin", - "type": "Class", - "start_line": 16, - "end_line": 201, - "tags": { - "PURPOSE": "Plugin for searching text patterns in Superset datasets." - }, - "relations": [], - "children": [ - { - "name": "id", + "name": "run_cleanup", "type": "Function", "start_line": 24, - "end_line": 32, + "end_line": 44, "tags": { - "PURPOSE": "Returns the unique identifier for the search plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string ID.", - "RETURN": "str - \"search-datasets\"" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "name", - "type": "Function", - "start_line": 35, - "end_line": 43, - "tags": { - "PURPOSE": "Returns the human-readable name of the search plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string name.", - "RETURN": "str - Plugin name." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "description", - "type": "Function", - "start_line": 46, - "end_line": 54, - "tags": { - "PURPOSE": "Returns a description of the search plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string description.", - "RETURN": "str - Plugin description." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "version", - "type": "Function", - "start_line": 57, - "end_line": 65, - "tags": { - "PURPOSE": "Returns the version of the search plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string version.", - "RETURN": "str - \"1.0.0\"" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_schema", - "type": "Function", - "start_line": 67, - "end_line": 90, - "tags": { - "PURPOSE": "Returns the JSON schema for the search plugin parameters.", - "PRE": "Plugin instance exists.", - "POST": "Returns dictionary schema.", - "RETURN": "Dict[str, Any] - JSON schema." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "execute", - "type": "Function", - "start_line": 92, - "end_line": 161, - "tags": { - "PURPOSE": "Executes the dataset search logic.", - "PARAM": "params (Dict[str, Any]) - Search parameters.", - "PRE": "Params contain valid 'env' and 'query'.", - "POST": "Returns a dictionary with count and results list.", - "RETURN": "Dict[str, Any] - Search results." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "_get_context", - "type": "Function", - "start_line": 163, - "end_line": 199, - "tags": { - "PURPOSE": "Extracts a small context around the match for display.", - "PARAM": "context_lines (int) - Number of lines of context to include.", - "PRE": "text and match_text must be strings.", - "POST": "Returns context string.", - "RETURN": "str - Extracted context." + "PURPOSE": "Deletes tasks older than the configured retention period.", + "PRE": "Config manager has valid settings.", + "POST": "Old tasks are deleted from persistence." }, "relations": [], "children": [], @@ -8086,1049 +7766,18 @@ } }, { - "name": "BackupPlugin", + "name": "TaskManagerPackage", "type": "Module", "start_line": 1, - "end_line": 189, + "end_line": 12, "tags": { - "SEMANTICS": "backup, superset, automation, dashboard, plugin", - "PURPOSE": "A plugin that provides functionality to back up Superset dashboards.", - "LAYER": "App" - }, - "relations": [ - { - "type": "IMPLEMENTS", - "target": "PluginBase" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.client" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.utils" - } - ], - "children": [ - { - "name": "BackupPlugin", - "type": "Class", - "start_line": 27, - "end_line": 188, - "tags": { - "PURPOSE": "Implementation of the backup plugin logic." - }, - "relations": [], - "children": [ - { - "name": "id", - "type": "Function", - "start_line": 35, - "end_line": 43, - "tags": { - "PURPOSE": "Returns the unique identifier for the backup plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string ID.", - "RETURN": "str - \"superset-backup\"" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "name", - "type": "Function", - "start_line": 46, - "end_line": 54, - "tags": { - "PURPOSE": "Returns the human-readable name of the backup plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string name.", - "RETURN": "str - Plugin name." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "description", - "type": "Function", - "start_line": 57, - "end_line": 65, - "tags": { - "PURPOSE": "Returns a description of the backup plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string description.", - "RETURN": "str - Plugin description." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "version", - "type": "Function", - "start_line": 68, - "end_line": 76, - "tags": { - "PURPOSE": "Returns the version of the backup plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string version.", - "RETURN": "str - \"1.0.0\"" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_schema", - "type": "Function", - "start_line": 78, - "end_line": 107, - "tags": { - "PURPOSE": "Returns the JSON schema for backup plugin parameters.", - "PRE": "Plugin instance exists.", - "POST": "Returns dictionary schema.", - "RETURN": "Dict[str, Any] - JSON schema." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "execute", - "type": "Function", - "start_line": 109, - "end_line": 187, - "tags": { - "PURPOSE": "Executes the dashboard backup logic.", - "PARAM": "params (Dict[str, Any]) - Backup parameters (env, backup_path).", - "PRE": "Target environment must be configured. params must be a dictionary.", - "POST": "All dashboards are exported and archived." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DebugPluginModule", - "type": "Module", - "start_line": 1, - "end_line": 187, - "tags": { - "SEMANTICS": "plugin, debug, api, database, superset", - "PURPOSE": "Implements a plugin for system diagnostics and debugging Superset API responses.", - "LAYER": "Plugins", - "RELATION": "Inherits from PluginBase. Uses SupersetClient from core.", - "CONSTRAINT": "Must use belief_scope for logging." + "SEMANTICS": "task, manager, package, exports", + "PURPOSE": "Exports the public API of the task manager package.", + "LAYER": "Core", + "RELATION": "Aggregates models and manager." }, "relations": [], - "children": [ - { - "name": "DebugPlugin", - "type": "Class", - "start_line": 15, - "end_line": 186, - "tags": { - "PURPOSE": "Plugin for system diagnostics and debugging." - }, - "relations": [], - "children": [ - { - "name": "id", - "type": "Function", - "start_line": 23, - "end_line": 31, - "tags": { - "PURPOSE": "Returns the unique identifier for the debug plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string ID.", - "RETURN": "str - \"system-debug\"" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "name", - "type": "Function", - "start_line": 34, - "end_line": 42, - "tags": { - "PURPOSE": "Returns the human-readable name of the debug plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string name.", - "RETURN": "str - Plugin name." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "description", - "type": "Function", - "start_line": 45, - "end_line": 53, - "tags": { - "PURPOSE": "Returns a description of the debug plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string description.", - "RETURN": "str - Plugin description." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "version", - "type": "Function", - "start_line": 56, - "end_line": 64, - "tags": { - "PURPOSE": "Returns the version of the debug plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string version.", - "RETURN": "str - \"1.0.0\"" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_schema", - "type": "Function", - "start_line": 66, - "end_line": 105, - "tags": { - "PURPOSE": "Returns the JSON schema for the debug plugin parameters.", - "PRE": "Plugin instance exists.", - "POST": "Returns dictionary schema.", - "RETURN": "Dict[str, Any] - JSON schema." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "execute", - "type": "Function", - "start_line": 107, - "end_line": 123, - "tags": { - "PURPOSE": "Executes the debug logic.", - "PARAM": "params (Dict[str, Any]) - Debug parameters.", - "PRE": "action must be provided in params.", - "POST": "Debug action is executed and results returned.", - "RETURN": "Dict[str, Any] - Execution results." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "_test_db_api", - "type": "Function", - "start_line": 125, - "end_line": 157, - "tags": { - "PURPOSE": "Tests database API connectivity for source and target environments.", - "PRE": "source_env and target_env params exist in params.", - "POST": "Returns DB counts for both envs.", - "PARAM": "params (Dict) - Plugin parameters.", - "RETURN": "Dict - Comparison results." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "_get_dataset_structure", - "type": "Function", - "start_line": 159, - "end_line": 184, - "tags": { - "PURPOSE": "Retrieves the structure of a dataset.", - "PRE": "env and dataset_id params exist in params.", - "POST": "Returns dataset JSON structure.", - "PARAM": "params (Dict) - Plugin parameters.", - "RETURN": "Dict - Dataset structure." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "MigrationPlugin", - "type": "Module", - "start_line": 1, - "end_line": 387, - "tags": { - "SEMANTICS": "migration, superset, automation, dashboard, plugin", - "PURPOSE": "A plugin that provides functionality to migrate Superset dashboards between environments.", - "LAYER": "App" - }, - "relations": [ - { - "type": "IMPLEMENTS", - "target": "PluginBase" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.client" - }, - { - "type": "DEPENDS_ON", - "target": "superset_tool.utils" - } - ], - "children": [ - { - "name": "MigrationPlugin", - "type": "Class", - "start_line": 23, - "end_line": 386, - "tags": { - "PURPOSE": "Implementation of the migration plugin logic." - }, - "relations": [], - "children": [ - { - "name": "id", - "type": "Function", - "start_line": 31, - "end_line": 39, - "tags": { - "PURPOSE": "Returns the unique identifier for the migration plugin.", - "PRE": "None.", - "POST": "Returns \"superset-migration\".", - "RETURN": "str - \"superset-migration\"" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "name", - "type": "Function", - "start_line": 42, - "end_line": 50, - "tags": { - "PURPOSE": "Returns the human-readable name of the migration plugin.", - "PRE": "None.", - "POST": "Returns the plugin name.", - "RETURN": "str - Plugin name." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "description", - "type": "Function", - "start_line": 53, - "end_line": 61, - "tags": { - "PURPOSE": "Returns a description of the migration plugin.", - "PRE": "None.", - "POST": "Returns the plugin description.", - "RETURN": "str - Plugin description." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "version", - "type": "Function", - "start_line": 64, - "end_line": 72, - "tags": { - "PURPOSE": "Returns the version of the migration plugin.", - "PRE": "None.", - "POST": "Returns \"1.0.0\".", - "RETURN": "str - \"1.0.0\"" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_schema", - "type": "Function", - "start_line": 74, - "end_line": 123, - "tags": { - "PURPOSE": "Returns the JSON schema for migration plugin parameters.", - "PRE": "Config manager is available.", - "POST": "Returns a valid JSON schema dictionary.", - "RETURN": "Dict[str, Any] - JSON schema." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "execute", - "type": "Function", - "start_line": 125, - "end_line": 385, - "tags": { - "PURPOSE": "Executes the dashboard migration logic.", - "PARAM": "params (Dict[str, Any]) - Migration parameters.", - "PRE": "Source and target environments must be configured.", - "POST": "Selected dashboards are migrated." - }, - "relations": [], - "children": [ - { - "name": "MigrationPlugin.execute", - "type": "Action", - "start_line": 145, - "end_line": 384, - "tags": { - "PURPOSE": "Execute the migration logic with proper task logging." - }, - "relations": [], - "children": [ - { - "name": "__init__", - "type": "Function", - "start_line": 152, - "end_line": 160, - "tags": { - "PURPOSE": "Initializes the proxy logger.", - "PRE": "None.", - "POST": "Instance is initialized." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "debug", - "type": "Function", - "start_line": 162, - "end_line": 169, - "tags": { - "PURPOSE": "Logs a debug message to the task manager.", - "PRE": "msg is a string.", - "POST": "Log is added to task manager if task_id exists." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "info", - "type": "Function", - "start_line": 171, - "end_line": 178, - "tags": { - "PURPOSE": "Logs an info message to the task manager.", - "PRE": "msg is a string.", - "POST": "Log is added to task manager if task_id exists." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "warning", - "type": "Function", - "start_line": 180, - "end_line": 187, - "tags": { - "PURPOSE": "Logs a warning message to the task manager.", - "PRE": "msg is a string.", - "POST": "Log is added to task manager if task_id exists." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "error", - "type": "Function", - "start_line": 189, - "end_line": 196, - "tags": { - "PURPOSE": "Logs an error message to the task manager.", - "PRE": "msg is a string.", - "POST": "Log is added to task manager if task_id exists." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "critical", - "type": "Function", - "start_line": 198, - "end_line": 205, - "tags": { - "PURPOSE": "Logs a critical message to the task manager.", - "PRE": "msg is a string.", - "POST": "Log is added to task manager if task_id exists." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "exception", - "type": "Function", - "start_line": 207, - "end_line": 214, - "tags": { - "PURPOSE": "Logs an exception message to the task manager.", - "PRE": "msg is a string.", - "POST": "Log is added to task manager if task_id exists." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "backend.src.plugins.git_plugin", - "type": "Module", - "start_line": 1, - "end_line": 376, - "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.", - "LAYER": "Plugin", - "INVARIANT": "\u0412\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 Git \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 GitService.", - "CONSTRAINT": "\u041f\u043b\u0430\u0433\u0438\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 YAML-\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430\u043c\u0438 Superset." - }, - "relations": [ - { - "type": "INHERITS_FROM", - "target": "src.core.plugin_base.PluginBase" - }, - { - "type": "USES", - "target": "src.services.git_service.GitService" - }, - { - "type": "USES", - "target": "src.core.superset_client.SupersetClient" - }, - { - "type": "USES", - "target": "src.core.config_manager.ConfigManager" - } - ], - "children": [ - { - "name": "GitPlugin", - "type": "Class", - "start_line": 28, - "end_line": 375, - "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." - }, - "relations": [], - "children": [ - { - "name": "__init__", - "type": "Function", - "start_line": 32, - "end_line": 60, - "tags": { - "PURPOSE": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0438 \u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.", - "PRE": "config.json exists or shared config_manager is available.", - "POST": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b git_service \u0438 config_manager." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "id", - "type": "Function", - "start_line": 63, - "end_line": 70, - "tags": { - "PURPOSE": "Returns the plugin identifier.", - "PRE": "GitPlugin is initialized.", - "POST": "Returns 'git-integration'." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "name", - "type": "Function", - "start_line": 73, - "end_line": 80, - "tags": { - "PURPOSE": "Returns the plugin name.", - "PRE": "GitPlugin is initialized.", - "POST": "Returns the human-readable name." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "description", - "type": "Function", - "start_line": 83, - "end_line": 90, - "tags": { - "PURPOSE": "Returns the plugin description.", - "PRE": "GitPlugin is initialized.", - "POST": "Returns the plugin's purpose description." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "version", - "type": "Function", - "start_line": 93, - "end_line": 100, - "tags": { - "PURPOSE": "Returns the plugin version.", - "PRE": "GitPlugin is initialized.", - "POST": "Returns the version string." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_schema", - "type": "Function", - "start_line": 102, - "end_line": 119, - "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.", - "POST": "Returns a JSON schema dictionary.", - "RETURN": "Dict[str, Any] - \u0421\u0445\u0435\u043c\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "initialize", - "type": "Function", - "start_line": 121, - "end_line": 374, - "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.", - "POST": "\u041f\u043b\u0430\u0433\u0438\u043d \u0433\u043e\u0442\u043e\u0432 \u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0447." - }, - "relations": [], - "children": [ - { - "name": "execute", - "type": "Function", - "start_line": 129, - "end_line": 158, - "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'.", - "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.", - "PARAM": "task_data (Dict[str, Any]) - \u0414\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.", - "RETURN": "Dict[str, Any] - \u0421\u0442\u0430\u0442\u0443\u0441 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435." - }, - "relations": [ - { - "type": "CALLS", - "target": "self._handle_sync" - }, - { - "type": "CALLS", - "target": "self._handle_deploy" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "_handle_sync", - "type": "Function", - "start_line": 160, - "end_line": 240, - "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.", - "POST": "\u0424\u0430\u0439\u043b\u044b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0434\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0432 Superset.", - "PARAM": "source_env_id (Optional[str]) - ID \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.", - "RETURN": "Dict[str, str] - \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438.", - "SIDE_EFFECT": "\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0444\u0430\u0439\u043b\u044b \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f." - }, - "relations": [ - { - "type": "CALLS", - "target": "src.services.git_service.GitService.get_repo" - }, - { - "type": "CALLS", - "target": "src.core.superset_client.SupersetClient.export_dashboard" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "_handle_deploy", - "type": "Function", - "start_line": 242, - "end_line": 307, - "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.", - "POST": "\u0414\u0430\u0448\u0431\u043e\u0440\u0434 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 Superset.", - "PARAM": "env_id (str) - ID \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.", - "RETURN": "Dict[str, Any] - \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u0435\u043f\u043b\u043e\u044f.", - "SIDE_EFFECT": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 ZIP-\u0444\u0430\u0439\u043b." - }, - "relations": [ - { - "type": "CALLS", - "target": "src.core.superset_client.SupersetClient.import_dashboard" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "_get_env", - "type": "Function", - "start_line": 309, - "end_line": 372, - "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.", - "PRE": "env_id is a string or None.", - "POST": "Returns an Environment object from config or DB.", - "RETURN": "Environment - \u041e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "MapperPluginModule", - "type": "Module", - "start_line": 1, - "end_line": 195, - "tags": { - "SEMANTICS": "plugin, mapper, datasets, postgresql, excel", - "PURPOSE": "Implements a plugin for mapping dataset columns using external database connections or Excel files.", - "LAYER": "Plugins", - "RELATION": "Inherits from PluginBase. Uses DatasetMapper from superset_tool.", - "CONSTRAINT": "Must use belief_scope for logging." - }, - "relations": [], - "children": [ - { - "name": "MapperPlugin", - "type": "Class", - "start_line": 18, - "end_line": 194, - "tags": { - "PURPOSE": "Plugin for mapping dataset columns verbose names." - }, - "relations": [], - "children": [ - { - "name": "id", - "type": "Function", - "start_line": 26, - "end_line": 34, - "tags": { - "PURPOSE": "Returns the unique identifier for the mapper plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string ID.", - "RETURN": "str - \"dataset-mapper\"" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "name", - "type": "Function", - "start_line": 37, - "end_line": 45, - "tags": { - "PURPOSE": "Returns the human-readable name of the mapper plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string name.", - "RETURN": "str - Plugin name." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "description", - "type": "Function", - "start_line": 48, - "end_line": 56, - "tags": { - "PURPOSE": "Returns a description of the mapper plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string description.", - "RETURN": "str - Plugin description." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "version", - "type": "Function", - "start_line": 59, - "end_line": 67, - "tags": { - "PURPOSE": "Returns the version of the mapper plugin.", - "PRE": "Plugin instance exists.", - "POST": "Returns string version.", - "RETURN": "str - \"1.0.0\"" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_schema", - "type": "Function", - "start_line": 69, - "end_line": 119, - "tags": { - "PURPOSE": "Returns the JSON schema for the mapper plugin parameters.", - "PRE": "Plugin instance exists.", - "POST": "Returns dictionary schema.", - "RETURN": "Dict[str, Any] - JSON schema." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "execute", - "type": "Function", - "start_line": 121, - "end_line": 192, - "tags": { - "PURPOSE": "Executes the dataset mapping logic.", - "PARAM": "params (Dict[str, Any]) - Mapping parameters.", - "PRE": "Params contain valid 'env', 'dataset_id', and 'source'. params must be a dictionary.", - "POST": "Updates the dataset in Superset.", - "RETURN": "Dict[str, Any] - Execution status." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - } - ], + "children": [], "compliance": { "valid": true, "issues": [] @@ -9175,661 +7824,6 @@ "issues": [] } }, - { - "name": "backend.src.api.routes.git_schemas", - "type": "Module", - "start_line": 1, - "end_line": 143, - "tags": { - "SEMANTICS": "git, schemas, pydantic, api, contracts", - "PURPOSE": "Defines Pydantic models for the Git integration API layer.", - "LAYER": "API", - "INVARIANT": "All schemas must be compatible with the FastAPI router." - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "backend.src.models.git" - } - ], - "children": [ - { - "name": "GitServerConfigBase", - "type": "Class", - "start_line": 16, - "end_line": 24, - "tags": { - "PURPOSE": "Base schema for Git server configuration attributes." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "GitServerConfigCreate", - "type": "Class", - "start_line": 26, - "end_line": 31, - "tags": { - "PURPOSE": "Schema for creating a new Git server configuration." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "GitServerConfigSchema", - "type": "Class", - "start_line": 33, - "end_line": 43, - "tags": { - "PURPOSE": "Schema for representing a Git server configuration with metadata." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "GitRepositorySchema", - "type": "Class", - "start_line": 45, - "end_line": 59, - "tags": { - "PURPOSE": "Schema for tracking a local Git repository linked to a dashboard." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "BranchSchema", - "type": "Class", - "start_line": 61, - "end_line": 69, - "tags": { - "PURPOSE": "Schema for representing a Git branch metadata." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "CommitSchema", - "type": "Class", - "start_line": 71, - "end_line": 81, - "tags": { - "PURPOSE": "Schema for representing Git commit details." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "BranchCreate", - "type": "Class", - "start_line": 83, - "end_line": 89, - "tags": { - "PURPOSE": "Schema for branch creation requests." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "BranchCheckout", - "type": "Class", - "start_line": 91, - "end_line": 96, - "tags": { - "PURPOSE": "Schema for branch checkout requests." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "CommitCreate", - "type": "Class", - "start_line": 98, - "end_line": 104, - "tags": { - "PURPOSE": "Schema for staging and committing changes." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "ConflictResolution", - "type": "Class", - "start_line": 106, - "end_line": 113, - "tags": { - "PURPOSE": "Schema for resolving merge conflicts." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DeploymentEnvironmentSchema", - "type": "Class", - "start_line": 115, - "end_line": 126, - "tags": { - "PURPOSE": "Schema for representing a target deployment environment." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "DeployRequest", - "type": "Class", - "start_line": 128, - "end_line": 133, - "tags": { - "PURPOSE": "Schema for dashboard deployment requests." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "RepoInitRequest", - "type": "Class", - "start_line": 135, - "end_line": 141, - "tags": { - "PURPOSE": "Schema for repository initialization requests." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "SettingsRouter", - "type": "Module", - "start_line": 1, - "end_line": 208, - "tags": { - "SEMANTICS": "settings, api, router, fastapi", - "PURPOSE": "Provides API endpoints for managing application settings and Superset environments.", - "LAYER": "UI (API)", - "INVARIANT": "All settings changes must be persisted via ConfigManager.", - "PUBLIC_API": "router" - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "ConfigManager" - }, - { - "type": "DEPENDS_ON", - "target": "ConfigModels" - } - ], - "children": [ - { - "name": "get_settings", - "type": "Function", - "start_line": 25, - "end_line": 40, - "tags": { - "PURPOSE": "Retrieves all application settings.", - "PRE": "Config manager is available.", - "POST": "Returns masked AppConfig.", - "RETURN": "AppConfig - The current configuration." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "update_global_settings", - "type": "Function", - "start_line": 42, - "end_line": 57, - "tags": { - "PURPOSE": "Updates global application settings.", - "PRE": "New settings are provided.", - "POST": "Global settings are updated.", - "PARAM": "settings (GlobalSettings) - The new global settings.", - "RETURN": "GlobalSettings - The updated settings." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_environments", - "type": "Function", - "start_line": 59, - "end_line": 69, - "tags": { - "PURPOSE": "Lists all configured Superset environments.", - "PRE": "Config manager is available.", - "POST": "Returns list of environments.", - "RETURN": "List[Environment] - List of environments." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "add_environment", - "type": "Function", - "start_line": 71, - "end_line": 95, - "tags": { - "PURPOSE": "Adds a new Superset environment.", - "PRE": "Environment data is valid and reachable.", - "POST": "Environment is added to config.", - "PARAM": "env (Environment) - The environment to add.", - "RETURN": "Environment - The added environment." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "update_environment", - "type": "Function", - "start_line": 97, - "end_line": 131, - "tags": { - "PURPOSE": "Updates an existing Superset environment.", - "PRE": "ID and valid environment data are provided.", - "POST": "Environment is updated in config.", - "PARAM": "env (Environment) - The updated environment data.", - "RETURN": "Environment - The updated environment." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "delete_environment", - "type": "Function", - "start_line": 133, - "end_line": 147, - "tags": { - "PURPOSE": "Deletes a Superset environment.", - "PRE": "ID is provided.", - "POST": "Environment is removed from config.", - "PARAM": "id (str) - The ID of the environment to delete." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "test_environment_connection", - "type": "Function", - "start_line": 149, - "end_line": 180, - "tags": { - "PURPOSE": "Tests the connection to a Superset environment.", - "PRE": "ID is provided.", - "POST": "Returns success or error status.", - "PARAM": "id (str) - The ID of the environment to test.", - "RETURN": "dict - Success message or error." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "validate_backup_path", - "type": "Function", - "start_line": 182, - "end_line": 206, - "tags": { - "PURPOSE": "Validates if a backup path exists and is writable.", - "PRE": "Path is provided in path_data.", - "POST": "Returns success or error status.", - "PARAM": "path (str) - The path to validate.", - "RETURN": "dict - Validation result." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "ConnectionsRouter", - "type": "Module", - "start_line": 1, - "end_line": 100, - "tags": { - "SEMANTICS": "api, router, connections, database", - "PURPOSE": "Defines the FastAPI router for managing external database connections.", - "LAYER": "UI (API)", - "RELATION": "Depends on SQLAlchemy session.", - "CONSTRAINT": "Must use belief_scope for logging." - }, - "relations": [], - "children": [ - { - "name": "ConnectionSchema", - "type": "Class", - "start_line": 21, - "end_line": 35, - "tags": { - "PURPOSE": "Pydantic model for connection response." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "ConnectionCreate", - "type": "Class", - "start_line": 37, - "end_line": 47, - "tags": { - "PURPOSE": "Pydantic model for creating a connection." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "list_connections", - "type": "Function", - "start_line": 49, - "end_line": 60, - "tags": { - "PURPOSE": "Lists all saved connections.", - "PRE": "Database session is active.", - "POST": "Returns list of connection configs.", - "PARAM": "db (Session) - Database session.", - "RETURN": "List[ConnectionSchema] - List of connections." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "create_connection", - "type": "Function", - "start_line": 62, - "end_line": 78, - "tags": { - "PURPOSE": "Creates a new connection configuration.", - "PRE": "Connection name is unique.", - "POST": "Connection is saved to DB.", - "PARAM": "db (Session) - Database session.", - "RETURN": "ConnectionSchema - Created connection." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "delete_connection", - "type": "Function", - "start_line": 80, - "end_line": 98, - "tags": { - "PURPOSE": "Deletes a connection configuration.", - "PRE": "Connection ID exists.", - "POST": "Connection is removed from DB.", - "PARAM": "db (Session) - Database session.", - "RETURN": "None." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "TasksRouter", - "type": "Module", - "start_line": 1, - "end_line": 187, - "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.", - "LAYER": "UI (API)", - "RELATION": "Depends on the TaskManager. It is included by the main app." - }, - "relations": [], - "children": [ - { - "name": "create_task", - "type": "Function", - "start_line": 27, - "end_line": 50, - "tags": { - "PURPOSE": "Create and start a new task for a given plugin.", - "PARAM": "task_manager (TaskManager) - The task manager instance.", - "PRE": "plugin_id must exist and params must be valid for that plugin.", - "POST": "A new task is created and started.", - "RETURN": "Task - The created task instance." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "list_tasks", - "type": "Function", - "start_line": 53, - "end_line": 73, - "tags": { - "PURPOSE": "Retrieve a list of tasks with pagination and optional status filter.", - "PARAM": "task_manager (TaskManager) - The task manager instance.", - "PRE": "task_manager must be available.", - "POST": "Returns a list of tasks.", - "RETURN": "List[Task] - List of tasks." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_task", - "type": "Function", - "start_line": 76, - "end_line": 95, - "tags": { - "PURPOSE": "Retrieve the details of a specific task.", - "PARAM": "task_manager (TaskManager) - The task manager instance.", - "PRE": "task_id must exist.", - "POST": "Returns task details or raises 404.", - "RETURN": "Task - The task details." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "get_task_logs", - "type": "Function", - "start_line": 98, - "end_line": 117, - "tags": { - "PURPOSE": "Retrieve logs for a specific task.", - "PARAM": "task_manager (TaskManager) - The task manager instance.", - "PRE": "task_id must exist.", - "POST": "Returns a list of log entries or raises 404.", - "RETURN": "List[LogEntry] - List of log entries." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "resolve_task", - "type": "Function", - "start_line": 120, - "end_line": 142, - "tags": { - "PURPOSE": "Resolve a task that is awaiting mapping.", - "PARAM": "task_manager (TaskManager) - The task manager instance.", - "PRE": "task must be in AWAITING_MAPPING status.", - "POST": "Task is resolved and resumes execution.", - "RETURN": "Task - The updated task object." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "resume_task", - "type": "Function", - "start_line": 145, - "end_line": 167, - "tags": { - "PURPOSE": "Resume a task that is awaiting input (e.g., passwords).", - "PARAM": "task_manager (TaskManager) - The task manager instance.", - "PRE": "task must be in AWAITING_INPUT status.", - "POST": "Task resumes execution with provided input.", - "RETURN": "Task - The updated task object." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - }, - { - "name": "clear_tasks", - "type": "Function", - "start_line": 170, - "end_line": 186, - "tags": { - "PURPOSE": "Clear tasks matching the status filter.", - "PARAM": "task_manager (TaskManager) - The task manager instance.", - "PRE": "task_manager is available.", - "POST": "Tasks are removed from memory/persistence." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, { "name": "backend.src.api.routes.git", "type": "Module", @@ -10173,6 +8167,113 @@ "issues": [] } }, + { + "name": "ConnectionsRouter", + "type": "Module", + "start_line": 1, + "end_line": 100, + "tags": { + "SEMANTICS": "api, router, connections, database", + "PURPOSE": "Defines the FastAPI router for managing external database connections.", + "LAYER": "UI (API)", + "RELATION": "Depends on SQLAlchemy session.", + "CONSTRAINT": "Must use belief_scope for logging." + }, + "relations": [], + "children": [ + { + "name": "ConnectionSchema", + "type": "Class", + "start_line": 21, + "end_line": 35, + "tags": { + "PURPOSE": "Pydantic model for connection response." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "ConnectionCreate", + "type": "Class", + "start_line": 37, + "end_line": 47, + "tags": { + "PURPOSE": "Pydantic model for creating a connection." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "list_connections", + "type": "Function", + "start_line": 49, + "end_line": 60, + "tags": { + "PURPOSE": "Lists all saved connections.", + "PRE": "Database session is active.", + "POST": "Returns list of connection configs.", + "PARAM": "db (Session) - Database session.", + "RETURN": "List[ConnectionSchema] - List of connections." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "create_connection", + "type": "Function", + "start_line": 62, + "end_line": 78, + "tags": { + "PURPOSE": "Creates a new connection configuration.", + "PRE": "Connection name is unique.", + "POST": "Connection is saved to DB.", + "PARAM": "db (Session) - Database session.", + "RETURN": "ConnectionSchema - Created connection." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "delete_connection", + "type": "Function", + "start_line": 80, + "end_line": 98, + "tags": { + "PURPOSE": "Deletes a connection configuration.", + "PRE": "Connection ID exists.", + "POST": "Connection is removed from DB.", + "PARAM": "db (Session) - Database session.", + "RETURN": "None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "backend.src.api.routes.environments", "type": "Module", @@ -10295,43 +8396,6 @@ "issues": [] } }, - { - "name": "PluginsRouter", - "type": "Module", - "start_line": 1, - "end_line": 30, - "tags": { - "SEMANTICS": "api, router, plugins, list", - "PURPOSE": "Defines the FastAPI router for plugin-related endpoints, allowing clients to list available plugins.", - "LAYER": "UI (API)", - "RELATION": "Depends on the PluginLoader and PluginConfig. It is included by the main app." - }, - "relations": [], - "children": [ - { - "name": "list_plugins", - "type": "Function", - "start_line": 15, - "end_line": 29, - "tags": { - "PURPOSE": "Retrieve a list of all available plugins.", - "PRE": "plugin_loader is injected via Depends.", - "POST": "Returns a list of PluginConfig objects.", - "RETURN": "List[PluginConfig] - List of registered plugins." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [] - } - } - ], - "compliance": { - "valid": true, - "issues": [] - } - }, { "name": "backend.src.api.routes.migration", "type": "Module", @@ -10397,6 +8461,43 @@ "issues": [] } }, + { + "name": "PluginsRouter", + "type": "Module", + "start_line": 1, + "end_line": 30, + "tags": { + "SEMANTICS": "api, router, plugins, list", + "PURPOSE": "Defines the FastAPI router for plugin-related endpoints, allowing clients to list available plugins.", + "LAYER": "UI (API)", + "RELATION": "Depends on the PluginLoader and PluginConfig. It is included by the main app." + }, + "relations": [], + "children": [ + { + "name": "list_plugins", + "type": "Function", + "start_line": 15, + "end_line": 29, + "tags": { + "PURPOSE": "Retrieve a list of all available plugins.", + "PRE": "plugin_loader is injected via Depends.", + "POST": "Returns a list of PluginConfig objects.", + "RETURN": "List[PluginConfig] - List of registered plugins." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "backend.src.api.routes.mappings", "type": "Module", @@ -10519,6 +8620,2909 @@ "issues": [] } }, + { + "name": "SettingsRouter", + "type": "Module", + "start_line": 1, + "end_line": 212, + "tags": { + "SEMANTICS": "settings, api, router, fastapi", + "PURPOSE": "Provides API endpoints for managing application settings and Superset environments.", + "LAYER": "UI (API)", + "INVARIANT": "All settings changes must be persisted via ConfigManager.", + "PUBLIC_API": "router" + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "ConfigManager" + }, + { + "type": "DEPENDS_ON", + "target": "ConfigModels" + } + ], + "children": [ + { + "name": "get_settings", + "type": "Function", + "start_line": 26, + "end_line": 41, + "tags": { + "PURPOSE": "Retrieves all application settings.", + "PRE": "Config manager is available.", + "POST": "Returns masked AppConfig.", + "RETURN": "AppConfig - The current configuration." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "update_global_settings", + "type": "Function", + "start_line": 43, + "end_line": 59, + "tags": { + "PURPOSE": "Updates global application settings.", + "PRE": "New settings are provided.", + "POST": "Global settings are updated.", + "PARAM": "settings (GlobalSettings) - The new global settings.", + "RETURN": "GlobalSettings - The updated settings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_storage_settings", + "type": "Function", + "start_line": 61, + "end_line": 68, + "tags": { + "PURPOSE": "Retrieves storage-specific settings.", + "RETURN": "StorageConfig - The storage configuration." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST", + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @POST" + ] + } + }, + { + "name": "update_storage_settings", + "type": "Function", + "start_line": 70, + "end_line": 86, + "tags": { + "PURPOSE": "Updates storage-specific settings.", + "PARAM": "storage (StorageConfig) - The new storage settings.", + "POST": "Storage settings are updated and saved.", + "RETURN": "StorageConfig - The updated storage settings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + "Missing Mandatory Tag: @PRE", + "Missing Mandatory Tag: @PRE" + ] + } + }, + { + "name": "get_environments", + "type": "Function", + "start_line": 88, + "end_line": 98, + "tags": { + "PURPOSE": "Lists all configured Superset environments.", + "PRE": "Config manager is available.", + "POST": "Returns list of environments.", + "RETURN": "List[Environment] - List of environments." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "add_environment", + "type": "Function", + "start_line": 100, + "end_line": 124, + "tags": { + "PURPOSE": "Adds a new Superset environment.", + "PRE": "Environment data is valid and reachable.", + "POST": "Environment is added to config.", + "PARAM": "env (Environment) - The environment to add.", + "RETURN": "Environment - The added environment." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "update_environment", + "type": "Function", + "start_line": 126, + "end_line": 160, + "tags": { + "PURPOSE": "Updates an existing Superset environment.", + "PRE": "ID and valid environment data are provided.", + "POST": "Environment is updated in config.", + "PARAM": "env (Environment) - The updated environment data.", + "RETURN": "Environment - The updated environment." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "delete_environment", + "type": "Function", + "start_line": 162, + "end_line": 176, + "tags": { + "PURPOSE": "Deletes a Superset environment.", + "PRE": "ID is provided.", + "POST": "Environment is removed from config.", + "PARAM": "id (str) - The ID of the environment to delete." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "test_environment_connection", + "type": "Function", + "start_line": 178, + "end_line": 209, + "tags": { + "PURPOSE": "Tests the connection to a Superset environment.", + "PRE": "ID is provided.", + "POST": "Returns success or error status.", + "PARAM": "id (str) - The ID of the environment to test.", + "RETURN": "dict - Success message or error." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.api.routes.git_schemas", + "type": "Module", + "start_line": 1, + "end_line": 143, + "tags": { + "SEMANTICS": "git, schemas, pydantic, api, contracts", + "PURPOSE": "Defines Pydantic models for the Git integration API layer.", + "LAYER": "API", + "INVARIANT": "All schemas must be compatible with the FastAPI router." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "backend.src.models.git" + } + ], + "children": [ + { + "name": "GitServerConfigBase", + "type": "Class", + "start_line": 16, + "end_line": 24, + "tags": { + "PURPOSE": "Base schema for Git server configuration attributes." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "GitServerConfigCreate", + "type": "Class", + "start_line": 26, + "end_line": 31, + "tags": { + "PURPOSE": "Schema for creating a new Git server configuration." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "GitServerConfigSchema", + "type": "Class", + "start_line": 33, + "end_line": 43, + "tags": { + "PURPOSE": "Schema for representing a Git server configuration with metadata." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "GitRepositorySchema", + "type": "Class", + "start_line": 45, + "end_line": 59, + "tags": { + "PURPOSE": "Schema for tracking a local Git repository linked to a dashboard." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "BranchSchema", + "type": "Class", + "start_line": 61, + "end_line": 69, + "tags": { + "PURPOSE": "Schema for representing a Git branch metadata." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "CommitSchema", + "type": "Class", + "start_line": 71, + "end_line": 81, + "tags": { + "PURPOSE": "Schema for representing Git commit details." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "BranchCreate", + "type": "Class", + "start_line": 83, + "end_line": 89, + "tags": { + "PURPOSE": "Schema for branch creation requests." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "BranchCheckout", + "type": "Class", + "start_line": 91, + "end_line": 96, + "tags": { + "PURPOSE": "Schema for branch checkout requests." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "CommitCreate", + "type": "Class", + "start_line": 98, + "end_line": 104, + "tags": { + "PURPOSE": "Schema for staging and committing changes." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "ConflictResolution", + "type": "Class", + "start_line": 106, + "end_line": 113, + "tags": { + "PURPOSE": "Schema for resolving merge conflicts." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DeploymentEnvironmentSchema", + "type": "Class", + "start_line": 115, + "end_line": 126, + "tags": { + "PURPOSE": "Schema for representing a target deployment environment." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DeployRequest", + "type": "Class", + "start_line": 128, + "end_line": 133, + "tags": { + "PURPOSE": "Schema for dashboard deployment requests." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "RepoInitRequest", + "type": "Class", + "start_line": 135, + "end_line": 141, + "tags": { + "PURPOSE": "Schema for repository initialization requests." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "storage_routes", + "type": "Module", + "start_line": 1, + "end_line": 132, + "tags": { + "SEMANTICS": "storage, files, upload, download, backup, repository", + "PURPOSE": "API endpoints for file storage management (backups and repositories).", + "LAYER": "API", + "INVARIANT": "All paths must be validated against path traversal." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "backend.src.models.storage" + } + ], + "children": [ + { + "name": "list_files", + "type": "Function", + "start_line": 22, + "end_line": 44, + "tags": { + "PURPOSE": "List all files and directories in the storage system.", + "PRE": "None.", + "POST": "Returns a list of StoredFile objects.", + "PARAM": "path (Optional[str]) - Subpath within the category.", + "RETURN": "List[StoredFile] - List of files/directories." + }, + "relations": [ + { + "type": "CALLS", + "target": "StoragePlugin.list_files" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "upload_file", + "type": "Function", + "start_line": 46, + "end_line": 76, + "tags": { + "PURPOSE": "Upload a file to the storage system.", + "PRE": "file must be a valid UploadFile.", + "POST": "Returns the StoredFile object of the uploaded file.", + "PARAM": "file (UploadFile) - The file content.", + "RETURN": "StoredFile - Metadata of the uploaded file.", + "SIDE_EFFECT": "Writes file to the filesystem." + }, + "relations": [ + { + "type": "CALLS", + "target": "StoragePlugin.save_file" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "delete_file", + "type": "Function", + "start_line": 78, + "end_line": 103, + "tags": { + "PURPOSE": "Delete a specific file or directory.", + "PRE": "category must be a valid FileCategory.", + "POST": "Item is removed from storage.", + "PARAM": "path (str) - Relative path of the item.", + "RETURN": "None", + "SIDE_EFFECT": "Deletes item from the filesystem." + }, + "relations": [ + { + "type": "CALLS", + "target": "StoragePlugin.delete_file" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "download_file", + "type": "Function", + "start_line": 105, + "end_line": 130, + "tags": { + "PURPOSE": "Retrieve a file for download.", + "PRE": "category must be a valid FileCategory.", + "POST": "Returns a FileResponse.", + "PARAM": "path (str) - Relative path of the file.", + "RETURN": "FileResponse - The file content." + }, + "relations": [ + { + "type": "CALLS", + "target": "StoragePlugin.get_file_path" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "TasksRouter", + "type": "Module", + "start_line": 1, + "end_line": 187, + "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.", + "LAYER": "UI (API)", + "RELATION": "Depends on the TaskManager. It is included by the main app." + }, + "relations": [], + "children": [ + { + "name": "create_task", + "type": "Function", + "start_line": 27, + "end_line": 50, + "tags": { + "PURPOSE": "Create and start a new task for a given plugin.", + "PARAM": "task_manager (TaskManager) - The task manager instance.", + "PRE": "plugin_id must exist and params must be valid for that plugin.", + "POST": "A new task is created and started.", + "RETURN": "Task - The created task instance." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "list_tasks", + "type": "Function", + "start_line": 53, + "end_line": 73, + "tags": { + "PURPOSE": "Retrieve a list of tasks with pagination and optional status filter.", + "PARAM": "task_manager (TaskManager) - The task manager instance.", + "PRE": "task_manager must be available.", + "POST": "Returns a list of tasks.", + "RETURN": "List[Task] - List of tasks." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_task", + "type": "Function", + "start_line": 76, + "end_line": 95, + "tags": { + "PURPOSE": "Retrieve the details of a specific task.", + "PARAM": "task_manager (TaskManager) - The task manager instance.", + "PRE": "task_id must exist.", + "POST": "Returns task details or raises 404.", + "RETURN": "Task - The task details." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_task_logs", + "type": "Function", + "start_line": 98, + "end_line": 117, + "tags": { + "PURPOSE": "Retrieve logs for a specific task.", + "PARAM": "task_manager (TaskManager) - The task manager instance.", + "PRE": "task_id must exist.", + "POST": "Returns a list of log entries or raises 404.", + "RETURN": "List[LogEntry] - List of log entries." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "resolve_task", + "type": "Function", + "start_line": 120, + "end_line": 142, + "tags": { + "PURPOSE": "Resolve a task that is awaiting mapping.", + "PARAM": "task_manager (TaskManager) - The task manager instance.", + "PRE": "task must be in AWAITING_MAPPING status.", + "POST": "Task is resolved and resumes execution.", + "RETURN": "Task - The updated task object." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "resume_task", + "type": "Function", + "start_line": 145, + "end_line": 167, + "tags": { + "PURPOSE": "Resume a task that is awaiting input (e.g., passwords).", + "PARAM": "task_manager (TaskManager) - The task manager instance.", + "PRE": "task must be in AWAITING_INPUT status.", + "POST": "Task resumes execution with provided input.", + "RETURN": "Task - The updated task object." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "clear_tasks", + "type": "Function", + "start_line": 170, + "end_line": 186, + "tags": { + "PURPOSE": "Clear tasks matching the status filter.", + "PARAM": "task_manager (TaskManager) - The task manager instance.", + "PRE": "task_manager is available.", + "POST": "Tasks are removed from memory/persistence." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "GitModels", + "type": "Module", + "start_line": 1, + "end_line": 73, + "tags": { + "SEMANTICS": "git, models, sqlalchemy, database, schema", + "PURPOSE": "Git-specific SQLAlchemy models for configuration and repository tracking.", + "LAYER": "Model", + "RELATION": "specs/011-git-integration-dashboard/data-model.md" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.models.task", + "type": "Module", + "start_line": 1, + "end_line": 35, + "tags": { + "SEMANTICS": "database, task, record, sqlalchemy, sqlite", + "PURPOSE": "Defines the database schema for task execution records.", + "LAYER": "Domain", + "INVARIANT": "All primary keys are UUID strings." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "sqlalchemy" + } + ], + "children": [ + { + "name": "TaskRecord", + "type": "Class", + "start_line": 17, + "end_line": 33, + "tags": { + "PURPOSE": "Represents a persistent record of a task execution." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.models.connection", + "type": "Module", + "start_line": 1, + "end_line": 34, + "tags": { + "SEMANTICS": "database, connection, configuration, sqlalchemy, sqlite", + "PURPOSE": "Defines the database schema for external database connection configurations.", + "LAYER": "Domain", + "INVARIANT": "All primary keys are UUID strings." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "sqlalchemy" + } + ], + "children": [ + { + "name": "ConnectionConfig", + "type": "Class", + "start_line": 17, + "end_line": 32, + "tags": { + "PURPOSE": "Stores credentials for external databases used for column mapping." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.models.mapping", + "type": "Module", + "start_line": 1, + "end_line": 70, + "tags": { + "SEMANTICS": "database, mapping, environment, migration, sqlalchemy, sqlite", + "PURPOSE": "Defines the database schema for environment metadata and database mappings using SQLAlchemy.", + "LAYER": "Domain", + "INVARIANT": "All primary keys are UUID strings.", + "CONSTRAINT": "source_env_id and target_env_id must be valid environment IDs." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "sqlalchemy" + } + ], + "children": [ + { + "name": "MigrationStatus", + "type": "Class", + "start_line": 21, + "end_line": 29, + "tags": { + "PURPOSE": "Enumeration of possible migration job statuses." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "Environment", + "type": "Class", + "start_line": 31, + "end_line": 40, + "tags": { + "PURPOSE": "Represents a Superset instance environment." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DatabaseMapping", + "type": "Class", + "start_line": 42, + "end_line": 55, + "tags": { + "PURPOSE": "Represents a mapping between source and target databases." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MigrationJob", + "type": "Class", + "start_line": 57, + "end_line": 68, + "tags": { + "PURPOSE": "Represents a single migration execution job." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "FileCategory", + "type": "Class", + "start_line": 6, + "end_line": 11, + "tags": { + "PURPOSE": "Enumeration of supported file categories in the storage system." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "StorageConfig", + "type": "Class", + "start_line": 13, + "end_line": 20, + "tags": { + "PURPOSE": "Configuration model for the storage system, defining paths and naming patterns." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "StoredFile", + "type": "Class", + "start_line": 22, + "end_line": 31, + "tags": { + "PURPOSE": "Data model representing metadata for a file stored in the system." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.models.dashboard", + "type": "Module", + "start_line": 1, + "end_line": 28, + "tags": { + "SEMANTICS": "dashboard, model, metadata, migration", + "PURPOSE": "Defines data models for dashboard metadata and selection.", + "LAYER": "Model" + }, + "relations": [ + { + "type": "USED_BY", + "target": "backend.src.api.routes.migration" + } + ], + "children": [ + { + "name": "DashboardMetadata", + "type": "Class", + "start_line": 10, + "end_line": 17, + "tags": { + "PURPOSE": "Represents a dashboard available for migration." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DashboardSelection", + "type": "Class", + "start_line": 19, + "end_line": 26, + "tags": { + "PURPOSE": "Represents the user's selection of dashboards to migrate." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.services.git_service", + "type": "Module", + "start_line": 1, + "end_line": 413, + "tags": { + "SEMANTICS": "git, service, gitpython, repository, version_control", + "PURPOSE": "Core Git logic using GitPython to manage dashboard repositories.", + "LAYER": "Service", + "INVARIANT": "All Git operations must be performed on a valid local directory." + }, + "relations": [ + { + "type": "INHERITS_FROM", + "target": "None" + }, + { + "type": "USED_BY", + "target": "src.api.routes.git" + }, + { + "type": "USED_BY", + "target": "src.plugins.git_plugin" + } + ], + "children": [ + { + "name": "GitService", + "type": "Class", + "start_line": 22, + "end_line": 412, + "tags": { + "PURPOSE": "Wrapper for GitPython operations with semantic logging and error handling." + }, + "relations": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 29, + "end_line": 45, + "tags": { + "PURPOSE": "Initializes the GitService with a base path for repositories.", + "PARAM": "base_path (str) - Root directory for all Git clones.", + "PRE": "base_path is a valid string path.", + "POST": "GitService is initialized; base_path directory exists." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "_get_repo_path", + "type": "Function", + "start_line": 47, + "end_line": 56, + "tags": { + "PURPOSE": "Resolves the local filesystem path for a dashboard's repository.", + "PARAM": "dashboard_id (int)", + "PRE": "dashboard_id is an integer.", + "POST": "Returns the absolute or relative path to the dashboard's repo.", + "RETURN": "str" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "init_repo", + "type": "Function", + "start_line": 58, + "end_line": 83, + "tags": { + "PURPOSE": "Initialize or clone a repository for a dashboard.", + "PARAM": "pat (str) - Personal Access Token for authentication.", + "PRE": "dashboard_id is int, remote_url is valid Git URL, pat is provided.", + "POST": "Repository is cloned or opened at the local path.", + "RETURN": "Repo - GitPython Repo object." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_repo", + "type": "Function", + "start_line": 85, + "end_line": 101, + "tags": { + "PURPOSE": "Get Repo object for a dashboard.", + "PRE": "Repository must exist on disk for the given dashboard_id.", + "POST": "Returns a GitPython Repo instance for the dashboard.", + "RETURN": "Repo" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "list_branches", + "type": "Function", + "start_line": 103, + "end_line": 155, + "tags": { + "PURPOSE": "List all branches for a dashboard's repository.", + "PRE": "Repository for dashboard_id exists.", + "POST": "Returns a list of branch metadata dictionaries.", + "RETURN": "List[dict]" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "create_branch", + "type": "Function", + "start_line": 157, + "end_line": 191, + "tags": { + "PURPOSE": "Create a new branch from an existing one.", + "PARAM": "from_branch (str) - Source branch.", + "PRE": "Repository exists; name is valid; from_branch exists or repo is empty.", + "POST": "A new branch is created in the repository." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "checkout_branch", + "type": "Function", + "start_line": 193, + "end_line": 202, + "tags": { + "PURPOSE": "Switch to a specific branch.", + "PRE": "Repository exists and the specified branch name exists.", + "POST": "The repository working directory is updated to the specified branch." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "commit_changes", + "type": "Function", + "start_line": 204, + "end_line": 228, + "tags": { + "PURPOSE": "Stage and commit changes.", + "PARAM": "files (List[str]) - Optional list of specific files to stage.", + "PRE": "Repository exists and has changes (dirty) or files are specified.", + "POST": "Changes are staged and a new commit is created." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "push_changes", + "type": "Function", + "start_line": 230, + "end_line": 262, + "tags": { + "PURPOSE": "Push local commits to remote.", + "PRE": "Repository exists and has an 'origin' remote.", + "POST": "Local branch commits are pushed to origin." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "pull_changes", + "type": "Function", + "start_line": 264, + "end_line": 285, + "tags": { + "PURPOSE": "Pull changes from remote.", + "PRE": "Repository exists and has an 'origin' remote.", + "POST": "Changes from origin are pulled and merged into the active branch." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_status", + "type": "Function", + "start_line": 287, + "end_line": 311, + "tags": { + "PURPOSE": "Get current repository status (dirty files, untracked, etc.)", + "PRE": "Repository for dashboard_id exists.", + "POST": "Returns a dictionary representing the Git status.", + "RETURN": "dict" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_diff", + "type": "Function", + "start_line": 313, + "end_line": 330, + "tags": { + "PURPOSE": "Generate diff for a file or the whole repository.", + "PARAM": "staged (bool) - Whether to show staged changes.", + "PRE": "Repository for dashboard_id exists.", + "POST": "Returns the diff text as a string.", + "RETURN": "str" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_commit_history", + "type": "Function", + "start_line": 332, + "end_line": 360, + "tags": { + "PURPOSE": "Retrieve commit history for a repository.", + "PARAM": "limit (int) - Max number of commits to return.", + "PRE": "Repository for dashboard_id exists.", + "POST": "Returns a list of dictionaries for each commit in history.", + "RETURN": "List[dict]" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "test_connection", + "type": "Function", + "start_line": 362, + "end_line": 410, + "tags": { + "PURPOSE": "Test connection to Git provider using PAT.", + "PARAM": "pat (str)", + "PRE": "provider is valid; url is a valid HTTP(S) URL; pat is provided.", + "POST": "Returns True if connection to the provider's API succeeds.", + "RETURN": "bool" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.services.mapping_service", + "type": "Module", + "start_line": 1, + "end_line": 71, + "tags": { + "SEMANTICS": "service, mapping, fuzzy-matching, superset", + "PURPOSE": "Orchestrates database fetching and fuzzy matching suggestions.", + "LAYER": "Service", + "INVARIANT": "Suggestions are based on database names." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "backend.src.core.superset_client" + }, + { + "type": "DEPENDS_ON", + "target": "backend.src.core.utils.matching" + } + ], + "children": [ + { + "name": "MappingService", + "type": "Class", + "start_line": 18, + "end_line": 69, + "tags": { + "PURPOSE": "Service for handling database mapping logic." + }, + "relations": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 22, + "end_line": 30, + "tags": { + "PURPOSE": "Initializes the mapping service with a config manager.", + "PRE": "config_manager is provided.", + "PARAM": "config_manager (ConfigManager) - The configuration manager.", + "POST": "Service is initialized." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "_get_client", + "type": "Function", + "start_line": 32, + "end_line": 46, + "tags": { + "PURPOSE": "Helper to get an initialized SupersetClient for an environment.", + "PARAM": "env_id (str) - The ID of the environment.", + "PRE": "environment must exist in config.", + "POST": "Returns an initialized SupersetClient.", + "RETURN": "SupersetClient - Initialized client." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_suggestions", + "type": "Function", + "start_line": 48, + "end_line": 67, + "tags": { + "PURPOSE": "Fetches databases from both environments and returns fuzzy matching suggestions.", + "PARAM": "target_env_id (str) - Target environment ID.", + "PRE": "Both environments must be accessible.", + "POST": "Returns fuzzy-matched database suggestions.", + "RETURN": "List[Dict] - Suggested mappings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "BackupPlugin", + "type": "Module", + "start_line": 1, + "end_line": 184, + "tags": { + "SEMANTICS": "backup, superset, automation, dashboard, plugin", + "PURPOSE": "A plugin that provides functionality to back up Superset dashboards.", + "LAYER": "App" + }, + "relations": [ + { + "type": "IMPLEMENTS", + "target": "PluginBase" + }, + { + "type": "DEPENDS_ON", + "target": "superset_tool.client" + }, + { + "type": "DEPENDS_ON", + "target": "superset_tool.utils" + } + ], + "children": [ + { + "name": "BackupPlugin", + "type": "Class", + "start_line": 27, + "end_line": 183, + "tags": { + "PURPOSE": "Implementation of the backup plugin logic." + }, + "relations": [], + "children": [ + { + "name": "id", + "type": "Function", + "start_line": 35, + "end_line": 43, + "tags": { + "PURPOSE": "Returns the unique identifier for the backup plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string ID.", + "RETURN": "str - \"superset-backup\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "name", + "type": "Function", + "start_line": 46, + "end_line": 54, + "tags": { + "PURPOSE": "Returns the human-readable name of the backup plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string name.", + "RETURN": "str - Plugin name." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "description", + "type": "Function", + "start_line": 57, + "end_line": 65, + "tags": { + "PURPOSE": "Returns a description of the backup plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string description.", + "RETURN": "str - Plugin description." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "version", + "type": "Function", + "start_line": 68, + "end_line": 76, + "tags": { + "PURPOSE": "Returns the version of the backup plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string version.", + "RETURN": "str - \"1.0.0\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_schema", + "type": "Function", + "start_line": 78, + "end_line": 101, + "tags": { + "PURPOSE": "Returns the JSON schema for backup plugin parameters.", + "PRE": "Plugin instance exists.", + "POST": "Returns dictionary schema.", + "RETURN": "Dict[str, Any] - JSON schema." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "execute", + "type": "Function", + "start_line": 103, + "end_line": 182, + "tags": { + "PURPOSE": "Executes the dashboard backup logic.", + "PARAM": "params (Dict[str, Any]) - Backup parameters (env, backup_path).", + "PRE": "Target environment must be configured. params must be a dictionary.", + "POST": "All dashboards are exported and archived." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "DebugPluginModule", + "type": "Module", + "start_line": 1, + "end_line": 187, + "tags": { + "SEMANTICS": "plugin, debug, api, database, superset", + "PURPOSE": "Implements a plugin for system diagnostics and debugging Superset API responses.", + "LAYER": "Plugins", + "RELATION": "Inherits from PluginBase. Uses SupersetClient from core.", + "CONSTRAINT": "Must use belief_scope for logging." + }, + "relations": [], + "children": [ + { + "name": "DebugPlugin", + "type": "Class", + "start_line": 15, + "end_line": 186, + "tags": { + "PURPOSE": "Plugin for system diagnostics and debugging." + }, + "relations": [], + "children": [ + { + "name": "id", + "type": "Function", + "start_line": 23, + "end_line": 31, + "tags": { + "PURPOSE": "Returns the unique identifier for the debug plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string ID.", + "RETURN": "str - \"system-debug\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "name", + "type": "Function", + "start_line": 34, + "end_line": 42, + "tags": { + "PURPOSE": "Returns the human-readable name of the debug plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string name.", + "RETURN": "str - Plugin name." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "description", + "type": "Function", + "start_line": 45, + "end_line": 53, + "tags": { + "PURPOSE": "Returns a description of the debug plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string description.", + "RETURN": "str - Plugin description." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "version", + "type": "Function", + "start_line": 56, + "end_line": 64, + "tags": { + "PURPOSE": "Returns the version of the debug plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string version.", + "RETURN": "str - \"1.0.0\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_schema", + "type": "Function", + "start_line": 66, + "end_line": 105, + "tags": { + "PURPOSE": "Returns the JSON schema for the debug plugin parameters.", + "PRE": "Plugin instance exists.", + "POST": "Returns dictionary schema.", + "RETURN": "Dict[str, Any] - JSON schema." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "execute", + "type": "Function", + "start_line": 107, + "end_line": 123, + "tags": { + "PURPOSE": "Executes the debug logic.", + "PARAM": "params (Dict[str, Any]) - Debug parameters.", + "PRE": "action must be provided in params.", + "POST": "Debug action is executed and results returned.", + "RETURN": "Dict[str, Any] - Execution results." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "_test_db_api", + "type": "Function", + "start_line": 125, + "end_line": 157, + "tags": { + "PURPOSE": "Tests database API connectivity for source and target environments.", + "PRE": "source_env and target_env params exist in params.", + "POST": "Returns DB counts for both envs.", + "PARAM": "params (Dict) - Plugin parameters.", + "RETURN": "Dict - Comparison results." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "_get_dataset_structure", + "type": "Function", + "start_line": 159, + "end_line": 184, + "tags": { + "PURPOSE": "Retrieves the structure of a dataset.", + "PRE": "env and dataset_id params exist in params.", + "POST": "Returns dataset JSON structure.", + "PARAM": "params (Dict) - Plugin parameters.", + "RETURN": "Dict - Dataset structure." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "SearchPluginModule", + "type": "Module", + "start_line": 1, + "end_line": 202, + "tags": { + "SEMANTICS": "plugin, search, datasets, regex, superset", + "PURPOSE": "Implements a plugin for searching text patterns across all datasets in a specific Superset environment.", + "LAYER": "Plugins", + "RELATION": "Inherits from PluginBase. Uses SupersetClient from core.", + "CONSTRAINT": "Must use belief_scope for logging." + }, + "relations": [], + "children": [ + { + "name": "SearchPlugin", + "type": "Class", + "start_line": 16, + "end_line": 201, + "tags": { + "PURPOSE": "Plugin for searching text patterns in Superset datasets." + }, + "relations": [], + "children": [ + { + "name": "id", + "type": "Function", + "start_line": 24, + "end_line": 32, + "tags": { + "PURPOSE": "Returns the unique identifier for the search plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string ID.", + "RETURN": "str - \"search-datasets\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "name", + "type": "Function", + "start_line": 35, + "end_line": 43, + "tags": { + "PURPOSE": "Returns the human-readable name of the search plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string name.", + "RETURN": "str - Plugin name." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "description", + "type": "Function", + "start_line": 46, + "end_line": 54, + "tags": { + "PURPOSE": "Returns a description of the search plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string description.", + "RETURN": "str - Plugin description." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "version", + "type": "Function", + "start_line": 57, + "end_line": 65, + "tags": { + "PURPOSE": "Returns the version of the search plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string version.", + "RETURN": "str - \"1.0.0\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_schema", + "type": "Function", + "start_line": 67, + "end_line": 90, + "tags": { + "PURPOSE": "Returns the JSON schema for the search plugin parameters.", + "PRE": "Plugin instance exists.", + "POST": "Returns dictionary schema.", + "RETURN": "Dict[str, Any] - JSON schema." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "execute", + "type": "Function", + "start_line": 92, + "end_line": 161, + "tags": { + "PURPOSE": "Executes the dataset search logic.", + "PARAM": "params (Dict[str, Any]) - Search parameters.", + "PRE": "Params contain valid 'env' and 'query'.", + "POST": "Returns a dictionary with count and results list.", + "RETURN": "Dict[str, Any] - Search results." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "_get_context", + "type": "Function", + "start_line": 163, + "end_line": 199, + "tags": { + "PURPOSE": "Extracts a small context around the match for display.", + "PARAM": "context_lines (int) - Number of lines of context to include.", + "PRE": "text and match_text must be strings.", + "POST": "Returns context string.", + "RETURN": "str - Extracted context." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MapperPluginModule", + "type": "Module", + "start_line": 1, + "end_line": 195, + "tags": { + "SEMANTICS": "plugin, mapper, datasets, postgresql, excel", + "PURPOSE": "Implements a plugin for mapping dataset columns using external database connections or Excel files.", + "LAYER": "Plugins", + "RELATION": "Inherits from PluginBase. Uses DatasetMapper from superset_tool.", + "CONSTRAINT": "Must use belief_scope for logging." + }, + "relations": [], + "children": [ + { + "name": "MapperPlugin", + "type": "Class", + "start_line": 18, + "end_line": 194, + "tags": { + "PURPOSE": "Plugin for mapping dataset columns verbose names." + }, + "relations": [], + "children": [ + { + "name": "id", + "type": "Function", + "start_line": 26, + "end_line": 34, + "tags": { + "PURPOSE": "Returns the unique identifier for the mapper plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string ID.", + "RETURN": "str - \"dataset-mapper\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "name", + "type": "Function", + "start_line": 37, + "end_line": 45, + "tags": { + "PURPOSE": "Returns the human-readable name of the mapper plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string name.", + "RETURN": "str - Plugin name." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "description", + "type": "Function", + "start_line": 48, + "end_line": 56, + "tags": { + "PURPOSE": "Returns a description of the mapper plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string description.", + "RETURN": "str - Plugin description." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "version", + "type": "Function", + "start_line": 59, + "end_line": 67, + "tags": { + "PURPOSE": "Returns the version of the mapper plugin.", + "PRE": "Plugin instance exists.", + "POST": "Returns string version.", + "RETURN": "str - \"1.0.0\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_schema", + "type": "Function", + "start_line": 69, + "end_line": 119, + "tags": { + "PURPOSE": "Returns the JSON schema for the mapper plugin parameters.", + "PRE": "Plugin instance exists.", + "POST": "Returns dictionary schema.", + "RETURN": "Dict[str, Any] - JSON schema." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "execute", + "type": "Function", + "start_line": 121, + "end_line": 192, + "tags": { + "PURPOSE": "Executes the dataset mapping logic.", + "PARAM": "params (Dict[str, Any]) - Mapping parameters.", + "PRE": "Params contain valid 'env', 'dataset_id', and 'source'. params must be a dictionary.", + "POST": "Updates the dataset in Superset.", + "RETURN": "Dict[str, Any] - Execution status." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "backend.src.plugins.git_plugin", + "type": "Module", + "start_line": 1, + "end_line": 376, + "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.", + "LAYER": "Plugin", + "INVARIANT": "\u0412\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 Git \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 GitService.", + "CONSTRAINT": "\u041f\u043b\u0430\u0433\u0438\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 YAML-\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430\u043c\u0438 Superset." + }, + "relations": [ + { + "type": "INHERITS_FROM", + "target": "src.core.plugin_base.PluginBase" + }, + { + "type": "USES", + "target": "src.services.git_service.GitService" + }, + { + "type": "USES", + "target": "src.core.superset_client.SupersetClient" + }, + { + "type": "USES", + "target": "src.core.config_manager.ConfigManager" + } + ], + "children": [ + { + "name": "GitPlugin", + "type": "Class", + "start_line": 28, + "end_line": 375, + "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." + }, + "relations": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 32, + "end_line": 60, + "tags": { + "PURPOSE": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0438 \u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.", + "PRE": "config.json exists or shared config_manager is available.", + "POST": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b git_service \u0438 config_manager." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "id", + "type": "Function", + "start_line": 63, + "end_line": 70, + "tags": { + "PURPOSE": "Returns the plugin identifier.", + "PRE": "GitPlugin is initialized.", + "POST": "Returns 'git-integration'." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "name", + "type": "Function", + "start_line": 73, + "end_line": 80, + "tags": { + "PURPOSE": "Returns the plugin name.", + "PRE": "GitPlugin is initialized.", + "POST": "Returns the human-readable name." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "description", + "type": "Function", + "start_line": 83, + "end_line": 90, + "tags": { + "PURPOSE": "Returns the plugin description.", + "PRE": "GitPlugin is initialized.", + "POST": "Returns the plugin's purpose description." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "version", + "type": "Function", + "start_line": 93, + "end_line": 100, + "tags": { + "PURPOSE": "Returns the plugin version.", + "PRE": "GitPlugin is initialized.", + "POST": "Returns the version string." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_schema", + "type": "Function", + "start_line": 102, + "end_line": 119, + "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.", + "POST": "Returns a JSON schema dictionary.", + "RETURN": "Dict[str, Any] - \u0421\u0445\u0435\u043c\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "initialize", + "type": "Function", + "start_line": 121, + "end_line": 374, + "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.", + "POST": "\u041f\u043b\u0430\u0433\u0438\u043d \u0433\u043e\u0442\u043e\u0432 \u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0447." + }, + "relations": [], + "children": [ + { + "name": "execute", + "type": "Function", + "start_line": 129, + "end_line": 158, + "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'.", + "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.", + "PARAM": "task_data (Dict[str, Any]) - \u0414\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.", + "RETURN": "Dict[str, Any] - \u0421\u0442\u0430\u0442\u0443\u0441 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435." + }, + "relations": [ + { + "type": "CALLS", + "target": "self._handle_sync" + }, + { + "type": "CALLS", + "target": "self._handle_deploy" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "_handle_sync", + "type": "Function", + "start_line": 160, + "end_line": 240, + "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.", + "POST": "\u0424\u0430\u0439\u043b\u044b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0434\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0432 Superset.", + "PARAM": "source_env_id (Optional[str]) - ID \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.", + "RETURN": "Dict[str, str] - \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438.", + "SIDE_EFFECT": "\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0444\u0430\u0439\u043b\u044b \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f." + }, + "relations": [ + { + "type": "CALLS", + "target": "src.services.git_service.GitService.get_repo" + }, + { + "type": "CALLS", + "target": "src.core.superset_client.SupersetClient.export_dashboard" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "_handle_deploy", + "type": "Function", + "start_line": 242, + "end_line": 307, + "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.", + "POST": "\u0414\u0430\u0448\u0431\u043e\u0440\u0434 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 Superset.", + "PARAM": "env_id (str) - ID \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.", + "RETURN": "Dict[str, Any] - \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u0435\u043f\u043b\u043e\u044f.", + "SIDE_EFFECT": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 ZIP-\u0444\u0430\u0439\u043b." + }, + "relations": [ + { + "type": "CALLS", + "target": "src.core.superset_client.SupersetClient.import_dashboard" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "_get_env", + "type": "Function", + "start_line": 309, + "end_line": 372, + "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.", + "PRE": "env_id is a string or None.", + "POST": "Returns an Environment object from config or DB.", + "RETURN": "Environment - \u041e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "MigrationPlugin", + "type": "Module", + "start_line": 1, + "end_line": 387, + "tags": { + "SEMANTICS": "migration, superset, automation, dashboard, plugin", + "PURPOSE": "A plugin that provides functionality to migrate Superset dashboards between environments.", + "LAYER": "App" + }, + "relations": [ + { + "type": "IMPLEMENTS", + "target": "PluginBase" + }, + { + "type": "DEPENDS_ON", + "target": "superset_tool.client" + }, + { + "type": "DEPENDS_ON", + "target": "superset_tool.utils" + } + ], + "children": [ + { + "name": "MigrationPlugin", + "type": "Class", + "start_line": 23, + "end_line": 386, + "tags": { + "PURPOSE": "Implementation of the migration plugin logic." + }, + "relations": [], + "children": [ + { + "name": "id", + "type": "Function", + "start_line": 31, + "end_line": 39, + "tags": { + "PURPOSE": "Returns the unique identifier for the migration plugin.", + "PRE": "None.", + "POST": "Returns \"superset-migration\".", + "RETURN": "str - \"superset-migration\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "name", + "type": "Function", + "start_line": 42, + "end_line": 50, + "tags": { + "PURPOSE": "Returns the human-readable name of the migration plugin.", + "PRE": "None.", + "POST": "Returns the plugin name.", + "RETURN": "str - Plugin name." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "description", + "type": "Function", + "start_line": 53, + "end_line": 61, + "tags": { + "PURPOSE": "Returns a description of the migration plugin.", + "PRE": "None.", + "POST": "Returns the plugin description.", + "RETURN": "str - Plugin description." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "version", + "type": "Function", + "start_line": 64, + "end_line": 72, + "tags": { + "PURPOSE": "Returns the version of the migration plugin.", + "PRE": "None.", + "POST": "Returns \"1.0.0\".", + "RETURN": "str - \"1.0.0\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_schema", + "type": "Function", + "start_line": 74, + "end_line": 123, + "tags": { + "PURPOSE": "Returns the JSON schema for migration plugin parameters.", + "PRE": "Config manager is available.", + "POST": "Returns a valid JSON schema dictionary.", + "RETURN": "Dict[str, Any] - JSON schema." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "execute", + "type": "Function", + "start_line": 125, + "end_line": 385, + "tags": { + "PURPOSE": "Executes the dashboard migration logic.", + "PARAM": "params (Dict[str, Any]) - Migration parameters.", + "PRE": "Source and target environments must be configured.", + "POST": "Selected dashboards are migrated." + }, + "relations": [], + "children": [ + { + "name": "MigrationPlugin.execute", + "type": "Action", + "start_line": 145, + "end_line": 384, + "tags": { + "PURPOSE": "Execute the migration logic with proper task logging." + }, + "relations": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 152, + "end_line": 160, + "tags": { + "PURPOSE": "Initializes the proxy logger.", + "PRE": "None.", + "POST": "Instance is initialized." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "debug", + "type": "Function", + "start_line": 162, + "end_line": 169, + "tags": { + "PURPOSE": "Logs a debug message to the task manager.", + "PRE": "msg is a string.", + "POST": "Log is added to task manager if task_id exists." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "info", + "type": "Function", + "start_line": 171, + "end_line": 178, + "tags": { + "PURPOSE": "Logs an info message to the task manager.", + "PRE": "msg is a string.", + "POST": "Log is added to task manager if task_id exists." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "warning", + "type": "Function", + "start_line": 180, + "end_line": 187, + "tags": { + "PURPOSE": "Logs a warning message to the task manager.", + "PRE": "msg is a string.", + "POST": "Log is added to task manager if task_id exists." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "error", + "type": "Function", + "start_line": 189, + "end_line": 196, + "tags": { + "PURPOSE": "Logs an error message to the task manager.", + "PRE": "msg is a string.", + "POST": "Log is added to task manager if task_id exists." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "critical", + "type": "Function", + "start_line": 198, + "end_line": 205, + "tags": { + "PURPOSE": "Logs a critical message to the task manager.", + "PRE": "msg is a string.", + "POST": "Log is added to task manager if task_id exists." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "exception", + "type": "Function", + "start_line": 207, + "end_line": 214, + "tags": { + "PURPOSE": "Logs an exception message to the task manager.", + "PRE": "msg is a string.", + "POST": "Log is added to task manager if task_id exists." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "StoragePlugin", + "type": "Module", + "start_line": 1, + "end_line": 324, + "tags": { + "SEMANTICS": "storage, files, filesystem, plugin", + "PURPOSE": "Provides core filesystem operations for managing backups and repositories.", + "LAYER": "App", + "INVARIANT": "All file operations must be restricted to the configured storage root." + }, + "relations": [ + { + "type": "IMPLEMENTS", + "target": "PluginBase" + }, + { + "type": "DEPENDS_ON", + "target": "backend.src.models.storage" + } + ], + "children": [ + { + "name": "StoragePlugin", + "type": "Class", + "start_line": 25, + "end_line": 323, + "tags": { + "PURPOSE": "Implementation of the storage management plugin." + }, + "relations": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "start_line": 32, + "end_line": 39, + "tags": { + "PURPOSE": "Initializes the StoragePlugin and ensures required directories exist.", + "PRE": "Configuration manager must be accessible.", + "POST": "Storage root and category directories are created on disk." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "id", + "type": "Function", + "start_line": 42, + "end_line": 50, + "tags": { + "PURPOSE": "Returns the unique identifier for the storage plugin.", + "PRE": "None.", + "POST": "Returns the plugin ID string.", + "RETURN": "str - \"storage-manager\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "name", + "type": "Function", + "start_line": 53, + "end_line": 61, + "tags": { + "PURPOSE": "Returns the human-readable name of the storage plugin.", + "PRE": "None.", + "POST": "Returns the plugin name string.", + "RETURN": "str - \"Storage Manager\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "description", + "type": "Function", + "start_line": 64, + "end_line": 72, + "tags": { + "PURPOSE": "Returns a description of the storage plugin.", + "PRE": "None.", + "POST": "Returns the plugin description string.", + "RETURN": "str - Plugin description." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "version", + "type": "Function", + "start_line": 75, + "end_line": 83, + "tags": { + "PURPOSE": "Returns the version of the storage plugin.", + "PRE": "None.", + "POST": "Returns the version string.", + "RETURN": "str - \"1.0.0\"" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_schema", + "type": "Function", + "start_line": 85, + "end_line": 103, + "tags": { + "PURPOSE": "Returns the JSON schema for storage plugin parameters.", + "PRE": "None.", + "POST": "Returns a dictionary representing the JSON schema.", + "RETURN": "Dict[str, Any] - JSON schema." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "execute", + "type": "Function", + "start_line": 105, + "end_line": 112, + "tags": { + "PURPOSE": "Executes storage-related tasks (placeholder for PluginBase compliance).", + "PRE": "params must match the plugin schema.", + "POST": "Task is executed and logged." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_storage_root", + "type": "Function", + "start_line": 114, + "end_line": 134, + "tags": { + "PURPOSE": "Resolves the absolute path to the storage root.", + "PRE": "Settings must define a storage root path.", + "POST": "Returns a Path object representing the storage root." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "resolve_path", + "type": "Function", + "start_line": 136, + "end_line": 158, + "tags": { + "PURPOSE": "Resolves a dynamic path pattern using provided variables.", + "PARAM": "variables (Dict[str, str]) - Variables to substitute in the pattern.", + "PRE": "pattern must be a valid format string.", + "POST": "Returns the resolved path string.", + "RETURN": "str - The resolved path." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "ensure_directories", + "type": "Function", + "start_line": 160, + "end_line": 173, + "tags": { + "PURPOSE": "Creates the storage root and category subdirectories if they don't exist.", + "PRE": "Storage root must be resolvable.", + "POST": "Directories are created on the filesystem.", + "SIDE_EFFECT": "Creates directories on the filesystem." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "validate_path", + "type": "Function", + "start_line": 175, + "end_line": 189, + "tags": { + "PURPOSE": "Prevents path traversal attacks by ensuring the path is within the storage root.", + "PRE": "path must be a Path object.", + "POST": "Returns the resolved absolute path if valid, otherwise raises ValueError." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "list_files", + "type": "Function", + "start_line": 191, + "end_line": 240, + "tags": { + "PURPOSE": "Lists all files and directories in a specific category and subpath.", + "PARAM": "subpath (Optional[str]) - Nested path within the category.", + "PRE": "Storage root must exist.", + "POST": "Returns a list of StoredFile objects.", + "RETURN": "List[StoredFile] - List of file and directory metadata objects." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "save_file", + "type": "Function", + "start_line": 242, + "end_line": 274, + "tags": { + "PURPOSE": "Saves an uploaded file to the specified category and optional subpath.", + "PARAM": "subpath (Optional[str]) - The target subpath.", + "PRE": "file must be a valid UploadFile; category must be valid.", + "POST": "File is written to disk and metadata is returned.", + "RETURN": "StoredFile - Metadata of the saved file.", + "SIDE_EFFECT": "Writes file to disk." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "delete_file", + "type": "Function", + "start_line": 276, + "end_line": 300, + "tags": { + "PURPOSE": "Deletes a file or directory from the specified category and path.", + "PARAM": "path (str) - The relative path of the file or directory.", + "PRE": "path must belong to the specified category and exist on disk.", + "POST": "The file or directory is removed from disk.", + "SIDE_EFFECT": "Removes item from disk." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + }, + { + "name": "get_file_path", + "type": "Function", + "start_line": 302, + "end_line": 321, + "tags": { + "PURPOSE": "Returns the absolute path of a file for download.", + "PARAM": "path (str) - The relative path of the file.", + "PRE": "path must belong to the specified category and be a file.", + "POST": "Returns the absolute Path to the file.", + "RETURN": "Path - Absolute path to the file." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + } + ], + "compliance": { + "valid": true, + "issues": [] + } + }, { "name": "test_environment_model", "type": "Function", diff --git a/specs/project_map.md b/specs/project_map.md index 67a603c..bc22dfb 100644 --- a/specs/project_map.md +++ b/specs/project_map.md @@ -51,264 +51,6 @@ - 📝 Generates the token-optimized project map. - ƒ **_write_entity_md** (`Function`) - 📝 Recursive helper to write entity tree to Markdown. -- 🧩 **DashboardGrid** (`Component`) - - 📝 Displays a grid of dashboards with selection and pagination. - - 🏗️ Layer: Component - - ƒ **handleSort** (`Function`) - - 📝 Toggles sort direction or changes sort column. - - ƒ **handleSelectionChange** (`Function`) - - 📝 Handles individual checkbox changes. - - ƒ **handleSelectAll** (`Function`) - - 📝 Handles select all checkbox. - - ƒ **goToPage** (`Function`) - - 📝 Changes current page. - - ƒ **openGit** (`Function`) - - 📝 Opens the Git management modal for a dashboard. -- 🧩 **TaskHistory** (`Component`) - - 📝 Displays a list of recent tasks with their status and allows selecting them for viewing logs. - - 🏗️ Layer: UI - - ƒ **fetchTasks** (`Function`) - - 📝 Fetches the list of recent tasks from the API. - - ƒ **clearTasks** (`Function`) - - 📝 Clears tasks from the history, optionally filtered by status. - - ƒ **selectTask** (`Function`) - - 📝 Selects a task and fetches its full details. - - ƒ **getStatusColor** (`Function`) - - 📝 Returns the CSS color class for a given task status. - - ƒ **onMount** (`Function`) - - 📝 Initializes the component by fetching tasks and starting polling. - - ƒ **onDestroy** (`Function`) - - 📝 Cleans up the polling interval when the component is destroyed. -- 🧩 **MappingTable** (`Component`) - - 📝 Displays and allows editing of database mappings. - - 🏗️ Layer: Feature - - ƒ **updateMapping** (`Function`) - - 📝 Updates a mapping for a specific source database. - - ƒ **getSuggestion** (`Function`) - - 📝 Finds a suggestion for a source database. -- 🧩 **EnvSelector** (`Component`) - - 📝 Provides a UI component for selecting source and target environments. - - 🏗️ Layer: Feature - - ƒ **handleSelect** (`Function`) - - 📝 Dispatches the selection change event. -- 🧩 **TaskList** (`Component`) - - 📝 Displays a list of tasks with their status and execution details. - - 🏗️ Layer: Component - - ƒ **getStatusColor** (`Function`) - - 📝 Returns the CSS color class for a given task status. - - ƒ **formatTime** (`Function`) - - 📝 Formats a date string using date-fns. - - ƒ **handleTaskClick** (`Function`) - - 📝 Dispatches a select event when a task is clicked. -- 🧩 **DynamicForm** (`Component`) - - 📝 Generates a form dynamically based on a JSON schema. - - 🏗️ Layer: UI - - ƒ **handleSubmit** (`Function`) - - 📝 Dispatches the submit event with the form data. - - ƒ **initializeForm** (`Function`) - - 📝 Initialize form data with default values from the schema. -- 🧩 **Footer** (`Component`) - - 📝 Displays the application footer with copyright information. - - 🏗️ Layer: UI -- 🧩 **Navbar** (`Component`) - - 📝 Main navigation bar for the application. - - 🏗️ Layer: UI -- 🧩 **TaskRunner** (`Component`) - - 📝 Connects to a WebSocket to display real-time logs for a running task. - - 🏗️ Layer: UI - - ƒ **connect** (`Function`) - - 📝 Establishes WebSocket connection with exponential backoff. - - ƒ **fetchTargetDatabases** (`Function`) - - 📝 Fetches the list of databases in the target environment. - - ƒ **handleMappingResolve** (`Function`) - - 📝 Handles the resolution of a missing database mapping. - - ƒ **handlePasswordResume** (`Function`) - - 📝 Handles the submission of database passwords to resume a task. - - ƒ **startDataTimeout** (`Function`) - - 📝 Starts a timeout to detect when the log stream has stalled. - - ƒ **resetDataTimeout** (`Function`) - - 📝 Resets the data stall timeout. - - ƒ **onMount** (`Function`) - - 📝 Initializes the component and subscribes to task selection changes. - - ƒ **onDestroy** (`Function`) - - 📝 Close WebSocket connection when the component is destroyed. -- 🧩 **TaskLogViewer** (`Component`) - - 📝 Displays detailed logs for a specific task in a modal or inline. - - 🏗️ Layer: UI - - ƒ **fetchLogs** (`Function`) - - 📝 Fetches logs for the current task. - - ƒ **scrollToBottom** (`Function`) - - 📝 Scrolls the log container to the bottom. - - ƒ **handleScroll** (`Function`) - - 📝 Updates auto-scroll preference based on scroll position. - - ƒ **close** (`Function`) - - 📝 Closes the log viewer modal. - - ƒ **getLogLevelColor** (`Function`) - - 📝 Returns the CSS color class for a given log level. - - ƒ **onDestroy** (`Function`) - - 📝 Cleans up the polling interval. -- 🧩 **PasswordPrompt** (`Component`) - - 📝 A modal component to prompt the user for database passwords when a migration task is paused. - - 🏗️ Layer: UI - - ƒ **handleSubmit** (`Function`) - - 📝 Validates and dispatches the passwords to resume the task. - - ƒ **handleCancel** (`Function`) - - 📝 Cancels the password prompt. -- 🧩 **MissingMappingModal** (`Component`) - - 📝 Prompts the user to provide a database mapping when one is missing during migration. - - 🏗️ Layer: Feature - - ƒ **resolve** (`Function`) - - 📝 Dispatches the resolution event with the selected mapping. - - ƒ **cancel** (`Function`) - - 📝 Cancels the mapping resolution modal. -- 🧩 **Toast** (`Component`) - - 📝 Displays transient notifications (toasts) in the bottom-right corner. - - 🏗️ Layer: UI -- 🧩 **GitManager** (`Component`) - - 📝 Центральный компонент для управления Git-операциями конкретного дашборда. - - 🏗️ Layer: Component - - ƒ **checkStatus** (`Function`) - - 📝 Проверяет, инициализирован ли репозиторий для данного дашборда. - - ƒ **handleInit** (`Function`) - - 📝 Инициализирует репозиторий для дашборда. - - ƒ **handleSync** (`Function`) - - 📝 Синхронизирует состояние Superset с локальным Git-репозиторием. - - ƒ **handlePush** (`Function`) - - 📝 Pushes local commits to the remote repository. - - ƒ **handlePull** (`Function`) - - 📝 Pulls changes from the remote repository. -- 🧩 **BranchSelector** (`Component`) - - 📝 UI для выбора и создания веток Git. - - 🏗️ Layer: Component - - ƒ **onMount** (`Function`) - - 📝 Load branches when component is mounted. - - ƒ **loadBranches** (`Function`) - - 📝 Загружает список веток для дашборда. - - ƒ **handleSelect** (`Function`) - - 📝 Handles branch selection from dropdown. - - ƒ **handleCheckout** (`Function`) - - 📝 Переключает текущую ветку. - - ƒ **handleCreate** (`Function`) - - 📝 Создает новую ветку. -- 🧩 **DeploymentModal** (`Component`) - - 📝 Modal for deploying a dashboard to a target environment. - - 🏗️ Layer: Component - - 📦 **loadStatus** (`Watcher`) - - ƒ **loadEnvironments** (`Function`) - - 📝 Fetch available environments from API. - - ƒ **handleDeploy** (`Function`) - - 📝 Trigger deployment to selected environment. -- 🧩 **ConflictResolver** (`Component`) - - 📝 UI for resolving merge conflicts (Keep Mine / Keep Theirs). - - 🏗️ Layer: Component - - ƒ **resolve** (`Function`) - - 📝 Set resolution strategy for a file. - - ƒ **handleSave** (`Function`) - - 📝 Validate and submit resolutions. -- 🧩 **CommitModal** (`Component`) - - 📝 Модальное окно для создания коммита с просмотром изменений (diff). - - 🏗️ Layer: Component - - ƒ **loadStatus** (`Function`) - - 📝 Загружает текущий статус репозитория и diff. - - ƒ **handleCommit** (`Function`) - - 📝 Создает коммит с указанным сообщением. -- 🧩 **CommitHistory** (`Component`) - - 📝 Displays the commit history for a specific dashboard. - - 🏗️ Layer: Component - - ƒ **onMount** (`Function`) - - 📝 Load history when component is mounted. - - ƒ **loadHistory** (`Function`) - - 📝 Fetch commit history from the backend. -- 🧩 **DebugTool** (`Component`) - - 📝 UI component for system diagnostics and debugging API responses. - - 🏗️ Layer: UI - - ƒ **fetchEnvironments** (`Function`) - - 📝 Fetches available environments. - - ƒ **handleRunDebug** (`Function`) - - 📝 Triggers the debug task. - - ƒ **startPolling** (`Function`) - - 📝 Polls for task completion. -- 🧩 **ConnectionForm** (`Component`) - - 📝 UI component for creating a new database connection configuration. - - 🏗️ Layer: UI - - ƒ **handleSubmit** (`Function`) - - 📝 Submits the connection form to the backend. - - ƒ **resetForm** (`Function`) - - 📝 Resets the connection form fields to their default values. -- 🧩 **MapperTool** (`Component`) - - 📝 UI component for mapping dataset column verbose names using the MapperPlugin. - - 🏗️ Layer: UI - - ƒ **fetchData** (`Function`) - - 📝 Fetches environments and saved connections. - - ƒ **handleRunMapper** (`Function`) - - 📝 Triggers the MapperPlugin task. -- 🧩 **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. -- 🧩 **ConnectionList** (`Component`) - - 📝 UI component for listing and deleting saved database connection configurations. - - 🏗️ Layer: UI - - ƒ **fetchConnections** (`Function`) - - 📝 Fetches the list of connections from the backend. - - ƒ **handleDelete** (`Function`) - - 📝 Deletes a connection configuration. -- 🧩 **Settings** (`Component`) - - 📝 The main settings page for the application, allowing management of environments and global settings. - - 🏗️ Layer: UI - - ƒ **loadSettings** (`Function`) - - 📝 Loads settings from the backend. - - ƒ **handleSaveGlobal** (`Function`) - - 📝 Saves global settings to the backend. - - ƒ **handleAddOrUpdateEnv** (`Function`) - - 📝 Adds or updates an environment. - - ƒ **handleDeleteEnv** (`Function`) - - 📝 Deletes an environment. - - ƒ **handleTestEnv** (`Function`) - - 📝 Tests the connection to an environment. - - ƒ **editEnv** (`Function`) - - 📝 Sets the form to edit an existing environment. - - ƒ **resetEnvForm** (`Function`) - - 📝 Resets the environment form. -- 🧩 **Dashboard** (`Component`) - - 📝 Displays the list of available plugins and allows selecting one. - - 🏗️ Layer: UI - - ƒ **onMount** (`Function`) - - 📝 Fetch plugins when the component mounts. - - ƒ **selectPlugin** (`Function`) - - 📝 Selects a plugin to display its form. -- 📦 **GitServiceClient** (`Module`) - - 📝 API client for Git operations, managing the communication between frontend and backend. - - 🏗️ Layer: Service - - 📦 **gitService** (`Action`) - - 📝 Retrieves the diff for specific files or the whole repository. -- ƒ **getConnections** (`Function`) - - 📝 Fetch a list of saved connections. -- ƒ **createConnection** (`Function`) - - 📝 Create a new connection configuration. -- ƒ **deleteConnection** (`Function`) - - 📝 Delete a connection configuration. -- ƒ **getTasks** (`Function`) - - 📝 Fetch a list of tasks with pagination and optional status filter. -- ƒ **getTask** (`Function`) - - 📝 Fetch details for a specific task. -- ƒ **getTaskLogs** (`Function`) - - 📝 Fetch logs for a specific task. -- ƒ **resumeTask** (`Function`) - - 📝 Resume a task that is awaiting input (e.g., passwords). -- ƒ **resolveTask** (`Function`) - - 📝 Resolve a task that is awaiting mapping. -- ƒ **clearTasks** (`Function`) - - 📝 Clear tasks based on status. -- ƒ **runTask** (`Function`) - - 📝 Start a new task for a given plugin. -- ƒ **getTaskStatus** (`Function`) - - 📝 Fetch details for a specific task (to poll status or get result). - 📦 **stores_module** (`Module`) - 📝 Global state management using Svelte stores. - 🏗️ Layer: UI-State @@ -350,12 +92,42 @@ - 📝 Generic request wrapper. - 📦 **api** (`Data`) - 📝 API client object with specific methods. -- ƒ **load** (`Function`) - - 📝 Loads initial plugin data for the dashboard. +- 🧩 **Select** (`Component`) + - 📝 Standardized dropdown selection component. + - 🏗️ Layer: Atom +- 📦 **ui** (`Module`) + - 📝 Central export point for standardized UI components. + - 🏗️ Layer: Atom +- 🧩 **PageHeader** (`Component`) + - 📝 Standardized page header with title and action area. + - 🏗️ Layer: Atom +- 🧩 **Card** (`Component`) + - 📝 Standardized container with padding and elevation. + - 🏗️ Layer: Atom +- 🧩 **Button** (`Component`) + - 📝 Define component interface and default values. + - 🏗️ Layer: Atom +- 🧩 **Input** (`Component`) + - 📝 Standardized text input component with label and error handling. + - 🏗️ Layer: Atom +- 🧩 **LanguageSwitcher** (`Component`) + - 📝 Dropdown component to switch between supported languages. + - 🏗️ Layer: Atom +- 📦 **i18n** (`Module`) + - 📝 Determines the starting locale. + - 🏗️ Layer: Infra + - 🔗 DEPENDS_ON -> `locales/ru.json` + - 🔗 DEPENDS_ON -> `locales/en.json` + - 📦 **locale** (`Store`) + - 📝 Holds the current active locale string. + - 📦 **t** (`Store`) + - 📝 Derived store providing the translation dictionary. - ƒ **selectPlugin** (`Function`) - 📝 Handles plugin selection and navigation. - ƒ **handleFormSubmit** (`Function`) - 📝 Handles task creation from dynamic form submission. +- ƒ **load** (`Function`) + - 📝 Loads initial plugin data for the dashboard. - 🧩 **TaskManagementPage** (`Component`) - 📝 Page for managing and monitoring tasks. - 🏗️ Layer: Page @@ -367,52 +139,6 @@ - 📝 Updates the selected task ID when a task is clicked. - ƒ **handleRunBackup** (`Function`) - 📝 Triggers a manual backup task for the selected environment. -- 🧩 **GitDashboardPage** (`Component`) - - 📝 Dashboard management page for Git integration. - - 🏗️ Layer: Page - - ƒ **fetchEnvironments** (`Function`) - - 📝 Fetches the list of deployment environments from the API. - - ƒ **fetchDashboards** (`Function`) - - 📝 Fetches dashboards for a specific environment. -- ƒ **load** (`Function`) - - 📝 Loads application settings and environment list. -- ƒ **handleSaveGlobal** (`Function`) - - 📝 Saves global application settings. -- ƒ **handleAddOrUpdateEnv** (`Function`) - - 📝 Adds a new environment or updates an existing one. -- ƒ **handleDeleteEnv** (`Function`) - - 📝 Deletes a Superset environment. -- ƒ **handleTestEnv** (`Function`) - - 📝 Tests the connection to a Superset environment. -- ƒ **editEnv** (`Function`) - - 📝 Populates the environment form for editing. -- ƒ **resetEnvForm** (`Function`) - - 📝 Resets the environment creation/edit form to default state. -- 🧩 **GitSettingsPage** (`Component`) - - 📝 Manage Git server configurations for dashboard versioning. - - 🏗️ Layer: Page - - ƒ **loadConfigs** (`Function`) - - 📝 Fetches existing git configurations. - - ƒ **handleTest** (`Function`) - - 📝 Tests connection to a git server with current form data. - - ƒ **handleSave** (`Function`) - - 📝 Saves a new git configuration. - - ƒ **handleDelete** (`Function`) - - 📝 Deletes a git configuration by ID. -- 🧩 **ConnectionsSettingsPage** (`Component`) - - 📝 Page for managing database connection configurations. - - 🏗️ Layer: UI - - ƒ **handleSuccess** (`Function`) - - 📝 Refreshes the connection list after a successful creation. -- 🧩 **MapperPage** (`Component`) - - 📝 Page for the dataset column mapper tool. - - 🏗️ Layer: UI -- 🧩 **DebugPage** (`Component`) - - 📝 Page for system diagnostics and debugging. - - 🏗️ Layer: UI -- 🧩 **SearchPage** (`Component`) - - 📝 Page for the dataset search tool. - - 🏗️ Layer: UI - 🧩 **MigrationDashboard** (`Component`) - 📝 Main dashboard for configuring and starting migrations. - 🏗️ Layer: Page @@ -441,22 +167,355 @@ - 📝 Fetches databases from both environments and gets suggestions. - ƒ **handleUpdate** (`Function`) - 📝 Saves a mapping to the backend. +- 🧩 **StoragePage** (`Component`) + - 📝 Main page for file storage management. + - 🏗️ Layer: Feature + - ƒ **loadFiles** (`Function`) + - 📝 Fetches the list of files from the server. + - ƒ **handleDelete** (`Function`) + - 📝 Handles the file deletion process. + - ƒ **handleNavigate** (`Function`) + - 📝 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 +- 🧩 **DebugPage** (`Component`) + - 📝 Page for system diagnostics and debugging. + - 🏗️ Layer: UI +- ƒ **handleSaveGlobal** (`Function`) + - 📝 Saves global application settings. +- ƒ **handleSaveStorage** (`Function`) + - 📝 Saves storage-specific settings. +- ƒ **handleAddOrUpdateEnv** (`Function`) + - 📝 Adds a new environment or updates an existing one. +- ƒ **handleDeleteEnv** (`Function`) + - 📝 Deletes a Superset environment. +- ƒ **handleTestEnv** (`Function`) + - 📝 Tests the connection to a Superset environment. +- ƒ **editEnv** (`Function`) + - 📝 Populates the environment form for editing. +- ƒ **resetEnvForm** (`Function`) + - 📝 Resets the environment creation/edit form to default state. +- ƒ **load** (`Function`) + - 📝 Loads application settings and environment list. +- 🧩 **ConnectionsSettingsPage** (`Component`) + - 📝 Page for managing database connection configurations. + - 🏗️ Layer: UI + - ƒ **handleSuccess** (`Function`) + - 📝 Refreshes the connection list after a successful creation. +- 🧩 **GitSettingsPage** (`Component`) + - 📝 Manage Git server configurations for dashboard versioning. + - 🏗️ Layer: Page + - ƒ **loadConfigs** (`Function`) + - 📝 Fetches existing git configurations. + - ƒ **handleTest** (`Function`) + - 📝 Tests connection to a git server with current form data. + - ƒ **handleSave** (`Function`) + - 📝 Saves a new git configuration. + - ƒ **handleDelete** (`Function`) + - 📝 Deletes a git configuration by ID. +- 🧩 **GitDashboardPage** (`Component`) + - 📝 Dashboard management page for Git integration. + - 🏗️ Layer: Page + - ƒ **fetchEnvironments** (`Function`) + - 📝 Fetches the list of deployment environments from the API. + - ƒ **fetchDashboards** (`Function`) + - 📝 Fetches dashboards for a specific environment. +- 🧩 **Dashboard** (`Component`) + - 📝 Displays the list of available plugins and allows selecting one. + - 🏗️ Layer: UI + - ƒ **onMount** (`Function`) + - 📝 Fetch plugins when the component mounts. + - ƒ **selectPlugin** (`Function`) + - 📝 Selects a plugin to display its form. +- 🧩 **Settings** (`Component`) + - 📝 The main settings page for the application, allowing management of environments and global settings. + - 🏗️ Layer: UI + - ƒ **loadSettings** (`Function`) + - 📝 Loads settings from the backend. + - ƒ **handleSaveGlobal** (`Function`) + - 📝 Saves global settings to the backend. + - ƒ **handleAddOrUpdateEnv** (`Function`) + - 📝 Adds or updates an environment. + - ƒ **handleDeleteEnv** (`Function`) + - 📝 Deletes an environment. + - ƒ **handleTestEnv** (`Function`) + - 📝 Tests the connection to an environment. + - ƒ **editEnv** (`Function`) + - 📝 Sets the form to edit an existing environment. + - ƒ **resetEnvForm** (`Function`) + - 📝 Resets the environment form. +- ƒ **getConnections** (`Function`) + - 📝 Fetch a list of saved connections. +- ƒ **createConnection** (`Function`) + - 📝 Create a new connection configuration. +- ƒ **deleteConnection** (`Function`) + - 📝 Delete a connection configuration. +- 📦 **GitServiceClient** (`Module`) + - 📝 API client for Git operations, managing the communication between frontend and backend. + - 🏗️ Layer: Service + - 📦 **gitService** (`Action`) + - 📝 Retrieves the diff for specific files or the whole repository. +- ƒ **runTask** (`Function`) + - 📝 Start a new task for a given plugin. +- ƒ **getTaskStatus** (`Function`) + - 📝 Fetch details for a specific task (to poll status or get result). +- ƒ **getTasks** (`Function`) + - 📝 Fetch a list of tasks with pagination and optional status filter. +- ƒ **getTask** (`Function`) + - 📝 Fetch details for a specific task. +- ƒ **getTaskLogs** (`Function`) + - 📝 Fetch logs for a specific task. +- ƒ **resumeTask** (`Function`) + - 📝 Resume a task that is awaiting input (e.g., passwords). +- ƒ **resolveTask** (`Function`) + - 📝 Resolve a task that is awaiting mapping. +- ƒ **clearTasks** (`Function`) + - 📝 Clear tasks based on status. +- 📦 **storageService** (`Module`) + - 📝 Frontend API client for file storage management. + - 🏗️ Layer: Service + - ƒ **listFiles** (`Function`) + - 📝 Fetches the list of files for a given category and subpath. + - ƒ **uploadFile** (`Function`) + - 📝 Uploads a file to the storage system. + - ƒ **deleteFile** (`Function`) + - 📝 Deletes a file or directory from storage. + - ƒ **downloadFileUrl** (`Function`) + - 📝 Returns the URL for downloading a file. +- 🧩 **PasswordPrompt** (`Component`) + - 📝 A modal component to prompt the user for database passwords when a migration task is paused. + - 🏗️ Layer: UI + - ƒ **handleSubmit** (`Function`) + - 📝 Validates and dispatches the passwords to resume the task. + - ƒ **handleCancel** (`Function`) + - 📝 Cancels the password prompt. +- 🧩 **MappingTable** (`Component`) + - 📝 Displays and allows editing of database mappings. + - 🏗️ Layer: Feature + - ƒ **updateMapping** (`Function`) + - 📝 Updates a mapping for a specific source database. + - ƒ **getSuggestion** (`Function`) + - 📝 Finds a suggestion for a source database. +- 🧩 **TaskLogViewer** (`Component`) + - 📝 Displays detailed logs for a specific task in a modal or inline. + - 🏗️ Layer: UI + - ƒ **fetchLogs** (`Function`) + - 📝 Fetches logs for the current task. + - ƒ **scrollToBottom** (`Function`) + - 📝 Scrolls the log container to the bottom. + - ƒ **handleScroll** (`Function`) + - 📝 Updates auto-scroll preference based on scroll position. + - ƒ **close** (`Function`) + - 📝 Closes the log viewer modal. + - ƒ **getLogLevelColor** (`Function`) + - 📝 Returns the CSS color class for a given log level. + - ƒ **onDestroy** (`Function`) + - 📝 Cleans up the polling interval. +- 🧩 **Footer** (`Component`) + - 📝 Displays the application footer with copyright information. + - 🏗️ Layer: UI +- 🧩 **MissingMappingModal** (`Component`) + - 📝 Prompts the user to provide a database mapping when one is missing during migration. + - 🏗️ Layer: Feature + - ƒ **resolve** (`Function`) + - 📝 Dispatches the resolution event with the selected mapping. + - ƒ **cancel** (`Function`) + - 📝 Cancels the mapping resolution modal. +- 🧩 **DashboardGrid** (`Component`) + - 📝 Displays a grid of dashboards with selection and pagination. + - 🏗️ Layer: Component + - ƒ **handleSort** (`Function`) + - 📝 Toggles sort direction or changes sort column. + - ƒ **handleSelectionChange** (`Function`) + - 📝 Handles individual checkbox changes. + - ƒ **handleSelectAll** (`Function`) + - 📝 Handles select all checkbox. + - ƒ **goToPage** (`Function`) + - 📝 Changes current page. + - ƒ **openGit** (`Function`) + - 📝 Opens the Git management modal for a dashboard. +- 🧩 **Navbar** (`Component`) + - 📝 Main navigation bar for the application. + - 🏗️ Layer: UI +- 🧩 **TaskHistory** (`Component`) + - 📝 Displays a list of recent tasks with their status and allows selecting them for viewing logs. + - 🏗️ Layer: UI + - ƒ **fetchTasks** (`Function`) + - 📝 Fetches the list of recent tasks from the API. + - ƒ **clearTasks** (`Function`) + - 📝 Clears tasks from the history, optionally filtered by status. + - ƒ **selectTask** (`Function`) + - 📝 Selects a task and fetches its full details. + - ƒ **getStatusColor** (`Function`) + - 📝 Returns the CSS color class for a given task status. + - ƒ **onMount** (`Function`) + - 📝 Initializes the component by fetching tasks and starting polling. + - ƒ **onDestroy** (`Function`) + - 📝 Cleans up the polling interval when the component is destroyed. +- 🧩 **Toast** (`Component`) + - 📝 Displays transient notifications (toasts) in the bottom-right corner. + - 🏗️ Layer: UI +- 🧩 **TaskRunner** (`Component`) + - 📝 Connects to a WebSocket to display real-time logs for a running task. + - 🏗️ Layer: UI + - ƒ **connect** (`Function`) + - 📝 Establishes WebSocket connection with exponential backoff. + - ƒ **fetchTargetDatabases** (`Function`) + - 📝 Fetches the list of databases in the target environment. + - ƒ **handleMappingResolve** (`Function`) + - 📝 Handles the resolution of a missing database mapping. + - ƒ **handlePasswordResume** (`Function`) + - 📝 Handles the submission of database passwords to resume a task. + - ƒ **startDataTimeout** (`Function`) + - 📝 Starts a timeout to detect when the log stream has stalled. + - ƒ **resetDataTimeout** (`Function`) + - 📝 Resets the data stall timeout. + - ƒ **onMount** (`Function`) + - 📝 Initializes the component and subscribes to task selection changes. + - ƒ **onDestroy** (`Function`) + - 📝 Close WebSocket connection when the component is destroyed. +- 🧩 **TaskList** (`Component`) + - 📝 Displays a list of tasks with their status and execution details. + - 🏗️ Layer: Component + - ƒ **getStatusColor** (`Function`) + - 📝 Returns the CSS color class for a given task status. + - ƒ **formatTime** (`Function`) + - 📝 Formats a date string using date-fns. + - ƒ **handleTaskClick** (`Function`) + - 📝 Dispatches a select event when a task is clicked. +- 🧩 **DynamicForm** (`Component`) + - 📝 Generates a form dynamically based on a JSON schema. + - 🏗️ Layer: UI + - ƒ **handleSubmit** (`Function`) + - 📝 Dispatches the submit event with the form data. + - ƒ **initializeForm** (`Function`) + - 📝 Initialize form data with default values from the schema. +- 🧩 **EnvSelector** (`Component`) + - 📝 Provides a UI component for selecting source and target environments. + - 🏗️ Layer: Feature + - ƒ **handleSelect** (`Function`) + - 📝 Dispatches the selection change event. +- 🧩 **FileList** (`Component`) + - 📝 Displays a table of files with metadata and actions. + - 🏗️ Layer: Component + - ƒ **isDirectory** (`Function`) + - 📝 Checks if a file object represents a directory. + - ƒ **formatSize** (`Function`) + - 📝 Formats file size in bytes into a human-readable string. + - ƒ **formatDate** (`Function`) + - 📝 Formats an ISO date string into a localized readable format. +- 🧩 **FileUpload** (`Component`) + - 📝 Provides a form for uploading files to a specific category. + - 🏗️ Layer: Component + - ƒ **handleUpload** (`Function`) + - 📝 Handles the file upload process. + - ƒ **handleDrop** (`Function`) + - 📝 Handles the file drop event for drag-and-drop. +- 🧩 **ConnectionForm** (`Component`) + - 📝 UI component for creating a new database connection configuration. + - 🏗️ Layer: UI + - ƒ **handleSubmit** (`Function`) + - 📝 Submits the connection form to the backend. + - ƒ **resetForm** (`Function`) + - 📝 Resets the connection form fields to their default values. +- 🧩 **ConnectionList** (`Component`) + - 📝 UI component for listing and deleting saved database connection configurations. + - 🏗️ Layer: UI + - ƒ **fetchConnections** (`Function`) + - 📝 Fetches the list of connections from the backend. + - ƒ **handleDelete** (`Function`) + - 📝 Deletes a connection configuration. +- 🧩 **MapperTool** (`Component`) + - 📝 UI component for mapping dataset column verbose names using the MapperPlugin. + - 🏗️ Layer: UI + - ƒ **fetchData** (`Function`) + - 📝 Fetches environments and saved connections. + - ƒ **handleRunMapper** (`Function`) + - 📝 Triggers the MapperPlugin task. +- 🧩 **DebugTool** (`Component`) + - 📝 UI component for system diagnostics and debugging API responses. + - 🏗️ Layer: UI + - ƒ **fetchEnvironments** (`Function`) + - 📝 Fetches available environments. + - ƒ **handleRunDebug** (`Function`) + - 📝 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 + - ƒ **onMount** (`Function`) + - 📝 Load history when component is mounted. + - ƒ **loadHistory** (`Function`) + - 📝 Fetch commit history from the backend. +- 🧩 **DeploymentModal** (`Component`) + - 📝 Modal for deploying a dashboard to a target environment. + - 🏗️ Layer: Component + - 📦 **loadStatus** (`Watcher`) + - ƒ **loadEnvironments** (`Function`) + - 📝 Fetch available environments from API. + - ƒ **handleDeploy** (`Function`) + - 📝 Trigger deployment to selected environment. +- 🧩 **ConflictResolver** (`Component`) + - 📝 UI for resolving merge conflicts (Keep Mine / Keep Theirs). + - 🏗️ Layer: Component + - ƒ **resolve** (`Function`) + - 📝 Set resolution strategy for a file. + - ƒ **handleSave** (`Function`) + - 📝 Validate and submit resolutions. +- 🧩 **CommitModal** (`Component`) + - 📝 Модальное окно для создания коммита с просмотром изменений (diff). + - 🏗️ Layer: Component + - ƒ **loadStatus** (`Function`) + - 📝 Загружает текущий статус репозитория и diff. + - ƒ **handleCommit** (`Function`) + - 📝 Создает коммит с указанным сообщением. +- 🧩 **BranchSelector** (`Component`) + - 📝 UI для выбора и создания веток Git. + - 🏗️ Layer: Component + - ƒ **onMount** (`Function`) + - 📝 Load branches when component is mounted. + - ƒ **loadBranches** (`Function`) + - 📝 Загружает список веток для дашборда. + - ƒ **handleSelect** (`Function`) + - 📝 Handles branch selection from dropdown. + - ƒ **handleCheckout** (`Function`) + - 📝 Переключает текущую ветку. + - ƒ **handleCreate** (`Function`) + - 📝 Создает новую ветку. +- 🧩 **GitManager** (`Component`) + - 📝 Центральный компонент для управления Git-операциями конкретного дашборда. + - 🏗️ Layer: Component + - ƒ **checkStatus** (`Function`) + - 📝 Проверяет, инициализирован ли репозиторий для данного дашборда. + - ƒ **handleInit** (`Function`) + - 📝 Инициализирует репозиторий для дашборда. + - ƒ **handleSync** (`Function`) + - 📝 Синхронизирует состояние Superset с локальным Git-репозиторием. + - ƒ **handlePush** (`Function`) + - 📝 Pushes local commits to the remote repository. + - ƒ **handlePull** (`Function`) + - 📝 Pulls changes from the remote repository. - 📦 **backend.delete_running_tasks** (`Module`) - 📝 Script to delete tasks with RUNNING status from the database. - 🏗️ Layer: Utility - ƒ **delete_running_tasks** (`Function`) - 📝 Delete all tasks with RUNNING status from the database. -- 📦 **Dependencies** (`Module`) - - 📝 Manages the creation and provision of shared application dependencies, such as the PluginLoader and TaskManager, to avoid circular imports. - - 🏗️ Layer: Core - - ƒ **get_config_manager** (`Function`) - - 📝 Dependency injector for the ConfigManager. - - ƒ **get_plugin_loader** (`Function`) - - 📝 Dependency injector for the PluginLoader. - - ƒ **get_task_manager** (`Function`) - - 📝 Dependency injector for the TaskManager. - - ƒ **get_scheduler_service** (`Function`) - - 📝 Dependency injector for the SchedulerService. - 📦 **AppModule** (`Module`) - 📝 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. - 🏗️ Layer: UI (API) @@ -476,120 +535,17 @@ - 📝 Serves frontend static files or index.html for SPA routing. - ƒ **read_root** (`Function`) - 📝 A simple root endpoint to confirm that the API is running when frontend is missing. -- 📦 **backend.src.models.mapping** (`Module`) - - 📝 Defines the database schema for environment metadata and database mappings using SQLAlchemy. - - 🏗️ Layer: Domain - - 🔗 DEPENDS_ON -> `sqlalchemy` - - ℂ **MigrationStatus** (`Class`) - - 📝 Enumeration of possible migration job statuses. - - ℂ **Environment** (`Class`) - - 📝 Represents a Superset instance environment. - - ℂ **DatabaseMapping** (`Class`) - - 📝 Represents a mapping between source and target databases. - - ℂ **MigrationJob** (`Class`) - - 📝 Represents a single migration execution job. -- 📦 **GitModels** (`Module`) - - 📝 Git-specific SQLAlchemy models for configuration and repository tracking. - - 🏗️ Layer: Model -- 📦 **backend.src.models.dashboard** (`Module`) - - 📝 Defines data models for dashboard metadata and selection. - - 🏗️ Layer: Model - - ℂ **DashboardMetadata** (`Class`) - - 📝 Represents a dashboard available for migration. - - ℂ **DashboardSelection** (`Class`) - - 📝 Represents the user's selection of dashboards to migrate. -- 📦 **backend.src.models.task** (`Module`) - - 📝 Defines the database schema for task execution records. - - 🏗️ Layer: Domain - - 🔗 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 - - 🔗 DEPENDS_ON -> `sqlalchemy` - - ℂ **ConnectionConfig** (`Class`) - - 📝 Stores credentials for external databases used for column mapping. -- 📦 **backend.src.services.mapping_service** (`Module`) - - 📝 Orchestrates database fetching and fuzzy matching suggestions. - - 🏗️ Layer: Service - - 🔗 DEPENDS_ON -> `backend.src.core.superset_client` - - 🔗 DEPENDS_ON -> `backend.src.core.utils.matching` - - ℂ **MappingService** (`Class`) - - 📝 Service for handling database mapping logic. - - ƒ **__init__** (`Function`) - - 📝 Initializes the mapping service with a config manager. - - ƒ **_get_client** (`Function`) - - 📝 Helper to get an initialized SupersetClient for an environment. - - ƒ **get_suggestions** (`Function`) - - 📝 Fetches databases from both environments and returns fuzzy matching suggestions. -- 📦 **backend.src.services.git_service** (`Module`) - - 📝 Core Git logic using GitPython to manage dashboard repositories. - - 🏗️ Layer: Service - - 🔗 INHERITS_FROM -> `None` - - ℂ **GitService** (`Class`) - - 📝 Wrapper for GitPython operations with semantic logging and error handling. - - ƒ **__init__** (`Function`) - - 📝 Initializes the GitService with a base path for repositories. - - ƒ **_get_repo_path** (`Function`) - - 📝 Resolves the local filesystem path for a dashboard's repository. - - ƒ **init_repo** (`Function`) - - 📝 Initialize or clone a repository for a dashboard. - - ƒ **get_repo** (`Function`) - - 📝 Get Repo object for a dashboard. - - ƒ **list_branches** (`Function`) - - 📝 List all branches for a dashboard's repository. - - ƒ **create_branch** (`Function`) - - 📝 Create a new branch from an existing one. - - ƒ **checkout_branch** (`Function`) - - 📝 Switch to a specific branch. - - ƒ **commit_changes** (`Function`) - - 📝 Stage and commit changes. - - ƒ **push_changes** (`Function`) - - 📝 Push local commits to remote. - - ƒ **pull_changes** (`Function`) - - 📝 Pull changes from remote. - - ƒ **get_status** (`Function`) - - 📝 Get current repository status (dirty files, untracked, etc.) - - ƒ **get_diff** (`Function`) - - 📝 Generate diff for a file or the whole repository. - - ƒ **get_commit_history** (`Function`) - - 📝 Retrieve commit history for a repository. - - ƒ **test_connection** (`Function`) - - 📝 Test connection to Git provider using PAT. -- 📦 **ConfigManagerModule** (`Module`) - - 📝 Manages application configuration, including loading/saving to JSON and CRUD for environments. +- 📦 **Dependencies** (`Module`) + - 📝 Manages the creation and provision of shared application dependencies, such as the PluginLoader and TaskManager, to avoid circular imports. - 🏗️ Layer: Core - - 🔗 DEPENDS_ON -> `ConfigModels` - - 🔗 CALLS -> `logger` - - ℂ **ConfigManager** (`Class`) - - 📝 A class to handle application configuration persistence and management. - - ƒ **__init__** (`Function`) - - 📝 Initializes the ConfigManager. - - ƒ **_load_config** (`Function`) - - 📝 Loads the configuration from disk or creates a default one. - - ƒ **_save_config_to_disk** (`Function`) - - 📝 Saves the provided configuration object to disk. - - ƒ **save** (`Function`) - - 📝 Saves the current configuration state to disk. - - ƒ **get_config** (`Function`) - - 📝 Returns the current configuration. - - ƒ **update_global_settings** (`Function`) - - 📝 Updates the global settings and persists the change. - - ƒ **validate_path** (`Function`) - - 📝 Validates if a path exists and is writable. - - ƒ **get_environments** (`Function`) - - 📝 Returns the list of configured environments. - - ƒ **has_environments** (`Function`) - - 📝 Checks if at least one environment is configured. - - ƒ **get_environment** (`Function`) - - 📝 Returns a single environment by ID. - - ƒ **add_environment** (`Function`) - - 📝 Adds a new environment to the configuration. - - ƒ **update_environment** (`Function`) - - 📝 Updates an existing environment. - - ƒ **delete_environment** (`Function`) - - 📝 Deletes an environment by ID. + - ƒ **get_config_manager** (`Function`) + - 📝 Dependency injector for the ConfigManager. + - ƒ **get_plugin_loader** (`Function`) + - 📝 Dependency injector for the PluginLoader. + - ƒ **get_task_manager** (`Function`) + - 📝 Dependency injector for the TaskManager. + - ƒ **get_scheduler_service** (`Function`) + - 📝 Dependency injector for the SchedulerService. - 📦 **backend.src.core.superset_client** (`Module`) - 📝 Предоставляет высокоуровневый клиент для взаимодействия с Superset REST API, инкапсулируя логику запросов, обработку ошибок и пагинацию. - 🏗️ Layer: Core @@ -641,16 +597,87 @@ - 📝 Iterates through all pages to collect all data items. - ƒ **_validate_import_file** (`Function`) - 📝 Validates that the file to be imported is a valid ZIP with metadata.yaml. -- 📦 **backend.src.core.migration_engine** (`Module`) - - 📝 Handles the interception and transformation of Superset asset ZIP archives. +- 📦 **ConfigManagerModule** (`Module`) + - 📝 Manages application configuration, including loading/saving to JSON and CRUD for environments. - 🏗️ Layer: Core - - 🔗 DEPENDS_ON -> `PyYAML` - - ℂ **MigrationEngine** (`Class`) - - 📝 Engine for transforming Superset export ZIPs. - - ƒ **transform_zip** (`Function`) - - 📝 Extracts ZIP, replaces database UUIDs in YAMLs, and re-packages. - - ƒ **_transform_yaml** (`Function`) - - 📝 Replaces database_uuid in a single YAML file. + - 🔗 DEPENDS_ON -> `ConfigModels` + - 🔗 CALLS -> `logger` + - ℂ **ConfigManager** (`Class`) + - 📝 A class to handle application configuration persistence and management. + - ƒ **__init__** (`Function`) + - 📝 Initializes the ConfigManager. + - ƒ **_load_config** (`Function`) + - 📝 Loads the configuration from disk or creates a default one. + - ƒ **_save_config_to_disk** (`Function`) + - 📝 Saves the provided configuration object to disk. + - ƒ **save** (`Function`) + - 📝 Saves the current configuration state to disk. + - ƒ **get_config** (`Function`) + - 📝 Returns the current configuration. + - ƒ **update_global_settings** (`Function`) + - 📝 Updates the global settings and persists the change. + - ƒ **validate_path** (`Function`) + - 📝 Validates if a path exists and is writable. + - ƒ **get_environments** (`Function`) + - 📝 Returns the list of configured environments. + - ƒ **has_environments** (`Function`) + - 📝 Checks if at least one environment is configured. + - ƒ **get_environment** (`Function`) + - 📝 Returns a single environment by ID. + - ƒ **add_environment** (`Function`) + - 📝 Adds a new environment to the configuration. + - ƒ **update_environment** (`Function`) + - 📝 Updates an existing environment. + - ƒ **delete_environment** (`Function`) + - 📝 Deletes an environment by ID. +- 📦 **SchedulerModule** (`Module`) + - 📝 Manages scheduled tasks using APScheduler. + - 🏗️ Layer: Core + - ℂ **SchedulerService** (`Class`) + - 📝 Provides a service to manage scheduled backup tasks. + - ƒ **__init__** (`Function`) + - 📝 Initializes the scheduler service with task and config managers. + - ƒ **start** (`Function`) + - 📝 Starts the background scheduler and loads initial schedules. + - ƒ **stop** (`Function`) + - 📝 Stops the background scheduler. + - ƒ **load_schedules** (`Function`) + - 📝 Loads backup schedules from configuration and registers them. + - ƒ **add_backup_job** (`Function`) + - 📝 Adds a scheduled backup job for an environment. + - ƒ **_trigger_backup** (`Function`) + - 📝 Triggered by the scheduler to start a backup task. +- 📦 **ConfigModels** (`Module`) + - 📝 Defines the data models for application configuration using Pydantic. + - 🏗️ Layer: Core + - 📦 **Schedule** (`DataClass`) + - 📝 Represents a backup schedule configuration. + - 📦 **Environment** (`DataClass`) + - 📝 Represents a Superset environment configuration. + - 📦 **LoggingConfig** (`DataClass`) + - 📝 Defines the configuration for the application's logging system. + - 📦 **GlobalSettings** (`DataClass`) + - 📝 Represents global application settings. + - 📦 **AppConfig** (`DataClass`) + - 📝 The root configuration model containing all application settings. +- 📦 **backend.src.core.database** (`Module`) + - 📝 Configures the SQLite database connection and session management. + - 🏗️ Layer: Core + - 🔗 DEPENDS_ON -> `sqlalchemy` + - 📦 **DATABASE_URL** (`Constant`) + - 📦 **TASKS_DATABASE_URL** (`Constant`) + - 📦 **engine** (`Variable`) + - 📦 **tasks_engine** (`Variable`) + - ℂ **SessionLocal** (`Class`) + - 📝 A session factory for the main mappings database. + - ℂ **TasksSessionLocal** (`Class`) + - 📝 A session factory for the tasks execution 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. - 📦 **LoggerModule** (`Module`) - 📝 Configures the application's logging system, including a custom handler for buffering logs and streaming them over WebSockets. - 🏗️ Layer: Core @@ -676,54 +703,6 @@ - 📝 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. -- 📦 **backend.src.core.database** (`Module`) - - 📝 Configures the SQLite database connection and session management. - - 🏗️ Layer: Core - - 🔗 DEPENDS_ON -> `sqlalchemy` - - 📦 **DATABASE_URL** (`Constant`) - - 📦 **TASKS_DATABASE_URL** (`Constant`) - - 📦 **engine** (`Variable`) - - 📦 **tasks_engine** (`Variable`) - - ℂ **SessionLocal** (`Class`) - - 📝 A session factory for the main mappings database. - - ℂ **TasksSessionLocal** (`Class`) - - 📝 A session factory for the tasks execution 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. -- 📦 **ConfigModels** (`Module`) - - 📝 Defines the data models for application configuration using Pydantic. - - 🏗️ Layer: Core - - 📦 **Schedule** (`DataClass`) - - 📝 Represents a backup schedule configuration. - - 📦 **Environment** (`DataClass`) - - 📝 Represents a Superset environment configuration. - - 📦 **LoggingConfig** (`DataClass`) - - 📝 Defines the configuration for the application's logging system. - - 📦 **GlobalSettings** (`DataClass`) - - 📝 Represents global application settings. - - 📦 **AppConfig** (`DataClass`) - - 📝 The root configuration model containing all application settings. -- 📦 **SchedulerModule** (`Module`) - - 📝 Manages scheduled tasks using APScheduler. - - 🏗️ Layer: Core - - ℂ **SchedulerService** (`Class`) - - 📝 Provides a service to manage scheduled backup tasks. - - ƒ **__init__** (`Function`) - - 📝 Initializes the scheduler service with task and config managers. - - ƒ **start** (`Function`) - - 📝 Starts the background scheduler and loads initial schedules. - - ƒ **stop** (`Function`) - - 📝 Stops the background scheduler. - - ƒ **load_schedules** (`Function`) - - 📝 Loads backup schedules from configuration and registers them. - - ƒ **add_backup_job** (`Function`) - - 📝 Adds a scheduled backup job for an environment. - - ƒ **_trigger_backup** (`Function`) - - 📝 Triggered by the scheduler to start a backup task. - ℂ **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 @@ -741,6 +720,16 @@ - 📝 Returns a list of all registered plugin configurations. - ƒ **has_plugin** (`Function`) - 📝 Checks if a plugin with the given ID is registered. +- 📦 **backend.src.core.migration_engine** (`Module`) + - 📝 Handles the interception and transformation of Superset asset ZIP archives. + - 🏗️ Layer: Core + - 🔗 DEPENDS_ON -> `PyYAML` + - ℂ **MigrationEngine** (`Class`) + - 📝 Engine for transforming Superset export ZIPs. + - ƒ **transform_zip** (`Function`) + - 📝 Extracts ZIP, replaces database UUIDs in YAMLs, and re-packages. + - ƒ **_transform_yaml** (`Function`) + - 📝 Replaces database_uuid in a single YAML file. - ℂ **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 @@ -759,12 +748,46 @@ - ℂ **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.utils.matching** (`Module`) - - 📝 Provides utility functions for fuzzy matching database names. - - 🏗️ Layer: Core - - 🔗 DEPENDS_ON -> `rapidfuzz` - - ƒ **suggest_mappings** (`Function`) - - 📝 Suggests mappings between source and target databases using fuzzy matching. +- 📦 **backend.core.utils.fileio** (`Module`) + - 📝 Предоставляет набор утилит для управления файловыми операциями, включая работу с временными файлами, архивами ZIP, файлами YAML и очистку директорий. + - 🏗️ Layer: Infra + - 🔗 DEPENDS_ON -> `backend.src.core.logger` + - 🔗 DEPENDS_ON -> `pyyaml` + - ℂ **InvalidZipFormatError** (`Class`) + - 📝 Exception raised when a file is not a valid ZIP archive. + - ƒ **create_temp_file** (`Function`) + - 📝 Контекстный менеджер для создания временного файла или директории с гарантированным удалением. + - ƒ **remove_empty_directories** (`Function`) + - 📝 Рекурсивно удаляет все пустые поддиректории, начиная с указанного пути. + - ƒ **read_dashboard_from_disk** (`Function`) + - 📝 Читает бинарное содержимое файла с диска. + - ƒ **calculate_crc32** (`Function`) + - 📝 Вычисляет контрольную сумму CRC32 для файла. + - 📦 **RetentionPolicy** (`DataClass`) + - 📝 Определяет политику хранения для архивов (ежедневные, еженедельные, ежемесячные). + - ƒ **archive_exports** (`Function`) + - 📝 Управляет архивом экспортированных файлов, применяя политику хранения и дедупликацию. + - 🔗 CALLS -> `apply_retention_policy` + - 🔗 CALLS -> `calculate_crc32` + - ƒ **apply_retention_policy** (`Function`) + - 📝 (Helper) Применяет политику хранения к списку файлов, возвращая те, что нужно сохранить. + - ƒ **save_and_unpack_dashboard** (`Function`) + - 📝 Сохраняет бинарное содержимое ZIP-архива на диск и опционально распаковывает его. + - ƒ **update_yamls** (`Function`) + - 📝 Обновляет конфигурации в YAML-файлах, заменяя значения или применяя regex. + - 🔗 CALLS -> `_update_yaml_file` + - ƒ **_update_yaml_file** (`Function`) + - 📝 (Helper) Обновляет один YAML файл. + - ƒ **replacer** (`Function`) + - 📝 Функция замены, сохраняющая кавычки если они были. + - ƒ **create_dashboard_export** (`Function`) + - 📝 Создает ZIP-архив из указанных исходных путей. + - ƒ **sanitize_filename** (`Function`) + - 📝 Очищает строку от символов, недопустимых в именах файлов. + - ƒ **get_filename_from_headers** (`Function`) + - 📝 Извлекает имя файла из HTTP заголовка 'Content-Disposition'. + - ƒ **consolidate_archive_folders** (`Function`) + - 📝 Консолидирует директории архивов на основе общего слага в имени. - 📦 **backend.core.utils.network** (`Module`) - 📝 Инкапсулирует низкоуровневую HTTP-логику для взаимодействия с Superset API, включая аутентификацию, управление сессией, retry-логику и обработку ошибок. - 🏗️ Layer: Infra @@ -814,6 +837,12 @@ - 📝 Получает общее количество элементов для пагинации. - ƒ **fetch_paginated_data** (`Function`) - 📝 Автоматически собирает данные со всех страниц пагинированного эндпоинта. +- 📦 **backend.src.core.utils.matching** (`Module`) + - 📝 Provides utility functions for fuzzy matching database names. + - 🏗️ Layer: Core + - 🔗 DEPENDS_ON -> `rapidfuzz` + - ƒ **suggest_mappings** (`Function`) + - 📝 Suggests mappings between source and target databases using fuzzy matching. - 📦 **backend.core.utils.dataset_mapper** (`Module`) - 📝 Этот модуль отвечает за обновление метаданных (verbose_map) в датасетах Superset, извлекая их из PostgreSQL или XLSX-файлов. - 🏗️ Layer: Domain @@ -834,46 +863,21 @@ - 🔗 CALLS -> `self.load_excel_mappings` - 🔗 CALLS -> `superset_client.get_dataset` - 🔗 CALLS -> `superset_client.update_dataset` -- 📦 **backend.core.utils.fileio** (`Module`) - - 📝 Предоставляет набор утилит для управления файловыми операциями, включая работу с временными файлами, архивами ZIP, файлами YAML и очистку директорий. - - 🏗️ Layer: Infra - - 🔗 DEPENDS_ON -> `backend.src.core.logger` - - 🔗 DEPENDS_ON -> `pyyaml` - - ℂ **InvalidZipFormatError** (`Class`) - - 📝 Exception raised when a file is not a valid ZIP archive. - - ƒ **create_temp_file** (`Function`) - - 📝 Контекстный менеджер для создания временного файла или директории с гарантированным удалением. - - ƒ **remove_empty_directories** (`Function`) - - 📝 Рекурсивно удаляет все пустые поддиректории, начиная с указанного пути. - - ƒ **read_dashboard_from_disk** (`Function`) - - 📝 Читает бинарное содержимое файла с диска. - - ƒ **calculate_crc32** (`Function`) - - 📝 Вычисляет контрольную сумму CRC32 для файла. - - 📦 **RetentionPolicy** (`DataClass`) - - 📝 Определяет политику хранения для архивов (ежедневные, еженедельные, ежемесячные). - - ƒ **archive_exports** (`Function`) - - 📝 Управляет архивом экспортированных файлов, применяя политику хранения и дедупликацию. - - 🔗 CALLS -> `apply_retention_policy` - - 🔗 CALLS -> `calculate_crc32` - - ƒ **apply_retention_policy** (`Function`) - - 📝 (Helper) Применяет политику хранения к списку файлов, возвращая те, что нужно сохранить. - - ƒ **save_and_unpack_dashboard** (`Function`) - - 📝 Сохраняет бинарное содержимое ZIP-архива на диск и опционально распаковывает его. - - ƒ **update_yamls** (`Function`) - - 📝 Обновляет конфигурации в YAML-файлах, заменяя значения или применяя regex. - - 🔗 CALLS -> `_update_yaml_file` - - ƒ **_update_yaml_file** (`Function`) - - 📝 (Helper) Обновляет один YAML файл. - - ƒ **replacer** (`Function`) - - 📝 Функция замены, сохраняющая кавычки если они были. - - ƒ **create_dashboard_export** (`Function`) - - 📝 Создает ZIP-архив из указанных исходных путей. - - ƒ **sanitize_filename** (`Function`) - - 📝 Очищает строку от символов, недопустимых в именах файлов. - - ƒ **get_filename_from_headers** (`Function`) - - 📝 Извлекает имя файла из HTTP заголовка 'Content-Disposition'. - - ƒ **consolidate_archive_folders** (`Function`) - - 📝 Консолидирует директории архивов на основе общего слага в имени. +- 📦 **TaskPersistenceModule** (`Module`) + - 📝 Handles the persistence of tasks using SQLAlchemy and the tasks.db database. + - 🏗️ Layer: Core + - ℂ **TaskPersistenceService** (`Class`) + - 📝 Provides methods to save and load tasks from the tasks.db database using SQLAlchemy. + - ƒ **__init__** (`Function`) + - 📝 Initializes the persistence service. + - ƒ **persist_task** (`Function`) + - 📝 Persists or updates a single task in the database. + - ƒ **persist_tasks** (`Function`) + - 📝 Persists multiple tasks. + - ƒ **load_tasks** (`Function`) + - 📝 Loads tasks from the database. + - ƒ **delete_tasks** (`Function`) + - 📝 Deletes specific tasks from the database. - 📦 **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 @@ -913,18 +917,6 @@ - 📝 Resume a task that is awaiting input with provided passwords. - ƒ **clear_tasks** (`Function`) - 📝 Clears tasks based on status filter. -- 📦 **TaskManagerPackage** (`Module`) - - 📝 Exports the public API of the task manager package. - - 🏗️ Layer: Core -- 📦 **TaskCleanupModule** (`Module`) - - 📝 Implements task cleanup and retention policies. - - 🏗️ Layer: Core - - ℂ **TaskCleanupService** (`Class`) - - 📝 Provides methods to clean up old task records. - - ƒ **__init__** (`Function`) - - 📝 Initializes the cleanup service with dependencies. - - ƒ **run_cleanup** (`Function`) - - 📝 Deletes tasks older than the configured retention period. - 📦 **TaskManagerModels** (`Module`) - 📝 Defines the data models and enumerations used by the Task Manager. - 🏗️ Layer: Core @@ -936,40 +928,289 @@ - 📝 A Pydantic model representing a single execution instance of a plugin, including its status, parameters, and logs. - ƒ **__init__** (`Function`) - 📝 Initializes the Task model and validates input_request for AWAITING_INPUT status. -- 📦 **TaskPersistenceModule** (`Module`) - - 📝 Handles the persistence of tasks using SQLAlchemy and the tasks.db database. +- 📦 **TaskCleanupModule** (`Module`) + - 📝 Implements task cleanup and retention policies. - 🏗️ Layer: Core - - ℂ **TaskPersistenceService** (`Class`) - - 📝 Provides methods to save and load tasks from the tasks.db database using SQLAlchemy. + - ℂ **TaskCleanupService** (`Class`) + - 📝 Provides methods to clean up old task records. - ƒ **__init__** (`Function`) - - 📝 Initializes the persistence service. - - ƒ **persist_task** (`Function`) - - 📝 Persists or updates a single task in the database. - - ƒ **persist_tasks** (`Function`) - - 📝 Persists multiple tasks. - - ƒ **load_tasks** (`Function`) - - 📝 Loads tasks from the database. - - ƒ **delete_tasks** (`Function`) - - 📝 Deletes specific tasks from the database. -- 📦 **SearchPluginModule** (`Module`) - - 📝 Implements a plugin for searching text patterns across all datasets in a specific Superset environment. - - 🏗️ Layer: Plugins - - ℂ **SearchPlugin** (`Class`) - - 📝 Plugin for searching text patterns in Superset datasets. - - ƒ **id** (`Function`) - - 📝 Returns the unique identifier for the search plugin. - - ƒ **name** (`Function`) - - 📝 Returns the human-readable name of the search plugin. - - ƒ **description** (`Function`) - - 📝 Returns a description of the search plugin. - - ƒ **version** (`Function`) - - 📝 Returns the version of the search plugin. - - ƒ **get_schema** (`Function`) - - 📝 Returns the JSON schema for the search plugin parameters. - - ƒ **execute** (`Function`) - - 📝 Executes the dataset search logic. - - ƒ **_get_context** (`Function`) - - 📝 Extracts a small context around the match for display. + - 📝 Initializes the cleanup service with dependencies. + - ƒ **run_cleanup** (`Function`) + - 📝 Deletes tasks older than the configured retention period. +- 📦 **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.routes.git** (`Module`) + - 📝 Provides FastAPI endpoints for Git integration operations. + - 🏗️ Layer: API + - ƒ **get_git_configs** (`Function`) + - 📝 List all configured Git servers. + - ƒ **create_git_config** (`Function`) + - 📝 Register a new Git server configuration. + - ƒ **delete_git_config** (`Function`) + - 📝 Remove a Git server configuration. + - ƒ **test_git_config** (`Function`) + - 📝 Validate connection to a Git server using provided credentials. + - ƒ **init_repository** (`Function`) + - 📝 Link a dashboard to a Git repository and perform initial clone/init. + - ƒ **get_branches** (`Function`) + - 📝 List all branches for a dashboard's repository. + - ƒ **create_branch** (`Function`) + - 📝 Create a new branch in the dashboard's repository. + - ƒ **checkout_branch** (`Function`) + - 📝 Switch the dashboard's repository to a specific branch. + - ƒ **commit_changes** (`Function`) + - 📝 Stage and commit changes in the dashboard's repository. + - ƒ **push_changes** (`Function`) + - 📝 Push local commits to the remote repository. + - ƒ **pull_changes** (`Function`) + - 📝 Pull changes from the remote repository. + - ƒ **sync_dashboard** (`Function`) + - 📝 Sync dashboard state from Superset to Git using the GitPlugin. + - ƒ **get_environments** (`Function`) + - 📝 List all deployment environments. + - ƒ **deploy_dashboard** (`Function`) + - 📝 Deploy dashboard from Git to a target environment. + - ƒ **get_history** (`Function`) + - 📝 View commit history for a dashboard's repository. + - ƒ **get_repository_status** (`Function`) + - 📝 Get current Git status for a dashboard repository. + - ƒ **get_repository_diff** (`Function`) + - 📝 Get Git diff for a dashboard repository. +- 📦 **ConnectionsRouter** (`Module`) + - 📝 Defines the FastAPI router for managing external database connections. + - 🏗️ Layer: UI (API) + - ℂ **ConnectionSchema** (`Class`) + - 📝 Pydantic model for connection response. + - ℂ **ConnectionCreate** (`Class`) + - 📝 Pydantic model for creating a connection. + - ƒ **list_connections** (`Function`) + - 📝 Lists all saved connections. + - ƒ **create_connection** (`Function`) + - 📝 Creates a new connection configuration. + - ƒ **delete_connection** (`Function`) + - 📝 Deletes a connection configuration. +- 📦 **backend.src.api.routes.environments** (`Module`) + - 📝 API endpoints for listing environments and their databases. + - 🏗️ Layer: API + - 🔗 DEPENDS_ON -> `backend.src.dependencies` + - 🔗 DEPENDS_ON -> `backend.src.core.superset_client` + - 📦 **ScheduleSchema** (`DataClass`) + - 📦 **EnvironmentResponse** (`DataClass`) + - 📦 **DatabaseResponse** (`DataClass`) + - ƒ **get_environments** (`Function`) + - 📝 List all configured environments. + - ƒ **update_environment_schedule** (`Function`) + - 📝 Update backup schedule for an environment. + - ƒ **get_environment_databases** (`Function`) + - 📝 Fetch the list of databases from a specific environment. +- 📦 **backend.src.api.routes.migration** (`Module`) + - 📝 API endpoints for migration operations. + - 🏗️ Layer: API + - 🔗 DEPENDS_ON -> `backend.src.dependencies` + - 🔗 DEPENDS_ON -> `backend.src.models.dashboard` + - ƒ **get_dashboards** (`Function`) + - 📝 Fetch all dashboards from the specified environment for the grid. + - ƒ **execute_migration** (`Function`) + - 📝 Execute the migration of selected dashboards. +- 📦 **PluginsRouter** (`Module`) + - 📝 Defines the FastAPI router for plugin-related endpoints, allowing clients to list available plugins. + - 🏗️ Layer: UI (API) + - ƒ **list_plugins** (`Function`) + - 📝 Retrieve a list of all available plugins. +- 📦 **backend.src.api.routes.mappings** (`Module`) + - 📝 API endpoints for managing database mappings and getting suggestions. + - 🏗️ Layer: API + - 🔗 DEPENDS_ON -> `backend.src.dependencies` + - 🔗 DEPENDS_ON -> `backend.src.core.database` + - 🔗 DEPENDS_ON -> `backend.src.services.mapping_service` + - 📦 **MappingCreate** (`DataClass`) + - 📦 **MappingResponse** (`DataClass`) + - 📦 **SuggestRequest** (`DataClass`) + - ƒ **get_mappings** (`Function`) + - 📝 List all saved database mappings. + - ƒ **create_mapping** (`Function`) + - 📝 Create or update a database mapping. + - ƒ **suggest_mappings_api** (`Function`) + - 📝 Get suggested mappings based on fuzzy matching. +- 📦 **SettingsRouter** (`Module`) + - 📝 Provides API endpoints for managing application settings and Superset environments. + - 🏗️ Layer: UI (API) + - 🔗 DEPENDS_ON -> `ConfigManager` + - 🔗 DEPENDS_ON -> `ConfigModels` + - ƒ **get_settings** (`Function`) + - 📝 Retrieves all application settings. + - ƒ **update_global_settings** (`Function`) + - 📝 Updates global application settings. + - ƒ **get_storage_settings** (`Function`) + - 📝 Retrieves storage-specific settings. + - ƒ **update_storage_settings** (`Function`) + - 📝 Updates storage-specific settings. + - ƒ **get_environments** (`Function`) + - 📝 Lists all configured Superset environments. + - ƒ **add_environment** (`Function`) + - 📝 Adds a new Superset environment. + - ƒ **update_environment** (`Function`) + - 📝 Updates an existing Superset environment. + - ƒ **delete_environment** (`Function`) + - 📝 Deletes a Superset environment. + - ƒ **test_environment_connection** (`Function`) + - 📝 Tests the connection to a Superset environment. +- 📦 **backend.src.api.routes.git_schemas** (`Module`) + - 📝 Defines Pydantic models for the Git integration API layer. + - 🏗️ Layer: API + - 🔗 DEPENDS_ON -> `backend.src.models.git` + - ℂ **GitServerConfigBase** (`Class`) + - 📝 Base schema for Git server configuration attributes. + - ℂ **GitServerConfigCreate** (`Class`) + - 📝 Schema for creating a new Git server configuration. + - ℂ **GitServerConfigSchema** (`Class`) + - 📝 Schema for representing a Git server configuration with metadata. + - ℂ **GitRepositorySchema** (`Class`) + - 📝 Schema for tracking a local Git repository linked to a dashboard. + - ℂ **BranchSchema** (`Class`) + - 📝 Schema for representing a Git branch metadata. + - ℂ **CommitSchema** (`Class`) + - 📝 Schema for representing Git commit details. + - ℂ **BranchCreate** (`Class`) + - 📝 Schema for branch creation requests. + - ℂ **BranchCheckout** (`Class`) + - 📝 Schema for branch checkout requests. + - ℂ **CommitCreate** (`Class`) + - 📝 Schema for staging and committing changes. + - ℂ **ConflictResolution** (`Class`) + - 📝 Schema for resolving merge conflicts. + - ℂ **DeploymentEnvironmentSchema** (`Class`) + - 📝 Schema for representing a target deployment environment. + - ℂ **DeployRequest** (`Class`) + - 📝 Schema for dashboard deployment requests. + - ℂ **RepoInitRequest** (`Class`) + - 📝 Schema for repository initialization requests. +- 📦 **storage_routes** (`Module`) + - 📝 API endpoints for file storage management (backups and repositories). + - 🏗️ Layer: API + - 🔗 DEPENDS_ON -> `backend.src.models.storage` + - ƒ **list_files** (`Function`) + - 📝 List all files and directories in the storage system. + - 🔗 CALLS -> `StoragePlugin.list_files` + - ƒ **upload_file** (`Function`) + - 📝 Upload a file to the storage system. + - 🔗 CALLS -> `StoragePlugin.save_file` + - ƒ **delete_file** (`Function`) + - 📝 Delete a specific file or directory. + - 🔗 CALLS -> `StoragePlugin.delete_file` + - ƒ **download_file** (`Function`) + - 📝 Retrieve a file for download. + - 🔗 CALLS -> `StoragePlugin.get_file_path` +- 📦 **TasksRouter** (`Module`) + - 📝 Defines the FastAPI router for task-related endpoints, allowing clients to create, list, and get the status of tasks. + - 🏗️ Layer: UI (API) + - ƒ **create_task** (`Function`) + - 📝 Create and start a new task for a given plugin. + - ƒ **list_tasks** (`Function`) + - 📝 Retrieve a list of tasks with pagination and optional status filter. + - ƒ **get_task** (`Function`) + - 📝 Retrieve the details of a specific task. + - ƒ **get_task_logs** (`Function`) + - 📝 Retrieve logs for a specific task. + - ƒ **resolve_task** (`Function`) + - 📝 Resolve a task that is awaiting mapping. + - ƒ **resume_task** (`Function`) + - 📝 Resume a task that is awaiting input (e.g., passwords). + - ƒ **clear_tasks** (`Function`) + - 📝 Clear tasks matching the status filter. +- 📦 **GitModels** (`Module`) + - 📝 Git-specific SQLAlchemy models for configuration and repository tracking. + - 🏗️ Layer: Model +- 📦 **backend.src.models.task** (`Module`) + - 📝 Defines the database schema for task execution records. + - 🏗️ Layer: Domain + - 🔗 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 + - 🔗 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 + - 🔗 DEPENDS_ON -> `sqlalchemy` + - ℂ **MigrationStatus** (`Class`) + - 📝 Enumeration of possible migration job statuses. + - ℂ **Environment** (`Class`) + - 📝 Represents a Superset instance environment. + - ℂ **DatabaseMapping** (`Class`) + - 📝 Represents a mapping between source and target databases. + - ℂ **MigrationJob** (`Class`) + - 📝 Represents a single migration execution job. +- ℂ **FileCategory** (`Class`) + - 📝 Enumeration of supported file categories in the storage system. +- ℂ **StorageConfig** (`Class`) + - 📝 Configuration model for the storage system, defining paths and naming patterns. +- ℂ **StoredFile** (`Class`) + - 📝 Data model representing metadata for a file stored in the system. +- 📦 **backend.src.models.dashboard** (`Module`) + - 📝 Defines data models for dashboard metadata and selection. + - 🏗️ Layer: Model + - ℂ **DashboardMetadata** (`Class`) + - 📝 Represents a dashboard available for migration. + - ℂ **DashboardSelection** (`Class`) + - 📝 Represents the user's selection of dashboards to migrate. +- 📦 **backend.src.services.git_service** (`Module`) + - 📝 Core Git logic using GitPython to manage dashboard repositories. + - 🏗️ Layer: Service + - 🔗 INHERITS_FROM -> `None` + - ℂ **GitService** (`Class`) + - 📝 Wrapper for GitPython operations with semantic logging and error handling. + - ƒ **__init__** (`Function`) + - 📝 Initializes the GitService with a base path for repositories. + - ƒ **_get_repo_path** (`Function`) + - 📝 Resolves the local filesystem path for a dashboard's repository. + - ƒ **init_repo** (`Function`) + - 📝 Initialize or clone a repository for a dashboard. + - ƒ **get_repo** (`Function`) + - 📝 Get Repo object for a dashboard. + - ƒ **list_branches** (`Function`) + - 📝 List all branches for a dashboard's repository. + - ƒ **create_branch** (`Function`) + - 📝 Create a new branch from an existing one. + - ƒ **checkout_branch** (`Function`) + - 📝 Switch to a specific branch. + - ƒ **commit_changes** (`Function`) + - 📝 Stage and commit changes. + - ƒ **push_changes** (`Function`) + - 📝 Push local commits to remote. + - ƒ **pull_changes** (`Function`) + - 📝 Pull changes from remote. + - ƒ **get_status** (`Function`) + - 📝 Get current repository status (dirty files, untracked, etc.) + - ƒ **get_diff** (`Function`) + - 📝 Generate diff for a file or the whole repository. + - ƒ **get_commit_history** (`Function`) + - 📝 Retrieve commit history for a repository. + - ƒ **test_connection** (`Function`) + - 📝 Test connection to Git provider using PAT. +- 📦 **backend.src.services.mapping_service** (`Module`) + - 📝 Orchestrates database fetching and fuzzy matching suggestions. + - 🏗️ Layer: Service + - 🔗 DEPENDS_ON -> `backend.src.core.superset_client` + - 🔗 DEPENDS_ON -> `backend.src.core.utils.matching` + - ℂ **MappingService** (`Class`) + - 📝 Service for handling database mapping logic. + - ƒ **__init__** (`Function`) + - 📝 Initializes the mapping service with a config manager. + - ƒ **_get_client** (`Function`) + - 📝 Helper to get an initialized SupersetClient for an environment. + - ƒ **get_suggestions** (`Function`) + - 📝 Fetches databases from both environments and returns fuzzy matching suggestions. - 📦 **BackupPlugin** (`Module`) - 📝 A plugin that provides functionality to back up Superset dashboards. - 🏗️ Layer: App @@ -1010,25 +1251,42 @@ - 📝 Tests database API connectivity for source and target environments. - ƒ **_get_dataset_structure** (`Function`) - 📝 Retrieves the structure of a dataset. -- 📦 **MigrationPlugin** (`Module`) - - 📝 A plugin that provides functionality to migrate Superset dashboards between environments. - - 🏗️ Layer: App - - 🔗 DEPENDS_ON -> `superset_tool.client` - - 🔗 DEPENDS_ON -> `superset_tool.utils` - - ℂ **MigrationPlugin** (`Class`) - - 📝 Implementation of the migration plugin logic. +- 📦 **SearchPluginModule** (`Module`) + - 📝 Implements a plugin for searching text patterns across all datasets in a specific Superset environment. + - 🏗️ Layer: Plugins + - ℂ **SearchPlugin** (`Class`) + - 📝 Plugin for searching text patterns in Superset datasets. - ƒ **id** (`Function`) - - 📝 Returns the unique identifier for the migration plugin. + - 📝 Returns the unique identifier for the search plugin. - ƒ **name** (`Function`) - - 📝 Returns the human-readable name of the migration plugin. + - 📝 Returns the human-readable name of the search plugin. - ƒ **description** (`Function`) - - 📝 Returns a description of the migration plugin. + - 📝 Returns a description of the search plugin. - ƒ **version** (`Function`) - - 📝 Returns the version of the migration plugin. + - 📝 Returns the version of the search plugin. - ƒ **get_schema** (`Function`) - - 📝 Returns the JSON schema for migration plugin parameters. + - 📝 Returns the JSON schema for the search plugin parameters. - ƒ **execute** (`Function`) - - 📝 Executes the dashboard migration logic. + - 📝 Executes the dataset search logic. + - ƒ **_get_context** (`Function`) + - 📝 Extracts a small context around the match for display. +- 📦 **MapperPluginModule** (`Module`) + - 📝 Implements a plugin for mapping dataset columns using external database connections or Excel files. + - 🏗️ Layer: Plugins + - ℂ **MapperPlugin** (`Class`) + - 📝 Plugin for mapping dataset columns verbose names. + - ƒ **id** (`Function`) + - 📝 Returns the unique identifier for the mapper plugin. + - ƒ **name** (`Function`) + - 📝 Returns the human-readable name of the mapper plugin. + - ƒ **description** (`Function`) + - 📝 Returns a description of the mapper plugin. + - ƒ **version** (`Function`) + - 📝 Returns the version of the mapper plugin. + - ƒ **get_schema** (`Function`) + - 📝 Returns the JSON schema for the mapper plugin parameters. + - ƒ **execute** (`Function`) + - 📝 Executes the dataset mapping logic. - 📦 **backend.src.plugins.git_plugin** (`Module`) - 📝 Предоставляет плагин для версионирования и развертывания дашбордов Superset. - 🏗️ Layer: Plugin @@ -1049,189 +1307,61 @@ - 📝 Возвращает JSON-схему параметров для выполнения задач плагина. - ƒ **initialize** (`Function`) - 📝 Выполняет начальную настройку плагина. -- 📦 **MapperPluginModule** (`Module`) - - 📝 Implements a plugin for mapping dataset columns using external database connections or Excel files. - - 🏗️ Layer: Plugins - - ℂ **MapperPlugin** (`Class`) - - 📝 Plugin for mapping dataset columns verbose names. +- 📦 **MigrationPlugin** (`Module`) + - 📝 A plugin that provides functionality to migrate Superset dashboards between environments. + - 🏗️ Layer: App + - 🔗 DEPENDS_ON -> `superset_tool.client` + - 🔗 DEPENDS_ON -> `superset_tool.utils` + - ℂ **MigrationPlugin** (`Class`) + - 📝 Implementation of the migration plugin logic. - ƒ **id** (`Function`) - - 📝 Returns the unique identifier for the mapper plugin. + - 📝 Returns the unique identifier for the migration plugin. - ƒ **name** (`Function`) - - 📝 Returns the human-readable name of the mapper plugin. + - 📝 Returns the human-readable name of the migration plugin. - ƒ **description** (`Function`) - - 📝 Returns a description of the mapper plugin. + - 📝 Returns a description of the migration plugin. - ƒ **version** (`Function`) - - 📝 Returns the version of the mapper plugin. + - 📝 Returns the version of the migration plugin. - ƒ **get_schema** (`Function`) - - 📝 Returns the JSON schema for the mapper plugin parameters. + - 📝 Returns the JSON schema for migration plugin parameters. - ƒ **execute** (`Function`) - - 📝 Executes the dataset mapping logic. -- 📦 **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.routes.git_schemas** (`Module`) - - 📝 Defines Pydantic models for the Git integration API layer. - - 🏗️ Layer: API - - 🔗 DEPENDS_ON -> `backend.src.models.git` - - ℂ **GitServerConfigBase** (`Class`) - - 📝 Base schema for Git server configuration attributes. - - ℂ **GitServerConfigCreate** (`Class`) - - 📝 Schema for creating a new Git server configuration. - - ℂ **GitServerConfigSchema** (`Class`) - - 📝 Schema for representing a Git server configuration with metadata. - - ℂ **GitRepositorySchema** (`Class`) - - 📝 Schema for tracking a local Git repository linked to a dashboard. - - ℂ **BranchSchema** (`Class`) - - 📝 Schema for representing a Git branch metadata. - - ℂ **CommitSchema** (`Class`) - - 📝 Schema for representing Git commit details. - - ℂ **BranchCreate** (`Class`) - - 📝 Schema for branch creation requests. - - ℂ **BranchCheckout** (`Class`) - - 📝 Schema for branch checkout requests. - - ℂ **CommitCreate** (`Class`) - - 📝 Schema for staging and committing changes. - - ℂ **ConflictResolution** (`Class`) - - 📝 Schema for resolving merge conflicts. - - ℂ **DeploymentEnvironmentSchema** (`Class`) - - 📝 Schema for representing a target deployment environment. - - ℂ **DeployRequest** (`Class`) - - 📝 Schema for dashboard deployment requests. - - ℂ **RepoInitRequest** (`Class`) - - 📝 Schema for repository initialization requests. -- 📦 **SettingsRouter** (`Module`) - - 📝 Provides API endpoints for managing application settings and Superset environments. - - 🏗️ Layer: UI (API) - - 🔗 DEPENDS_ON -> `ConfigManager` - - 🔗 DEPENDS_ON -> `ConfigModels` - - ƒ **get_settings** (`Function`) - - 📝 Retrieves all application settings. - - ƒ **update_global_settings** (`Function`) - - 📝 Updates global application settings. - - ƒ **get_environments** (`Function`) - - 📝 Lists all configured Superset environments. - - ƒ **add_environment** (`Function`) - - 📝 Adds a new Superset environment. - - ƒ **update_environment** (`Function`) - - 📝 Updates an existing Superset environment. - - ƒ **delete_environment** (`Function`) - - 📝 Deletes a Superset environment. - - ƒ **test_environment_connection** (`Function`) - - 📝 Tests the connection to a Superset environment. - - ƒ **validate_backup_path** (`Function`) - - 📝 Validates if a backup path exists and is writable. -- 📦 **ConnectionsRouter** (`Module`) - - 📝 Defines the FastAPI router for managing external database connections. - - 🏗️ Layer: UI (API) - - ℂ **ConnectionSchema** (`Class`) - - 📝 Pydantic model for connection response. - - ℂ **ConnectionCreate** (`Class`) - - 📝 Pydantic model for creating a connection. - - ƒ **list_connections** (`Function`) - - 📝 Lists all saved connections. - - ƒ **create_connection** (`Function`) - - 📝 Creates a new connection configuration. - - ƒ **delete_connection** (`Function`) - - 📝 Deletes a connection configuration. -- 📦 **TasksRouter** (`Module`) - - 📝 Defines the FastAPI router for task-related endpoints, allowing clients to create, list, and get the status of tasks. - - 🏗️ Layer: UI (API) - - ƒ **create_task** (`Function`) - - 📝 Create and start a new task for a given plugin. - - ƒ **list_tasks** (`Function`) - - 📝 Retrieve a list of tasks with pagination and optional status filter. - - ƒ **get_task** (`Function`) - - 📝 Retrieve the details of a specific task. - - ƒ **get_task_logs** (`Function`) - - 📝 Retrieve logs for a specific task. - - ƒ **resolve_task** (`Function`) - - 📝 Resolve a task that is awaiting mapping. - - ƒ **resume_task** (`Function`) - - 📝 Resume a task that is awaiting input (e.g., passwords). - - ƒ **clear_tasks** (`Function`) - - 📝 Clear tasks matching the status filter. -- 📦 **backend.src.api.routes.git** (`Module`) - - 📝 Provides FastAPI endpoints for Git integration operations. - - 🏗️ Layer: API - - ƒ **get_git_configs** (`Function`) - - 📝 List all configured Git servers. - - ƒ **create_git_config** (`Function`) - - 📝 Register a new Git server configuration. - - ƒ **delete_git_config** (`Function`) - - 📝 Remove a Git server configuration. - - ƒ **test_git_config** (`Function`) - - 📝 Validate connection to a Git server using provided credentials. - - ƒ **init_repository** (`Function`) - - 📝 Link a dashboard to a Git repository and perform initial clone/init. - - ƒ **get_branches** (`Function`) - - 📝 List all branches for a dashboard's repository. - - ƒ **create_branch** (`Function`) - - 📝 Create a new branch in the dashboard's repository. - - ƒ **checkout_branch** (`Function`) - - 📝 Switch the dashboard's repository to a specific branch. - - ƒ **commit_changes** (`Function`) - - 📝 Stage and commit changes in the dashboard's repository. - - ƒ **push_changes** (`Function`) - - 📝 Push local commits to the remote repository. - - ƒ **pull_changes** (`Function`) - - 📝 Pull changes from the remote repository. - - ƒ **sync_dashboard** (`Function`) - - 📝 Sync dashboard state from Superset to Git using the GitPlugin. - - ƒ **get_environments** (`Function`) - - 📝 List all deployment environments. - - ƒ **deploy_dashboard** (`Function`) - - 📝 Deploy dashboard from Git to a target environment. - - ƒ **get_history** (`Function`) - - 📝 View commit history for a dashboard's repository. - - ƒ **get_repository_status** (`Function`) - - 📝 Get current Git status for a dashboard repository. - - ƒ **get_repository_diff** (`Function`) - - 📝 Get Git diff for a dashboard repository. -- 📦 **backend.src.api.routes.environments** (`Module`) - - 📝 API endpoints for listing environments and their databases. - - 🏗️ Layer: API - - 🔗 DEPENDS_ON -> `backend.src.dependencies` - - 🔗 DEPENDS_ON -> `backend.src.core.superset_client` - - 📦 **ScheduleSchema** (`DataClass`) - - 📦 **EnvironmentResponse** (`DataClass`) - - 📦 **DatabaseResponse** (`DataClass`) - - ƒ **get_environments** (`Function`) - - 📝 List all configured environments. - - ƒ **update_environment_schedule** (`Function`) - - 📝 Update backup schedule for an environment. - - ƒ **get_environment_databases** (`Function`) - - 📝 Fetch the list of databases from a specific environment. -- 📦 **PluginsRouter** (`Module`) - - 📝 Defines the FastAPI router for plugin-related endpoints, allowing clients to list available plugins. - - 🏗️ Layer: UI (API) - - ƒ **list_plugins** (`Function`) - - 📝 Retrieve a list of all available plugins. -- 📦 **backend.src.api.routes.migration** (`Module`) - - 📝 API endpoints for migration operations. - - 🏗️ Layer: API - - 🔗 DEPENDS_ON -> `backend.src.dependencies` - - 🔗 DEPENDS_ON -> `backend.src.models.dashboard` - - ƒ **get_dashboards** (`Function`) - - 📝 Fetch all dashboards from the specified environment for the grid. - - ƒ **execute_migration** (`Function`) - - 📝 Execute the migration of selected dashboards. -- 📦 **backend.src.api.routes.mappings** (`Module`) - - 📝 API endpoints for managing database mappings and getting suggestions. - - 🏗️ Layer: API - - 🔗 DEPENDS_ON -> `backend.src.dependencies` - - 🔗 DEPENDS_ON -> `backend.src.core.database` - - 🔗 DEPENDS_ON -> `backend.src.services.mapping_service` - - 📦 **MappingCreate** (`DataClass`) - - 📦 **MappingResponse** (`DataClass`) - - 📦 **SuggestRequest** (`DataClass`) - - ƒ **get_mappings** (`Function`) - - 📝 List all saved database mappings. - - ƒ **create_mapping** (`Function`) - - 📝 Create or update a database mapping. - - ƒ **suggest_mappings_api** (`Function`) - - 📝 Get suggested mappings based on fuzzy matching. + - 📝 Executes the dashboard migration logic. +- 📦 **StoragePlugin** (`Module`) + - 📝 Provides core filesystem operations for managing backups and repositories. + - 🏗️ Layer: App + - 🔗 DEPENDS_ON -> `backend.src.models.storage` + - ℂ **StoragePlugin** (`Class`) + - 📝 Implementation of the storage management plugin. + - ƒ **__init__** (`Function`) + - 📝 Initializes the StoragePlugin and ensures required directories exist. + - ƒ **id** (`Function`) + - 📝 Returns the unique identifier for the storage plugin. + - ƒ **name** (`Function`) + - 📝 Returns the human-readable name of the storage plugin. + - ƒ **description** (`Function`) + - 📝 Returns a description of the storage plugin. + - ƒ **version** (`Function`) + - 📝 Returns the version of the storage plugin. + - ƒ **get_schema** (`Function`) + - 📝 Returns the JSON schema for storage plugin parameters. + - ƒ **execute** (`Function`) + - 📝 Executes storage-related tasks (placeholder for PluginBase compliance). + - ƒ **get_storage_root** (`Function`) + - 📝 Resolves the absolute path to the storage root. + - ƒ **resolve_path** (`Function`) + - 📝 Resolves a dynamic path pattern using provided variables. + - ƒ **ensure_directories** (`Function`) + - 📝 Creates the storage root and category subdirectories if they don't exist. + - ƒ **validate_path** (`Function`) + - 📝 Prevents path traversal attacks by ensuring the path is within the storage root. + - ƒ **list_files** (`Function`) + - 📝 Lists all files and directories in a specific category and subpath. + - ƒ **save_file** (`Function`) + - 📝 Saves an uploaded file to the specified category and optional subpath. + - ƒ **delete_file** (`Function`) + - 📝 Deletes a file or directory from the specified category and path. + - ƒ **get_file_path** (`Function`) + - 📝 Returns the absolute path of a file for download. - ƒ **test_environment_model** (`Function`) - 📝 Tests that Environment model correctly stores values. - ƒ **test_belief_scope_logs_entry_action_exit** (`Function`)