From 8fa951fc93ebe261407d5d9b419a33369fe256e4 Mon Sep 17 00:00:00 2001 From: busya Date: Fri, 27 Feb 2026 20:48:18 +0300 Subject: [PATCH] dry run migration --- .ai/MODULE_MAP.md | 1602 ++++ .ai/PROJECT_MAP.md | 4523 +++++++++++ .ai/shots/critical_module.py | 78 +- .../routes/__tests__/test_migration_routes.py | 100 + backend/src/api/routes/migration.py | 41 +- backend/src/core/migration/__init__.py | 12 + backend/src/core/migration/archive_parser.py | 139 + .../core/migration/dry_run_orchestrator.py | 235 + backend/src/core/migration/risk_assessor.py | 119 + backend/src/core/superset_client.py | 19 + .../core/migration/test_archive_parser.py | 62 + .../migration/test_dry_run_orchestrator.py | 110 + .../fixtures/migration_dry_run_fixture.json | 58 + frontend/src/routes/migration/+page.svelte | 128 +- frontend/src/types/dashboard.ts | 45 +- semantics/semantic_map.json | 6921 ++++++++++++----- 16 files changed, 12141 insertions(+), 2051 deletions(-) create mode 100644 .ai/MODULE_MAP.md create mode 100644 .ai/PROJECT_MAP.md create mode 100644 backend/src/core/migration/__init__.py create mode 100644 backend/src/core/migration/archive_parser.py create mode 100644 backend/src/core/migration/dry_run_orchestrator.py create mode 100644 backend/src/core/migration/risk_assessor.py create mode 100644 backend/tests/core/migration/test_archive_parser.py create mode 100644 backend/tests/core/migration/test_dry_run_orchestrator.py create mode 100644 backend/tests/fixtures/migration_dry_run_fixture.json diff --git a/.ai/MODULE_MAP.md b/.ai/MODULE_MAP.md new file mode 100644 index 0000000..af0d4ff --- /dev/null +++ b/.ai/MODULE_MAP.md @@ -0,0 +1,1602 @@ +# Module Map + +> High-level module structure for AI Context. Generated automatically. + +**Generated:** 2026-02-27T15:09:17.269938 + +## Summary + +- **Total Modules:** 78 +- **Total Entities:** 1927 + +## Module Hierarchy + +### πŸ“ `backend/` + +- πŸ—οΈ **Layers:** Unknown, Utility +- πŸ“Š **Tiers:** STANDARD: 2, TRIVIAL: 2 +- πŸ“„ **Files:** 2 +- πŸ“¦ **Entities:** 4 + +**Key Entities:** + + - πŸ“¦ **backend.delete_running_tasks** (Module) + - Script to delete tasks with RUNNING status from the database... + - πŸ“¦ **test_auth_debug** (Module) `[TRIVIAL]` + - Auto-generated module for backend/test_auth_debug.py + + ### πŸ“ `src/` + + - πŸ—οΈ **Layers:** API, Core, UI (API) + - πŸ“Š **Tiers:** CRITICAL: 2, STANDARD: 19, TRIVIAL: 2 + - πŸ“„ **Files:** 2 + - πŸ“¦ **Entities:** 23 + + **Key Entities:** + + - πŸ“¦ **AppModule** (Module) `[CRITICAL]` + - The main entry point for the FastAPI application. It initial... + - πŸ“¦ **Dependencies** (Module) + - Manages creation and provision of shared application depende... + + ### πŸ“ `api/` + + - πŸ—οΈ **Layers:** API + - πŸ“Š **Tiers:** STANDARD: 7 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 7 + + **Key Entities:** + + - πŸ“¦ **backend.src.api.auth** (Module) + - Authentication API endpoints. + + ### πŸ“ `routes/` + + - πŸ—οΈ **Layers:** API, UI (API) + - πŸ“Š **Tiers:** CRITICAL: 3, STANDARD: 197, TRIVIAL: 6 + - πŸ“„ **Files:** 17 + - πŸ“¦ **Entities:** 206 + + **Key Entities:** + + - β„‚ **AssistantAction** (Class) `[TRIVIAL]` + - UI action descriptor returned with assistant responses. + - β„‚ **AssistantMessageRequest** (Class) `[TRIVIAL]` + - Input payload for assistant message endpoint. + - β„‚ **AssistantMessageResponse** (Class) + - Output payload contract for assistant interaction endpoints. + - β„‚ **BranchCheckout** (Class) + - Schema for branch checkout requests. + - β„‚ **BranchCreate** (Class) + - Schema for branch creation requests. + - β„‚ **BranchSchema** (Class) + - Schema for representing a Git branch metadata. + - β„‚ **CommitCreate** (Class) + - Schema for staging and committing changes. + - β„‚ **CommitSchema** (Class) + - Schema for representing Git commit details. + - β„‚ **ConfirmationRecord** (Class) + - In-memory confirmation token model for risky operation dispa... + - β„‚ **ConflictResolution** (Class) + - Schema for resolving merge conflicts. + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> ConfigManager + - πŸ”— DEPENDS_ON -> ConfigModels + - πŸ”— DEPENDS_ON -> backend.src.core.database + - πŸ”— DEPENDS_ON -> backend.src.core.superset_client + - πŸ”— DEPENDS_ON -> backend.src.core.task_manager + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** API, Domain (Tests), UI (API Tests) + - πŸ“Š **Tiers:** STANDARD: 51, TRIVIAL: 104 + - πŸ“„ **Files:** 8 + - πŸ“¦ **Entities:** 155 + + **Key Entities:** + + - β„‚ **_FakeConfigManager** (Class) `[TRIVIAL]` + - Provide deterministic environment aliases required by intent... + - β„‚ **_FakeConfigManager** (Class) `[TRIVIAL]` + - Environment config fixture with dev/prod aliases for parser ... + - β„‚ **_FakeDb** (Class) `[TRIVIAL]` + - In-memory session substitute for assistant route persistence... + - β„‚ **_FakeDb** (Class) `[TRIVIAL]` + - In-memory fake database implementing subset of Session inter... + - β„‚ **_FakeQuery** (Class) `[TRIVIAL]` + - Minimal chainable query object for fake DB interactions. + - β„‚ **_FakeQuery** (Class) `[TRIVIAL]` + - Minimal chainable query object for fake SQLAlchemy-like DB b... + - β„‚ **_FakeTask** (Class) `[TRIVIAL]` + - Lightweight task model used for assistant authz tests. + - β„‚ **_FakeTask** (Class) `[TRIVIAL]` + - Lightweight task stub used by assistant API tests. + - β„‚ **_FakeTaskManager** (Class) `[TRIVIAL]` + - Minimal task manager for deterministic operation creation an... + - β„‚ **_FakeTaskManager** (Class) `[TRIVIAL]` + - Minimal async-compatible TaskManager fixture for determinist... + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> backend.src.api.routes.assistant + + ### πŸ“ `core/` + + - πŸ—οΈ **Layers:** Core + - πŸ“Š **Tiers:** CRITICAL: 2, STANDARD: 125, TRIVIAL: 8 + - πŸ“„ **Files:** 10 + - πŸ“¦ **Entities:** 135 + + **Key Entities:** + + - β„‚ **AuthSessionLocal** (Class) `[TRIVIAL]` + - A session factory for the authentication database. + - β„‚ **BeliefFormatter** (Class) + - Custom logging formatter that adds belief state prefixes to ... + - β„‚ **ConfigManager** (Class) + - A class to handle application configuration persistence and ... + - β„‚ **IdMappingService** (Class) `[CRITICAL]` + - Service handling the cataloging and retrieval of remote Supe... + - β„‚ **LogEntry** (Class) + - A Pydantic model representing a single, structured log entry... + - β„‚ **MigrationEngine** (Class) + - Engine for transforming Superset export ZIPs. + - β„‚ **PluginBase** (Class) + - Defines the abstract base class that all plugins must implem... + - β„‚ **PluginConfig** (Class) + - A Pydantic model used to represent the validated configurati... + - β„‚ **PluginLoader** (Class) + - Scans a specified directory for Python modules, dynamically ... + - β„‚ **SchedulerService** (Class) + - Provides a service to manage scheduled backup tasks. + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> AppConfigRecord + - πŸ”— DEPENDS_ON -> ConfigModels + - πŸ”— DEPENDS_ON -> PyYAML + - πŸ”— DEPENDS_ON -> backend.src.core.auth.config + - πŸ”— DEPENDS_ON -> backend.src.core.logger + + ### πŸ“ `auth/` + + - πŸ—οΈ **Layers:** Core + - πŸ“Š **Tiers:** STANDARD: 26 + - πŸ“„ **Files:** 6 + - πŸ“¦ **Entities:** 26 + + **Key Entities:** + + - β„‚ **AuthConfig** (Class) + - Holds authentication-related settings. + - β„‚ **AuthRepository** (Class) + - Encapsulates database operations for authentication. + - πŸ“¦ **backend.src.core.auth.config** (Module) + - Centralized configuration for authentication and authorizati... + - πŸ“¦ **backend.src.core.auth.jwt** (Module) + - JWT token generation and validation logic. + - πŸ“¦ **backend.src.core.auth.logger** (Module) + - Audit logging for security-related events. + - πŸ“¦ **backend.src.core.auth.oauth** (Module) + - ADFS OIDC configuration and client using Authlib. + - πŸ“¦ **backend.src.core.auth.repository** (Module) + - Data access layer for authentication-related entities. + - πŸ“¦ **backend.src.core.auth.security** (Module) + - Utility for password hashing and verification using Passlib. + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> authlib + - πŸ”— DEPENDS_ON -> jose + - πŸ”— DEPENDS_ON -> passlib + - πŸ”— DEPENDS_ON -> pydantic + - πŸ”— DEPENDS_ON -> sqlalchemy + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** Domain + - πŸ“Š **Tiers:** STANDARD: 1, TRIVIAL: 14 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 15 + + **Key Entities:** + + - πŸ“¦ **test_auth** (Module) + - Unit tests for authentication module + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** Infra + - πŸ“Š **Tiers:** STANDARD: 11, TRIVIAL: 1 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 12 + + **Key Entities:** + + - πŸ“¦ **test_logger** (Module) + - Unit tests for logger module + + ### πŸ“ `task_manager/` + + - πŸ—οΈ **Layers:** Core + - πŸ“Š **Tiers:** CRITICAL: 10, STANDARD: 63, TRIVIAL: 5 + - πŸ“„ **Files:** 7 + - πŸ“¦ **Entities:** 78 + + **Key Entities:** + + - β„‚ **LogEntry** (Class) `[CRITICAL]` + - A Pydantic model representing a single, structured log entry... + - β„‚ **LogFilter** (Class) + - Filter parameters for querying task logs. + - β„‚ **LogStats** (Class) + - Statistics about log entries for a task. + - β„‚ **Task** (Class) + - A Pydantic model representing a single execution instance of... + - β„‚ **TaskCleanupService** (Class) + - Provides methods to clean up old task records and their asso... + - β„‚ **TaskContext** (Class) `[CRITICAL]` + - A container passed to plugin.execute() providing the logger ... + - β„‚ **TaskLog** (Class) + - A Pydantic model representing a persisted log entry from the... + - β„‚ **TaskLogPersistenceService** (Class) `[CRITICAL]` + - Provides methods to save and query task logs from the task_l... + - β„‚ **TaskLogger** (Class) `[CRITICAL]` + - A wrapper around TaskManager._add_log that carries task_id a... + - β„‚ **TaskManager** (Class) `[CRITICAL]` + - Manages the lifecycle of tasks, including their creation, ex... + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> TaskLogRecord + - πŸ”— DEPENDS_ON -> TaskLogger, USED_BY -> plugins + - πŸ”— DEPENDS_ON -> TaskManager, CALLS -> TaskManager._add_log + + ### πŸ“ `utils/` + + - πŸ—οΈ **Layers:** Core, Domain, Infra + - πŸ“Š **Tiers:** STANDARD: 48, TRIVIAL: 1 + - πŸ“„ **Files:** 4 + - πŸ“¦ **Entities:** 49 + + **Key Entities:** + + - β„‚ **APIClient** (Class) + - Π˜Π½ΠΊΠ°ΠΏΡΡƒΠ»ΠΈΡ€ΡƒΠ΅Ρ‚ HTTP-Π»ΠΎΠ³ΠΈΠΊΡƒ для Ρ€Π°Π±ΠΎΡ‚Ρ‹ с API, Π²ΠΊΠ»ΡŽΡ‡Π°Ρ сСссии, ... + - β„‚ **AuthenticationError** (Class) + - Exception raised when authentication fails. + - β„‚ **DashboardNotFoundError** (Class) + - Exception raised when a dashboard cannot be found. + - β„‚ **DatasetMapper** (Class) + - Класс для ΠΌΠ΅ΠΏΠΏΠΈΠ½Π³Π° ΠΈ обновлСния verbose_map Π² датасСтах Supe... + - β„‚ **InvalidZipFormatError** (Class) + - Exception raised when a file is not a valid ZIP archive. + - β„‚ **NetworkError** (Class) + - Exception raised when a network level error occurs. + - β„‚ **PermissionDeniedError** (Class) + - Exception raised when access is denied. + - β„‚ **SupersetAPIError** (Class) + - Base exception for all Superset API related errors. + - πŸ“¦ **backend.core.utils.dataset_mapper** (Module) + - Π­Ρ‚ΠΎΡ‚ ΠΌΠΎΠ΄ΡƒΠ»ΡŒ ΠΎΡ‚Π²Π΅Ρ‡Π°Π΅Ρ‚ Π·Π° ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΌΠ΅Ρ‚Π°Π΄Π°Π½Π½Ρ‹Ρ… (verbose_map) ... + - πŸ“¦ **backend.core.utils.fileio** (Module) + - ΠŸΡ€Π΅Π΄ΠΎΡΡ‚Π°Π²Π»ΡΠ΅Ρ‚ Π½Π°Π±ΠΎΡ€ ΡƒΡ‚ΠΈΠ»ΠΈΡ‚ для управлСния Ρ„Π°ΠΉΠ»ΠΎΠ²Ρ‹ΠΌΠΈ опСрация... + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> backend.core.superset_client + - πŸ”— DEPENDS_ON -> backend.src.core.logger + - πŸ”— DEPENDS_ON -> pandas + - πŸ”— DEPENDS_ON -> psycopg2 + - πŸ”— DEPENDS_ON -> pyyaml + + ### πŸ“ `models/` + + - πŸ—οΈ **Layers:** Domain, Model + - πŸ“Š **Tiers:** CRITICAL: 9, STANDARD: 22, TRIVIAL: 22 + - πŸ“„ **Files:** 11 + - πŸ“¦ **Entities:** 53 + + **Key Entities:** + + - β„‚ **ADGroupMapping** (Class) + - Maps an Active Directory group to a local System Role. + - β„‚ **AppConfigRecord** (Class) + - Stores the single source of truth for application configurat... + - β„‚ **AssistantAuditRecord** (Class) + - Store audit decisions and outcomes produced by assistant com... + - β„‚ **AssistantConfirmationRecord** (Class) + - Persist risky operation confirmation tokens with lifecycle s... + - β„‚ **AssistantMessageRecord** (Class) + - Persist chat history entries for assistant conversations. + - β„‚ **ConnectionConfig** (Class) `[TRIVIAL]` + - Stores credentials for external databases used for column ma... + - β„‚ **DashboardMetadata** (Class) `[TRIVIAL]` + - Represents a dashboard available for migration. + - β„‚ **DashboardSelection** (Class) `[TRIVIAL]` + - Represents the user's selection of dashboards to migrate. + - β„‚ **DatabaseMapping** (Class) + - Represents a mapping between source and target databases. + - β„‚ **DeploymentEnvironment** (Class) `[TRIVIAL]` + - Target Superset environments for dashboard deployment. + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> Role + - πŸ”— DEPENDS_ON -> TaskRecord + - πŸ”— DEPENDS_ON -> backend.src.core.task_manager.models + - πŸ”— DEPENDS_ON -> backend.src.models.mapping + - πŸ”— DEPENDS_ON -> sqlalchemy + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** Domain + - πŸ“Š **Tiers:** STANDARD: 2, TRIVIAL: 27 + - πŸ“„ **Files:** 2 + - πŸ“¦ **Entities:** 29 + + **Key Entities:** + + - πŸ“¦ **test_models** (Module) `[TRIVIAL]` + - Unit tests for data models + - πŸ“¦ **test_report_models** (Module) + - Unit tests for report Pydantic models and their validators + + ### πŸ“ `plugins/` + + - πŸ—οΈ **Layers:** App, Plugin, Plugins + - πŸ“Š **Tiers:** STANDARD: 63 + - πŸ“„ **Files:** 6 + - πŸ“¦ **Entities:** 63 + + **Key Entities:** + + - β„‚ **BackupPlugin** (Class) + - Implementation of the backup plugin logic. + - β„‚ **DebugPlugin** (Class) + - Plugin for system diagnostics and debugging. + - β„‚ **GitPlugin** (Class) + - РСализация ΠΏΠ»Π°Π³ΠΈΠ½Π° Git Integration для управлСния вСрсиями Π΄... + - β„‚ **MapperPlugin** (Class) + - Plugin for mapping dataset columns verbose names. + - β„‚ **MigrationPlugin** (Class) + - Implementation of the migration plugin logic. + - β„‚ **SearchPlugin** (Class) + - Plugin for searching text patterns in Superset datasets. + - πŸ“¦ **BackupPlugin** (Module) + - A plugin that provides functionality to back up Superset das... + - πŸ“¦ **DebugPluginModule** (Module) + - Implements a plugin for system diagnostics and debugging Sup... + - πŸ“¦ **MapperPluginModule** (Module) + - Implements a plugin for mapping dataset columns using extern... + - πŸ“¦ **MigrationPlugin** (Module) + - A plugin that provides functionality to migrate Superset das... + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> superset_tool.client + - πŸ”— DEPENDS_ON -> superset_tool.utils + - πŸ”— IMPLEMENTS -> PluginBase + + ### πŸ“ `git/` + + - πŸ—οΈ **Layers:** Unknown + - πŸ“Š **Tiers:** STANDARD: 2, TRIVIAL: 2 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 4 + + **Key Entities:** + + - β„‚ **GitLLMExtension** (Class) + - Provides LLM capabilities to the Git plugin. + - πŸ“¦ **llm_extension** (Module) `[TRIVIAL]` + - Auto-generated module for backend/src/plugins/git/llm_extens... + + ### πŸ“ `llm_analysis/` + + - πŸ—οΈ **Layers:** Unknown + - πŸ“Š **Tiers:** STANDARD: 21, TRIVIAL: 24 + - πŸ“„ **Files:** 4 + - πŸ“¦ **Entities:** 45 + + **Key Entities:** + + - β„‚ **DashboardValidationPlugin** (Class) + - Plugin for automated dashboard health analysis using LLMs. + - β„‚ **DetectedIssue** (Class) + - Model for a single issue detected during validation. + - β„‚ **DocumentationPlugin** (Class) + - Plugin for automated dataset documentation using LLMs. + - β„‚ **LLMClient** (Class) + - Wrapper for LLM provider APIs. + - β„‚ **LLMProviderConfig** (Class) + - Configuration for an LLM provider. + - β„‚ **LLMProviderType** (Class) + - Enum for supported LLM providers. + - β„‚ **ScreenshotService** (Class) + - Handles capturing screenshots of Superset dashboards. + - β„‚ **ValidationResult** (Class) + - Model for dashboard validation result. + - β„‚ **ValidationStatus** (Class) + - Enum for dashboard validation status. + - πŸ“¦ **plugin** (Module) `[TRIVIAL]` + - Auto-generated module for backend/src/plugins/llm_analysis/p... + + **Dependencies:** + + - πŸ”— IMPLEMENTS -> backend.src.core.plugin_base.PluginBase + + ### πŸ“ `storage/` + + - πŸ—οΈ **Layers:** App + - πŸ“Š **Tiers:** STANDARD: 18 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 18 + + **Key Entities:** + + - β„‚ **StoragePlugin** (Class) + - Implementation of the storage management plugin. + - πŸ“¦ **StoragePlugin** (Module) + - Provides core filesystem operations for managing backups and... + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> backend.src.models.storage + - πŸ”— IMPLEMENTS -> PluginBase + + ### πŸ“ `schemas/` + + - πŸ—οΈ **Layers:** API + - πŸ“Š **Tiers:** STANDARD: 10, TRIVIAL: 3 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 13 + + **Key Entities:** + + - β„‚ **ADGroupMappingCreate** (Class) + - Schema for creating an AD Group mapping. + - β„‚ **ADGroupMappingSchema** (Class) + - Represents an AD Group to Role mapping in API responses. + - β„‚ **PermissionSchema** (Class) `[TRIVIAL]` + - Represents a permission in API responses. + - β„‚ **RoleCreate** (Class) + - Schema for creating a new role. + - β„‚ **RoleSchema** (Class) + - Represents a role in API responses. + - β„‚ **RoleUpdate** (Class) + - Schema for updating an existing role. + - β„‚ **Token** (Class) `[TRIVIAL]` + - Represents a JWT access token response. + - β„‚ **TokenData** (Class) `[TRIVIAL]` + - Represents the data encoded in a JWT token. + - β„‚ **User** (Class) + - Schema for user data in API responses. + - β„‚ **UserBase** (Class) + - Base schema for user data. + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> pydantic + + ### πŸ“ `scripts/` + + - πŸ—οΈ **Layers:** Scripts, Unknown + - πŸ“Š **Tiers:** STANDARD: 26, TRIVIAL: 2 + - πŸ“„ **Files:** 6 + - πŸ“¦ **Entities:** 28 + + **Key Entities:** + + - πŸ“¦ **backend.src.scripts.create_admin** (Module) + - CLI tool for creating the initial admin user. + - πŸ“¦ **backend.src.scripts.init_auth_db** (Module) + - Initializes the auth database and creates the necessary tabl... + - πŸ“¦ **backend.src.scripts.migrate_sqlite_to_postgres** (Module) + - Migrates legacy config and task history from SQLite/file sto... + - πŸ“¦ **backend.src.scripts.seed_permissions** (Module) + - Populates the auth database with initial system permissions. + - πŸ“¦ **backend.src.scripts.seed_superset_load_test** (Module) + - Creates randomized load-test data in Superset by cloning cha... + - πŸ“¦ **test_dataset_dashboard_relations** (Module) `[TRIVIAL]` + - Auto-generated module for backend/src/scripts/test_dataset_d... + + ### πŸ“ `services/` + + - πŸ—οΈ **Layers:** Core, Domain, Service + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 58, TRIVIAL: 5 + - πŸ“„ **Files:** 7 + - πŸ“¦ **Entities:** 64 + + **Key Entities:** + + - β„‚ **AuthService** (Class) + - Provides high-level authentication services. + - β„‚ **EncryptionManager** (Class) `[CRITICAL]` + - Handles encryption and decryption of sensitive data like API... + - β„‚ **GitService** (Class) + - Wrapper for GitPython operations with semantic logging and e... + - β„‚ **LLMProviderService** (Class) + - Service to manage LLM provider lifecycle. + - β„‚ **MappingService** (Class) + - Service for handling database mapping logic. + - β„‚ **ResourceService** (Class) + - Provides centralized access to resource data with enhanced m... + - πŸ“¦ **backend.src.services** (Module) + - Package initialization for services module + - πŸ“¦ **backend.src.services.auth_service** (Module) + - Orchestrates authentication business logic. + - πŸ“¦ **backend.src.services.git_service** (Module) + - Core Git logic using GitPython to manage dashboard repositor... + - πŸ“¦ **backend.src.services.llm_prompt_templates** (Module) + - Provide default LLM prompt templates and normalization helpe... + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> backend.src.core.config_manager + - πŸ”— DEPENDS_ON -> backend.src.core.database + - πŸ”— DEPENDS_ON -> backend.src.core.superset_client + - πŸ”— DEPENDS_ON -> backend.src.core.task_manager + - πŸ”— DEPENDS_ON -> backend.src.core.utils.matching + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** Domain, Domain Tests, Service + - πŸ“Š **Tiers:** STANDARD: 24, TRIVIAL: 7 + - πŸ“„ **Files:** 3 + - πŸ“¦ **Entities:** 31 + + **Key Entities:** + + - β„‚ **TestEncryptionManager** (Class) + - Validate EncryptionManager encrypt/decrypt roundtrip, unique... + - πŸ“¦ **backend.src.services.__tests__.test_llm_prompt_templates** (Module) + - Validate normalization and rendering behavior for configurab... + - πŸ“¦ **backend.src.services.__tests__.test_resource_service** (Module) + - Unit tests for ResourceService + - πŸ“¦ **test_encryption_manager** (Module) + - Unit tests for EncryptionManager encrypt/decrypt functionali... + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> backend.src.services.llm_prompt_templates + + ### πŸ“ `reports/` + + - πŸ—οΈ **Layers:** Domain + - πŸ“Š **Tiers:** CRITICAL: 5, STANDARD: 15 + - πŸ“„ **Files:** 3 + - πŸ“¦ **Entities:** 20 + + **Key Entities:** + + - β„‚ **ReportsService** (Class) `[CRITICAL]` + - Service layer for list/detail report retrieval and normaliza... + - πŸ“¦ **backend.src.services.reports.normalizer** (Module) `[CRITICAL]` + - Convert task manager task objects into canonical unified Tas... + - πŸ“¦ **backend.src.services.reports.report_service** (Module) `[CRITICAL]` + - Aggregate, normalize, filter, and paginate task reports for ... + - πŸ“¦ **backend.src.services.reports.type_profiles** (Module) `[CRITICAL]` + - Deterministic mapping of plugin/task identifiers to canonica... + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> backend.src.core.task_manager.manager.TaskManager + - πŸ”— DEPENDS_ON -> backend.src.core.task_manager.models.Task + - πŸ”— DEPENDS_ON -> backend.src.models.report + - πŸ”— DEPENDS_ON -> backend.src.models.report.TaskType + - πŸ”— DEPENDS_ON -> backend.src.services.reports.normalizer + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** Domain, Domain (Tests) + - πŸ“Š **Tiers:** STANDARD: 2, TRIVIAL: 19 + - πŸ“„ **Files:** 2 + - πŸ“¦ **Entities:** 21 + + **Key Entities:** + + - πŸ“¦ **backend.tests.test_report_normalizer** (Module) + - Validate unknown task type fallback and partial payload norm... + - πŸ“¦ **test_report_service** (Module) + - Unit tests for ReportsService list/detail operations + + ### πŸ“ `tests/` + + - πŸ—οΈ **Layers:** Core, Domain (Tests), Test, Unknown + - πŸ“Š **Tiers:** CRITICAL: 6, STANDARD: 79, TRIVIAL: 85 + - πŸ“„ **Files:** 10 + - πŸ“¦ **Entities:** 170 + + **Key Entities:** + + - β„‚ **TestLogPersistence** (Class) `[CRITICAL]` + - Test suite for TaskLogPersistenceService. + - β„‚ **TestTaskContext** (Class) + - Test suite for TaskContext. + - β„‚ **TestTaskLogger** (Class) + - Test suite for TaskLogger. + - β„‚ **TestTaskPersistenceHelpers** (Class) `[CRITICAL]` + - Test suite for TaskPersistenceService static helper methods. + - β„‚ **TestTaskPersistenceService** (Class) `[CRITICAL]` + - Test suite for TaskPersistenceService CRUD operations. + - πŸ“¦ **backend.tests.test_dashboards_api** (Module) + - Comprehensive contract-driven tests for Dashboard Hub API + - πŸ“¦ **test_auth** (Module) `[TRIVIAL]` + - Auto-generated module for backend/tests/test_auth.py + - πŸ“¦ **test_log_persistence** (Module) `[CRITICAL]` + - Unit tests for TaskLogPersistenceService. + - πŸ“¦ **test_resource_hubs** (Module) `[TRIVIAL]` + - Auto-generated module for backend/tests/test_resource_hubs.p... + - πŸ“¦ **test_smoke_plugins** (Module) `[TRIVIAL]` + - Auto-generated module for backend/tests/test_smoke_plugins.p... + + ### πŸ“ `core/` + + - πŸ—οΈ **Layers:** Domain, Unknown + - πŸ“Š **Tiers:** STANDARD: 2, TRIVIAL: 31 + - πŸ“„ **Files:** 3 + - πŸ“¦ **Entities:** 33 + + **Key Entities:** + + - πŸ“¦ **backend.tests.core.test_mapping_service** (Module) + - Unit tests for the IdMappingService matching UUIDs to intege... + - πŸ“¦ **backend.tests.core.test_migration_engine** (Module) + - Unit tests for MigrationEngine's cross-filter patching algor... + - πŸ“¦ **test_defensive_guards** (Module) `[TRIVIAL]` + - Auto-generated module for backend/tests/core/test_defensive_... + + ### πŸ“ `components/` + + - πŸ—οΈ **Layers:** Component, Feature, UI, UI -->, Unknown + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 49, TRIVIAL: 4 + - πŸ“„ **Files:** 13 + - πŸ“¦ **Entities:** 54 + + **Key Entities:** + + - 🧩 **DashboardGrid** (Component) + - Displays a grid of dashboards with selection and pagination. + - 🧩 **DynamicForm** (Component) + - Generates a form dynamically based on a JSON schema. + - 🧩 **EnvSelector** (Component) + - Provides a UI component for selecting source and target envi... + - 🧩 **Footer** (Component) `[TRIVIAL]` + - Displays the application footer with copyright information. + - 🧩 **MappingTable** (Component) + - Displays and allows editing of database mappings. + - 🧩 **MissingMappingModal** (Component) + - Prompts the user to provide a database mapping when one is m... + - 🧩 **Navbar** (Component) + - Main navigation bar for the application. + - 🧩 **PasswordPrompt** (Component) + - A modal component to prompt the user for database passwords ... + - 🧩 **TaskHistory** (Component) + - Displays a list of recent tasks with their status and allows... + - 🧩 **TaskList** (Component) + - Displays a list of tasks with their status and execution det... + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** UI (Tests) + - πŸ“Š **Tiers:** STANDARD: 1 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 1 + + **Key Entities:** + + - πŸ“¦ **frontend.src.components.__tests__.task_log_viewer** (Module) + - Unit tests for TaskLogViewer component by mounting it and ob... + + ### πŸ“ `auth/` + + - πŸ—οΈ **Layers:** Component + - πŸ“Š **Tiers:** TRIVIAL: 1 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 1 + + **Key Entities:** + + - 🧩 **ProtectedRoute** (Component) `[TRIVIAL]` + - Wraps content to ensure only authenticated users can access ... + + ### πŸ“ `git/` + + - πŸ—οΈ **Layers:** Component + - πŸ“Š **Tiers:** STANDARD: 26 + - πŸ“„ **Files:** 6 + - πŸ“¦ **Entities:** 26 + + **Key Entities:** + + - 🧩 **BranchSelector** (Component) + - UI для Π²Ρ‹Π±ΠΎΡ€Π° ΠΈ создания Π²Π΅Ρ‚ΠΎΠΊ Git. + - 🧩 **CommitHistory** (Component) + - Displays the commit history for a specific dashboard. + - 🧩 **CommitModal** (Component) + - МодальноС ΠΎΠΊΠ½ΠΎ для создания ΠΊΠΎΠΌΠΌΠΈΡ‚Π° с просмотром ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ (... + - 🧩 **ConflictResolver** (Component) + - UI for resolving merge conflicts (Keep Mine / Keep Theirs). + - 🧩 **DeploymentModal** (Component) + - Modal for deploying a dashboard to a target environment. + - 🧩 **GitManager** (Component) + - Π¦Π΅Π½Ρ‚Ρ€Π°Π»ΡŒΠ½Ρ‹ΠΉ ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚ для управлСния Git-опСрациями ΠΊΠΎΠ½ΠΊΡ€Π΅Ρ‚Π½... + + ### πŸ“ `llm/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** STANDARD: 2, TRIVIAL: 11 + - πŸ“„ **Files:** 3 + - πŸ“¦ **Entities:** 13 + + **Key Entities:** + + - 🧩 **DocPreview** (Component) + - UI component for previewing generated dataset documentation ... + - 🧩 **ProviderConfig** (Component) + - UI form for managing LLM provider configurations. + - πŸ“¦ **DocPreview** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/components/llm/DocPre... + - πŸ“¦ **ProviderConfig** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/components/llm/Provid... + - πŸ“¦ **ValidationReport** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/components/llm/Valida... + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** UI Tests + - πŸ“Š **Tiers:** STANDARD: 2 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 2 + + **Key Entities:** + + - πŸ“¦ **frontend.src.components.llm.__tests__.provider_config_integration** (Module) + - Protect edit-button interaction contract in LLM provider set... + + ### πŸ“ `storage/` + + - πŸ—οΈ **Layers:** UI + - πŸ“Š **Tiers:** STANDARD: 7 + - πŸ“„ **Files:** 2 + - πŸ“¦ **Entities:** 7 + + **Key Entities:** + + - 🧩 **FileList** (Component) + - Displays a table of files with metadata and actions. + - 🧩 **FileUpload** (Component) + - Provides a form for uploading files to a specific category. + + ### πŸ“ `tasks/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** STANDARD: 4, TRIVIAL: 12 + - πŸ“„ **Files:** 4 + - πŸ“¦ **Entities:** 16 + + **Key Entities:** + + - 🧩 **LogEntryRow** (Component) + - Renders a single log entry with stacked layout optimized for... + - 🧩 **LogFilterBar** (Component) + - Compact filter toolbar for logs β€” level, source, and text se... + - 🧩 **TaskLogPanel** (Component) + - Combines log filtering and display into a single cohesive da... + - πŸ“¦ **LogFilterBar** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/components/tasks/LogF... + - πŸ“¦ **TaskLogPanel** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/components/tasks/Task... + - πŸ“¦ **TaskResultPanel** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/components/tasks/Task... + + ### πŸ“ `tools/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** STANDARD: 14, TRIVIAL: 2 + - πŸ“„ **Files:** 4 + - πŸ“¦ **Entities:** 16 + + **Key Entities:** + + - 🧩 **ConnectionForm** (Component) + - UI component for creating a new database connection configur... + - 🧩 **ConnectionList** (Component) + - UI component for listing and deleting saved database connect... + - 🧩 **DebugTool** (Component) + - UI component for system diagnostics and debugging API respon... + - 🧩 **MapperTool** (Component) + - UI component for mapping dataset column verbose names using ... + - πŸ“¦ **MapperTool** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/components/tools/Mapp... + + ### πŸ“ `lib/` + + - πŸ—οΈ **Layers:** Infra, Infra-API, UI, UI-State + - πŸ“Š **Tiers:** STANDARD: 23, TRIVIAL: 3 + - πŸ“„ **Files:** 5 + - πŸ“¦ **Entities:** 26 + + **Key Entities:** + + - 🧩 **Counter** (Component) `[TRIVIAL]` + - Simple counter demo component + - πŸ“¦ **Utils** (Module) `[TRIVIAL]` + - General utility functions (class merging) + - πŸ“¦ **api_module** (Module) + - Handles all communication with the backend API. + - πŸ“¦ **stores_module** (Module) + - Global state management using Svelte stores. + - πŸ“¦ **toasts_module** (Module) + - Manages toast notifications using a Svelte writable store. + + ### πŸ“ `api/` + + - πŸ—οΈ **Layers:** Infra, Infra-API + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 10 + - πŸ“„ **Files:** 2 + - πŸ“¦ **Entities:** 11 + + **Key Entities:** + + - πŸ“¦ **frontend.src.lib.api.assistant** (Module) + - API client wrapper for assistant chat, confirmation actions,... + - πŸ“¦ **frontend.src.lib.api.reports** (Module) `[CRITICAL]` + - Wrapper-based reports API client for list/detail retrieval w... + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> [DEF:api_module] + - πŸ”— DEPENDS_ON -> frontend.src.lib.api.api_module + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** Infra (Tests) + - πŸ“Š **Tiers:** STANDARD: 4 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 4 + + **Key Entities:** + + - β„‚ **TestBuildReportQueryString** (Class) + - Validate query string construction from filter options. + - β„‚ **TestGetReportsAsync** (Class) + - Validate getReports and getReportDetail with mocked api.fetc... + - β„‚ **TestNormalizeApiError** (Class) + - Validate error normalization for UI-state mapping. + - πŸ“¦ **frontend.src.lib.api.__tests__.reports_api** (Module) + - Unit tests for reports API client functions: query string bu... + + ### πŸ“ `auth/` + + - πŸ—οΈ **Layers:** Feature + - πŸ“Š **Tiers:** STANDARD: 7 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 7 + + **Key Entities:** + + - πŸ—„οΈ **authStore** (Store) + - Manages the global authentication state on the frontend. + + ### πŸ“ `assistant/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 12, TRIVIAL: 5 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 18 + + **Key Entities:** + + - 🧩 **AssistantChatPanel** (Component) `[CRITICAL]` + - Slide-out assistant chat panel for natural language command ... + - πŸ“¦ **AssistantChatPanel** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/lib/components/assist... + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** UI Tests + - πŸ“Š **Tiers:** STANDARD: 3 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 3 + + **Key Entities:** + + - πŸ“¦ **frontend.src.lib.components.assistant.__tests__.assistant_chat_integration** (Module) + - Contract-level integration checks for assistant chat panel i... + + ### πŸ“ `layout/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** CRITICAL: 3, STANDARD: 5, TRIVIAL: 46 + - πŸ“„ **Files:** 4 + - πŸ“¦ **Entities:** 54 + + **Key Entities:** + + - 🧩 **Breadcrumbs** (Component) + - Display page hierarchy navigation + - 🧩 **Sidebar** (Component) `[CRITICAL]` + - Persistent left sidebar with resource categories navigation + - 🧩 **TaskDrawer** (Component) `[CRITICAL]` + - Global task drawer for monitoring background operations + - 🧩 **TopNavbar** (Component) `[CRITICAL]` + - Unified top navigation bar with Logo, Search, Activity, and ... + - πŸ“¦ **Breadcrumbs** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/lib/components/layout... + - πŸ“¦ **Sidebar** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/lib/components/layout... + - πŸ“¦ **TaskDrawer** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/lib/components/layout... + - πŸ“¦ **TopNavbar** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/lib/components/layout... + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** Unknown + - πŸ“Š **Tiers:** TRIVIAL: 3 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 3 + + **Key Entities:** + + - πŸ“¦ **test_breadcrumbs.svelte** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/lib/components/layout... + + ### πŸ“ `reports/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** CRITICAL: 4, STANDARD: 1, TRIVIAL: 10 + - πŸ“„ **Files:** 4 + - πŸ“¦ **Entities:** 15 + + **Key Entities:** + + - 🧩 **ReportCard** (Component) `[CRITICAL]` + - Render one report with explicit textual type label and profi... + - 🧩 **ReportDetailPanel** (Component) `[CRITICAL]` + - Display detailed report context with diagnostics and actiona... + - 🧩 **ReportsList** (Component) `[CRITICAL]` + - Render unified list of normalized reports with canonical min... + - πŸ“¦ **ReportCard** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/lib/components/report... + - πŸ“¦ **ReportDetailPanel** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/lib/components/report... + - πŸ“¦ **ReportsList** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/lib/components/report... + - πŸ“¦ **frontend.src.lib.components.reports.reportTypeProfiles** (Module) `[CRITICAL]` + - Deterministic mapping from report task_type to visual profil... + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> frontend/src/lib/i18n/index.ts + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** UI, UI (Tests) + - πŸ“Š **Tiers:** STANDARD: 6, TRIVIAL: 4 + - πŸ“„ **Files:** 6 + - πŸ“¦ **Entities:** 10 + + **Key Entities:** + + - πŸ“¦ **frontend.src.lib.components.reports.__tests__.report_card.ux** (Module) + - Test UX states and transitions for ReportCard component + - πŸ“¦ **frontend.src.lib.components.reports.__tests__.report_detail.integration** (Module) + - Validate detail-panel behavior for failed reports and recove... + - πŸ“¦ **frontend.src.lib.components.reports.__tests__.report_detail.ux** (Module) + - Test UX states and recovery for ReportDetailPanel component + - πŸ“¦ **frontend.src.lib.components.reports.__tests__.report_type_profiles** (Module) + - Validate report type profile mapping and unknown fallback be... + - πŸ“¦ **frontend.src.lib.components.reports.__tests__.reports_filter_performance** (Module) + - Guard test for report filter responsiveness on moderate in-m... + - πŸ“¦ **frontend.src.lib.components.reports.__tests__.reports_page.integration** (Module) + - Integration-style checks for unified mixed-type reports rend... + + ### πŸ“ `fixtures/` + + - πŸ—οΈ **Layers:** UI + - πŸ“Š **Tiers:** STANDARD: 1 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 1 + + **Key Entities:** + + - πŸ“¦ **reports.fixtures** (Module) + - Shared frontend fixtures for unified reports states. + + ### πŸ“ `i18n/` + + - πŸ—οΈ **Layers:** Infra + - πŸ“Š **Tiers:** STANDARD: 4 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 4 + + **Key Entities:** + + - πŸ“¦ **i18n** (Module) + - Determines the starting locale. + - πŸ—„οΈ **locale** (Store) + - Holds the current active locale string. + - πŸ—„οΈ **t** (Store) + - Derived store providing the translation dictionary. + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> locales/en.json + - πŸ”— DEPENDS_ON -> locales/ru.json + + ### πŸ“ `stores/` + + - πŸ—οΈ **Layers:** UI, UI-State, Unknown + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 8, TRIVIAL: 21 + - πŸ“„ **Files:** 5 + - πŸ“¦ **Entities:** 30 + + **Key Entities:** + + - πŸ“¦ **environmentContext** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/lib/stores/environmen... + - πŸ“¦ **sidebar** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/lib/stores/sidebar.js + - πŸ“¦ **taskDrawer** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/lib/stores/taskDrawer... + - πŸ—„οΈ **activity** (Store) + - Track active task count for navbar indicator + - πŸ—„οΈ **assistantChat** (Store) + - Control assistant chat panel visibility and active conversat... + - πŸ—„οΈ **environmentContext** (Store) + - Global selected environment context for navigation and safet... + - πŸ—„οΈ **sidebar** (Store) + - Manage sidebar visibility and navigation state + - πŸ—„οΈ **taskDrawer** (Store) `[CRITICAL]` + - Manage Task Drawer visibility and resource-to-task mapping + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> WebSocket connection, taskDrawer store + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** Domain (Tests), UI, UI Tests + - πŸ“Š **Tiers:** STANDARD: 11 + - πŸ“„ **Files:** 6 + - πŸ“¦ **Entities:** 11 + + **Key Entities:** + + - πŸ“¦ **frontend.src.lib.stores.__tests__.assistantChat** (Module) + - Validate assistant chat store visibility and conversation bi... + - πŸ“¦ **frontend.src.lib.stores.__tests__.sidebar** (Module) + - Unit tests for sidebar store + - πŸ“¦ **frontend.src.lib.stores.__tests__.test_activity** (Module) + - Unit tests for activity store + - πŸ“¦ **frontend.src.lib.stores.__tests__.test_sidebar** (Module) + - Unit tests for sidebar store + - πŸ“¦ **frontend.src.lib.stores.__tests__.test_taskDrawer** (Module) + - Unit tests for task drawer store + - πŸ“¦ **setupTests** (Module) + - Global test setup with mocks for SvelteKit modules + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> assistantChatStore + - πŸ”— DEPENDS_ON -> frontend.src.lib.stores.taskDrawer + + ### πŸ“ `mocks/` + + - πŸ—οΈ **Layers:** UI (Tests) + - πŸ“Š **Tiers:** STANDARD: 4 + - πŸ“„ **Files:** 4 + - πŸ“¦ **Entities:** 4 + + **Key Entities:** + + - πŸ“¦ **mock_env_public** (Module) + - Mock for $env/static/public SvelteKit module in vitest + + ### πŸ“ `ui/` + + - πŸ—οΈ **Layers:** Atom + - πŸ“Š **Tiers:** TRIVIAL: 7 + - πŸ“„ **Files:** 7 + - πŸ“¦ **Entities:** 7 + + **Key Entities:** + + - 🧩 **Button** (Component) `[TRIVIAL]` + - Define component interface and default values (Svelte 5 Rune... + - 🧩 **Card** (Component) `[TRIVIAL]` + - Standardized container with padding and elevation. + - 🧩 **Input** (Component) `[TRIVIAL]` + - Standardized text input component with label and error handl... + - 🧩 **LanguageSwitcher** (Component) `[TRIVIAL]` + - Dropdown component to switch between supported languages. + - 🧩 **PageHeader** (Component) `[TRIVIAL]` + - Standardized page header with title and action area. + - 🧩 **Select** (Component) `[TRIVIAL]` + - Standardized dropdown selection component. + - πŸ“¦ **ui** (Module) `[TRIVIAL]` + - Central export point for standardized UI components. + + ### πŸ“ `utils/` + + - πŸ—οΈ **Layers:** Infra + - πŸ“Š **Tiers:** TRIVIAL: 2 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 2 + + **Key Entities:** + + - πŸ“¦ **Debounce** (Module) `[TRIVIAL]` + - Debounce utility for limiting function execution rate + + ### πŸ“ `pages/` + + - πŸ—οΈ **Layers:** UI + - πŸ“Š **Tiers:** STANDARD: 11 + - πŸ“„ **Files:** 2 + - πŸ“¦ **Entities:** 11 + + **Key Entities:** + + - 🧩 **Dashboard** (Component) + - Displays the list of available plugins and allows selecting ... + - 🧩 **Settings** (Component) + - The main settings page for the application, allowing managem... + + ### πŸ“ `routes/` + + - πŸ—οΈ **Layers:** Infra, UI + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 3, TRIVIAL: 1 + - πŸ“„ **Files:** 5 + - πŸ“¦ **Entities:** 5 + + **Key Entities:** + + - πŸ“¦ **RootLayoutConfig** (Module) `[TRIVIAL]` + - Root layout configuration (SPA mode) + - πŸ“¦ **layout** (Module) + - Bind global layout shell and conditional login/full-app rend... + + ### πŸ“ `roles/` + + - πŸ—οΈ **Layers:** Domain + - πŸ“Š **Tiers:** STANDARD: 6 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 6 + + **Key Entities:** + + - 🧩 **AdminRolesPage** (Component) + - UI for managing system roles and their permissions. + + ### πŸ“ `settings/` + + - πŸ—οΈ **Layers:** Feature + - πŸ“Š **Tiers:** STANDARD: 5 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 5 + + **Key Entities:** + + - 🧩 **AdminSettingsPage** (Component) + - UI for configuring Active Directory Group to local Role mapp... + + ### πŸ“ `llm/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** STANDARD: 1, TRIVIAL: 5 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 6 + + **Key Entities:** + + - 🧩 **LLMSettingsPage** (Component) + - Admin settings page for LLM provider configuration. + - πŸ“¦ **+page** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/routes/admin/settings... + + ### πŸ“ `users/` + + - πŸ—οΈ **Layers:** Feature + - πŸ“Š **Tiers:** STANDARD: 6 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 6 + + **Key Entities:** + + - 🧩 **AdminUsersPage** (Component) + - UI for managing system users and their roles. + + ### πŸ“ `dashboards/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** CRITICAL: 1, TRIVIAL: 35 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 36 + + **Key Entities:** + + - πŸ“¦ **+page** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/routes/dashboards/+pa... + + ### πŸ“ `[id]/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** CRITICAL: 1, TRIVIAL: 17 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 18 + + **Key Entities:** + + - πŸ“¦ **+page** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/routes/dashboards/[id... + + ### πŸ“ `datasets/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** CRITICAL: 1, TRIVIAL: 15 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 16 + + **Key Entities:** + + - πŸ“¦ **+page** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/routes/datasets/+page... + + ### πŸ“ `[id]/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** CRITICAL: 1, TRIVIAL: 6 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 7 + + **Key Entities:** + + - πŸ“¦ **+page** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/routes/datasets/[id]/... + + ### πŸ“ `git/` + + - πŸ—οΈ **Layers:** Page + - πŸ“Š **Tiers:** STANDARD: 3 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 3 + + **Key Entities:** + + - 🧩 **GitDashboardPage** (Component) + - Dashboard management page for Git integration. + + ### πŸ“ `login/` + + - πŸ—οΈ **Layers:** UI + - πŸ“Š **Tiers:** STANDARD: 3 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 3 + + **Key Entities:** + + - 🧩 **LoginPage** (Component) + - Provides the user interface for local and ADFS authenticatio... + + ### πŸ“ `migration/` + + - πŸ—οΈ **Layers:** Page + - πŸ“Š **Tiers:** STANDARD: 10 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 10 + + **Key Entities:** + + - 🧩 **DashboardSelectionSection** (Component) + - 🧩 **MigrationDashboard** (Component) + - Main dashboard for configuring and starting migrations. + + ### πŸ“ `mappings/` + + - πŸ—οΈ **Layers:** Page + - πŸ“Š **Tiers:** STANDARD: 4 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 4 + + **Key Entities:** + + - 🧩 **MappingManagement** (Component) + - Page for managing database mappings between environments. + + ### πŸ“ `reports/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** CRITICAL: 1, TRIVIAL: 7 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 8 + + **Key Entities:** + + - 🧩 **UnifiedReportsPage** (Component) `[CRITICAL]` + - Unified reports page with filtering and resilient UX states ... + - πŸ“¦ **+page** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/routes/reports/+page.... + + ### πŸ“ `[taskId]/` + + - πŸ—οΈ **Layers:** Unknown + - πŸ“Š **Tiers:** TRIVIAL: 8 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 8 + + **Key Entities:** + + - πŸ“¦ **+page** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/routes/reports/llm/[t... + + ### πŸ“ `settings/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 1, TRIVIAL: 23 + - πŸ“„ **Files:** 2 + - πŸ“¦ **Entities:** 25 + + **Key Entities:** + + - πŸ“¦ **+page** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/routes/settings/+page... + + ### πŸ“ `connections/` + + - πŸ—οΈ **Layers:** UI + - πŸ“Š **Tiers:** STANDARD: 2 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 2 + + **Key Entities:** + + - 🧩 **ConnectionsSettingsPage** (Component) + - Page for managing database connection configurations. + + ### πŸ“ `git/` + + - πŸ—οΈ **Layers:** Page + - πŸ“Š **Tiers:** STANDARD: 5 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 5 + + **Key Entities:** + + - 🧩 **GitSettingsPage** (Component) + - Manage Git server configurations for dashboard versioning. + + ### πŸ“ `storage/` + + - πŸ—οΈ **Layers:** Page + - πŸ“Š **Tiers:** TRIVIAL: 1 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 1 + + ### πŸ“ `repos/` + + - πŸ“Š **Tiers:** STANDARD: 3 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 3 + + ### πŸ“ `debug/` + + - πŸ—οΈ **Layers:** UI + - πŸ“Š **Tiers:** TRIVIAL: 1 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 1 + + **Key Entities:** + + - 🧩 **DebugPage** (Component) `[TRIVIAL]` + - Page for system diagnostics and debugging. + + ### πŸ“ `mapper/` + + - πŸ—οΈ **Layers:** UI + - πŸ“Š **Tiers:** TRIVIAL: 1 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 1 + + **Key Entities:** + + - 🧩 **MapperPage** (Component) `[TRIVIAL]` + - Page for the dataset column mapper tool. + + ### πŸ“ `storage/` + + - πŸ—οΈ **Layers:** UI + - πŸ“Š **Tiers:** STANDARD: 5 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 5 + + **Key Entities:** + + - 🧩 **StoragePage** (Component) + - Main page for file storage management. + + ### πŸ“ `services/` + + - πŸ—οΈ **Layers:** Service + - πŸ“Š **Tiers:** STANDARD: 33 + - πŸ“„ **Files:** 6 + - πŸ“¦ **Entities:** 33 + + **Key Entities:** + + - πŸ“¦ **GitServiceClient** (Module) + - API client for Git operations, managing the communication be... + - πŸ“¦ **adminService** (Module) + - Service for Admin-related API calls (User and Role managemen... + - πŸ“¦ **storageService** (Module) + - Frontend API client for file storage management. + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> frontend.src.lib.api + + ### πŸ“ `types/` + + - πŸ—οΈ **Layers:** Domain + - πŸ“Š **Tiers:** TRIVIAL: 1 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 1 + + **Key Entities:** + + - πŸ“¦ **DashboardTypes** (Module) `[TRIVIAL]` + - TypeScript interfaces for Dashboard entities + +### πŸ“ `root/` + +- πŸ—οΈ **Layers:** DevOps/Tooling, Domain, Unknown +- πŸ“Š **Tiers:** CRITICAL: 14, STANDARD: 24, TRIVIAL: 12 +- πŸ“„ **Files:** 4 +- πŸ“¦ **Entities:** 50 + +**Key Entities:** + + - β„‚ **ComplianceIssue** (Class) `[TRIVIAL]` + - Represents a single compliance issue with severity. + - β„‚ **ReportsService** (Class) `[CRITICAL]` + - Service layer for list/detail report retrieval and normaliza... + - β„‚ **SemanticEntity** (Class) `[CRITICAL]` + - Represents a code entity (Module, Function, Component) found... + - β„‚ **SemanticMapGenerator** (Class) `[CRITICAL]` + - Orchestrates the mapping process with tier-based validation. + - β„‚ **Severity** (Class) `[TRIVIAL]` + - Severity levels for compliance issues. + - β„‚ **Tier** (Class) `[TRIVIAL]` + - Enumeration of semantic tiers defining validation strictness... + - πŸ“¦ **backend.src.services.reports.report_service** (Module) `[CRITICAL]` + - Aggregate, normalize, filter, and paginate task reports for ... + - πŸ“¦ **check_test_data** (Module) `[TRIVIAL]` + - Auto-generated module for check_test_data.py + - πŸ“¦ **generate_semantic_map** (Module) + - Scans the codebase to generate a Semantic Map, Module Map, a... + - πŸ“¦ **test_analyze** (Module) `[TRIVIAL]` + - Auto-generated module for test_analyze.py + +**Dependencies:** + + - πŸ”— DEPENDS_ON -> backend.src.core.task_manager.manager.TaskManager + - πŸ”— DEPENDS_ON -> backend.src.models.report + - πŸ”— DEPENDS_ON -> backend.src.services.reports.normalizer + +## Cross-Module Dependencies + +```mermaid +graph TD + api-->|USES|backend + api-->|USES|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|USES|backend + routes-->|USES|backend + routes-->|CALLS|backend + routes-->|CALLS|backend + routes-->|CALLS|backend + routes-->|CALLS|backend + routes-->|CALLS|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|CALLS|root + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + __tests__-->|TESTS|backend + __tests__-->|TESTS|backend + __tests__-->|TESTS|backend + __tests__-->|TESTS|backend + __tests__-->|DEPENDS_ON|backend + __tests__-->|DEPENDS_ON|backend + __tests__-->|VERIFIES|backend + core-->|USES|backend + core-->|USES|backend + core-->|DEPENDS_ON|backend + core-->|DEPENDS_ON|backend + core-->|DEPENDS_ON|backend + core-->|DEPENDS_ON|backend + auth-->|USES|backend + auth-->|USES|backend + auth-->|USES|backend + auth-->|USES|backend + utils-->|DEPENDS_ON|backend + utils-->|DEPENDS_ON|backend + utils-->|DEPENDS_ON|backend + models-->|INHERITS_FROM|backend + models-->|DEPENDS_ON|backend + models-->|DEPENDS_ON|backend + models-->|USED_BY|backend + models-->|INHERITS_FROM|backend + __tests__-->|TESTS|backend + llm_analysis-->|IMPLEMENTS|backend + llm_analysis-->|IMPLEMENTS|backend + storage-->|DEPENDS_ON|backend + scripts-->|USES|backend + scripts-->|USES|backend + scripts-->|READS_FROM|backend + scripts-->|READS_FROM|backend + scripts-->|USES|backend + scripts-->|USES|backend + scripts-->|CALLS|backend + scripts-->|USES|backend + scripts-->|USES|backend + scripts-->|USES|backend + services-->|DEPENDS_ON|backend + services-->|DEPENDS_ON|backend + services-->|DEPENDS_ON|backend + services-->|DEPENDS_ON|backend + services-->|DEPENDS_ON|backend + services-->|DEPENDS_ON|backend + services-->|USES|backend + services-->|USES|backend + services-->|USES|backend + services-->|DEPENDS_ON|backend + services-->|DEPENDS_ON|backend + __tests__-->|TESTS|backend + __tests__-->|DEPENDS_ON|backend + __tests__-->|TESTS|backend + reports-->|DEPENDS_ON|backend + reports-->|DEPENDS_ON|backend + reports-->|DEPENDS_ON|backend + reports-->|DEPENDS_ON|backend + reports-->|DEPENDS_ON|backend + reports-->|DEPENDS_ON|backend + reports-->|DEPENDS_ON|backend + __tests__-->|TESTS|backend + __tests__-->|TESTS|backend + tests-->|TESTS|backend + core-->|VERIFIES|backend + core-->|VERIFIES|backend + __tests__-->|VERIFIES|components + __tests__-->|VERIFIES|lib + reports-->|DEPENDS_ON|lib + __tests__-->|TESTS|routes + __tests__-->|TESTS|routes + __tests__-->|TESTS|lib + __tests__-->|TESTS|lib + __tests__-->|TESTS|lib + __tests__-->|TESTS|routes + root-->|DEPENDS_ON|backend + root-->|DEPENDS_ON|backend + root-->|DEPENDS_ON|backend +``` diff --git a/.ai/PROJECT_MAP.md b/.ai/PROJECT_MAP.md new file mode 100644 index 0000000..873d655 --- /dev/null +++ b/.ai/PROJECT_MAP.md @@ -0,0 +1,4523 @@ +# Project Semantic Map + +> Compressed view for AI Context. Generated automatically. + +- πŸ“¦ **check_test_data** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for check_test_data.py + - πŸ—οΈ Layer: Unknown + - Ζ’ **check_file** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.services.reports.report_service** (`Module`) `[CRITICAL]` + - πŸ“ Aggregate, normalize, filter, and paginate task reports for unified list/detail API use cases. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: List responses are deterministic and include applied filter echo metadata. + - πŸ”— DEPENDS_ON -> `backend.src.core.task_manager.manager.TaskManager` + - πŸ”— DEPENDS_ON -> `backend.src.models.report` + - πŸ”— DEPENDS_ON -> `backend.src.services.reports.normalizer` + - β„‚ **ReportsService** (`Class`) `[CRITICAL]` + - πŸ“ Service layer for list/detail report retrieval and normalization. + - πŸ”’ Invariant: Service methods are read-only over task history source. + - Ζ’ **__init__** (`Function`) `[CRITICAL]` + - πŸ“ Initialize service with TaskManager dependency. + - πŸ”’ Invariant: Constructor performs no task mutations. + - Ζ’ **_load_normalized_reports** (`Function`) + - πŸ“ Build normalized reports from all available tasks. + - πŸ”’ Invariant: Every returned item is a TaskReport. + - Ζ’ **_to_utc_datetime** (`Function`) + - πŸ“ Normalize naive/aware datetime values to UTC-aware datetime for safe comparisons. + - πŸ”’ Invariant: Naive datetimes are interpreted as UTC to preserve deterministic ordering/filtering. + - Ζ’ **_datetime_sort_key** (`Function`) + - πŸ“ Produce stable numeric sort key for report timestamps. + - πŸ”’ Invariant: Mixed naive/aware datetimes never raise TypeError. + - Ζ’ **_matches_query** (`Function`) + - πŸ“ Apply query filtering to a report. + - πŸ”’ Invariant: Filter evaluation is side-effect free. + - Ζ’ **_sort_reports** (`Function`) + - πŸ“ Sort reports deterministically according to query settings. + - πŸ”’ Invariant: Sorting criteria are deterministic for equal input. + - Ζ’ **list_reports** (`Function`) + - πŸ“ Return filtered, sorted, paginated report collection. + - Ζ’ **get_report_detail** (`Function`) + - πŸ“ Return one normalized report with timeline/diagnostics/next actions. + - Ζ’ **print_entity** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **test_analyze** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for test_analyze.py + - πŸ—οΈ Layer: Unknown + - Ζ’ **print_issues** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **generate_semantic_map** (`Module`) + - πŸ“ Scans the codebase to generate a Semantic Map, Module Map, and Compliance Report based on the System Standard. + - πŸ—οΈ Layer: DevOps/Tooling + - πŸ”’ Invariant: All DEF anchors must have matching closing anchors; TIER determines validation strictness. + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Mock init for self-containment. + - Ζ’ **__enter__** (`Function`) `[TRIVIAL]` + - πŸ“ Mock enter. + - Ζ’ **__exit__** (`Function`) `[TRIVIAL]` + - πŸ“ Mock exit. + - β„‚ **Tier** (`Class`) `[TRIVIAL]` + - πŸ“ Enumeration of semantic tiers defining validation strictness. + - β„‚ **Severity** (`Class`) `[TRIVIAL]` + - πŸ“ Severity levels for compliance issues. + - β„‚ **ComplianceIssue** (`Class`) `[TRIVIAL]` + - πŸ“ Represents a single compliance issue with severity. + - β„‚ **SemanticEntity** (`Class`) `[CRITICAL]` + - πŸ“ Represents a code entity (Module, Function, Component) found during parsing. + - πŸ”’ Invariant: start_line is always set; end_line is set upon closure; tier defaults to STANDARD. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes a new SemanticEntity instance. + - Ζ’ **get_tier** (`Function`) + - πŸ“ Returns the tier of the entity, defaulting to STANDARD. + - Ζ’ **to_dict** (`Function`) + - πŸ“ Serializes the entity to a dictionary for JSON output. + - Ζ’ **validate** (`Function`) `[CRITICAL]` + - πŸ“ Checks for semantic compliance based on TIER requirements. + - Ζ’ **get_score** (`Function`) + - πŸ“ Calculates a compliance score (0.0 to 1.0) based on tier requirements. + - Ζ’ **get_patterns** (`Function`) + - πŸ“ Returns regex patterns for a specific language. + - Ζ’ **extract_svelte_props** (`Function`) + - πŸ“ Extracts props from Svelte component script section. + - Ζ’ **extract_svelte_events** (`Function`) + - πŸ“ Extracts dispatched events from Svelte component. + - Ζ’ **extract_data_flow** (`Function`) + - πŸ“ Extracts store subscriptions and data flow from Svelte component. + - Ζ’ **parse_file** (`Function`) `[CRITICAL]` + - πŸ“ Parses a single file to extract semantic entities with tier awareness and enhanced Svelte analysis. + - πŸ”’ Invariant: Every opened anchor must have a matching closing anchor for valid compliance. + - β„‚ **SemanticMapGenerator** (`Class`) `[CRITICAL]` + - πŸ“ Orchestrates the mapping process with tier-based validation. + - πŸ”’ Invariant: All entities are validated according to their TIER requirements. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the generator with a root directory. + - Ζ’ **_load_gitignore** (`Function`) + - πŸ“ Loads patterns from .gitignore file. + - Ζ’ **_is_ignored** (`Function`) + - πŸ“ Checks if a path should be ignored based on .gitignore or hardcoded defaults. + - Ζ’ **run** (`Function`) `[CRITICAL]` + - πŸ“ Main execution flow. + - πŸ”— CALLS -> `_walk_and_parse` + - πŸ”— CALLS -> `_generate_artifacts` + - Ζ’ **_walk_and_parse** (`Function`) `[CRITICAL]` + - πŸ“ Recursively walks directories and triggers parsing. + - Ζ’ **_process_file_results** (`Function`) + - πŸ“ Validates entities and calculates file scores with tier awareness. + - Ζ’ **validate_recursive** (`Function`) + - πŸ“ Calculate score and determine module's max tier for weighted global score + - Ζ’ **_generate_artifacts** (`Function`) `[CRITICAL]` + - πŸ“ Writes output files with tier-based compliance data. + - Ζ’ **_generate_report** (`Function`) `[CRITICAL]` + - πŸ“ Generates the Markdown compliance report with severity levels. + - Ζ’ **_collect_issues** (`Function`) + - πŸ“ Helper to collect issues for a specific file from the entity tree. + - Ζ’ **_generate_compressed_map** (`Function`) `[CRITICAL]` + - πŸ“ Generates the token-optimized project map with enhanced Svelte details. + - Ζ’ **_write_entity_md** (`Function`) `[CRITICAL]` + - πŸ“ Recursive helper to write entity tree to Markdown with tier badges and enhanced details. + - Ζ’ **_generate_module_map** (`Function`) `[CRITICAL]` + - πŸ“ Generates a module-centric map grouping entities by directory structure. + - Ζ’ **_get_module_path** (`Function`) + - πŸ“ Extracts the module path from a file path. + - Ζ’ **_collect_all_entities** (`Function`) + - πŸ“ Flattens entity tree for easier grouping. + - Ζ’ **to_dict** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **DashboardTypes** (`Module`) `[TRIVIAL]` + - πŸ“ TypeScript interfaces for Dashboard entities + - πŸ—οΈ Layer: Domain +- 🧩 **Counter** (`Component`) `[TRIVIAL]` + - πŸ“ Simple counter demo component + - πŸ—οΈ Layer: UI + - ➑️ WRITES_TO `state` +- πŸ“¦ **stores_module** (`Module`) + - πŸ“ Global state management using Svelte stores. + - πŸ—οΈ Layer: UI-State + - πŸ“¦ **plugins** (`Data`) + - πŸ“ Store for the list of available plugins. + - πŸ“¦ **tasks** (`Data`) + - πŸ“ Store for the list of tasks. + - πŸ“¦ **selectedPlugin** (`Data`) + - πŸ“ Store for the currently selected plugin. + - πŸ“¦ **selectedTask** (`Data`) + - πŸ“ Store for the currently selected task. + - πŸ“¦ **currentPage** (`Data`) + - πŸ“ Store for the current page. + - πŸ“¦ **taskLogs** (`Data`) + - πŸ“ Store for the logs of the currently selected task. + - Ζ’ **fetchPlugins** (`Function`) + - πŸ“ Fetches plugins from the API and updates the plugins store. + - Ζ’ **fetchTasks** (`Function`) + - πŸ“ Fetches tasks from the API and updates the tasks store. +- πŸ“¦ **toasts_module** (`Module`) + - πŸ“ Manages toast notifications using a Svelte writable store. + - πŸ—οΈ Layer: UI-State + - πŸ“¦ **toasts** (`Data`) + - πŸ“ Writable store containing the list of active toasts. + - Ζ’ **addToast** (`Function`) + - πŸ“ Adds a new toast message. + - Ζ’ **removeToast** (`Function`) + - πŸ“ Removes a toast message by ID. +- πŸ“¦ **api_module** (`Module`) + - πŸ“ Handles all communication with the backend API. + - πŸ—οΈ Layer: Infra-API + - Ζ’ **buildApiError** (`Function`) + - πŸ“ Creates a normalized Error object for failed API responses. + - Ζ’ **notifyApiError** (`Function`) + - πŸ“ Shows toast for API errors with explicit handling of critical statuses. + - Ζ’ **getWsUrl** (`Function`) + - πŸ“ Returns the WebSocket URL for a specific task, with fallback logic. + - Ζ’ **getAuthHeaders** (`Function`) + - πŸ“ Returns headers with Authorization if token exists. + - Ζ’ **fetchApi** (`Function`) + - πŸ“ Generic GET request wrapper. + - Ζ’ **fetchApiBlob** (`Function`) + - πŸ“ Generic GET wrapper for binary payloads. + - Ζ’ **postApi** (`Function`) + - πŸ“ Generic POST request wrapper. + - Ζ’ **requestApi** (`Function`) + - πŸ“ Generic request wrapper. + - πŸ“¦ **api** (`Data`) + - πŸ“ API client object with specific methods. +- πŸ“¦ **Utils** (`Module`) `[TRIVIAL]` + - πŸ“ General utility functions (class merging) + - πŸ—οΈ Layer: Infra + - Ζ’ **cn** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ—„οΈ **authStore** (`Store`) + - πŸ“ Manages the global authentication state on the frontend. + - πŸ—οΈ Layer: Feature + - πŸ“¦ **AuthState** (`Interface`) + - πŸ“ Defines the structure of the authentication state. + - Ζ’ **createAuthStore** (`Function`) + - πŸ“ Creates and configures the auth store with helper methods. + - Ζ’ **setToken** (`Function`) + - πŸ“ Updates the store with a new JWT token. + - Ζ’ **setUser** (`Function`) + - πŸ“ Sets the current user profile data. + - Ζ’ **logout** (`Function`) + - πŸ“ Clears authentication state and storage. + - Ζ’ **setLoading** (`Function`) + - πŸ“ Updates the loading state. +- πŸ“¦ **Debounce** (`Module`) `[TRIVIAL]` + - πŸ“ Debounce utility for limiting function execution rate + - πŸ—οΈ Layer: Infra + - Ζ’ **debounce** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ—„οΈ **assistantChat** (`Store`) + - πŸ“ Control assistant chat panel visibility and active conversation binding. + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: conversationId persists while panel toggles unless explicitly reset. + - Ζ’ **toggleAssistantChat** (`Function`) + - πŸ“ Toggle assistant panel visibility. + - Ζ’ **openAssistantChat** (`Function`) + - πŸ“ Open assistant panel. + - Ζ’ **closeAssistantChat** (`Function`) + - πŸ“ Close assistant panel. + - Ζ’ **setAssistantConversationId** (`Function`) + - πŸ“ Bind current conversation id in UI state. +- πŸ—„οΈ **taskDrawer** (`Store`) `[CRITICAL]` + - πŸ“ Manage Task Drawer visibility and resource-to-task mapping + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: resourceTaskMap always reflects current task associations +- πŸ“¦ **taskDrawer** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/lib/stores/taskDrawer.js + - πŸ—οΈ Layer: Unknown + - Ζ’ **openDrawerForTask** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **openDrawer** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **closeDrawer** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **updateResourceTask** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getTaskForResource** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ—„οΈ **sidebar** (`Store`) + - πŸ“ Manage sidebar visibility and navigation state + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: isExpanded state is always synced with localStorage +- πŸ“¦ **sidebar** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/lib/stores/sidebar.js + - πŸ—οΈ Layer: Unknown + - Ζ’ **toggleSidebar** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **setActiveItem** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **setMobileOpen** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **closeMobile** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **toggleMobileSidebar** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ—„οΈ **environmentContext** (`Store`) + - πŸ“ Global selected environment context for navigation and safety cues. + - πŸ—οΈ Layer: UI-State +- πŸ“¦ **environmentContext** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/lib/stores/environmentContext.js + - πŸ—οΈ Layer: Unknown + - Ζ’ **getStoredSelectedEnvId** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **persistSelectedEnvId** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **hasAuthToken** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **resolveSelectedEnvId** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **applySelectedEnvId** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **refreshEnvironmentContext** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **initializeEnvironmentContext** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **setSelectedEnvironment** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ—„οΈ **activity** (`Store`) + - πŸ“ Track active task count for navbar indicator + - πŸ—οΈ Layer: UI + - πŸ”— DEPENDS_ON -> `WebSocket connection, taskDrawer store` +- πŸ“¦ **frontend.src.lib.stores.__tests__.test_sidebar** (`Module`) + - πŸ“ Unit tests for sidebar store + - πŸ—οΈ Layer: UI +- πŸ“¦ **frontend.src.lib.stores.__tests__.sidebar** (`Module`) + - πŸ“ Unit tests for sidebar store + - πŸ—οΈ Layer: Domain (Tests) + - πŸ”’ Invariant: Sidebar store transitions must be deterministic across desktop/mobile toggles. + - Ζ’ **test_sidebar_initial_state** (`Function`) + - πŸ“ Verify initial sidebar store values when no persisted state is available. + - Ζ’ **test_toggleSidebar** (`Function`) + - πŸ“ Verify desktop sidebar expansion toggles deterministically. + - Ζ’ **test_setActiveItem** (`Function`) + - Ζ’ **test_mobile_functions** (`Function`) +- πŸ“¦ **frontend.src.lib.stores.__tests__.test_activity** (`Module`) + - πŸ“ Unit tests for activity store + - πŸ—οΈ Layer: UI + - πŸ”— DEPENDS_ON -> `frontend.src.lib.stores.taskDrawer` +- πŸ“¦ **setupTests** (`Module`) + - πŸ“ Global test setup with mocks for SvelteKit modules + - πŸ—οΈ Layer: UI +- πŸ“¦ **frontend.src.lib.stores.__tests__.test_taskDrawer** (`Module`) + - πŸ“ Unit tests for task drawer store + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Store state transitions remain deterministic for open/close and task-status mapping. +- πŸ“¦ **frontend.src.lib.stores.__tests__.assistantChat** (`Module`) + - πŸ“ Validate assistant chat store visibility and conversation binding transitions. + - πŸ—οΈ Layer: UI Tests + - πŸ”’ Invariant: Each test starts from default closed state. + - πŸ”— DEPENDS_ON -> `assistantChatStore` + - Ζ’ **assistantChatStore_tests** (`Function`) + - πŸ“ Group store unit scenarios for assistant panel behavior. +- πŸ“¦ **navigation** (`Mock`) + - πŸ“ Mock for $app/navigation in tests +- πŸ“¦ **stores** (`Mock`) + - πŸ“ Mock for $app/stores in tests +- πŸ“¦ **environment** (`Mock`) + - πŸ“ Mock for $app/environment in tests +- πŸ“¦ **mock_env_public** (`Module`) + - πŸ“ Mock for $env/static/public SvelteKit module in vitest + - πŸ—οΈ Layer: UI (Tests) +- πŸ“¦ **frontend.src.lib.api.reports** (`Module`) `[CRITICAL]` + - πŸ“ Wrapper-based reports API client for list/detail retrieval without direct native fetch usage. + - πŸ—οΈ Layer: Infra + - πŸ”’ Invariant: Uses existing api wrapper methods and returns structured errors for UI-state mapping. + - πŸ”— DEPENDS_ON -> `[DEF:api_module]` + - Ζ’ **buildReportQueryString** (`Function`) + - πŸ“ Build query string for reports list endpoint from filter options. + - Ζ’ **normalizeApiError** (`Function`) + - πŸ“ Convert unknown API exceptions into deterministic UI-consumable error objects. + - Ζ’ **getReports** (`Function`) + - πŸ“ Fetch unified report list using existing request wrapper. + - Ζ’ **getReportDetail** (`Function`) + - πŸ“ Fetch one report detail by report_id. +- πŸ“¦ **frontend.src.lib.api.assistant** (`Module`) + - πŸ“ API client wrapper for assistant chat, confirmation actions, and history retrieval. + - πŸ—οΈ Layer: Infra-API + - πŸ”’ Invariant: All assistant requests must use requestApi wrapper (no native fetch). + - πŸ”— DEPENDS_ON -> `frontend.src.lib.api.api_module` + - Ζ’ **sendAssistantMessage** (`Function`) + - πŸ“ Send a user message to assistant orchestrator endpoint. + - Ζ’ **confirmAssistantOperation** (`Function`) + - πŸ“ Confirm a pending risky assistant operation. + - Ζ’ **cancelAssistantOperation** (`Function`) + - πŸ“ Cancel a pending risky assistant operation. + - Ζ’ **getAssistantHistory** (`Function`) + - πŸ“ Retrieve paginated assistant conversation history. + - Ζ’ **getAssistantConversations** (`Function`) + - πŸ“ Retrieve paginated conversation list for assistant sidebar/history switcher. +- πŸ“¦ **frontend.src.lib.api.__tests__.reports_api** (`Module`) + - πŸ“ Unit tests for reports API client functions: query string building, error normalization, and fetch wrappers. + - πŸ—οΈ Layer: Infra (Tests) + - πŸ”’ Invariant: Pure functions produce deterministic output. Async wrappers propagate structured errors. + - β„‚ **TestBuildReportQueryString** (`Class`) + - πŸ“ Validate query string construction from filter options. + - β„‚ **TestNormalizeApiError** (`Class`) + - πŸ“ Validate error normalization for UI-state mapping. + - β„‚ **TestGetReportsAsync** (`Class`) + - πŸ“ Validate getReports and getReportDetail with mocked api.fetchApi. +- 🧩 **Select** (`Component`) `[TRIVIAL]` + - πŸ“ Standardized dropdown selection component. + - πŸ—οΈ Layer: Atom + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `bindable` + - ➑️ WRITES_TO `props` +- πŸ“¦ **ui** (`Module`) `[TRIVIAL]` + - πŸ“ Central export point for standardized UI components. + - πŸ—οΈ Layer: Atom + - πŸ”’ Invariant: All components exported here must follow Semantic Protocol. +- 🧩 **PageHeader** (`Component`) `[TRIVIAL]` + - πŸ“ Standardized page header with title and action area. + - πŸ—οΈ Layer: Atom + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `props` +- 🧩 **Card** (`Component`) `[TRIVIAL]` + - πŸ“ Standardized container with padding and elevation. + - πŸ—οΈ Layer: Atom + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `props` +- 🧩 **Button** (`Component`) `[TRIVIAL]` + - πŸ“ Define component interface and default values (Svelte 5 Runes). + - πŸ—οΈ Layer: Atom + - πŸ”’ Invariant: Supports accessible labels and keyboard navigation. + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `props` +- 🧩 **Input** (`Component`) `[TRIVIAL]` + - πŸ“ Standardized text input component with label and error handling. + - πŸ—οΈ Layer: Atom + - πŸ”’ Invariant: Consistent spacing and focus states. + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `bindable` + - ➑️ WRITES_TO `props` +- 🧩 **LanguageSwitcher** (`Component`) `[TRIVIAL]` + - πŸ“ Dropdown component to switch between supported languages. + - πŸ—οΈ Layer: Atom + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `locale` +- πŸ“¦ **i18n** (`Module`) + - πŸ“ Determines the starting locale. + - πŸ—οΈ Layer: Infra + - πŸ”’ Invariant: Persistence is handled via LocalStorage. + - πŸ”— DEPENDS_ON -> `locales/ru.json` + - πŸ”— DEPENDS_ON -> `locales/en.json` + - πŸ—„οΈ **locale** (`Store`) + - πŸ“ Holds the current active locale string. + - πŸ—„οΈ **t** (`Store`) + - πŸ“ Derived store providing the translation dictionary. + - Ζ’ **_** (`Function`) + - πŸ“ Get translation by key path. +- 🧩 **AssistantChatPanel** (`Component`) `[CRITICAL]` + - πŸ“ Slide-out assistant chat panel for natural language command execution and task tracking. + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Risky operations are executed only through explicit confirm action. + - ⬅️ READS_FROM `app` + - ⬅️ READS_FROM `lib` + - ⬅️ READS_FROM `assistantChatStore` + - Ζ’ **loadHistory** (`Function`) + - πŸ“ Load current conversation history when panel becomes visible. + - Ζ’ **loadConversations** (`Function`) + - πŸ“ Load paginated conversation summaries for quick switching UI. + - Ζ’ **loadOlderMessages** (`Function`) + - πŸ“ Lazy-load older messages for active conversation when user scrolls to top. + - Ζ’ **appendLocalUserMessage** (`Function`) + - πŸ“ Add optimistic local user message before backend response. + - Ζ’ **appendAssistantResponse** (`Function`) + - πŸ“ Normalize and append assistant response payload to chat list. + - Ζ’ **handleSend** (`Function`) + - πŸ“ Submit user command to assistant orchestration API. + - Ζ’ **selectConversation** (`Function`) + - πŸ“ Switch active chat context to selected conversation item. + - Ζ’ **startNewConversation** (`Function`) + - πŸ“ Create local empty chat context that will be persisted on first message. + - Ζ’ **handleAction** (`Function`) + - πŸ“ Execute assistant action button behavior (open task/reports, confirm, cancel). + - Ζ’ **handleKeydown** (`Function`) + - πŸ“ Submit command by Enter while preserving multiline input with Shift+Enter. + - Ζ’ **stateClass** (`Function`) + - πŸ“ Map assistant state to visual badge style class. + - Ζ’ **handleHistoryScroll** (`Function`) + - πŸ“ Trigger lazy history fetch when user scroll reaches top boundary. +- πŸ“¦ **AssistantChatPanel** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/lib/components/assistant/AssistantChatPanel.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **buildConversationTitle** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **setConversationFilter** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **formatConversationTime** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadLlmStatus** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **frontend.src.lib.components.assistant.__tests__.assistant_chat_integration** (`Module`) + - πŸ“ Contract-level integration checks for assistant chat panel implementation and localization wiring. + - πŸ—οΈ Layer: UI Tests + - πŸ”’ Invariant: Critical assistant UX states and action hooks remain present in component source. + - Ζ’ **readJson** (`Function`) + - πŸ“ Read and parse JSON fixture file from disk. + - Ζ’ **assistant_chat_contract_tests** (`Function`) + - πŸ“ Validate assistant chat component contract and locale integration without DOM runtime dependency. +- 🧩 **ReportCard** (`Component`) `[CRITICAL]` + - πŸ“ Render one report with explicit textual type label and profile-driven visual variant. + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Unknown task type always uses fallback profile. + - ⚑ Events: select + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `derived` +- πŸ“¦ **ReportCard** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/lib/components/reports/ReportCard.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **getStatusClass** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getStatusLabel** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **formatDate** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **onSelect** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- 🧩 **ReportsList** (`Component`) `[CRITICAL]` + - πŸ“ Render unified list of normalized reports with canonical minimum fields. + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Every rendered row shows task_type label, status, summary, and updated_at. + - ⚑ Events: select + - ➑️ WRITES_TO `props` +- πŸ“¦ **ReportsList** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/lib/components/reports/ReportsList.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **handleSelect** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **frontend.src.lib.components.reports.reportTypeProfiles** (`Module`) `[CRITICAL]` + - πŸ“ Deterministic mapping from report task_type to visual profile with one fallback. + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Unknown type always resolves to fallback profile. + - πŸ”— DEPENDS_ON -> `frontend/src/lib/i18n/index.ts` + - Ζ’ **getReportTypeProfile** (`Function`) + - πŸ“ Resolve visual profile by task type with guaranteed fallback. +- 🧩 **ReportDetailPanel** (`Component`) `[CRITICAL]` + - πŸ“ Display detailed report context with diagnostics and actionable recovery guidance. + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Failed/partial reports surface actionable hints when available. + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `props` + - ⬅️ READS_FROM `t` +- πŸ“¦ **ReportDetailPanel** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/lib/components/reports/ReportDetailPanel.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **notProvided** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **formatDate** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **frontend.src.lib.components.reports.__tests__.reports_filter_performance** (`Module`) + - πŸ“ Guard test for report filter responsiveness on moderate in-memory dataset. + - πŸ—οΈ Layer: UI (Tests) + - Ζ’ **applyFilters** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **makeDataset** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **frontend.src.lib.components.reports.__tests__.reports_page.integration** (`Module`) + - πŸ“ Integration-style checks for unified mixed-type reports rendering expectations. + - πŸ—οΈ Layer: UI (Tests) + - πŸ”’ Invariant: Mixed fixture includes all supported report types in one list. + - Ζ’ **collectVisibleTypeLabels** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **frontend.src.lib.components.reports.__tests__.report_type_profiles** (`Module`) + - πŸ“ Validate report type profile mapping and unknown fallback behavior. + - πŸ—οΈ Layer: UI (Tests) + - πŸ”’ Invariant: Unknown task_type always resolves to the fallback profile. +- πŸ“¦ **frontend.src.lib.components.reports.__tests__.report_card.ux** (`Module`) + - πŸ“ Test UX states and transitions for ReportCard component + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Each test asserts at least one observable UX contract outcome. +- πŸ“¦ **frontend.src.lib.components.reports.__tests__.report_detail.ux** (`Module`) + - πŸ“ Test UX states and recovery for ReportDetailPanel component + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Detail UX tests keep placeholder-safe rendering and recovery visibility verifiable. +- πŸ“¦ **frontend.src.lib.components.reports.__tests__.report_detail.integration** (`Module`) + - πŸ“ Validate detail-panel behavior for failed reports and recovery guidance visibility. + - πŸ—οΈ Layer: UI (Tests) + - πŸ”’ Invariant: Failed report detail exposes actionable next actions when available. + - Ζ’ **buildFailedDetailFixture** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **reports.fixtures** (`Module`) + - πŸ“ Shared frontend fixtures for unified reports states. + - πŸ—οΈ Layer: UI +- 🧩 **Sidebar** (`Component`) `[CRITICAL]` + - πŸ“ Persistent left sidebar with resource categories navigation + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Always shows active category and item + - ⬅️ READS_FROM `app` + - ⬅️ READS_FROM `lib` + - ⬅️ READS_FROM `t` +- πŸ“¦ **Sidebar** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/lib/components/layout/Sidebar.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **buildCategories** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleItemClick** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleCategoryToggle** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSubItemClick** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleToggleClick** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleOverlayClick** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- 🧩 **TopNavbar** (`Component`) `[CRITICAL]` + - πŸ“ Unified top navigation bar with Logo, Search, Activity, and User menu + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Always visible on non-login pages + - ⚑ Events: activityClick + - ⬅️ READS_FROM `app` + - ⬅️ READS_FROM `lib` + - ⬅️ READS_FROM `sidebarStore` +- πŸ“¦ **TopNavbar** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/lib/components/layout/TopNavbar.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **toggleUserMenu** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **closeUserMenu** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleLogout** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleActivityClick** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleAssistantClick** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSearchFocus** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **clearSearchState** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleDocumentClick** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleHamburgerClick** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleGlobalEnvironmentChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **buildSearchResultSections** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **triggerSearch** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSearchInput** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **openSearchResult** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSearchKeydown** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- 🧩 **Breadcrumbs** (`Component`) + - πŸ“ Display page hierarchy navigation + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Always shows current page path + - ⬅️ READS_FROM `app` + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `props` +- πŸ“¦ **Breadcrumbs** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/lib/components/layout/Breadcrumbs.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **getBreadcrumbs** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **formatBreadcrumbLabel** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getCrumbMeta** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- 🧩 **TaskDrawer** (`Component`) `[CRITICAL]` + - πŸ“ Global task drawer for monitoring background operations + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Drawer shows logs for active task or remains closed + - ⬅️ READS_FROM `lib` + - ⬅️ READS_FROM `taskDrawerStore` + - ➑️ WRITES_TO `taskDrawerStore` + - Ζ’ **disconnectWebSocket** (`Function`) + - πŸ“ Disconnects the active WebSocket connection + - Ζ’ **loadRecentTasks** (`Function`) + - πŸ“ Load recent tasks for list mode display + - Ζ’ **selectTask** (`Function`) + - πŸ“ Select a task from list to view details + - Ζ’ **goBackToList** (`Function`) + - πŸ“ Return to task list view from task details +- πŸ“¦ **TaskDrawer** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/lib/components/layout/TaskDrawer.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **handleClose** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **goToReportsPage** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleGlobalKeydown** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **normalizeTaskId** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **isTaskFinished** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **resolveLlmValidationStatus** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **llmValidationBadgeClass** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **stopTaskDetailsPolling** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadEnvironmentOptions** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **resolveEnvironmentName** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **resolveEnvironmentId** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadActiveTaskDetails** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **extractPrimaryDashboardId** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **buildTaskSummary** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleOpenDashboardDeepLink** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleShowDiff** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleOpenLlmReport** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **connectWebSocket** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **test_breadcrumbs.svelte** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/lib/components/layout/__tests__/test_breadcrumbs.svelte.js + - πŸ—οΈ Layer: Unknown + - Ζ’ **getBreadcrumbs** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **formatBreadcrumbLabel** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **ErrorPage** (`Page`) + - πŸ“ Global error page displaying HTTP status and messages + - πŸ—οΈ Layer: UI +- πŸ“¦ **RootLayoutConfig** (`Module`) `[TRIVIAL]` + - πŸ“ Root layout configuration (SPA mode) + - πŸ—οΈ Layer: Infra +- πŸ“¦ **HomePage** (`Page`) `[CRITICAL]` + - πŸ“ Redirect to Dashboard Hub as per UX requirements + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Always redirects to /dashboards +- Ζ’ **load** (`Function`) + - πŸ“ Loads initial plugin data for the dashboard. +- πŸ“¦ **layout** (`Module`) + - πŸ“ Bind global layout shell and conditional login/full-app rendering. + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Login route bypasses shell; all other routes are wrapped by ProtectedRoute. +- πŸ“¦ **DatasetHub** (`Page`) `[CRITICAL]` + - πŸ“ Dataset Hub - Dedicated hub for datasets with mapping progress + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Always shows datasets for the active environment from context store +- πŸ“¦ **+page** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/routes/datasets/+page.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **loadDatasets** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSearch** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handlePageChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handlePageSizeChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **updateSelectionState** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleCheckboxChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSelectAll** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSelectVisible** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleAction** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleBulkMapColumns** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleBulkGenerateDocs** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleTaskStatusClick** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getTaskStatusIcon** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getMappingProgressClass** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **DatasetDetail** (`Page`) `[CRITICAL]` + - πŸ“ Dataset Detail View - Shows detailed dataset information with columns, SQL, and linked dashboards + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Always shows dataset details when loaded +- πŸ“¦ **+page** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/routes/datasets/[id]/+page.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **loadDatasetDetail** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **navigateToDashboard** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **goBack** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getColumnTypeClass** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getMappingProgress** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- 🧩 **UnifiedReportsPage** (`Component`) `[CRITICAL]` + - πŸ“ Unified reports page with filtering and resilient UX states for mixed task types. + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: List state remains deterministic for active filter set. + - ⬅️ READS_FROM `lib` + - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `t` +- πŸ“¦ **+page** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/routes/reports/+page.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **buildQuery** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadReports** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **hasActiveFilters** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **clearFilters** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **onFilterChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **onSelectReport** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **+page** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/routes/reports/llm/[taskId]/+page.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **formatDate** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **formatMs** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getDashboardCheckResult** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getCheckResultClasses** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadReport** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **backToReports** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **openTaskDetails** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- 🧩 **LoginPage** (`Component`) + - πŸ“ Provides the user interface for local and ADFS authentication. + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Shows both local login form and ADFS SSO button. + - ⬅️ READS_FROM `app` + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `t` + - Ζ’ **handleLogin** (`Function`) + - πŸ“ Submits the local login form to the backend. + - Ζ’ **handleADFSLogin** (`Function`) + - πŸ“ Redirects the user to the ADFS login endpoint. +- πŸ“¦ **StorageIndexPage** (`Page`) `[TRIVIAL]` + - πŸ“ Redirect to the backups page as the default storage view. + - πŸ—οΈ Layer: Page + - πŸ”’ Invariant: Always redirects to /storage/backups. +- πŸ“¦ **StorageReposPage** (`Page`) + - Ζ’ **fetchEnvironments** (`Function`) + - πŸ“ Fetches the list of available environments. + - Ζ’ **fetchDashboards** (`Function`) + - πŸ“ Fetches dashboards for a specific environment. +- πŸ“¦ **DashboardHub** (`Page`) `[CRITICAL]` + - πŸ“ Dashboard Hub - Central hub for managing dashboards with Git status and task actions + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Always shows dashboards for the active environment from context store +- πŸ“¦ **+page** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/routes/dashboards/+page.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **handleDocumentClick** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadDashboards** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSearch** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handlePageChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handlePageSizeChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **updateSelectionState** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleCheckboxChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSelectAll** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSelectVisible** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **toggleActionDropdown** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **closeActionDropdown** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleAction** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleValidate** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleTargetEnvChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadDatabases** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleMappingUpdate** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadDbMappings** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleBulkMigrate** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleBulkBackup** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleTaskStatusClick** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **navigateToDashboardDetail** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getStatusBadgeClass** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **isGitBusy** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **setGitBusy** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **ensureGitConfigs** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **updateDashboardGitState** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **refreshDashboardGitState** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleGitInit** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleGitSync** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleGitCommit** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleGitPull** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleGitPush** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getTaskStatusIcon** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getPaginationRange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **DashboardDetail** (`Page`) `[CRITICAL]` + - πŸ“ Dashboard Detail View - Overview of charts and datasets linked to a dashboard + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Shows dashboard metadata, charts, and datasets for selected environment +- πŸ“¦ **+page** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/routes/dashboards/[id]/+page.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **loadDashboardPage** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadDashboardDetail** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadTaskHistory** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **releaseThumbnailUrl** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadThumbnail** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **runBackupTask** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **runLlmValidationTask** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **openLlmReport** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **toTaskTypeLabel** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getTaskStatusClasses** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getValidationStatus** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getValidationStatusClasses** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **goBack** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **openDataset** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **formatDate** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadLlmStatus** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- 🧩 **AdminRolesPage** (`Component`) + - πŸ“ UI for managing system roles and their permissions. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: Only accessible by users with Admin role. + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `t` + - ⬅️ READS_FROM `t` + - Ζ’ **loadData** (`Function`) + - πŸ“ Fetches roles and available permissions. + - Ζ’ **openCreateModal** (`Function`) + - πŸ“ Initializes state for creating a new role. + - Ζ’ **openEditModal** (`Function`) + - πŸ“ Initializes state for editing an existing role. + - Ζ’ **handleSaveRole** (`Function`) + - πŸ“ Submits role data (create or update). + - Ζ’ **handleDeleteRole** (`Function`) + - πŸ“ Deletes a role after confirmation. +- 🧩 **AdminUsersPage** (`Component`) + - πŸ“ UI for managing system users and their roles. + - πŸ—οΈ Layer: Feature + - πŸ”’ Invariant: Only accessible by users with "admin:users" permission. + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `t` + - ⬅️ READS_FROM `t` + - Ζ’ **loadData** (`Function`) + - πŸ“ Fetches users and roles from the backend. + - Ζ’ **openCreateModal** (`Function`) + - πŸ“ Prepares the form for creating a new user. + - Ζ’ **openEditModal** (`Function`) + - πŸ“ Prepares the form for editing an existing user. + - Ζ’ **handleSaveUser** (`Function`) + - πŸ“ Submits user data to the backend (create or update). + - Ζ’ **handleDeleteUser** (`Function`) + - πŸ“ Deletes a user after confirmation. +- 🧩 **AdminSettingsPage** (`Component`) + - πŸ“ UI for configuring Active Directory Group to local Role mappings for ADFS SSO and logging settings. + - πŸ—οΈ Layer: Feature + - πŸ”’ Invariant: Only accessible by users with "admin:settings" permission. + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `t` + - ⬅️ READS_FROM `t` + - Ζ’ **loadData** (`Function`) + - πŸ“ Fetches AD mappings and roles from the backend to populate the UI. + - Ζ’ **handleCreateMapping** (`Function`) + - πŸ“ Submits a new AD Group to Role mapping to the backend. + - Ζ’ **loadLoggingConfig** (`Function`) + - πŸ“ Fetches current logging configuration from the backend. + - Ζ’ **saveLoggingConfig** (`Function`) + - πŸ“ Saves logging configuration to the backend. +- 🧩 **LLMSettingsPage** (`Component`) + - πŸ“ Admin settings page for LLM provider configuration. + - πŸ—οΈ Layer: UI + - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `t` +- πŸ“¦ **+page** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/routes/admin/settings/llm/+page.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **isMultimodalModel** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getProviderById** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **fetchProviders** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **saveSettings** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- 🧩 **MigrationDashboard** (`Component`) + - πŸ“ Main dashboard for configuring and starting migrations. + - πŸ—οΈ Layer: Page + - πŸ”’ Invariant: Migration cannot start without source and target environments. + - ⬅️ READS_FROM `lib` + - ⬅️ READS_FROM `selectedTask` + - ➑️ WRITES_TO `selectedTask` + - Ζ’ **fetchEnvironments** (`Function`) + - πŸ“ Fetches the list of environments from the API. + - Ζ’ **fetchDashboards** (`Function`) + - πŸ“ Fetches dashboards for the selected source environment. + - Ζ’ **fetchDatabases** (`Function`) + - πŸ“ Fetches databases from both environments and gets suggestions. + - Ζ’ **handleMappingUpdate** (`Function`) + - πŸ“ Saves a mapping to the backend. + - Ζ’ **handleViewLogs** (`Function`) + - πŸ“ Opens the log viewer for a specific task. + - Ζ’ **handlePasswordPrompt** (`Function`) + - πŸ“ Reactive logic to show password prompt when a task is awaiting input. + - Ζ’ **handleResumeMigration** (`Function`) + - πŸ“ Resumes a migration task with provided passwords. + - Ζ’ **startMigration** (`Function`) + - πŸ“ Starts the migration process. + - 🧩 **DashboardSelectionSection** (`Component`) +- 🧩 **MappingManagement** (`Component`) + - πŸ“ Page for managing database mappings between environments. + - πŸ—οΈ Layer: Page + - πŸ”’ Invariant: Mappings are saved to the backend for persistence. + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `t` + - ⬅️ READS_FROM `t` + - Ζ’ **fetchEnvironments** (`Function`) + - πŸ“ Fetches the list of environments. + - Ζ’ **fetchDatabases** (`Function`) + - πŸ“ 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: UI + - πŸ”’ Invariant: Always displays tabs for Backups and Repositories. + - ⬅️ READS_FROM `app` + - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `page` + - Ζ’ **loadFiles** (`Function`) + - πŸ“ Fetches the list of files from the server. + - Ζ’ **handleDelete** (`Function`) + - πŸ“ 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. +- 🧩 **MapperPage** (`Component`) `[TRIVIAL]` + - πŸ“ Page for the dataset column mapper tool. + - πŸ—οΈ Layer: UI + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `t` +- 🧩 **DebugPage** (`Component`) `[TRIVIAL]` + - πŸ“ Page for system diagnostics and debugging. + - πŸ—οΈ Layer: UI + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `t` +- πŸ“¦ **SettingsPage** (`Page`) `[CRITICAL]` + - πŸ“ Consolidated Settings Page - All settings in one place with tabbed navigation + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Always shows tabbed interface with all settings categories +- πŸ“¦ **+page** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/routes/settings/+page.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **normalizeTab** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **readTabFromUrl** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **writeTabToUrl** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadSettings** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **normalizeLlmSettings** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **isMultimodalModel** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getProviderById** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **isDashboardValidationBindingValid** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleTabChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadMigrationSettings** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **loadMappingsPage** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **onMappingsSearchInput** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **onMappingsFilterChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **goToMappingsPage** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **saveMigrationSettings** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **triggerSyncNow** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSave** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleTestEnv** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **editEnv** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **resetEnvForm** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleAddOrUpdateEnv** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleDeleteEnv** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- Ζ’ **load** (`Function`) + - πŸ“ Loads application settings and environment list. +- 🧩 **ConnectionsSettingsPage** (`Component`) + - πŸ“ Page for managing database connection configurations. + - πŸ—οΈ Layer: UI + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `t` + - Ζ’ **handleSuccess** (`Function`) + - πŸ“ Refreshes the connection list after a successful creation. +- 🧩 **GitSettingsPage** (`Component`) + - πŸ“ Manage Git server configurations for dashboard versioning. + - πŸ—οΈ Layer: Page + - πŸ”’ Invariant: All configurations must be validated via connection test. + - ⬅️ READS_FROM `lib` + - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `t` + - Ζ’ **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 + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `environmentContextStore` + - ⬅️ READS_FROM `environmentContextStore` + - Ζ’ **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 + - ⬅️ READS_FROM `plugins` + - Ζ’ **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 + - πŸ”’ Invariant: Settings changes must be saved to the backend. + - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `t` + - Ζ’ **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). +- πŸ“¦ **adminService** (`Module`) + - πŸ“ Service for Admin-related API calls (User and Role management). + - πŸ—οΈ Layer: Service + - πŸ”’ Invariant: All requests must include valid Admin JWT token (handled by api client). + - πŸ”— DEPENDS_ON -> `frontend.src.lib.api` + - Ζ’ **getUsers** (`Function`) + - πŸ“ Fetches all registered users from the backend. + - Ζ’ **createUser** (`Function`) + - πŸ“ Creates a new local user. + - Ζ’ **getRoles** (`Function`) + - πŸ“ Fetches all available system roles. + - Ζ’ **getADGroupMappings** (`Function`) + - πŸ“ Fetches mappings between AD groups and local roles. + - Ζ’ **createADGroupMapping** (`Function`) + - πŸ“ Creates or updates an AD group to Role mapping. + - Ζ’ **updateUser** (`Function`) + - πŸ“ Updates an existing user. + - Ζ’ **deleteUser** (`Function`) + - πŸ“ Deletes a user. + - Ζ’ **createRole** (`Function`) + - πŸ“ Creates a new role. + - Ζ’ **updateRole** (`Function`) + - πŸ“ Updates an existing role. + - Ζ’ **deleteRole** (`Function`) + - πŸ“ Deletes a role. + - Ζ’ **getPermissions** (`Function`) + - πŸ“ Fetches all available permissions. + - Ζ’ **getLoggingConfig** (`Function`) + - πŸ“ Fetches current logging configuration. + - Ζ’ **updateLoggingConfig** (`Function`) + - πŸ“ Updates logging 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. +- πŸ“¦ **storageService** (`Module`) + - πŸ“ Frontend API client for file storage management. + - πŸ—οΈ Layer: Service + - Ζ’ **getStorageAuthHeaders** (`Function`) + - πŸ“ Returns headers with Authorization for storage API calls. + - Ζ’ **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 + - ⚑ Events: cancel, resume + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` + - ⬅️ READS_FROM `effect` + - Ζ’ **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 + - πŸ”’ Invariant: Each source database can be mapped to one target database. + - ⚑ Events: update + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `t` + - Ζ’ **updateMapping** (`Function`) + - πŸ“ Updates a mapping for a specific source database. + - Ζ’ **getSuggestion** (`Function`) + - πŸ“ Finds a suggestion for a source database. +- 🧩 **TaskLogViewer** (`Component`) `[CRITICAL]` + - πŸ“ Displays detailed logs for a specific task inline or in a modal using TaskLogPanel. + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Real-time logs are always appended without duplicates. + - ⚑ Events: close + - ➑️ WRITES_TO `bindable` + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` + - πŸ“¦ **handleRealTimeLogs** (`Action`) + - πŸ“ Sync real-time logs to the current log list + - Ζ’ **fetchLogs** (`Function`) + - πŸ“ Fetches logs for a given task ID + - Ζ’ **handleFilterChange** (`Function`) + - πŸ“ Updates filter conditions for the log viewer + - Ζ’ **handleRefresh** (`Function`) + - πŸ“ Refreshes the logs by polling the API + - 🧩 **showInline** (`Component`) + - πŸ“ Shows inline logs --> + - πŸ—οΈ Layer: UI --> + - 🧩 **showModal** (`Component`) + - πŸ“ Shows modal logs --> + - πŸ—οΈ Layer: UI --> +- 🧩 **Footer** (`Component`) `[TRIVIAL]` + - πŸ“ 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 + - πŸ”’ Invariant: Modal blocks migration progress until resolved or cancelled. + - ⚑ Events: cancel, resolve + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` + - Ζ’ **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 + - πŸ”’ Invariant: Selected IDs must be a subset of available dashboards. + - ⚑ Events: selectionChanged + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` + - ➑️ WRITES_TO `derived` + - Ζ’ **handleValidate** (`Function`) + - πŸ“ Triggers dashboard validation task. + - Ζ’ **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 + - ⬅️ READS_FROM `app` + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `page` +- πŸ“¦ **Navbar** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/components/Navbar.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **handleLogout** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- 🧩 **TaskHistory** (`Component`) + - πŸ“ Displays a list of recent tasks with their status and allows selecting them for viewing logs. + - πŸ—οΈ Layer: UI + - ⬅️ READS_FROM `selectedTask` + - ➑️ WRITES_TO `selectedTask` + - ⬅️ READS_FROM `t` + - Ζ’ **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`) `[TRIVIAL]` + - πŸ“ Displays transient notifications (toasts) in the bottom-right corner. + - πŸ—οΈ Layer: UI + - ⬅️ READS_FROM `toasts` +- 🧩 **TaskRunner** (`Component`) + - πŸ“ Connects to a WebSocket to display real-time logs for a running task with filtering support. + - πŸ—οΈ Layer: UI + - ⬅️ READS_FROM `t` + - ⬅️ READS_FROM `selectedTask` + - ➑️ WRITES_TO `t` + - Ζ’ **connect** (`Function`) + - πŸ“ Establishes WebSocket connection with exponential backoff and filter parameters. + - Ζ’ **handleFilterChange** (`Function`) + - πŸ“ Handles filter changes and reconnects WebSocket with new parameters. + - Ζ’ **fetchTargetDatabases** (`Function`) + - πŸ“ Fetches available databases from target environment for mapping. + - Ζ’ **handleMappingResolve** (`Function`) + - πŸ“ Resolves missing database mapping and continues migration. + - Ζ’ **handlePasswordResume** (`Function`) + - πŸ“ Submits passwords and resumes paused migration task. + - Ζ’ **startDataTimeout** (`Function`) + - πŸ“ Starts timeout timer to detect idle connection. + - Ζ’ **resetDataTimeout** (`Function`) + - πŸ“ Resets data timeout timer when new data arrives. + - Ζ’ **onMount** (`Function`) + - πŸ“ Initializes WebSocket connection when component mounts. + - Ζ’ **onDestroy** (`Function`) +- 🧩 **TaskList** (`Component`) + - πŸ“ Displays a list of tasks with their status and execution details. + - πŸ—οΈ Layer: Component + - ⚑ Events: select + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `t` + - ⬅️ READS_FROM `t` + - Ζ’ **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 + - ⚑ Events: submit + - ➑️ WRITES_TO `props` + - Ζ’ **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 + - πŸ”’ Invariant: Source and target environments must be selectable from the list of configured environments. + - ⚑ Events: change + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `t` + - Ζ’ **handleSelect** (`Function`) + - πŸ“ Dispatches the selection change event. +- 🧩 **ProtectedRoute** (`Component`) `[TRIVIAL]` + - πŸ“ Wraps content to ensure only authenticated users can access it. + - πŸ—οΈ Layer: Component + - πŸ”’ Invariant: Redirects to /login if user is not authenticated. + - ⬅️ READS_FROM `app` + - ⬅️ READS_FROM `auth` +- 🧩 **TaskLogPanel** (`Component`) + - πŸ“ Combines log filtering and display into a single cohesive dark-themed panel. + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Must always display logs in chronological order and respect auto-scroll preference. + - ⚑ Events: filterChange + - ➑️ WRITES_TO `bindable` + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` +- πŸ“¦ **TaskLogPanel** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/components/tasks/TaskLogPanel.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **filterLogs** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleFilterChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **scrollToBottom** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **toggleAutoScroll** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- 🧩 **LogFilterBar** (`Component`) + - πŸ“ Compact filter toolbar for logs β€” level, source, and text search in a single dense row. + - πŸ—οΈ Layer: UI + - ➑️ WRITES_TO `bindable` + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `derived` +- πŸ“¦ **LogFilterBar** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/components/tasks/LogFilterBar.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **handleLevelChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSourceChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSearchChange** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **clearFilters** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- 🧩 **LogEntryRow** (`Component`) + - πŸ“ Renders a single log entry with stacked layout optimized for narrow drawer panels. + - πŸ—οΈ Layer: UI + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `derived` + - Ζ’ **formatTime** (`Function`) + - πŸ“ Format ISO timestamp to HH:MM:SS */ +- πŸ“¦ **TaskResultPanel** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/components/tasks/TaskResultPanel.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **statusColor** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **frontend.src.components.__tests__.task_log_viewer** (`Module`) + - πŸ“ Unit tests for TaskLogViewer component by mounting it and observing the DOM. + - πŸ—οΈ Layer: UI (Tests) + - πŸ”’ Invariant: Duplicate logs are never appended. Polling only active for in-progress tasks. +- 🧩 **FileList** (`Component`) + - πŸ“ Displays a table of files with metadata and actions. + - πŸ—οΈ Layer: UI + - ⚑ Events: delete, navigate + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `t` + - ⬅️ READS_FROM `t` + - Ζ’ **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: UI + - ⚑ Events: uploaded + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` + - ⬅️ READS_FROM `t` + - Ζ’ **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 + - ⚑ Events: success + - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `t` + - Ζ’ **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 + - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `t` + - Ζ’ **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 + - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `t` + - Ζ’ **fetchData** (`Function`) + - πŸ“ Fetches environments and saved connections. + - Ζ’ **handleRunMapper** (`Function`) + - πŸ“ Triggers the MapperPlugin task. + - Ζ’ **handleGenerateDocs** (`Function`) + - πŸ“ Triggers the LLM Documentation task. +- πŸ“¦ **MapperTool** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/components/tools/MapperTool.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **handleApplyDoc** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- 🧩 **DebugTool** (`Component`) + - πŸ“ UI component for system diagnostics and debugging API responses. + - πŸ—οΈ Layer: UI + - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `t` + - Ζ’ **fetchEnvironments** (`Function`) + - πŸ“ Fetches available environments. + - Ζ’ **handleRunDebug** (`Function`) + - πŸ“ Triggers the debug task. + - Ζ’ **startPolling** (`Function`) + - πŸ“ Polls for task completion. +- 🧩 **CommitHistory** (`Component`) + - πŸ“ Displays the commit history for a specific dashboard. + - πŸ—οΈ Layer: Component + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` + - ⬅️ READS_FROM `t` + - Ζ’ **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 + - πŸ”’ Invariant: Cannot deploy without a selected environment. + - ⚑ Events: deploy + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` + - ⬅️ READS_FROM `effect` + - πŸ“¦ **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 + - πŸ”’ Invariant: User must resolve all conflicts before saving. + - ⚑ Events: resolve + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` + - Ζ’ **resolve** (`Function`) + - πŸ“ Set resolution strategy for a file. + - Ζ’ **handleSave** (`Function`) + - πŸ“ Validate and submit resolutions. +- 🧩 **CommitModal** (`Component`) + - πŸ“ МодальноС ΠΎΠΊΠ½ΠΎ для создания ΠΊΠΎΠΌΠΌΠΈΡ‚Π° с просмотром ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ (diff). + - πŸ—οΈ Layer: Component + - ⚑ Events: commit + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` + - ⬅️ READS_FROM `t` + - Ζ’ **handleGenerateMessage** (`Function`) + - πŸ“ Generates a commit message using LLM. + - Ζ’ **loadStatus** (`Function`) + - πŸ“ Π—Π°Π³Ρ€ΡƒΠΆΠ°Π΅Ρ‚ Ρ‚Π΅ΠΊΡƒΡ‰ΠΈΠΉ статус рСпозитория ΠΈ diff. + - Ζ’ **handleCommit** (`Function`) + - πŸ“ Π‘ΠΎΠ·Π΄Π°Π΅Ρ‚ ΠΊΠΎΠΌΠΌΠΈΡ‚ с ΡƒΠΊΠ°Π·Π°Π½Π½Ρ‹ΠΌ сообщСниСм. +- 🧩 **BranchSelector** (`Component`) + - πŸ“ UI для Π²Ρ‹Π±ΠΎΡ€Π° ΠΈ создания Π²Π΅Ρ‚ΠΎΠΊ Git. + - πŸ—οΈ Layer: Component + - ⚑ Events: change + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` + - ⬅️ READS_FROM `t` + - Ζ’ **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 + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` + - ⬅️ READS_FROM `t` + - Ζ’ **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. +- 🧩 **DocPreview** (`Component`) + - πŸ“ UI component for previewing generated dataset documentation before saving. + - πŸ—οΈ Layer: UI + - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `derived` + - ➑️ WRITES_TO `state` +- πŸ“¦ **DocPreview** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/components/llm/DocPreview.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **handleSave** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- 🧩 **ProviderConfig** (`Component`) + - πŸ“ UI form for managing LLM provider configurations. + - πŸ—οΈ Layer: UI + - πŸ“₯ Props: providers: any, onSave: any + - ➑️ WRITES_TO `t` + - ⬅️ READS_FROM `t` +- πŸ“¦ **ProviderConfig** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/components/llm/ProviderConfig.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **isMultimodalModel** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **resetForm** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleEdit** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **testConnection** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleSubmit** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **toggleActive** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **ValidationReport** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/components/llm/ValidationReport.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **getStatusColor** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **frontend.src.components.llm.__tests__.provider_config_integration** (`Module`) + - πŸ“ Protect edit-button interaction contract in LLM provider settings UI. + - πŸ—οΈ Layer: UI Tests + - πŸ”’ Invariant: Edit action keeps explicit click handler and opens normalized edit form. + - Ζ’ **provider_config_edit_contract_tests** (`Function`) + - πŸ“ Validate edit button handler wiring and normalized edit form state mapping. +- πŸ“¦ **test_auth_debug** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for backend/test_auth_debug.py + - πŸ—οΈ Layer: Unknown + - Ζ’ **main** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **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. +- πŸ“¦ **AppModule** (`Module`) `[CRITICAL]` + - πŸ“ 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) + - πŸ”’ Invariant: All WebSocket connections must be properly cleaned up on disconnect. + - πŸ“¦ **App** (`Global`) + - πŸ“ The global FastAPI application instance. + - Ζ’ **startup_event** (`Function`) + - πŸ“ Handles application startup tasks, such as starting the scheduler. + - Ζ’ **shutdown_event** (`Function`) + - πŸ“ Handles application shutdown tasks, such as stopping the scheduler. + - Ζ’ **network_error_handler** (`Function`) + - πŸ“ Global exception handler for NetworkError. + - Ζ’ **log_requests** (`Function`) + - πŸ“ Middleware to log incoming HTTP requests and their response status. + - πŸ“¦ **api.include_routers** (`Action`) + - πŸ“ Registers all API routers with the FastAPI application. + - πŸ—οΈ Layer: API + - Ζ’ **websocket_endpoint** (`Function`) `[CRITICAL]` + - πŸ“ Provides a WebSocket endpoint for real-time log streaming of a task with server-side filtering. + - πŸ“¦ **StaticFiles** (`Mount`) + - πŸ“ Mounts the frontend build directory to serve static assets. + - Ζ’ **serve_spa** (`Function`) + - πŸ“ Serves the SPA frontend for any path not matched by API routes. + - Ζ’ **read_root** (`Function`) + - πŸ“ A simple root endpoint to confirm that the API is running when frontend is missing. + - Ζ’ **matches_filters** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **Dependencies** (`Module`) + - πŸ“ Manages creation and provision of shared application dependencies, such as PluginLoader and TaskManager, to avoid circular imports. + - πŸ—οΈ Layer: Core + - Ζ’ **get_config_manager** (`Function`) + - πŸ“ Dependency injector for ConfigManager. + - Ζ’ **get_plugin_loader** (`Function`) + - πŸ“ Dependency injector for PluginLoader. + - Ζ’ **get_task_manager** (`Function`) + - πŸ“ Dependency injector for TaskManager. + - Ζ’ **get_scheduler_service** (`Function`) + - πŸ“ Dependency injector for SchedulerService. + - Ζ’ **get_resource_service** (`Function`) + - πŸ“ Dependency injector for ResourceService. + - Ζ’ **get_mapping_service** (`Function`) + - πŸ“ Dependency injector for MappingService. + - πŸ“¦ **oauth2_scheme** (`Variable`) + - πŸ“ OAuth2 password bearer scheme for token extraction. + - Ζ’ **get_current_user** (`Function`) + - πŸ“ Dependency for retrieving currently authenticated user from a JWT. + - Ζ’ **has_permission** (`Function`) + - πŸ“ Dependency for checking if the current user has a specific permission. + - Ζ’ **permission_checker** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.scripts.seed_superset_load_test** (`Module`) + - πŸ“ Creates randomized load-test data in Superset by cloning chart configurations and creating dashboards in target environments. + - πŸ—οΈ Layer: Scripts + - πŸ”’ Invariant: Created chart and dashboard names are globally unique for one script run. + - Ζ’ **_parse_args** (`Function`) + - πŸ“ Parses CLI arguments for load-test data generation. + - Ζ’ **_extract_result_payload** (`Function`) + - πŸ“ Normalizes Superset API payloads that may be wrapped in `result`. + - Ζ’ **_extract_created_id** (`Function`) + - πŸ“ Extracts object ID from create/update API response. + - Ζ’ **_generate_unique_name** (`Function`) + - πŸ“ Generates globally unique random names for charts/dashboards. + - Ζ’ **_resolve_target_envs** (`Function`) + - πŸ“ Resolves requested environment IDs from configuration. + - Ζ’ **_build_chart_template_pool** (`Function`) + - πŸ“ Builds a pool of source chart templates to clone in one environment. + - Ζ’ **seed_superset_load_data** (`Function`) + - πŸ“ Creates dashboards and cloned charts for load testing across target environments. + - Ζ’ **main** (`Function`) + - πŸ“ CLI entrypoint for Superset load-test data seeding. +- πŸ“¦ **test_dataset_dashboard_relations** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for backend/src/scripts/test_dataset_dashboard_relations.py + - πŸ—οΈ Layer: Unknown + - Ζ’ **test_dashboard_dataset_relations** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.scripts.migrate_sqlite_to_postgres** (`Module`) + - πŸ“ Migrates legacy config and task history from SQLite/file storage to PostgreSQL. + - πŸ—οΈ Layer: Scripts + - πŸ”’ Invariant: Script is idempotent for task_records and app_configurations. + - πŸ“¦ **Constants** (`Section`) + - Ζ’ **_json_load_if_needed** (`Function`) + - πŸ“ Parses JSON-like values from SQLite TEXT/JSON columns to Python objects. + - Ζ’ **_find_legacy_config_path** (`Function`) + - πŸ“ Resolves the existing legacy config.json path from candidates. + - Ζ’ **_connect_sqlite** (`Function`) + - πŸ“ Opens a SQLite connection with row factory. + - Ζ’ **_ensure_target_schema** (`Function`) + - πŸ“ Ensures required PostgreSQL tables exist before migration. + - Ζ’ **_migrate_config** (`Function`) + - πŸ“ Migrates legacy config.json into app_configurations(global). + - Ζ’ **_migrate_tasks_and_logs** (`Function`) + - πŸ“ Migrates task_records and task_logs from SQLite into PostgreSQL. + - Ζ’ **run_migration** (`Function`) + - πŸ“ Orchestrates migration from SQLite/file to PostgreSQL. + - Ζ’ **main** (`Function`) + - πŸ“ CLI entrypoint. +- πŸ“¦ **backend.src.scripts.seed_permissions** (`Module`) + - πŸ“ Populates the auth database with initial system permissions. + - πŸ—οΈ Layer: Scripts + - πŸ”’ Invariant: Safe to run multiple times (idempotent). + - πŸ“¦ **INITIAL_PERMISSIONS** (`Constant`) + - Ζ’ **seed_permissions** (`Function`) + - πŸ“ Inserts missing permissions into the database. +- πŸ“¦ **backend.src.scripts.init_auth_db** (`Module`) + - πŸ“ Initializes the auth database and creates the necessary tables. + - πŸ—οΈ Layer: Scripts + - πŸ”’ Invariant: Safe to run multiple times (idempotent). + - πŸ”— CALLS -> `backend.src.core.database.init_db` + - Ζ’ **run_init** (`Function`) + - πŸ“ Main entry point for the initialization script. +- πŸ“¦ **backend.src.scripts.create_admin** (`Module`) + - πŸ“ CLI tool for creating the initial admin user. + - πŸ—οΈ Layer: Scripts + - πŸ”’ Invariant: Admin user must have the "Admin" role. + - Ζ’ **create_admin** (`Function`) + - πŸ“ Creates an admin user and necessary roles/permissions. +- πŸ“¦ **backend.src.schemas.auth** (`Module`) + - πŸ“ Pydantic schemas for authentication requests and responses. + - πŸ—οΈ Layer: API + - πŸ”’ Invariant: Sensitive fields like password must not be included in response schemas. + - πŸ”— DEPENDS_ON -> `pydantic` + - β„‚ **Token** (`Class`) `[TRIVIAL]` + - πŸ“ Represents a JWT access token response. + - β„‚ **TokenData** (`Class`) `[TRIVIAL]` + - πŸ“ Represents the data encoded in a JWT token. + - β„‚ **PermissionSchema** (`Class`) `[TRIVIAL]` + - πŸ“ Represents a permission in API responses. + - β„‚ **RoleSchema** (`Class`) + - πŸ“ Represents a role in API responses. + - β„‚ **RoleCreate** (`Class`) + - πŸ“ Schema for creating a new role. + - β„‚ **RoleUpdate** (`Class`) + - πŸ“ Schema for updating an existing role. + - β„‚ **ADGroupMappingSchema** (`Class`) + - πŸ“ Represents an AD Group to Role mapping in API responses. + - β„‚ **ADGroupMappingCreate** (`Class`) + - πŸ“ Schema for creating an AD Group mapping. + - β„‚ **UserBase** (`Class`) + - πŸ“ Base schema for user data. + - β„‚ **UserCreate** (`Class`) + - πŸ“ Schema for creating a new user. + - β„‚ **UserUpdate** (`Class`) + - πŸ“ Schema for updating an existing user. + - β„‚ **User** (`Class`) + - πŸ“ Schema for user data in API responses. +- πŸ“¦ **backend.src.core.superset_client** (`Module`) + - πŸ“ ΠŸΡ€Π΅Π΄ΠΎΡΡ‚Π°Π²Π»ΡΠ΅Ρ‚ высокоуровнСвый ΠΊΠ»ΠΈΠ΅Π½Ρ‚ для взаимодСйствия с Superset REST API, инкапсулируя Π»ΠΎΠ³ΠΈΠΊΡƒ запросов, ΠΎΠ±Ρ€Π°Π±ΠΎΡ‚ΠΊΡƒ ошибок ΠΈ ΠΏΠ°Π³ΠΈΠ½Π°Ρ†ΠΈΡŽ. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: All network operations must use the internal APIClient instance. + - β„‚ **SupersetClient** (`Class`) + - πŸ“ Класс-ΠΎΠ±Ρ‘Ρ€Ρ‚ΠΊΠ° Π½Π°Π΄ Superset REST API, ΠΏΡ€Π΅Π΄ΠΎΡΡ‚Π°Π²Π»ΡΡŽΡ‰ΠΈΠΉ ΠΌΠ΅Ρ‚ΠΎΠ΄Ρ‹ для Ρ€Π°Π±ΠΎΡ‚Ρ‹ с Π΄Π°ΡˆΠ±ΠΎΡ€Π΄Π°ΠΌΠΈ ΠΈ датасСтами. + - Ζ’ **__init__** (`Function`) + - πŸ“ Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·ΠΈΡ€ΡƒΠ΅Ρ‚ ΠΊΠ»ΠΈΠ΅Π½Ρ‚, провСряСт ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΡŽ ΠΈ создаСт сСтСвой ΠΊΠ»ΠΈΠ΅Π½Ρ‚. + - Ζ’ **authenticate** (`Function`) + - πŸ“ Authenticates the client using the configured credentials. + - Ζ’ **headers** (`Function`) + - πŸ“ Π’ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ Π±Π°Π·ΠΎΠ²Ρ‹Π΅ HTTP-Π·Π°Π³ΠΎΠ»ΠΎΠ²ΠΊΠΈ, ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅ΠΌΡ‹Π΅ сСтСвым ΠΊΠ»ΠΈΠ΅Π½Ρ‚ΠΎΠΌ. + - Ζ’ **get_dashboards** (`Function`) + - πŸ“ ΠŸΠΎΠ»ΡƒΡ‡Π°Π΅Ρ‚ ΠΏΠΎΠ»Π½Ρ‹ΠΉ список Π΄Π°ΡˆΠ±ΠΎΡ€Π΄ΠΎΠ², автоматичСски обрабатывая ΠΏΠ°Π³ΠΈΠ½Π°Ρ†ΠΈΡŽ. + - Ζ’ **get_dashboards_summary** (`Function`) + - πŸ“ Fetches dashboard metadata optimized for the grid. + - Ζ’ **get_dashboard** (`Function`) + - πŸ“ Fetches a single dashboard by ID. + - Ζ’ **get_chart** (`Function`) + - πŸ“ Fetches a single chart by ID. + - Ζ’ **get_dashboard_detail** (`Function`) + - πŸ“ Fetches detailed dashboard information including related charts and datasets. + - Ζ’ **_extract_chart_ids_from_layout** (`Function`) + - πŸ“ Traverses dashboard layout metadata and extracts chart IDs from common keys. + - Ζ’ **export_dashboard** (`Function`) + - πŸ“ ЭкспортируСт Π΄Π°ΡˆΠ±ΠΎΡ€Π΄ Π² Π²ΠΈΠ΄Π΅ ZIP-Π°Ρ€Ρ…ΠΈΠ²Π°. + - Ζ’ **import_dashboard** (`Function`) + - πŸ“ Π˜ΠΌΠΏΠΎΡ€Ρ‚ΠΈΡ€ΡƒΠ΅Ρ‚ Π΄Π°ΡˆΠ±ΠΎΡ€Π΄ ΠΈΠ· ZIP-Ρ„Π°ΠΉΠ»Π°. + - Ζ’ **delete_dashboard** (`Function`) + - πŸ“ УдаляСт Π΄Π°ΡˆΠ±ΠΎΡ€Π΄ ΠΏΠΎ Π΅Π³ΠΎ ID ΠΈΠ»ΠΈ slug. + - Ζ’ **get_datasets** (`Function`) + - πŸ“ ΠŸΠΎΠ»ΡƒΡ‡Π°Π΅Ρ‚ ΠΏΠΎΠ»Π½Ρ‹ΠΉ список датасСтов, автоматичСски обрабатывая ΠΏΠ°Π³ΠΈΠ½Π°Ρ†ΠΈΡŽ. + - Ζ’ **get_datasets_summary** (`Function`) + - πŸ“ Fetches dataset metadata optimized for the Dataset Hub grid. + - Ζ’ **get_dataset_detail** (`Function`) + - πŸ“ Fetches detailed dataset information including columns and linked dashboards + - πŸ”— CALLS -> `self.get_dataset` + - πŸ”— CALLS -> `self.network.request (for related_objects)` + - Ζ’ **get_dataset** (`Function`) + - πŸ“ ΠŸΠΎΠ»ΡƒΡ‡Π°Π΅Ρ‚ ΠΈΠ½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΡŽ ΠΎ ΠΊΠΎΠ½ΠΊΡ€Π΅Ρ‚Π½ΠΎΠΌ датасСтС ΠΏΠΎ Π΅Π³ΠΎ ID. + - Ζ’ **update_dataset** (`Function`) + - πŸ“ ΠžΠ±Π½ΠΎΠ²Π»ΡΠ΅Ρ‚ Π΄Π°Π½Π½Ρ‹Π΅ датасСта ΠΏΠΎ Π΅Π³ΠΎ ID. + - Ζ’ **get_databases** (`Function`) + - πŸ“ ΠŸΠΎΠ»ΡƒΡ‡Π°Π΅Ρ‚ ΠΏΠΎΠ»Π½Ρ‹ΠΉ список Π±Π°Π· Π΄Π°Π½Π½Ρ‹Ρ…. + - Ζ’ **get_database** (`Function`) + - πŸ“ ΠŸΠΎΠ»ΡƒΡ‡Π°Π΅Ρ‚ ΠΈΠ½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΡŽ ΠΎ ΠΊΠΎΠ½ΠΊΡ€Π΅Ρ‚Π½ΠΎΠΉ Π±Π°Π·Π΅ Π΄Π°Π½Π½Ρ‹Ρ… ΠΏΠΎ Π΅Ρ‘ ID. + - Ζ’ **get_databases_summary** (`Function`) + - πŸ“ Fetch a summary of databases including uuid, name, and engine. + - Ζ’ **get_database_by_uuid** (`Function`) + - πŸ“ Find a database by its UUID. + - Ζ’ **_resolve_target_id_for_delete** (`Function`) + - πŸ“ Resolves a dashboard ID from either an ID or a slug. + - Ζ’ **_do_import** (`Function`) + - πŸ“ Performs the actual multipart upload for import. + - Ζ’ **_validate_export_response** (`Function`) + - πŸ“ Validates that the export response is a non-empty ZIP archive. + - Ζ’ **_resolve_export_filename** (`Function`) + - πŸ“ Determines the filename for an exported dashboard. + - Ζ’ **_validate_query_params** (`Function`) + - πŸ“ Ensures query parameters have default page and page_size. + - Ζ’ **_fetch_total_object_count** (`Function`) + - πŸ“ Fetches the total number of items for a given endpoint. + - Ζ’ **_fetch_all_pages** (`Function`) + - πŸ“ 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. + - Ζ’ **get_all_resources** (`Function`) + - πŸ“ Fetches all resources of a given type with id, uuid, and name columns. + - Ζ’ **extract_dataset_id_from_form_data** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **walk** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **as_bool** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **ConfigManagerModule** (`Module`) + - πŸ“ Manages application configuration persisted in database with one-time migration from JSON. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: Configuration must always be valid according to AppConfig model. + - πŸ”— DEPENDS_ON -> `ConfigModels` + - πŸ”— DEPENDS_ON -> `AppConfigRecord` + - πŸ”— CALLS -> `logger` + - β„‚ **ConfigManager** (`Class`) + - πŸ“ A class to handle application configuration persistence and management. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the ConfigManager. + - Ζ’ **_default_config** (`Function`) + - πŸ“ Returns default application configuration. + - Ζ’ **_load_from_legacy_file** (`Function`) + - πŸ“ Loads legacy configuration from config.json for migration fallback. + - Ζ’ **_get_record** (`Function`) + - πŸ“ Loads config record from DB. + - Ζ’ **_load_config** (`Function`) + - πŸ“ Loads the configuration from DB or performs one-time migration from JSON file. + - Ζ’ **_save_config_to_db** (`Function`) + - πŸ“ Saves the provided configuration object to DB. + - Ζ’ **save** (`Function`) + - πŸ“ Saves the current configuration state to DB. + - Ζ’ **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 database connection and session management (PostgreSQL-first). + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: A single engine instance is used for the entire application. + - πŸ”— DEPENDS_ON -> `sqlalchemy` + - πŸ”— DEPENDS_ON -> `backend.src.models.mapping` + - πŸ”— DEPENDS_ON -> `backend.src.core.auth.config` + - πŸ“¦ **BASE_DIR** (`Variable`) + - πŸ“ Base directory for the backend. + - πŸ“¦ **DATABASE_URL** (`Constant`) + - πŸ“ URL for the main application database. + - πŸ“¦ **TASKS_DATABASE_URL** (`Constant`) + - πŸ“ URL for the tasks execution database. + - πŸ“¦ **AUTH_DATABASE_URL** (`Constant`) + - πŸ“ URL for the authentication database. + - πŸ“¦ **engine** (`Variable`) + - πŸ“ SQLAlchemy engine for mappings database. + - πŸ“¦ **tasks_engine** (`Variable`) + - πŸ“ SQLAlchemy engine for tasks database. + - πŸ“¦ **auth_engine** (`Variable`) + - πŸ“ SQLAlchemy engine for authentication database. + - β„‚ **SessionLocal** (`Class`) `[TRIVIAL]` + - πŸ“ A session factory for the main mappings database. + - β„‚ **TasksSessionLocal** (`Class`) `[TRIVIAL]` + - πŸ“ A session factory for the tasks execution database. + - β„‚ **AuthSessionLocal** (`Class`) `[TRIVIAL]` + - πŸ“ A session factory for the authentication database. + - Ζ’ **init_db** (`Function`) + - πŸ“ Initializes the database by creating all tables. + - Ζ’ **get_db** (`Function`) + - πŸ“ Dependency for getting a database session. + - Ζ’ **get_tasks_db** (`Function`) + - πŸ“ Dependency for getting a tasks database session. + - Ζ’ **get_auth_db** (`Function`) + - πŸ“ Dependency for getting an authentication database session. + - Ζ’ **_build_engine** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **LoggerModule** (`Module`) + - πŸ“ Configures the application's logging system, including a custom handler for buffering logs and streaming them over WebSockets. + - πŸ—οΈ Layer: Core + - β„‚ **BeliefFormatter** (`Class`) + - πŸ“ Custom logging formatter that adds belief state prefixes to log messages. + - Ζ’ **format** (`Function`) + - πŸ“ Formats the log record, adding belief state context if available. + - β„‚ **LogEntry** (`Class`) + - πŸ“ 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. + - Ζ’ **belief_scope** (`Function`) + - πŸ“ Context manager for structured Belief State logging. + - Ζ’ **configure_logger** (`Function`) + - πŸ“ Configures the logger with the provided logging settings. + - Ζ’ **get_task_log_level** (`Function`) + - πŸ“ Returns the current task log level filter. + - Ζ’ **should_log_task_level** (`Function`) + - πŸ“ Checks if a log level should be recorded based on task_log_level setting. + - β„‚ **WebSocketLogHandler** (`Class`) + - πŸ“ A custom logging handler that captures log records into a buffer. It is designed to be extended for real-time log streaming over WebSockets. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the handler with a fixed-capacity buffer. + - Ζ’ **emit** (`Function`) + - πŸ“ Captures a log record, formats it, and stores it in the buffer. + - Ζ’ **get_recent_logs** (`Function`) + - πŸ“ Returns a list of recent log entries from the buffer. + - πŸ“¦ **Logger** (`Global`) + - πŸ“ The global logger instance for the application, configured with both a console handler and the custom WebSocket handler. + - Ζ’ **believed** (`Function`) + - πŸ“ A decorator that wraps a function in a belief scope. + - Ζ’ **decorator** (`Function`) + - πŸ“ Internal decorator for belief scope. + - Ζ’ **explore** (`Function`) + - πŸ“ Logs an EXPLORE message (Van der Waals force) for searching, alternatives, and hypotheses. + - Ζ’ **reason** (`Function`) + - πŸ“ Logs a REASON message (Covalent bond) for strict deduction and core logic. + - Ζ’ **reflect** (`Function`) + - πŸ“ Logs a REFLECT message (Hydrogen bond) for self-check and structural validation. +- β„‚ **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 + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the PluginLoader with a directory to scan. + - Ζ’ **_load_plugins** (`Function`) + - πŸ“ Scans the plugin directory and loads all valid plugins. + - Ζ’ **_load_module** (`Function`) + - πŸ“ Loads a single Python module and discovers PluginBase implementations. + - Ζ’ **_register_plugin** (`Function`) + - πŸ“ Registers a PluginBase instance and its configuration. + - Ζ’ **get_plugin** (`Function`) + - πŸ“ Retrieves a loaded plugin instance by its ID. + - Ζ’ **get_all_plugin_configs** (`Function`) + - πŸ“ 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 + - πŸ”’ Invariant: ZIP structure must be preserved after transformation. + - πŸ”— DEPENDS_ON -> `PyYAML` + - β„‚ **MigrationEngine** (`Class`) + - πŸ“ Engine for transforming Superset export ZIPs. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the migration engine with optional ID mapping service. + - Ζ’ **transform_zip** (`Function`) + - πŸ“ Extracts ZIP, replaces database UUIDs in YAMLs, patches cross-filters, and re-packages. + - Ζ’ **_transform_yaml** (`Function`) + - πŸ“ Replaces database_uuid in a single YAML file. + - Ζ’ **_extract_chart_uuids_from_archive** (`Function`) + - πŸ“ Scans the unpacked ZIP to map local exported integer IDs back to their UUIDs. + - Ζ’ **_patch_dashboard_metadata** (`Function`) + - πŸ“ Replaces integer IDs in json_metadata. +- β„‚ **PluginBase** (`Class`) + - πŸ“ Defines the abstract base class that all plugins must implement to be recognized by the system. It enforces a common structure for plugin metadata and execution. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: All plugins MUST inherit from this class. + - Ζ’ **id** (`Function`) + - πŸ“ Returns the unique identifier for the plugin. + - Ζ’ **name** (`Function`) + - πŸ“ Returns the human-readable name of the plugin. + - Ζ’ **description** (`Function`) + - πŸ“ Returns a brief description of the plugin. + - Ζ’ **version** (`Function`) + - πŸ“ Returns the version of the plugin. + - Ζ’ **required_permission** (`Function`) + - πŸ“ Returns the required permission string to execute this plugin. + - Ζ’ **ui_route** (`Function`) + - πŸ“ Returns the frontend route for the plugin's UI, if applicable. + - Ζ’ **get_schema** (`Function`) + - πŸ“ Returns the JSON schema for the plugin's input parameters. + - Ζ’ **execute** (`Function`) + - πŸ“ Executes the plugin's core logic. +- β„‚ **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.mapping_service** (`Module`) `[CRITICAL]` + - πŸ“ Service for tracking and synchronizing Superset Resource IDs (UUID <-> Integer ID) + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: sync_environment must handle remote API failures gracefully. + - πŸ”— DEPENDS_ON -> `backend.src.models.mapping (ResourceMapping, ResourceType)` + - πŸ”— DEPENDS_ON -> `backend.src.core.logger` + - β„‚ **IdMappingService** (`Class`) `[CRITICAL]` + - πŸ“ Service handling the cataloging and retrieval of remote Superset Integer IDs. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the mapping service. + - Ζ’ **start_scheduler** (`Function`) + - πŸ“ Starts the background scheduler with a given cron string. + - Ζ’ **sync_environment** (`Function`) + - πŸ“ Fully synchronizes mapping for a specific environment. + - Ζ’ **get_remote_id** (`Function`) + - πŸ“ Retrieves the remote integer ID for a given universal UUID. + - Ζ’ **get_remote_ids_batch** (`Function`) + - πŸ“ Retrieves remote integer IDs for a list of universal UUIDs efficiently. + - Ζ’ **sync_all** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.core.auth.config** (`Module`) + - πŸ“ Centralized configuration for authentication and authorization. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: All sensitive configuration must have defaults or be loaded from environment. + - πŸ”— DEPENDS_ON -> `pydantic` + - β„‚ **AuthConfig** (`Class`) + - πŸ“ Holds authentication-related settings. + - πŸ“¦ **auth_config** (`Variable`) + - πŸ“ Singleton instance of AuthConfig. +- πŸ“¦ **backend.src.core.auth.jwt** (`Module`) + - πŸ“ JWT token generation and validation logic. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: Tokens must include expiration time and user identifier. + - πŸ”— DEPENDS_ON -> `jose` + - Ζ’ **create_access_token** (`Function`) + - πŸ“ Generates a new JWT access token. + - Ζ’ **decode_token** (`Function`) + - πŸ“ Decodes and validates a JWT token. +- πŸ“¦ **backend.src.core.auth.oauth** (`Module`) + - πŸ“ ADFS OIDC configuration and client using Authlib. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: Must use secure OIDC flows. + - πŸ”— DEPENDS_ON -> `authlib` + - πŸ“¦ **oauth** (`Variable`) + - πŸ“ Global Authlib OAuth registry. + - Ζ’ **register_adfs** (`Function`) + - πŸ“ Registers the ADFS OIDC client. + - Ζ’ **is_adfs_configured** (`Function`) + - πŸ“ Checks if ADFS is properly configured. +- πŸ“¦ **backend.src.core.auth.logger** (`Module`) + - πŸ“ Audit logging for security-related events. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: Must not log sensitive data like passwords or full tokens. + - Ζ’ **log_security_event** (`Function`) + - πŸ“ Logs a security-related event for audit trails. +- πŸ“¦ **backend.src.core.auth.security** (`Module`) + - πŸ“ Utility for password hashing and verification using Passlib. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: Uses bcrypt for hashing with standard work factor. + - πŸ”— DEPENDS_ON -> `passlib` + - Ζ’ **verify_password** (`Function`) + - πŸ“ Verifies a plain password against a hashed password. + - Ζ’ **get_password_hash** (`Function`) + - πŸ“ Generates a bcrypt hash for a plain password. +- πŸ“¦ **backend.src.core.auth.repository** (`Module`) + - πŸ“ Data access layer for authentication-related entities. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: All database operations must be performed within a session. + - πŸ”— DEPENDS_ON -> `sqlalchemy` + - β„‚ **AuthRepository** (`Class`) + - πŸ“ Encapsulates database operations for authentication. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the repository with a database session. + - Ζ’ **get_user_by_username** (`Function`) + - πŸ“ Retrieves a user by their username. + - Ζ’ **get_user_by_id** (`Function`) + - πŸ“ Retrieves a user by their unique ID. + - Ζ’ **get_role_by_name** (`Function`) + - πŸ“ Retrieves a role by its name. + - Ζ’ **update_last_login** (`Function`) + - πŸ“ Updates the last_login timestamp for a user. + - Ζ’ **get_role_by_id** (`Function`) + - πŸ“ Retrieves a role by its unique ID. + - Ζ’ **get_permission_by_id** (`Function`) + - πŸ“ Retrieves a permission by its unique ID. + - Ζ’ **get_permission_by_resource_action** (`Function`) + - πŸ“ Retrieves a permission by resource and action. + - Ζ’ **list_permissions** (`Function`) + - πŸ“ Lists all available permissions. +- πŸ“¦ **test_auth** (`Module`) + - πŸ“ Unit tests for authentication module + - πŸ—οΈ Layer: Domain + - Ζ’ **db_session** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **auth_service** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **auth_repo** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_create_user** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_authenticate_user** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_create_session** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_role_permission_association** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_user_role_association** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_ad_group_mapping** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_authenticate_user_updates_last_login** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_authenticate_inactive_user** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_verify_password_empty_hash** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_provision_adfs_user_new** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_provision_adfs_user_existing** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **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 + - πŸ”— DEPENDS_ON -> `backend.src.core.logger` + - πŸ”— DEPENDS_ON -> `requests` + - β„‚ **SupersetAPIError** (`Class`) + - πŸ“ Base exception for all Superset API related errors. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the exception with a message and context. + - β„‚ **AuthenticationError** (`Class`) + - πŸ“ Exception raised when authentication fails. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the authentication error. + - β„‚ **PermissionDeniedError** (`Class`) + - πŸ“ Exception raised when access is denied. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the permission denied error. + - β„‚ **DashboardNotFoundError** (`Class`) + - πŸ“ Exception raised when a dashboard cannot be found. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the not found error with resource ID. + - β„‚ **NetworkError** (`Class`) + - πŸ“ Exception raised when a network level error occurs. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the network error. + - β„‚ **APIClient** (`Class`) + - πŸ“ Π˜Π½ΠΊΠ°ΠΏΡΡƒΠ»ΠΈΡ€ΡƒΠ΅Ρ‚ HTTP-Π»ΠΎΠ³ΠΈΠΊΡƒ для Ρ€Π°Π±ΠΎΡ‚Ρ‹ с API, Π²ΠΊΠ»ΡŽΡ‡Π°Ρ сСссии, Π°ΡƒΡ‚Π΅Π½Ρ‚ΠΈΡ„ΠΈΠΊΠ°Ρ†ΠΈΡŽ, ΠΈ ΠΎΠ±Ρ€Π°Π±ΠΎΡ‚ΠΊΡƒ запросов. + - Ζ’ **__init__** (`Function`) + - πŸ“ Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·ΠΈΡ€ΡƒΠ΅Ρ‚ API ΠΊΠ»ΠΈΠ΅Π½Ρ‚ с ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠ΅ΠΉ, сСссиСй ΠΈ Π»ΠΎΠ³Π³Π΅Ρ€ΠΎΠΌ. + - Ζ’ **_init_session** (`Function`) + - πŸ“ Π‘ΠΎΠ·Π΄Π°Π΅Ρ‚ ΠΈ настраиваСт `requests.Session` с retry-Π»ΠΎΠ³ΠΈΠΊΠΎΠΉ. + - Ζ’ **authenticate** (`Function`) + - πŸ“ ВыполняСт Π°ΡƒΡ‚Π΅Π½Ρ‚ΠΈΡ„ΠΈΠΊΠ°Ρ†ΠΈΡŽ Π² Superset API ΠΈ ΠΏΠΎΠ»ΡƒΡ‡Π°Π΅Ρ‚ access ΠΈ CSRF Ρ‚ΠΎΠΊΠ΅Π½Ρ‹. + - Ζ’ **headers** (`Function`) + - πŸ“ Π’ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ HTTP-Π·Π°Π³ΠΎΠ»ΠΎΠ²ΠΊΠΈ для Π°ΡƒΡ‚Π΅Π½Ρ‚ΠΈΡ„ΠΈΡ†ΠΈΡ€ΠΎΠ²Π°Π½Π½Ρ‹Ρ… запросов. + - Ζ’ **request** (`Function`) + - πŸ“ ВыполняСт ΡƒΠ½ΠΈΠ²Π΅Ρ€ΡΠ°Π»ΡŒΠ½Ρ‹ΠΉ HTTP-запрос ΠΊ API. + - Ζ’ **_handle_http_error** (`Function`) + - πŸ“ (Helper) ΠŸΡ€Π΅ΠΎΠ±Ρ€Π°Π·ΡƒΠ΅Ρ‚ HTTP ошибки Π² кастомныС ΠΈΡΠΊΠ»ΡŽΡ‡Π΅Π½ΠΈΡ. + - Ζ’ **_handle_network_error** (`Function`) + - πŸ“ (Helper) ΠŸΡ€Π΅ΠΎΠ±Ρ€Π°Π·ΡƒΠ΅Ρ‚ сСтСвыС ошибки Π² `NetworkError`. + - Ζ’ **upload_file** (`Function`) + - πŸ“ Π—Π°Π³Ρ€ΡƒΠΆΠ°Π΅Ρ‚ Ρ„Π°ΠΉΠ» Π½Π° сСрвСр Ρ‡Π΅Ρ€Π΅Π· multipart/form-data. + - Ζ’ **_perform_upload** (`Function`) + - πŸ“ (Helper) ВыполняСт POST запрос с Ρ„Π°ΠΉΠ»ΠΎΠΌ. + - Ζ’ **fetch_paginated_count** (`Function`) + - πŸ“ ΠŸΠΎΠ»ΡƒΡ‡Π°Π΅Ρ‚ ΠΎΠ±Ρ‰Π΅Π΅ количСство элСмСнтов для ΠΏΠ°Π³ΠΈΠ½Π°Ρ†ΠΈΠΈ. + - Ζ’ **fetch_paginated_data** (`Function`) + - πŸ“ АвтоматичСски собираСт Π΄Π°Π½Π½Ρ‹Π΅ со всСх страниц ΠΏΠ°Π³ΠΈΠ½ΠΈΡ€ΠΎΠ²Π°Π½Π½ΠΎΠ³ΠΎ эндпоинта. + - Ζ’ **init_poolmanager** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.core.utils.matching** (`Module`) + - πŸ“ Provides utility functions for fuzzy matching database names. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: Confidence scores are returned as floats between 0.0 and 1.0. + - πŸ”— DEPENDS_ON -> `rapidfuzz` + - Ζ’ **suggest_mappings** (`Function`) + - πŸ“ Suggests mappings between source and target databases using fuzzy matching. +- πŸ“¦ **backend.core.utils.dataset_mapper** (`Module`) + - πŸ“ Π­Ρ‚ΠΎΡ‚ ΠΌΠΎΠ΄ΡƒΠ»ΡŒ ΠΎΡ‚Π²Π΅Ρ‡Π°Π΅Ρ‚ Π·Π° ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΌΠ΅Ρ‚Π°Π΄Π°Π½Π½Ρ‹Ρ… (verbose_map) Π² датасСтах Superset, извлСкая ΠΈΡ… ΠΈΠ· PostgreSQL ΠΈΠ»ΠΈ XLSX-Ρ„Π°ΠΉΠ»ΠΎΠ². + - πŸ—οΈ Layer: Domain + - πŸ”— DEPENDS_ON -> `backend.core.superset_client` + - πŸ”— DEPENDS_ON -> `pandas` + - πŸ”— DEPENDS_ON -> `psycopg2` + - β„‚ **DatasetMapper** (`Class`) + - πŸ“ Класс для ΠΌΠ΅ΠΏΠΏΠΈΠ½Π³Π° ΠΈ обновлСния verbose_map Π² датасСтах Superset. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the mapper. + - Ζ’ **get_postgres_comments** (`Function`) + - πŸ“ Π˜Π·Π²Π»Π΅ΠΊΠ°Π΅Ρ‚ ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΈ ΠΊ ΠΊΠΎΠ»ΠΎΠ½ΠΊΠ°ΠΌ ΠΈΠ· систСмного ΠΊΠ°Ρ‚Π°Π»ΠΎΠ³Π° PostgreSQL. + - Ζ’ **load_excel_mappings** (`Function`) + - πŸ“ Π—Π°Π³Ρ€ΡƒΠΆΠ°Π΅Ρ‚ ΠΌΠ΅ΠΏΠΏΠΈΠ½Π³ΠΈ 'column_name' -> 'column_comment' ΠΈΠ· XLSX Ρ„Π°ΠΉΠ»Π°. + - Ζ’ **run_mapping** (`Function`) + - πŸ“ Основная функция для выполнСния ΠΌΠ΅ΠΏΠΏΠΈΠ½Π³Π° ΠΈ обновлСния verbose_map датасСта Π² Superset. + - πŸ”— CALLS -> `self.get_postgres_comments` + - πŸ”— CALLS -> `self.load_excel_mappings` + - πŸ”— CALLS -> `superset_client.get_dataset` + - πŸ”— CALLS -> `superset_client.update_dataset` +- πŸ“¦ **test_logger** (`Module`) + - πŸ“ Unit tests for logger module + - πŸ—οΈ Layer: Infra + - Ζ’ **test_belief_scope_logs_entry_action_exit_at_debug** (`Function`) + - πŸ“ Test that belief_scope generates [ID][Entry], [ID][Action], and [ID][Exit] logs at DEBUG level. + - Ζ’ **test_belief_scope_error_handling** (`Function`) + - πŸ“ Test that belief_scope logs Coherence:Failed on exception. + - Ζ’ **test_belief_scope_success_coherence** (`Function`) + - πŸ“ Test that belief_scope logs Coherence:OK on success. + - Ζ’ **test_belief_scope_not_visible_at_info** (`Function`) + - πŸ“ Test that belief_scope Entry/Exit/Coherence logs are NOT visible at INFO level. + - Ζ’ **test_task_log_level_default** (`Function`) + - πŸ“ Test that default task log level is INFO. + - Ζ’ **test_should_log_task_level** (`Function`) + - πŸ“ Test that should_log_task_level correctly filters log levels. + - Ζ’ **test_configure_logger_task_log_level** (`Function`) + - πŸ“ Test that configure_logger updates task_log_level. + - Ζ’ **test_enable_belief_state_flag** (`Function`) + - πŸ“ Test that enable_belief_state flag controls belief_scope logging. + - Ζ’ **test_belief_scope_missing_anchor** (`Function`) + - πŸ“ Test @PRE condition: anchor_id must be provided + - Ζ’ **test_configure_logger_post_conditions** (`Function`) + - πŸ“ Test @POST condition: Logger level, handlers, belief state flag, and task log level are updated. + - Ζ’ **reset_logger_state** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **TaskLoggerModule** (`Module`) `[CRITICAL]` + - πŸ“ Provides a dedicated logger for tasks with automatic source attribution. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: Each TaskLogger instance is bound to a specific task_id and default source. + - πŸ”— DEPENDS_ON -> `TaskManager, CALLS -> TaskManager._add_log` + - β„‚ **TaskLogger** (`Class`) `[CRITICAL]` + - πŸ“ A wrapper around TaskManager._add_log that carries task_id and source context. + - πŸ”’ Invariant: All log calls include the task_id and source. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initialize the TaskLogger with task context. + - Ζ’ **with_source** (`Function`) + - πŸ“ Create a sub-logger with a different default source. + - Ζ’ **_log** (`Function`) + - πŸ“ Internal method to log a message at a given level. + - Ζ’ **debug** (`Function`) + - πŸ“ Log a DEBUG level message. + - Ζ’ **info** (`Function`) + - πŸ“ Log an INFO level message. + - Ζ’ **warning** (`Function`) + - πŸ“ Log a WARNING level message. + - Ζ’ **error** (`Function`) + - πŸ“ Log an ERROR level message. + - Ζ’ **progress** (`Function`) + - πŸ“ Log a progress update with percentage. +- πŸ“¦ **TaskPersistenceModule** (`Module`) `[CRITICAL]` + - πŸ“ Handles the persistence of tasks using SQLAlchemy and the tasks.db database. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: Database schema must match the TaskRecord model structure. + - β„‚ **TaskPersistenceService** (`Class`) `[CRITICAL]` + - πŸ“ Provides methods to save and load tasks from the tasks.db database using SQLAlchemy. + - πŸ”’ Invariant: Persistence must handle potentially missing task fields natively. + - Ζ’ **_json_load_if_needed** (`Function`) + - πŸ“ Safely load JSON strings from DB if necessary + - Ζ’ **_parse_datetime** (`Function`) + - πŸ“ Safely parse a datetime string from the database + - Ζ’ **_resolve_environment_id** (`Function`) + - πŸ“ Resolve environment id based on provided value or fallback to default + - Ζ’ **__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. + - β„‚ **TaskLogPersistenceService** (`Class`) `[CRITICAL]` + - πŸ“ Provides methods to save and query task logs from the task_logs table. + - πŸ”’ Invariant: Log entries are batch-inserted for performance. + - πŸ”— DEPENDS_ON -> `TaskLogRecord` + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the TaskLogPersistenceService + - Ζ’ **add_logs** (`Function`) + - πŸ“ Batch insert log entries for a task. + - Ζ’ **get_logs** (`Function`) + - πŸ“ Query logs for a task with filtering and pagination. + - Ζ’ **get_log_stats** (`Function`) + - πŸ“ Get statistics about logs for a task. + - Ζ’ **get_sources** (`Function`) + - πŸ“ Get unique sources for a task's logs. + - Ζ’ **delete_logs_for_task** (`Function`) + - πŸ“ Delete all logs for a specific task. + - Ζ’ **delete_logs_for_tasks** (`Function`) + - πŸ“ Delete all logs for multiple tasks. + - Ζ’ **json_serializable** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **TaskManagerModule** (`Module`) `[CRITICAL]` + - πŸ“ Manages the lifecycle of tasks, including their creation, execution, and state tracking. It uses a thread pool to run plugins asynchronously. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: Task IDs are unique. + - β„‚ **TaskManager** (`Class`) `[CRITICAL]` + - πŸ“ Manages the lifecycle of tasks, including their creation, execution, and state tracking. + - πŸ”’ Invariant: Log entries are never deleted after being added to a task. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initialize the TaskManager with dependencies. + - Ζ’ **_flusher_loop** (`Function`) + - πŸ“ Background thread that periodically flushes log buffer to database. + - Ζ’ **_flush_logs** (`Function`) + - πŸ“ Flush all buffered logs to the database. + - Ζ’ **_flush_task_logs** (`Function`) + - πŸ“ Flush logs for a specific task immediately. + - Ζ’ **create_task** (`Function`) + - πŸ“ Creates and queues a new task for execution. + - Ζ’ **_run_task** (`Function`) + - πŸ“ Internal method to execute a task with TaskContext support. + - Ζ’ **resolve_task** (`Function`) + - πŸ“ Resumes a task that is awaiting mapping. + - Ζ’ **wait_for_resolution** (`Function`) + - πŸ“ Pauses execution and waits for a resolution signal. + - Ζ’ **wait_for_input** (`Function`) + - πŸ“ Pauses execution and waits for user input. + - Ζ’ **get_task** (`Function`) + - πŸ“ Retrieves a task by its ID. + - Ζ’ **get_all_tasks** (`Function`) + - πŸ“ Retrieves all registered tasks. + - Ζ’ **get_tasks** (`Function`) + - πŸ“ Retrieves tasks with pagination and optional status filter. + - Ζ’ **get_task_logs** (`Function`) + - πŸ“ Retrieves logs for a specific task (from memory for running, persistence for completed). + - Ζ’ **get_task_log_stats** (`Function`) + - πŸ“ Get statistics about logs for a task. + - Ζ’ **get_task_log_sources** (`Function`) + - πŸ“ Get unique sources for a task's logs. + - Ζ’ **_add_log** (`Function`) + - πŸ“ Adds a log entry to a task buffer and notifies subscribers. + - Ζ’ **subscribe_logs** (`Function`) + - πŸ“ Subscribes to real-time logs for a task. + - Ζ’ **unsubscribe_logs** (`Function`) + - πŸ“ Unsubscribes from real-time logs for a task. + - Ζ’ **load_persisted_tasks** (`Function`) + - πŸ“ Load persisted tasks using persistence service. + - Ζ’ **await_input** (`Function`) + - πŸ“ Transition a task to AWAITING_INPUT state with input request. + - Ζ’ **resume_task_with_password** (`Function`) + - πŸ“ Resume a task that is awaiting input with provided passwords. + - Ζ’ **clear_tasks** (`Function`) + - πŸ“ Clears tasks based on status filter (also deletes associated logs). + - Ζ’ **sort_key** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **TaskManagerModels** (`Module`) + - πŸ“ Defines the data models and enumerations used by the Task Manager. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: Task IDs are immutable once created. + - πŸ“¦ **TaskStatus** (`Enum`) `[TRIVIAL]` + - πŸ“ Defines the possible states a task can be in during its lifecycle. + - πŸ“¦ **LogLevel** (`Enum`) + - πŸ“ Defines the possible log levels for task logging. + - β„‚ **LogEntry** (`Class`) `[CRITICAL]` + - πŸ“ A Pydantic model representing a single, structured log entry associated with a task. + - πŸ”’ Invariant: Each log entry has a unique timestamp and source. + - β„‚ **TaskLog** (`Class`) + - πŸ“ A Pydantic model representing a persisted log entry from the database. + - β„‚ **LogFilter** (`Class`) + - πŸ“ Filter parameters for querying task logs. + - β„‚ **LogStats** (`Class`) + - πŸ“ Statistics about log entries for a task. + - β„‚ **Task** (`Class`) + - πŸ“ 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. +- πŸ“¦ **TaskCleanupModule** (`Module`) + - πŸ“ Implements task cleanup and retention policies, including associated logs. + - πŸ—οΈ Layer: Core + - β„‚ **TaskCleanupService** (`Class`) + - πŸ“ Provides methods to clean up old task records and their associated logs. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the cleanup service with dependencies. + - Ζ’ **run_cleanup** (`Function`) + - πŸ“ Deletes tasks older than the configured retention period and their logs. + - Ζ’ **delete_task_with_logs** (`Function`) + - πŸ“ Delete a single task and all its associated logs. +- πŸ“¦ **TaskManagerPackage** (`Module`) `[TRIVIAL]` + - πŸ“ Exports the public API of the task manager package. + - πŸ—οΈ Layer: Core +- πŸ“¦ **TaskContextModule** (`Module`) `[CRITICAL]` + - πŸ“ Provides execution context passed to plugins during task execution. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: Each TaskContext is bound to a single task execution. + - πŸ”— DEPENDS_ON -> `TaskLogger, USED_BY -> plugins` + - β„‚ **TaskContext** (`Class`) `[CRITICAL]` + - πŸ“ A container passed to plugin.execute() providing the logger and other task-specific utilities. + - πŸ”’ Invariant: logger is always a valid TaskLogger instance. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initialize the TaskContext with task-specific resources. + - Ζ’ **task_id** (`Function`) + - πŸ“ Get the task ID. + - Ζ’ **logger** (`Function`) + - πŸ“ Get the TaskLogger instance for this context. + - Ζ’ **params** (`Function`) + - πŸ“ Get the task parameters. + - Ζ’ **get_param** (`Function`) + - πŸ“ Get a specific parameter value with optional default. + - Ζ’ **create_sub_context** (`Function`) + - πŸ“ Create a sub-context with a different default source. + - Ζ’ **execute** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.api.auth** (`Module`) + - πŸ“ Authentication API endpoints. + - πŸ—οΈ Layer: API + - πŸ”’ Invariant: All auth endpoints must return consistent error codes. + - πŸ“¦ **router** (`Variable`) + - πŸ“ APIRouter instance for authentication routes. + - Ζ’ **login_for_access_token** (`Function`) + - πŸ“ Authenticates a user and returns a JWT access token. + - Ζ’ **read_users_me** (`Function`) + - πŸ“ Retrieves the profile of the currently authenticated user. + - Ζ’ **logout** (`Function`) + - πŸ“ Logs out the current user (placeholder for session revocation). + - Ζ’ **login_adfs** (`Function`) + - πŸ“ Initiates the ADFS OIDC login flow. + - Ζ’ **auth_callback_adfs** (`Function`) + - πŸ“ Handles the callback from ADFS after successful authentication. +- πŸ“¦ **router** (`Global`) + - πŸ“ APIRouter instance for LLM routes. +- Ζ’ **_is_valid_runtime_api_key** (`Function`) + - πŸ“ Validate decrypted runtime API key presence/shape. +- Ζ’ **get_providers** (`Function`) + - πŸ“ Retrieve all LLM provider configurations. +- Ζ’ **get_llm_status** (`Function`) + - πŸ“ Returns whether LLM runtime is configured for dashboard validation. +- Ζ’ **create_provider** (`Function`) + - πŸ“ Create a new LLM provider configuration. +- Ζ’ **update_provider** (`Function`) + - πŸ“ Update an existing LLM provider configuration. +- Ζ’ **delete_provider** (`Function`) + - πŸ“ Delete an LLM provider configuration. +- Ζ’ **test_connection** (`Function`) + - πŸ“ Test connection to an LLM provider. +- Ζ’ **test_provider_config** (`Function`) + - πŸ“ Test connection with a provided configuration (not yet saved). +- πŸ“¦ **backend.src.api.routes.datasets** (`Module`) + - πŸ“ API endpoints for the Dataset Hub - listing datasets with mapping progress + - πŸ—οΈ Layer: API + - πŸ”’ Invariant: All dataset responses include last_task metadata + - πŸ”— DEPENDS_ON -> `backend.src.dependencies` + - πŸ”— DEPENDS_ON -> `backend.src.services.resource_service` + - πŸ”— DEPENDS_ON -> `backend.src.core.superset_client` + - πŸ“¦ **MappedFields** (`DataClass`) + - πŸ“¦ **LastTask** (`DataClass`) + - πŸ“¦ **DatasetItem** (`DataClass`) + - πŸ“¦ **LinkedDashboard** (`DataClass`) + - πŸ“¦ **DatasetColumn** (`DataClass`) + - πŸ“¦ **DatasetDetailResponse** (`DataClass`) + - πŸ“¦ **DatasetsResponse** (`DataClass`) + - πŸ“¦ **TaskResponse** (`DataClass`) + - Ζ’ **get_dataset_ids** (`Function`) + - πŸ“ Fetch list of all dataset IDs from a specific environment (without pagination) + - πŸ”— CALLS -> `ResourceService.get_datasets_with_status` + - Ζ’ **get_datasets** (`Function`) + - πŸ“ Fetch list of datasets from a specific environment with mapping progress + - πŸ”— CALLS -> `ResourceService.get_datasets_with_status` + - πŸ“¦ **MapColumnsRequest** (`DataClass`) + - Ζ’ **map_columns** (`Function`) + - πŸ“ Trigger bulk column mapping for datasets + - πŸ”— DISPATCHES -> `MapperPlugin` + - πŸ”— CALLS -> `task_manager.create_task` + - πŸ“¦ **GenerateDocsRequest** (`DataClass`) + - Ζ’ **generate_docs** (`Function`) + - πŸ“ Trigger bulk documentation generation for datasets + - πŸ”— DISPATCHES -> `LLMAnalysisPlugin` + - πŸ”— CALLS -> `task_manager.create_task` + - Ζ’ **get_dataset_detail** (`Function`) + - πŸ“ Get detailed dataset information including columns and linked dashboards + - πŸ”— CALLS -> `SupersetClient.get_dataset_detail` +- πŸ“¦ **backend.src.api.routes.git** (`Module`) + - πŸ“ Provides FastAPI endpoints for Git integration operations. + - πŸ—οΈ Layer: API + - πŸ”’ Invariant: All Git operations must be routed through GitService. + - Ζ’ **get_git_configs** (`Function`) + - πŸ“ List all configured Git servers. + - Ζ’ **create_git_config** (`Function`) + - πŸ“ 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. + - Ζ’ **generate_commit_message** (`Function`) + - πŸ“ Generate a suggested commit message using LLM. +- πŸ“¦ **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 + - πŸ”’ Invariant: Environment IDs must exist in the configuration. + - πŸ”— 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. + - πŸ—οΈ Layer: API + - Ζ’ **update_environment_schedule** (`Function`) + - πŸ“ Update backup schedule for an environment. + - πŸ—οΈ Layer: API + - Ζ’ **get_environment_databases** (`Function`) + - πŸ“ Fetch the list of databases from a specific environment. + - πŸ—οΈ Layer: API +- πŸ“¦ **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. + - Ζ’ **get_migration_settings** (`Function`) + - πŸ“ Get current migration Cron string explicitly. + - Ζ’ **update_migration_settings** (`Function`) + - πŸ“ Update migration Cron string. + - Ζ’ **get_resource_mappings** (`Function`) + - πŸ“ Fetch synchronized object mappings with search, filtering, and pagination. + - Ζ’ **trigger_sync_now** (`Function`) + - πŸ“ Triggers an immediate ID synchronization for all environments. +- πŸ“¦ **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 + - πŸ”’ Invariant: Mappings are persisted in the SQLite database. + - πŸ”— DEPENDS_ON -> `backend.src.dependencies` + - πŸ”— DEPENDS_ON -> `backend.src.core.database` + - πŸ”— DEPENDS_ON -> `backend.src.services.mapping_service` + - πŸ“¦ **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) + - πŸ”’ Invariant: All settings changes must be persisted via ConfigManager. + - πŸ”— DEPENDS_ON -> `ConfigManager` + - πŸ”— DEPENDS_ON -> `ConfigModels` + - β„‚ **LoggingConfigResponse** (`Class`) + - πŸ“ Response model for logging configuration with current task log level. + - Ζ’ **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. + - Ζ’ **get_logging_config** (`Function`) + - πŸ“ Retrieves current logging configuration. + - Ζ’ **update_logging_config** (`Function`) + - πŸ“ Updates logging configuration. + - β„‚ **ConsolidatedSettingsResponse** (`Class`) + - Ζ’ **get_consolidated_settings** (`Function`) + - πŸ“ Retrieves all settings categories in a single call + - Ζ’ **update_consolidated_settings** (`Function`) + - πŸ“ Bulk update application settings from the consolidated view. +- πŸ“¦ **backend.src.api.routes.admin** (`Module`) + - πŸ“ Admin API endpoints for user and role management. + - πŸ—οΈ Layer: API + - πŸ”’ Invariant: All endpoints in this module require 'Admin' role or 'admin' scope. + - πŸ“¦ **router** (`Variable`) + - πŸ“ APIRouter instance for admin routes. + - Ζ’ **list_users** (`Function`) + - πŸ“ Lists all registered users. + - Ζ’ **create_user** (`Function`) + - πŸ“ Creates a new local user. + - Ζ’ **update_user** (`Function`) + - πŸ“ Updates an existing user. + - Ζ’ **delete_user** (`Function`) + - πŸ“ Deletes a user. + - Ζ’ **list_roles** (`Function`) + - πŸ“ Lists all available roles. + - πŸ”— CALLS -> `backend.src.models.auth.Role` + - Ζ’ **create_role** (`Function`) + - πŸ“ Creates a new system role with associated permissions. + - πŸ”— CALLS -> `backend.src.core.auth.repository.AuthRepository.get_permission_by_id` + - Ζ’ **update_role** (`Function`) + - πŸ“ Updates an existing role's metadata and permissions. + - πŸ”— CALLS -> `backend.src.core.auth.repository.AuthRepository.get_role_by_id` + - Ζ’ **delete_role** (`Function`) + - πŸ“ Removes a role from the system. + - πŸ”— CALLS -> `backend.src.core.auth.repository.AuthRepository.get_role_by_id` + - Ζ’ **list_permissions** (`Function`) + - πŸ“ Lists all available system permissions for assignment. + - πŸ”— CALLS -> `backend.src.core.auth.repository.AuthRepository.list_permissions` + - Ζ’ **list_ad_mappings** (`Function`) + - πŸ“ Lists all AD Group to Role mappings. + - Ζ’ **create_ad_mapping** (`Function`) + - πŸ“ Creates a new AD Group mapping. +- πŸ“¦ **backend.src.api.routes.git_schemas** (`Module`) + - πŸ“ Defines Pydantic models for the Git integration API layer. + - πŸ—οΈ Layer: API + - πŸ”’ Invariant: All schemas must be compatible with the FastAPI router. + - πŸ”— DEPENDS_ON -> `backend.src.models.git` + - β„‚ **GitServerConfigBase** (`Class`) `[TRIVIAL]` + - πŸ“ 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. +- πŸ“¦ **backend.src.api.routes.assistant** (`Module`) + - πŸ“ API routes for LLM assistant command parsing and safe execution orchestration. + - πŸ—οΈ Layer: API + - πŸ”’ Invariant: Risky operations are never executed without valid confirmation token. + - πŸ”— DEPENDS_ON -> `backend.src.core.task_manager` + - πŸ”— DEPENDS_ON -> `backend.src.models.assistant` + - β„‚ **AssistantMessageRequest** (`Class`) `[TRIVIAL]` + - πŸ“ Input payload for assistant message endpoint. + - β„‚ **AssistantAction** (`Class`) `[TRIVIAL]` + - πŸ“ UI action descriptor returned with assistant responses. + - β„‚ **AssistantMessageResponse** (`Class`) + - πŸ“ Output payload contract for assistant interaction endpoints. + - β„‚ **ConfirmationRecord** (`Class`) + - πŸ“ In-memory confirmation token model for risky operation dispatch. + - Ζ’ **_append_history** (`Function`) + - πŸ“ Append conversation message to in-memory history buffer. + - Ζ’ **_persist_message** (`Function`) + - πŸ“ Persist assistant/user message record to database. + - Ζ’ **_audit** (`Function`) + - πŸ“ Append in-memory audit record for assistant decision trace. + - Ζ’ **_persist_audit** (`Function`) + - πŸ“ Persist structured assistant audit payload in database. + - Ζ’ **_persist_confirmation** (`Function`) + - πŸ“ Persist confirmation token record to database. + - Ζ’ **_update_confirmation_state** (`Function`) + - πŸ“ Update persistent confirmation token lifecycle state. + - Ζ’ **_load_confirmation_from_db** (`Function`) + - πŸ“ Load confirmation token from database into in-memory model. + - Ζ’ **_ensure_conversation** (`Function`) + - πŸ“ Resolve active conversation id in memory or create a new one. + - Ζ’ **_resolve_or_create_conversation** (`Function`) + - πŸ“ Resolve active conversation using explicit id, memory cache, or persisted history. + - Ζ’ **_cleanup_history_ttl** (`Function`) + - πŸ“ Enforce assistant message retention window by deleting expired rows and in-memory records. + - Ζ’ **_is_conversation_archived** (`Function`) + - πŸ“ Determine archived state for a conversation based on last update timestamp. + - Ζ’ **_coerce_query_bool** (`Function`) + - πŸ“ Normalize bool-like query values for compatibility in direct handler invocations/tests. + - Ζ’ **_extract_id** (`Function`) + - πŸ“ Extract first regex match group from text by ordered pattern list. + - Ζ’ **_resolve_env_id** (`Function`) + - πŸ“ Resolve environment identifier/name token to canonical environment id. + - Ζ’ **_is_production_env** (`Function`) + - πŸ“ Determine whether environment token resolves to production-like target. + - Ζ’ **_resolve_provider_id** (`Function`) + - πŸ“ Resolve provider token to provider id with active/default fallback. + - Ζ’ **_get_default_environment_id** (`Function`) + - πŸ“ Resolve default environment id from settings or first configured environment. + - Ζ’ **_resolve_dashboard_id_by_ref** (`Function`) + - πŸ“ Resolve dashboard id by title or slug reference in selected environment. + - Ζ’ **_resolve_dashboard_id_entity** (`Function`) + - πŸ“ Resolve dashboard id from intent entities using numeric id or dashboard_ref fallback. + - Ζ’ **_get_environment_name_by_id** (`Function`) + - πŸ“ Resolve human-readable environment name by id. + - Ζ’ **_extract_result_deep_links** (`Function`) + - πŸ“ Build deep-link actions to verify task result from assistant chat. + - Ζ’ **_build_task_observability_summary** (`Function`) + - πŸ“ Build compact textual summary for completed tasks to reduce "black box" effect. + - Ζ’ **_parse_command** (`Function`) + - πŸ“ Deterministically parse RU/EN command text into intent payload. + - Ζ’ **_check_any_permission** (`Function`) + - πŸ“ Validate user against alternative permission checks (logical OR). + - Ζ’ **_has_any_permission** (`Function`) + - πŸ“ Check whether user has at least one permission tuple from the provided list. + - Ζ’ **_build_tool_catalog** (`Function`) + - πŸ“ Build current-user tool catalog for LLM planner with operation contracts and defaults. + - Ζ’ **_coerce_intent_entities** (`Function`) + - πŸ“ Normalize intent entity value types from LLM output to route-compatible values. + - Ζ’ **_confirmation_summary** (`Function`) + - πŸ“ Build human-readable confirmation prompt for an intent before execution. + - Ζ’ **_clarification_text_for_intent** (`Function`) + - πŸ“ Convert technical missing-parameter errors into user-facing clarification prompts. + - Ζ’ **_plan_intent_with_llm** (`Function`) + - πŸ“ Use active LLM provider to select best tool/operation from dynamic catalog. + - Ζ’ **_authorize_intent** (`Function`) + - πŸ“ Validate user permissions for parsed intent before confirmation/dispatch. + - Ζ’ **_dispatch_intent** (`Function`) + - πŸ“ Execute parsed assistant intent via existing task/plugin/git services. + - Ζ’ **send_message** (`Function`) + - πŸ“ Parse assistant command, enforce safety gates, and dispatch executable intent. + - Ζ’ **confirm_operation** (`Function`) + - πŸ“ Execute previously requested risky operation after explicit user confirmation. + - Ζ’ **cancel_operation** (`Function`) + - πŸ“ Cancel pending risky operation and mark confirmation token as cancelled. + - Ζ’ **list_conversations** (`Function`) + - πŸ“ Return paginated conversation list for current user with archived flag and last message preview. + - Ζ’ **get_history** (`Function`) + - πŸ“ Retrieve paginated assistant conversation history for current user. + - Ζ’ **get_assistant_audit** (`Function`) + - πŸ“ Return assistant audit decisions for current user from persistent and in-memory stores. + - Ζ’ **_label** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **storage_routes** (`Module`) + - πŸ“ API endpoints for file storage management (backups and repositories). + - πŸ—οΈ Layer: API + - πŸ”’ Invariant: All paths must be validated against path traversal. + - πŸ”— DEPENDS_ON -> `backend.src.models.storage` + - Ζ’ **list_files** (`Function`) + - πŸ“ List all files and directories in the storage system. + - πŸ”— 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` + - Ζ’ **get_file_by_path** (`Function`) + - πŸ“ Retrieve a file by validated absolute/relative path under storage root. + - πŸ”— CALLS -> `StoragePlugin.get_storage_root` + - πŸ”— CALLS -> `StoragePlugin.validate_path` +- πŸ“¦ **ReportsRouter** (`Module`) `[CRITICAL]` + - πŸ“ FastAPI router for unified task report list and detail retrieval endpoints. + - πŸ—οΈ Layer: UI (API) + - πŸ”’ Invariant: Endpoints are read-only and do not trigger long-running tasks. + - πŸ”— DEPENDS_ON -> `backend.src.services.reports.report_service.ReportsService` + - πŸ”— DEPENDS_ON -> `backend.src.dependencies` + - Ζ’ **_parse_csv_enum_list** (`Function`) + - πŸ“ Parse comma-separated query value into enum list. + - Ζ’ **list_reports** (`Function`) + - πŸ“ Return paginated unified reports list. + - Ζ’ **get_report_detail** (`Function`) + - πŸ“ Return one normalized report detail with diagnostics and next actions. +- πŸ“¦ **backend.src.api.routes.__init__** (`Module`) + - πŸ“ Provide lazy route module loading to avoid heavyweight imports during tests. + - πŸ—οΈ Layer: API + - πŸ”’ Invariant: Only names listed in __all__ are importable via __getattr__. + - πŸ”— DEPENDS_ON -> `importlib` + - Ζ’ **__getattr__** (`Function`) `[TRIVIAL]` + - πŸ“ Lazily import route module by attribute name. +- πŸ“¦ **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`) `[CRITICAL]` + - πŸ“ Retrieve logs for a specific task with optional filtering. + - Ζ’ **get_task_log_stats** (`Function`) + - πŸ“ Get statistics about logs for a task (counts by level and source). + - Ζ’ **get_task_log_sources** (`Function`) + - πŸ“ Get unique sources for a task's logs. + - Ζ’ **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.dashboards** (`Module`) `[CRITICAL]` + - πŸ“ API endpoints for the Dashboard Hub - listing dashboards with Git and task status + - πŸ—οΈ Layer: API + - πŸ”’ Invariant: All dashboard responses include git_status and last_task metadata + - πŸ”— DEPENDS_ON -> `backend.src.dependencies` + - πŸ”— DEPENDS_ON -> `backend.src.services.resource_service` + - πŸ”— DEPENDS_ON -> `backend.src.core.superset_client` + - πŸ“¦ **GitStatus** (`DataClass`) + - πŸ“¦ **LastTask** (`DataClass`) + - πŸ“¦ **DashboardItem** (`DataClass`) + - πŸ“¦ **DashboardsResponse** (`DataClass`) + - πŸ“¦ **DashboardChartItem** (`DataClass`) + - πŸ“¦ **DashboardDatasetItem** (`DataClass`) + - πŸ“¦ **DashboardDetailResponse** (`DataClass`) + - πŸ“¦ **DashboardTaskHistoryItem** (`DataClass`) + - πŸ“¦ **DashboardTaskHistoryResponse** (`DataClass`) + - πŸ“¦ **DatabaseMapping** (`DataClass`) + - πŸ“¦ **DatabaseMappingsResponse** (`DataClass`) + - Ζ’ **get_dashboards** (`Function`) + - πŸ“ Fetch list of dashboards from a specific environment with Git status and last task status + - πŸ”— CALLS -> `ResourceService.get_dashboards_with_status` + - Ζ’ **get_database_mappings** (`Function`) + - πŸ“ Get database mapping suggestions between source and target environments + - πŸ”— CALLS -> `MappingService.get_suggestions` + - Ζ’ **get_dashboard_detail** (`Function`) + - πŸ“ Fetch detailed dashboard info with related charts and datasets + - πŸ”— CALLS -> `SupersetClient.get_dashboard_detail` + - Ζ’ **_task_matches_dashboard** (`Function`) + - πŸ“ Checks whether task params are tied to a specific dashboard and environment. + - Ζ’ **get_dashboard_tasks_history** (`Function`) + - πŸ“ Returns history of backup and LLM validation tasks for a dashboard. + - Ζ’ **get_dashboard_thumbnail** (`Function`) + - πŸ“ Proxies Superset dashboard thumbnail with cache support. + - πŸ“¦ **MigrateRequest** (`DataClass`) + - πŸ“¦ **TaskResponse** (`DataClass`) + - Ζ’ **migrate_dashboards** (`Function`) + - πŸ“ Trigger bulk migration of dashboards from source to target environment + - πŸ”— DISPATCHES -> `MigrationPlugin` + - πŸ”— CALLS -> `task_manager.create_task` + - πŸ“¦ **BackupRequest** (`DataClass`) + - Ζ’ **backup_dashboards** (`Function`) + - πŸ“ Trigger bulk backup of dashboards with optional cron schedule + - πŸ”— DISPATCHES -> `BackupPlugin` + - πŸ”— CALLS -> `task_manager.create_task` + - Ζ’ **_sort_key** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.api.routes.__tests__.test_dashboards** (`Module`) + - πŸ“ Unit tests for Dashboards API endpoints + - πŸ—οΈ Layer: API + - Ζ’ **test_get_dashboards_success** (`Function`) + - Ζ’ **test_get_dashboards_with_search** (`Function`) + - Ζ’ **test_get_dashboards_empty** (`Function`) + - Ζ’ **test_get_dashboards_superset_failure** (`Function`) + - Ζ’ **test_get_dashboards_env_not_found** (`Function`) + - Ζ’ **test_get_dashboards_invalid_pagination** (`Function`) + - Ζ’ **test_get_dashboard_detail_success** (`Function`) + - Ζ’ **test_get_dashboard_detail_env_not_found** (`Function`) + - Ζ’ **test_migrate_dashboards_success** (`Function`) + - Ζ’ **test_migrate_dashboards_no_ids** (`Function`) + - Ζ’ **test_migrate_dashboards_env_not_found** (`Function`) + - Ζ’ **test_backup_dashboards_success** (`Function`) + - Ζ’ **test_backup_dashboards_env_not_found** (`Function`) + - Ζ’ **test_get_database_mappings_success** (`Function`) + - Ζ’ **test_get_database_mappings_env_not_found** (`Function`) + - Ζ’ **test_get_dashboard_tasks_history_filters_success** (`Function`) + - Ζ’ **test_get_dashboard_thumbnail_success** (`Function`) + - Ζ’ **mock_deps** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **mock_get_dashboards** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_network_request** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.tests.test_reports_openapi_conformance** (`Module`) + - πŸ“ Validate implemented reports payload shape against OpenAPI-required top-level contract fields. + - πŸ—οΈ Layer: Domain (Tests) + - πŸ”’ Invariant: List and detail payloads include required contract keys. + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_all_tasks** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_admin_user** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_reports_list_openapi_required_keys** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_reports_detail_openapi_required_keys** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.tests.test_reports_api** (`Module`) + - πŸ“ Contract tests for GET /api/reports defaults, pagination, and filtering behavior. + - πŸ—οΈ Layer: Domain (Tests) + - πŸ”’ Invariant: API response contract contains {items,total,page,page_size,has_next,applied_filters}. + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_all_tasks** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_admin_user** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_make_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_reports_default_pagination_contract** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_reports_filter_and_pagination** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_reports_handles_mixed_naive_and_aware_datetimes** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_reports_invalid_filter_returns_400** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.api.routes.__tests__.test_datasets** (`Module`) + - πŸ“ Unit tests for Datasets API endpoints + - πŸ—οΈ Layer: API + - πŸ”’ Invariant: Endpoint contracts remain stable for success and validation failure paths. + - Ζ’ **test_get_datasets_success** (`Function`) + - πŸ“ Validate successful datasets listing contract for an existing environment. + - Ζ’ **test_get_datasets_env_not_found** (`Function`) + - Ζ’ **test_get_datasets_invalid_pagination** (`Function`) + - Ζ’ **test_map_columns_success** (`Function`) + - Ζ’ **test_map_columns_invalid_source_type** (`Function`) + - Ζ’ **test_generate_docs_success** (`Function`) + - Ζ’ **test_map_columns_empty_ids** (`Function`) + - Ζ’ **test_generate_docs_empty_ids** (`Function`) + - Ζ’ **test_generate_docs_env_not_found** (`Function`) + - Ζ’ **test_get_datasets_superset_failure** (`Function`) + - Ζ’ **mock_deps** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.tests.test_reports_detail_api** (`Module`) + - πŸ“ Contract tests for GET /api/reports/{report_id} detail endpoint behavior. + - πŸ—οΈ Layer: Domain (Tests) + - πŸ”’ Invariant: Detail endpoint tests must keep deterministic assertions for success and not-found contracts. + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_all_tasks** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_admin_user** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_make_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_report_detail_success** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_report_detail_not_found** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.api.routes.__tests__.test_assistant_authz** (`Module`) + - πŸ“ Verify assistant confirmation ownership, expiration, and deny behavior for restricted users. + - πŸ—οΈ Layer: UI (API Tests) + - πŸ”’ Invariant: Security-sensitive flows fail closed for unauthorized actors. + - πŸ”— DEPENDS_ON -> `backend.src.api.routes.assistant` + - Ζ’ **_run_async** (`Function`) `[TRIVIAL]` + - πŸ“ Execute async endpoint handler in synchronous test context. + - β„‚ **_FakeTask** (`Class`) `[TRIVIAL]` + - πŸ“ Lightweight task model used for assistant authz tests. + - β„‚ **_FakeTaskManager** (`Class`) `[TRIVIAL]` + - πŸ“ Minimal task manager for deterministic operation creation and lookup. + - β„‚ **_FakeConfigManager** (`Class`) `[TRIVIAL]` + - πŸ“ Provide deterministic environment aliases required by intent parsing. + - Ζ’ **_admin_user** (`Function`) `[TRIVIAL]` + - πŸ“ Build admin principal fixture. + - Ζ’ **_other_admin_user** (`Function`) `[TRIVIAL]` + - πŸ“ Build second admin principal fixture for ownership tests. + - Ζ’ **_limited_user** (`Function`) `[TRIVIAL]` + - πŸ“ Build limited principal without required assistant execution privileges. + - β„‚ **_FakeQuery** (`Class`) `[TRIVIAL]` + - πŸ“ Minimal chainable query object for fake DB interactions. + - β„‚ **_FakeDb** (`Class`) `[TRIVIAL]` + - πŸ“ In-memory session substitute for assistant route persistence calls. + - Ζ’ **_clear_assistant_state** (`Function`) `[TRIVIAL]` + - πŸ“ Reset assistant process-local state between test cases. + - Ζ’ **test_confirmation_owner_mismatch_returns_403** (`Function`) + - πŸ“ Confirm endpoint should reject requests from user that does not own the confirmation token. + - Ζ’ **test_expired_confirmation_cannot_be_confirmed** (`Function`) + - πŸ“ Expired confirmation token should be rejected and not create task. + - Ζ’ **test_limited_user_cannot_launch_restricted_operation** (`Function`) + - πŸ“ Limited user should receive denied state for privileged operation. + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **create_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_tasks** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_environments** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **filter** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **order_by** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **first** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **all** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **limit** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **offset** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **count** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **add** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **merge** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **query** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **commit** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **rollback** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.api.routes.__tests__.test_assistant_api** (`Module`) + - πŸ“ Validate assistant API endpoint logic via direct async handler invocation. + - πŸ—οΈ Layer: UI (API Tests) + - πŸ”’ Invariant: Every test clears assistant in-memory state before execution. + - πŸ”— DEPENDS_ON -> `backend.src.api.routes.assistant` + - Ζ’ **_run_async** (`Function`) `[TRIVIAL]` + - πŸ“ Execute async endpoint handler in synchronous test context. + - β„‚ **_FakeTask** (`Class`) `[TRIVIAL]` + - πŸ“ Lightweight task stub used by assistant API tests. + - β„‚ **_FakeTaskManager** (`Class`) `[TRIVIAL]` + - πŸ“ Minimal async-compatible TaskManager fixture for deterministic test flows. + - β„‚ **_FakeConfigManager** (`Class`) `[TRIVIAL]` + - πŸ“ Environment config fixture with dev/prod aliases for parser tests. + - Ζ’ **_admin_user** (`Function`) `[TRIVIAL]` + - πŸ“ Build admin principal fixture. + - Ζ’ **_limited_user** (`Function`) `[TRIVIAL]` + - πŸ“ Build non-admin principal fixture. + - β„‚ **_FakeQuery** (`Class`) `[TRIVIAL]` + - πŸ“ Minimal chainable query object for fake SQLAlchemy-like DB behavior in tests. + - β„‚ **_FakeDb** (`Class`) `[TRIVIAL]` + - πŸ“ In-memory fake database implementing subset of Session interface used by assistant routes. + - Ζ’ **_clear_assistant_state** (`Function`) `[TRIVIAL]` + - πŸ“ Reset in-memory assistant registries for isolation between tests. + - Ζ’ **test_unknown_command_returns_needs_clarification** (`Function`) + - πŸ“ Unknown command should return clarification state and unknown intent. + - Ζ’ **test_capabilities_question_returns_successful_help** (`Function`) + - πŸ“ Capability query should return deterministic help response, not clarification. + - Ζ’ **test_non_admin_command_returns_denied** (`Function`) + - πŸ“ Non-admin user must receive denied state for privileged command. + - Ζ’ **test_migration_to_prod_requires_confirmation_and_can_be_confirmed** (`Function`) + - πŸ“ Migration to prod must require confirmation and then start task after explicit confirm. + - Ζ’ **test_status_query_returns_task_status** (`Function`) + - πŸ“ Task status command must surface current status text for existing task id. + - Ζ’ **test_status_query_without_task_id_returns_latest_user_task** (`Function`) + - πŸ“ Status command without explicit task_id should resolve to latest task for current user. + - Ζ’ **test_llm_validation_with_dashboard_ref_requires_confirmation** (`Function`) + - πŸ“ LLM validation with dashboard_ref should now require confirmation before dispatch. + - Ζ’ **test_list_conversations_groups_by_conversation_and_marks_archived** (`Function`) + - πŸ“ Conversations endpoint must group messages and compute archived marker by inactivity threshold. + - Ζ’ **test_history_from_latest_returns_recent_page_first** (`Function`) + - πŸ“ History endpoint from_latest mode must return newest page while preserving chronological order in chunk. + - Ζ’ **test_list_conversations_archived_only_filters_active** (`Function`) + - πŸ“ archived_only mode must return only archived conversations. + - Ζ’ **test_guarded_operation_always_requires_confirmation** (`Function`) + - πŸ“ Non-dangerous (guarded) commands must still require confirmation before execution. + - Ζ’ **test_guarded_operation_confirm_roundtrip** (`Function`) + - πŸ“ Guarded operation must execute successfully after explicit confirmation. + - Ζ’ **test_confirm_nonexistent_id_returns_404** (`Function`) + - πŸ“ Confirming a non-existent ID should raise 404. + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **create_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_tasks** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_environments** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **filter** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **order_by** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **first** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **all** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **count** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **offset** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **limit** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **add** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **merge** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **query** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **commit** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **rollback** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.api.routes.__tests__.test_migration_routes** (`Module`) + - πŸ“ Unit tests for migration API route handlers. + - πŸ—οΈ Layer: API + - Ζ’ **db_session** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_make_config_manager** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_migration_settings_returns_default_cron** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_migration_settings_returns_fallback_when_no_cron** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_update_migration_settings_saves_cron** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_update_migration_settings_rejects_missing_cron** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_resource_mappings_returns_formatted_list** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_resource_mappings_respects_pagination** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_resource_mappings_search_by_name** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_resource_mappings_filter_by_env** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_resource_mappings_filter_by_type** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_mock_env** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_make_sync_config_manager** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_trigger_sync_now_creates_env_row_and_syncs** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_trigger_sync_now_rejects_empty_environments** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_trigger_sync_now_handles_partial_failure** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_trigger_sync_now_idempotent_env_upsert** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboards_success** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboards_invalid_env_raises_404** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_execute_migration_success** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_execute_migration_invalid_env_raises_400** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.models.config** (`Module`) + - πŸ“ Defines database schema for persisted application configuration. + - πŸ—οΈ Layer: Domain + - πŸ”— DEPENDS_ON -> `sqlalchemy` + - β„‚ **AppConfigRecord** (`Class`) + - πŸ“ Stores the single source of truth for application configuration. +- πŸ“¦ **backend.src.models.llm** (`Module`) + - πŸ“ SQLAlchemy models for LLM provider configuration and validation results. + - πŸ—οΈ Layer: Domain + - β„‚ **LLMProvider** (`Class`) + - πŸ“ SQLAlchemy model for LLM provider configuration. + - β„‚ **ValidationRecord** (`Class`) + - πŸ“ SQLAlchemy model for dashboard validation history. + - Ζ’ **generate_uuid** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **GitModels** (`Module`) `[TRIVIAL]` + - πŸ“ Git-specific SQLAlchemy models for configuration and repository tracking. + - πŸ—οΈ Layer: Model + - β„‚ **GitServerConfig** (`Class`) `[TRIVIAL]` + - πŸ“ Configuration for a Git server connection. + - β„‚ **GitRepository** (`Class`) `[TRIVIAL]` + - πŸ“ Tracking for a local Git repository linked to a dashboard. + - β„‚ **DeploymentEnvironment** (`Class`) `[TRIVIAL]` + - πŸ“ Target Superset environments for dashboard deployment. +- πŸ“¦ **backend.src.models.task** (`Module`) `[TRIVIAL]` + - πŸ“ Defines the database schema for task execution records. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: All primary keys are UUID strings. + - πŸ”— DEPENDS_ON -> `sqlalchemy` + - β„‚ **TaskRecord** (`Class`) `[TRIVIAL]` + - πŸ“ Represents a persistent record of a task execution. + - β„‚ **TaskLogRecord** (`Class`) `[CRITICAL]` + - πŸ“ Represents a single persistent log entry for a task. + - πŸ”’ Invariant: Each log entry belongs to exactly one task. + - πŸ”— DEPENDS_ON -> `TaskRecord` +- πŸ“¦ **backend.src.models.connection** (`Module`) `[TRIVIAL]` + - πŸ“ Defines the database schema for external database connection configurations. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: All primary keys are UUID strings. + - πŸ”— DEPENDS_ON -> `sqlalchemy` + - β„‚ **ConnectionConfig** (`Class`) `[TRIVIAL]` + - πŸ“ Stores credentials for external databases used for column mapping. +- πŸ“¦ **backend.src.models.mapping** (`Module`) + - πŸ“ Defines the database schema for environment metadata and database mappings using SQLAlchemy. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: All primary keys are UUID strings. + - πŸ”— DEPENDS_ON -> `sqlalchemy` + - β„‚ **ResourceType** (`Class`) `[TRIVIAL]` + - πŸ“ Enumeration of possible Superset resource types for ID mapping. + - β„‚ **MigrationStatus** (`Class`) `[TRIVIAL]` + - πŸ“ 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`) `[TRIVIAL]` + - πŸ“ Represents a single migration execution job. + - β„‚ **ResourceMapping** (`Class`) + - πŸ“ Maps a universal UUID for a resource to its actual ID on a specific environment. +- πŸ“¦ **backend.src.models.report** (`Module`) `[CRITICAL]` + - πŸ“ Canonical report schemas for unified task reporting across heterogeneous task types. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: Canonical report fields are always present for every report item. + - πŸ”— DEPENDS_ON -> `backend.src.core.task_manager.models` + - β„‚ **TaskType** (`Class`) `[CRITICAL]` + - πŸ“ Supported normalized task report types. + - πŸ”’ Invariant: Must contain valid generic task type mappings. + - β„‚ **ReportStatus** (`Class`) `[CRITICAL]` + - πŸ“ Supported normalized report status values. + - πŸ”’ Invariant: TaskStatus enum mapping logic holds. + - β„‚ **ErrorContext** (`Class`) `[CRITICAL]` + - πŸ“ Error and recovery context for failed/partial reports. + - πŸ”’ Invariant: The properties accurately describe error state. + - β„‚ **TaskReport** (`Class`) `[CRITICAL]` + - πŸ“ Canonical normalized report envelope for one task execution. + - πŸ”’ Invariant: Must represent canonical task record attributes. + - β„‚ **ReportQuery** (`Class`) `[CRITICAL]` + - πŸ“ Query object for server-side report filtering, sorting, and pagination. + - πŸ”’ Invariant: Time and pagination queries are mutually consistent. + - β„‚ **ReportCollection** (`Class`) `[CRITICAL]` + - πŸ“ Paginated collection of normalized task reports. + - πŸ”’ Invariant: Represents paginated data correctly. + - β„‚ **ReportDetailView** (`Class`) `[CRITICAL]` + - πŸ“ Detailed report representation including diagnostics and recovery actions. + - πŸ”’ Invariant: Incorporates a report and logs correctly. + - Ζ’ **_non_empty_str** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_validate_sort_by** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_validate_sort_order** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_validate_time_range** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.models.assistant** (`Module`) + - πŸ“ SQLAlchemy models for assistant audit trail and confirmation tokens. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: Assistant records preserve immutable ids and creation timestamps. + - πŸ”— DEPENDS_ON -> `backend.src.models.mapping` + - β„‚ **AssistantAuditRecord** (`Class`) + - πŸ“ Store audit decisions and outcomes produced by assistant command handling. + - β„‚ **AssistantMessageRecord** (`Class`) + - πŸ“ Persist chat history entries for assistant conversations. + - β„‚ **AssistantConfirmationRecord** (`Class`) + - πŸ“ Persist risky operation confirmation tokens with lifecycle state. +- πŸ“¦ **backend.src.models.storage** (`Module`) `[TRIVIAL]` + - πŸ“ Data models for the storage system. + - πŸ—οΈ Layer: Domain + - β„‚ **FileCategory** (`Class`) `[TRIVIAL]` + - πŸ“ Enumeration of supported file categories in the storage system. + - β„‚ **StorageConfig** (`Class`) `[TRIVIAL]` + - πŸ“ Configuration model for the storage system, defining paths and naming patterns. + - β„‚ **StoredFile** (`Class`) `[TRIVIAL]` + - πŸ“ 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`) `[TRIVIAL]` + - πŸ“ Represents a dashboard available for migration. + - β„‚ **DashboardSelection** (`Class`) `[TRIVIAL]` + - πŸ“ Represents the user's selection of dashboards to migrate. +- πŸ“¦ **backend.src.models.auth** (`Module`) + - πŸ“ SQLAlchemy models for multi-user authentication and authorization. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: Usernames and emails must be unique. + - Ζ’ **generate_uuid** (`Function`) + - πŸ“ Generates a unique UUID string. + - πŸ“¦ **user_roles** (`Table`) + - πŸ“ Association table for many-to-many relationship between Users and Roles. + - πŸ“¦ **role_permissions** (`Table`) + - πŸ“ Association table for many-to-many relationship between Roles and Permissions. + - β„‚ **User** (`Class`) + - πŸ“ Represents an identity that can authenticate to the system. + - β„‚ **Role** (`Class`) + - πŸ“ Represents a collection of permissions. + - β„‚ **Permission** (`Class`) + - πŸ“ Represents a specific capability within the system. + - β„‚ **ADGroupMapping** (`Class`) + - πŸ“ Maps an Active Directory group to a local System Role. + - πŸ”— DEPENDS_ON -> `Role` +- πŸ“¦ **test_models** (`Module`) `[TRIVIAL]` + - πŸ“ Unit tests for data models + - πŸ—οΈ Layer: Domain + - Ζ’ **test_environment_model** (`Function`) + - πŸ“ Tests that Environment model correctly stores values. +- πŸ“¦ **test_report_models** (`Module`) + - πŸ“ Unit tests for report Pydantic models and their validators + - πŸ—οΈ Layer: Domain + - Ζ’ **test_enum_values** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_enum_values** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_valid_creation** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_minimal_creation** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_make_report** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_valid_creation** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_empty_report_id_raises** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_whitespace_report_id_raises** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_empty_task_id_raises** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_empty_summary_raises** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_summary_whitespace_trimmed** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_optional_fields** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_with_error_context** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_defaults** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_invalid_sort_by_raises** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_valid_sort_by_values** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_invalid_sort_order_raises** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_valid_sort_order_values** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_time_range_validation_valid** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_time_range_validation_invalid** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_page_ge_1** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_page_size_bounds** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_valid_creation** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_with_items** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_valid_creation** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_with_all_fields** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.services.resource_service** (`Module`) + - πŸ“ Shared service for fetching resource data with Git status and task status + - πŸ—οΈ Layer: Service + - πŸ”’ Invariant: All resources include metadata about their current state + - πŸ”— DEPENDS_ON -> `backend.src.core.superset_client` + - πŸ”— DEPENDS_ON -> `backend.src.core.task_manager` + - πŸ”— DEPENDS_ON -> `backend.src.services.git_service` + - β„‚ **ResourceService** (`Class`) + - πŸ“ Provides centralized access to resource data with enhanced metadata + - Ζ’ **__init__** (`Function`) + - πŸ“ Initialize the resource service with dependencies + - Ζ’ **get_dashboards_with_status** (`Function`) + - πŸ“ Fetch dashboards from environment with Git status and last task status + - πŸ”— CALLS -> `SupersetClient.get_dashboards_summary` + - πŸ”— CALLS -> `self._get_git_status_for_dashboard` + - πŸ”— CALLS -> `self._get_last_task_for_resource` + - Ζ’ **get_datasets_with_status** (`Function`) + - πŸ“ Fetch datasets from environment with mapping progress and last task status + - πŸ”— CALLS -> `SupersetClient.get_datasets_summary` + - πŸ”— CALLS -> `self._get_last_task_for_resource` + - Ζ’ **get_activity_summary** (`Function`) + - πŸ“ Get summary of active and recent tasks for the activity indicator + - Ζ’ **_get_git_status_for_dashboard** (`Function`) + - πŸ“ Get Git sync status for a dashboard + - πŸ”— CALLS -> `GitService.get_repo` + - Ζ’ **_get_last_task_for_resource** (`Function`) + - πŸ“ Get the most recent task for a specific resource + - Ζ’ **_extract_resource_name_from_task** (`Function`) + - πŸ“ Extract resource name from task params + - Ζ’ **_extract_resource_type_from_task** (`Function`) + - πŸ“ Extract resource type from task params +- πŸ“¦ **backend.src.services.llm_prompt_templates** (`Module`) + - πŸ“ Provide default LLM prompt templates and normalization helpers for runtime usage. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: All required prompt template keys are always present after normalization. + - πŸ”— DEPENDS_ON -> `backend.src.core.config_manager` + - πŸ“¦ **DEFAULT_LLM_PROMPTS** (`Constant`) + - πŸ“ Default prompt templates used by documentation, dashboard validation, and git commit generation. + - πŸ“¦ **DEFAULT_LLM_PROVIDER_BINDINGS** (`Constant`) + - πŸ“ Default provider binding per task domain. + - πŸ“¦ **DEFAULT_LLM_ASSISTANT_SETTINGS** (`Constant`) + - πŸ“ Default planner settings for assistant chat intent model/provider resolution. + - Ζ’ **normalize_llm_settings** (`Function`) + - πŸ“ Ensure llm settings contain stable schema with prompts section and default templates. + - Ζ’ **is_multimodal_model** (`Function`) + - πŸ“ Heuristically determine whether model supports image input required for dashboard validation. + - Ζ’ **resolve_bound_provider_id** (`Function`) + - πŸ“ Resolve provider id configured for a task binding with fallback to default provider. + - Ζ’ **render_prompt** (`Function`) + - πŸ“ Render prompt template using deterministic placeholder replacement with graceful fallback. +- πŸ“¦ **backend.src.services.llm_provider** (`Module`) + - πŸ“ Service for managing LLM provider configurations with encrypted API keys. + - πŸ—οΈ Layer: Domain + - πŸ”— DEPENDS_ON -> `backend.src.core.database` + - πŸ”— DEPENDS_ON -> `backend.src.models.llm` + - β„‚ **EncryptionManager** (`Class`) `[CRITICAL]` + - πŸ“ Handles encryption and decryption of sensitive data like API keys. + - πŸ”’ Invariant: Uses a secret key from environment or a default one (fallback only for dev). + - Ζ’ **EncryptionManager.__init__** (`Function`) + - πŸ“ Initialize the encryption manager with a Fernet key. + - Ζ’ **EncryptionManager.encrypt** (`Function`) + - πŸ“ Encrypt a plaintext string. + - Ζ’ **EncryptionManager.decrypt** (`Function`) + - πŸ“ Decrypt an encrypted string. + - β„‚ **LLMProviderService** (`Class`) + - πŸ“ Service to manage LLM provider lifecycle. + - Ζ’ **LLMProviderService.__init__** (`Function`) + - πŸ“ Initialize the service with database session. + - Ζ’ **get_all_providers** (`Function`) + - πŸ“ Returns all configured LLM providers. + - Ζ’ **get_provider** (`Function`) + - πŸ“ Returns a single LLM provider by ID. + - Ζ’ **create_provider** (`Function`) + - πŸ“ Creates a new LLM provider with encrypted API key. + - Ζ’ **update_provider** (`Function`) + - πŸ“ Updates an existing LLM provider. + - Ζ’ **delete_provider** (`Function`) + - πŸ“ Deletes an LLM provider. + - Ζ’ **get_decrypted_api_key** (`Function`) + - πŸ“ Returns the decrypted API key for a provider. + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **encrypt** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **decrypt** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.services** (`Module`) + - πŸ“ Package initialization for services module + - πŸ—οΈ Layer: Core + - Ζ’ **__getattr__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.services.auth_service** (`Module`) + - πŸ“ Orchestrates authentication business logic. + - πŸ—οΈ Layer: Service + - πŸ”’ Invariant: Authentication must verify both credentials and account status. + - β„‚ **AuthService** (`Class`) + - πŸ“ Provides high-level authentication services. + - Ζ’ **__init__** (`Function`) + - πŸ“ Initializes the service with a database session. + - Ζ’ **authenticate_user** (`Function`) + - πŸ“ Authenticates a user with username and password. + - Ζ’ **create_session** (`Function`) + - πŸ“ Creates a JWT session for an authenticated user. + - Ζ’ **provision_adfs_user** (`Function`) + - πŸ“ Just-In-Time (JIT) provisioning for ADFS users based on group mappings. +- πŸ“¦ **backend.src.services.git_service** (`Module`) + - πŸ“ Core Git logic using GitPython to manage dashboard repositories. + - πŸ—οΈ Layer: Service + - πŸ”’ Invariant: All Git operations must be performed on a valid local directory. + - β„‚ **GitService** (`Class`) + - πŸ“ Wrapper for GitPython operations with semantic logging and error handling. + - Ζ’ **__init__** (`Function`) + - πŸ“ 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 + - πŸ”’ Invariant: Suggestions are based on database names. + - πŸ”— 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. +- πŸ“¦ **test_encryption_manager** (`Module`) + - πŸ“ Unit tests for EncryptionManager encrypt/decrypt functionality. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: Encrypt+decrypt roundtrip always returns original plaintext. + - β„‚ **TestEncryptionManager** (`Class`) + - πŸ“ Validate EncryptionManager encrypt/decrypt roundtrip, uniqueness, and error handling. + - Ζ’ **test_encrypt_decrypt_roundtrip** (`Function`) + - πŸ“ Encrypt then decrypt returns original plaintext. + - Ζ’ **test_encrypt_produces_different_output** (`Function`) + - πŸ“ Same plaintext produces different ciphertext (Fernet uses random IV). + - Ζ’ **test_different_inputs_yield_different_ciphertext** (`Function`) + - πŸ“ Different inputs produce different ciphertexts. + - Ζ’ **test_decrypt_invalid_data_raises** (`Function`) + - πŸ“ Decrypting invalid data raises InvalidToken. + - Ζ’ **test_encrypt_empty_string** (`Function`) + - πŸ“ Encrypting and decrypting an empty string works. + - Ζ’ **test_custom_key_roundtrip** (`Function`) + - πŸ“ Custom Fernet key produces valid roundtrip. + - Ζ’ **_make_manager** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **encrypt** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **decrypt** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **encrypt** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **decrypt** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.services.__tests__.test_llm_prompt_templates** (`Module`) + - πŸ“ Validate normalization and rendering behavior for configurable LLM prompt templates. + - πŸ—οΈ Layer: Domain Tests + - πŸ”’ Invariant: All required prompt keys remain available after normalization. + - πŸ”— DEPENDS_ON -> `backend.src.services.llm_prompt_templates` + - Ζ’ **test_normalize_llm_settings_adds_default_prompts** (`Function`) + - πŸ“ Ensure legacy/partial llm settings are expanded with all prompt defaults. + - Ζ’ **test_normalize_llm_settings_keeps_custom_prompt_values** (`Function`) + - πŸ“ Ensure user-customized prompt values are preserved during normalization. + - Ζ’ **test_render_prompt_replaces_known_placeholders** (`Function`) + - πŸ“ Ensure template placeholders are deterministically replaced. + - Ζ’ **test_is_multimodal_model_detects_known_vision_models** (`Function`) + - πŸ“ Ensure multimodal model detection recognizes common vision-capable model names. + - Ζ’ **test_resolve_bound_provider_id_prefers_binding_then_default** (`Function`) + - πŸ“ Verify provider binding resolution priority. + - Ζ’ **test_normalize_llm_settings_keeps_assistant_planner_settings** (`Function`) + - πŸ“ Ensure assistant planner provider/model fields are preserved and normalized. +- πŸ“¦ **backend.src.services.__tests__.test_resource_service** (`Module`) + - πŸ“ Unit tests for ResourceService + - πŸ—οΈ Layer: Service + - πŸ”’ Invariant: Resource summaries preserve task linkage and status projection behavior. + - Ζ’ **test_get_dashboards_with_status** (`Function`) + - πŸ“ Validate dashboard enrichment includes git/task status projections. + - Ζ’ **test_get_datasets_with_status** (`Function`) + - Ζ’ **test_get_activity_summary** (`Function`) + - Ζ’ **test_get_git_status_for_dashboard_no_repo** (`Function`) + - Ζ’ **test_get_last_task_for_resource** (`Function`) + - Ζ’ **test_extract_resource_name_from_task** (`Function`) + - Ζ’ **test_get_last_task_for_resource_empty_tasks** (`Function`) + - Ζ’ **test_get_last_task_for_resource_no_match** (`Function`) +- πŸ“¦ **backend.src.services.reports.normalizer** (`Module`) `[CRITICAL]` + - πŸ“ Convert task manager task objects into canonical unified TaskReport entities with deterministic fallback behavior. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: Unknown task types and partial payloads remain visible via fallback mapping. + - πŸ”— DEPENDS_ON -> `backend.src.core.task_manager.models.Task` + - πŸ”— DEPENDS_ON -> `backend.src.models.report` + - πŸ”— DEPENDS_ON -> `backend.src.services.reports.type_profiles` + - Ζ’ **status_to_report_status** (`Function`) + - πŸ“ Normalize internal task status to canonical report status. + - Ζ’ **build_summary** (`Function`) + - πŸ“ Build deterministic user-facing summary from task payload and status. + - Ζ’ **extract_error_context** (`Function`) + - πŸ“ Extract normalized error context and next actions for failed/partial reports. + - Ζ’ **normalize_task_report** (`Function`) + - πŸ“ Convert one Task to canonical TaskReport envelope. +- πŸ“¦ **backend.src.services.reports.type_profiles** (`Module`) `[CRITICAL]` + - πŸ“ Deterministic mapping of plugin/task identifiers to canonical report task types and fallback profile metadata. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: Unknown input always resolves to TaskType.UNKNOWN with a single fallback profile. + - πŸ”— DEPENDS_ON -> `backend.src.models.report.TaskType` + - πŸ“¦ **PLUGIN_TO_TASK_TYPE** (`Data`) + - πŸ“ Maps plugin identifiers to normalized report task types. + - πŸ“¦ **TASK_TYPE_PROFILES** (`Data`) + - πŸ“ Profile metadata registry for each normalized task type. + - Ζ’ **resolve_task_type** (`Function`) + - πŸ“ Resolve canonical task type from plugin/task identifier with guaranteed fallback. + - Ζ’ **get_type_profile** (`Function`) + - πŸ“ Return deterministic profile metadata for a task type. +- πŸ“¦ **backend.src.services.reports.report_service** (`Module`) `[CRITICAL]` + - πŸ“ Aggregate, normalize, filter, and paginate task reports for unified list/detail API use cases. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: List responses are deterministic and include applied filter echo metadata. + - πŸ”— DEPENDS_ON -> `backend.src.core.task_manager.manager.TaskManager` + - πŸ”— DEPENDS_ON -> `backend.src.models.report` + - πŸ”— DEPENDS_ON -> `backend.src.services.reports.normalizer` + - β„‚ **ReportsService** (`Class`) `[CRITICAL]` + - πŸ“ Service layer for list/detail report retrieval and normalization. + - πŸ”’ Invariant: Service methods are read-only over task history source. + - Ζ’ **__init__** (`Function`) `[CRITICAL]` + - πŸ“ Initialize service with TaskManager dependency. + - πŸ”’ Invariant: Constructor performs no task mutations. + - Ζ’ **_load_normalized_reports** (`Function`) + - πŸ“ Build normalized reports from all available tasks. + - πŸ”’ Invariant: Every returned item is a TaskReport. + - Ζ’ **_to_utc_datetime** (`Function`) + - πŸ“ Normalize naive/aware datetime values to UTC-aware datetime for safe comparisons. + - πŸ”’ Invariant: Naive datetimes are interpreted as UTC to preserve deterministic ordering/filtering. + - Ζ’ **_datetime_sort_key** (`Function`) + - πŸ“ Produce stable numeric sort key for report timestamps. + - πŸ”’ Invariant: Mixed naive/aware datetimes never raise TypeError. + - Ζ’ **_matches_query** (`Function`) + - πŸ“ Apply query filtering to a report. + - πŸ”’ Invariant: Filter evaluation is side-effect free. + - Ζ’ **_sort_reports** (`Function`) + - πŸ“ Sort reports deterministically according to query settings. + - πŸ”’ Invariant: Sorting criteria are deterministic for equal input. + - Ζ’ **list_reports** (`Function`) + - πŸ“ Return filtered, sorted, paginated report collection. + - Ζ’ **get_report_detail** (`Function`) + - πŸ“ Return one normalized report with timeline/diagnostics/next actions. +- πŸ“¦ **test_report_service** (`Module`) + - πŸ“ Unit tests for ReportsService list/detail operations + - πŸ—οΈ Layer: Domain + - Ζ’ **_make_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_make_service** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_empty_tasks_returns_empty_collection** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_single_task_normalized** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_pagination_first_page** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_pagination_last_page** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_filter_by_status** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_filter_by_task_type** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_search_filter** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_sort_by_status** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_applied_filters_echoed** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_make_service** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_detail_found** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_detail_not_found** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_detail_includes_timeline** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_detail_failed_task_has_next_actions** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_detail_success_task_no_error_next_actions** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.tests.test_report_normalizer** (`Module`) + - πŸ“ Validate unknown task type fallback and partial payload normalization behavior. + - πŸ—οΈ Layer: Domain (Tests) + - πŸ”’ Invariant: Unknown plugin types are mapped to canonical unknown task type. + - Ζ’ **test_unknown_type_maps_to_unknown_profile** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_partial_payload_keeps_report_visible_with_placeholders** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **BackupPlugin** (`Module`) + - πŸ“ A plugin that provides functionality to back up Superset dashboards. + - πŸ—οΈ Layer: App + - πŸ”— IMPLEMENTS -> `PluginBase` + - πŸ”— DEPENDS_ON -> `superset_tool.client` + - πŸ”— DEPENDS_ON -> `superset_tool.utils` + - β„‚ **BackupPlugin** (`Class`) + - πŸ“ Implementation of the backup plugin logic. + - Ζ’ **id** (`Function`) + - πŸ“ Returns the unique identifier for the backup plugin. + - Ζ’ **name** (`Function`) + - πŸ“ Returns the human-readable name of the backup plugin. + - Ζ’ **description** (`Function`) + - πŸ“ Returns a description of the backup plugin. + - Ζ’ **version** (`Function`) + - πŸ“ Returns the version of the backup plugin. + - Ζ’ **ui_route** (`Function`) + - πŸ“ Returns the frontend route for the backup plugin. + - Ζ’ **get_schema** (`Function`) + - πŸ“ Returns the JSON schema for backup plugin parameters. + - Ζ’ **execute** (`Function`) + - πŸ“ Executes the dashboard backup logic with TaskContext support. +- πŸ“¦ **DebugPluginModule** (`Module`) + - πŸ“ Implements a plugin for system diagnostics and debugging Superset API responses. + - πŸ—οΈ Layer: Plugins + - β„‚ **DebugPlugin** (`Class`) + - πŸ“ Plugin for system diagnostics and debugging. + - Ζ’ **id** (`Function`) + - πŸ“ Returns the unique identifier for the debug plugin. + - Ζ’ **name** (`Function`) + - πŸ“ Returns the human-readable name of the debug plugin. + - Ζ’ **description** (`Function`) + - πŸ“ Returns a description of the debug plugin. + - Ζ’ **version** (`Function`) + - πŸ“ Returns the version of the debug plugin. + - Ζ’ **ui_route** (`Function`) + - πŸ“ Returns the frontend route for the debug plugin. + - Ζ’ **get_schema** (`Function`) + - πŸ“ Returns the JSON schema for the debug plugin parameters. + - Ζ’ **execute** (`Function`) + - πŸ“ Executes the debug logic with TaskContext support. + - Ζ’ **_test_db_api** (`Function`) + - πŸ“ Tests database API connectivity for source and target environments. + - Ζ’ **_get_dataset_structure** (`Function`) + - πŸ“ Retrieves the structure of a dataset. +- πŸ“¦ **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. + - Ζ’ **ui_route** (`Function`) + - πŸ“ Returns the frontend route for the search plugin. + - Ζ’ **get_schema** (`Function`) + - πŸ“ Returns the JSON schema for the search plugin parameters. + - Ζ’ **execute** (`Function`) + - πŸ“ Executes the dataset search logic with TaskContext support. + - Ζ’ **_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. + - Ζ’ **ui_route** (`Function`) + - πŸ“ Returns the frontend route for the mapper plugin. + - Ζ’ **get_schema** (`Function`) + - πŸ“ Returns the JSON schema for the mapper plugin parameters. + - Ζ’ **execute** (`Function`) + - πŸ“ Executes the dataset mapping logic with TaskContext support. +- πŸ“¦ **backend.src.plugins.git_plugin** (`Module`) + - πŸ“ ΠŸΡ€Π΅Π΄ΠΎΡΡ‚Π°Π²Π»ΡΠ΅Ρ‚ ΠΏΠ»Π°Π³ΠΈΠ½ для вСрсионирования ΠΈ развСртывания Π΄Π°ΡˆΠ±ΠΎΡ€Π΄ΠΎΠ² Superset. + - πŸ—οΈ Layer: Plugin + - πŸ”’ Invariant: ВсС ΠΎΠΏΠ΅Ρ€Π°Ρ†ΠΈΠΈ с Git Π΄ΠΎΠ»ΠΆΠ½Ρ‹ Π²Ρ‹ΠΏΠΎΠ»Π½ΡΡ‚ΡŒΡΡ Ρ‡Π΅Ρ€Π΅Π· GitService. + - β„‚ **GitPlugin** (`Class`) + - πŸ“ РСализация ΠΏΠ»Π°Π³ΠΈΠ½Π° Git Integration для управлСния вСрсиями Π΄Π°ΡˆΠ±ΠΎΡ€Π΄ΠΎΠ². + - Ζ’ **__init__** (`Function`) + - πŸ“ Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·ΠΈΡ€ΡƒΠ΅Ρ‚ ΠΏΠ»Π°Π³ΠΈΠ½ ΠΈ Π΅Π³ΠΎ зависимости. + - Ζ’ **id** (`Function`) + - πŸ“ Returns the plugin identifier. + - Ζ’ **name** (`Function`) + - πŸ“ Returns the plugin name. + - Ζ’ **description** (`Function`) + - πŸ“ Returns the plugin description. + - Ζ’ **version** (`Function`) + - πŸ“ Returns the plugin version. + - Ζ’ **ui_route** (`Function`) + - πŸ“ Returns the frontend route for the git plugin. + - Ζ’ **get_schema** (`Function`) + - πŸ“ Π’ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ JSON-схСму ΠΏΠ°Ρ€Π°ΠΌΠ΅Ρ‚Ρ€ΠΎΠ² для выполнСния Π·Π°Π΄Π°Ρ‡ ΠΏΠ»Π°Π³ΠΈΠ½Π°. + - Ζ’ **initialize** (`Function`) + - πŸ“ ВыполняСт Π½Π°Ρ‡Π°Π»ΡŒΠ½ΡƒΡŽ настройку ΠΏΠ»Π°Π³ΠΈΠ½Π°. + - Ζ’ **execute** (`Function`) + - πŸ“ Основной ΠΌΠ΅Ρ‚ΠΎΠ΄ выполнСния Π·Π°Π΄Π°Ρ‡ ΠΏΠ»Π°Π³ΠΈΠ½Π° с ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠΎΠΉ TaskContext. + - πŸ”— CALLS -> `self._handle_sync` + - πŸ”— CALLS -> `self._handle_deploy` + - Ζ’ **_handle_sync** (`Function`) + - πŸ“ ЭкспортируСт Π΄Π°ΡˆΠ±ΠΎΡ€Π΄ ΠΈΠ· Superset ΠΈ распаковываСт Π² Git-Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ. + - πŸ”— CALLS -> `src.services.git_service.GitService.get_repo` + - πŸ”— CALLS -> `src.core.superset_client.SupersetClient.export_dashboard` + - Ζ’ **_handle_deploy** (`Function`) + - πŸ“ Π£ΠΏΠ°ΠΊΠΎΠ²Ρ‹Π²Π°Π΅Ρ‚ Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ Π² ZIP ΠΈ ΠΈΠΌΠΏΠΎΡ€Ρ‚ΠΈΡ€ΡƒΠ΅Ρ‚ Π² Ρ†Π΅Π»Π΅Π²ΠΎΠ΅ ΠΎΠΊΡ€ΡƒΠΆΠ΅Π½ΠΈΠ΅ Superset. + - πŸ”— CALLS -> `src.core.superset_client.SupersetClient.import_dashboard` + - Ζ’ **_get_env** (`Function`) + - πŸ“ Π’ΡΠΏΠΎΠΌΠΎΠ³Π°Ρ‚Π΅Π»ΡŒΠ½Ρ‹ΠΉ ΠΌΠ΅Ρ‚ΠΎΠ΄ для получСния ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠΈ окруТСния. +- πŸ“¦ **MigrationPlugin** (`Module`) + - πŸ“ A plugin that provides functionality to migrate Superset dashboards between environments. + - πŸ—οΈ Layer: App + - πŸ”— IMPLEMENTS -> `PluginBase` + - πŸ”— DEPENDS_ON -> `superset_tool.client` + - πŸ”— DEPENDS_ON -> `superset_tool.utils` + - β„‚ **MigrationPlugin** (`Class`) + - πŸ“ Implementation of the migration plugin logic. + - Ζ’ **id** (`Function`) + - πŸ“ Returns the unique identifier for the migration plugin. + - Ζ’ **name** (`Function`) + - πŸ“ Returns the human-readable name of the migration plugin. + - Ζ’ **description** (`Function`) + - πŸ“ Returns a description of the migration plugin. + - Ζ’ **version** (`Function`) + - πŸ“ Returns the version of the migration plugin. + - Ζ’ **ui_route** (`Function`) + - πŸ“ Returns the frontend route for the migration plugin. + - Ζ’ **get_schema** (`Function`) + - πŸ“ Returns the JSON schema for migration plugin parameters. + - Ζ’ **execute** (`Function`) + - πŸ“ Executes the dashboard migration logic with TaskContext support. + - πŸ“¦ **MigrationPlugin.execute** (`Action`) + - πŸ“ Execute the migration logic with proper task logging. +- Ζ’ **schedule_dashboard_validation** (`Function`) + - πŸ“ Schedules a recurring dashboard validation task. +- Ζ’ **_parse_cron** (`Function`) + - πŸ“ Basic cron parser placeholder. +- πŸ“¦ **scheduler** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for backend/src/plugins/llm_analysis/scheduler.py + - πŸ—οΈ Layer: Unknown + - Ζ’ **job_func** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- β„‚ **LLMProviderType** (`Class`) + - πŸ“ Enum for supported LLM providers. +- β„‚ **LLMProviderConfig** (`Class`) + - πŸ“ Configuration for an LLM provider. +- β„‚ **ValidationStatus** (`Class`) + - πŸ“ Enum for dashboard validation status. +- β„‚ **DetectedIssue** (`Class`) + - πŸ“ Model for a single issue detected during validation. +- β„‚ **ValidationResult** (`Class`) + - πŸ“ Model for dashboard validation result. +- Ζ’ **_is_masked_or_invalid_api_key** (`Function`) + - πŸ“ Guards against placeholder or malformed API keys in runtime. +- Ζ’ **_json_safe_value** (`Function`) + - πŸ“ Recursively normalize payload values for JSON serialization. +- β„‚ **DashboardValidationPlugin** (`Class`) + - πŸ“ Plugin for automated dashboard health analysis using LLMs. + - πŸ”— IMPLEMENTS -> `backend.src.core.plugin_base.PluginBase` + - Ζ’ **DashboardValidationPlugin.execute** (`Function`) + - πŸ“ Executes the dashboard validation task with TaskContext support. +- β„‚ **DocumentationPlugin** (`Class`) + - πŸ“ Plugin for automated dataset documentation using LLMs. + - πŸ”— IMPLEMENTS -> `backend.src.core.plugin_base.PluginBase` + - Ζ’ **DocumentationPlugin.execute** (`Function`) + - πŸ“ Executes the dataset documentation task with TaskContext support. +- πŸ“¦ **plugin** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for backend/src/plugins/llm_analysis/plugin.py + - πŸ—οΈ Layer: Unknown + - Ζ’ **id** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **name** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **description** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **version** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_schema** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **execute** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **id** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **name** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **description** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **version** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_schema** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **execute** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- β„‚ **ScreenshotService** (`Class`) + - πŸ“ Handles capturing screenshots of Superset dashboards. + - Ζ’ **ScreenshotService.__init__** (`Function`) + - πŸ“ Initializes the ScreenshotService with environment configuration. + - Ζ’ **ScreenshotService.capture_dashboard** (`Function`) + - πŸ“ Captures a full-page screenshot of a dashboard using Playwright and CDP. +- β„‚ **LLMClient** (`Class`) + - πŸ“ Wrapper for LLM provider APIs. + - Ζ’ **LLMClient.__init__** (`Function`) + - πŸ“ Initializes the LLMClient with provider settings. + - Ζ’ **LLMClient._supports_json_response_format** (`Function`) + - πŸ“ Detect whether provider/model is likely compatible with response_format=json_object. + - Ζ’ **LLMClient.get_json_completion** (`Function`) + - πŸ“ Helper to handle LLM calls with JSON mode and fallback parsing. + - Ζ’ **LLMClient.analyze_dashboard** (`Function`) + - πŸ“ Sends dashboard data (screenshot + logs) to LLM for health analysis. +- πŸ“¦ **service** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for backend/src/plugins/llm_analysis/service.py + - πŸ—οΈ Layer: Unknown + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **capture_dashboard** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **switch_tabs** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_supports_json_response_format** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_should_retry** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_json_completion** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **analyze_dashboard** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **StoragePlugin** (`Module`) + - πŸ“ Provides core filesystem operations for managing backups and repositories. + - πŸ—οΈ Layer: App + - πŸ”’ Invariant: All file operations must be restricted to the configured storage root. + - πŸ”— IMPLEMENTS -> `PluginBase` + - πŸ”— DEPENDS_ON -> `backend.src.models.storage` + - β„‚ **StoragePlugin** (`Class`) + - πŸ“ Implementation of the storage management plugin. + - Ζ’ **__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. + - Ζ’ **ui_route** (`Function`) + - πŸ“ Returns the frontend route for the storage plugin. + - Ζ’ **get_schema** (`Function`) + - πŸ“ Returns the JSON schema for storage plugin parameters. + - Ζ’ **execute** (`Function`) + - πŸ“ Executes storage-related tasks with TaskContext support. + - Ζ’ **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. +- β„‚ **GitLLMExtension** (`Class`) + - πŸ“ Provides LLM capabilities to the Git plugin. + - Ζ’ **suggest_commit_message** (`Function`) + - πŸ“ Generates a suggested commit message based on a diff and history. +- πŸ“¦ **llm_extension** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for backend/src/plugins/git/llm_extension.py + - πŸ—οΈ Layer: Unknown + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **test_task_persistence** (`Module`) `[CRITICAL]` + - πŸ“ Unit tests for TaskPersistenceService. + - πŸ—οΈ Layer: Test + - β„‚ **TestTaskPersistenceHelpers** (`Class`) `[CRITICAL]` + - πŸ“ Test suite for TaskPersistenceService static helper methods. + - Ζ’ **test_json_load_if_needed_none** (`Function`) + - πŸ“ Test _json_load_if_needed with None input. + - Ζ’ **test_json_load_if_needed_dict** (`Function`) + - πŸ“ Test _json_load_if_needed with dict input. + - Ζ’ **test_json_load_if_needed_list** (`Function`) + - πŸ“ Test _json_load_if_needed with list input. + - Ζ’ **test_json_load_if_needed_json_string** (`Function`) + - πŸ“ Test _json_load_if_needed with JSON string. + - Ζ’ **test_json_load_if_needed_empty_string** (`Function`) + - πŸ“ Test _json_load_if_needed with empty/null strings. + - Ζ’ **test_json_load_if_needed_plain_string** (`Function`) + - πŸ“ Test _json_load_if_needed with non-JSON string. + - Ζ’ **test_json_load_if_needed_integer** (`Function`) + - πŸ“ Test _json_load_if_needed with integer. + - Ζ’ **test_parse_datetime_none** (`Function`) + - πŸ“ Test _parse_datetime with None. + - Ζ’ **test_parse_datetime_datetime_object** (`Function`) + - πŸ“ Test _parse_datetime with datetime object. + - Ζ’ **test_parse_datetime_iso_string** (`Function`) + - πŸ“ Test _parse_datetime with ISO string. + - Ζ’ **test_parse_datetime_invalid_string** (`Function`) + - πŸ“ Test _parse_datetime with invalid string. + - Ζ’ **test_parse_datetime_integer** (`Function`) + - πŸ“ Test _parse_datetime with non-string, non-datetime. + - β„‚ **TestTaskPersistenceService** (`Class`) `[CRITICAL]` + - πŸ“ Test suite for TaskPersistenceService CRUD operations. + - Ζ’ **setup_class** (`Function`) + - πŸ“ Setup in-memory test database. + - Ζ’ **teardown_class** (`Function`) + - πŸ“ Dispose of test database. + - Ζ’ **setup_method** (`Function`) + - πŸ“ Clean task_records table before each test. + - Ζ’ **test_persist_task_new** (`Function`) + - πŸ“ Test persisting a new task creates a record. + - Ζ’ **test_persist_task_update** (`Function`) + - πŸ“ Test updating an existing task. + - Ζ’ **test_persist_task_with_logs** (`Function`) + - πŸ“ Test persisting a task with log entries. + - Ζ’ **test_persist_task_failed_extracts_error** (`Function`) + - πŸ“ Test that FAILED task extracts last error message. + - Ζ’ **test_persist_tasks_batch** (`Function`) + - πŸ“ Test persisting multiple tasks. + - Ζ’ **test_load_tasks** (`Function`) + - πŸ“ Test loading tasks from database. + - Ζ’ **test_load_tasks_with_status_filter** (`Function`) + - πŸ“ Test loading tasks filtered by status. + - Ζ’ **test_load_tasks_with_limit** (`Function`) + - πŸ“ Test loading tasks with limit. + - Ζ’ **test_delete_tasks** (`Function`) + - πŸ“ Test deleting tasks by ID list. + - Ζ’ **test_delete_tasks_empty_list** (`Function`) + - πŸ“ Test deleting with empty list (no-op). + - Ζ’ **test_persist_task_with_datetime_in_params** (`Function`) + - πŸ“ Test json_serializable handles datetime in params. + - Ζ’ **_patched** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_make_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- Ζ’ **test_environment_model** (`Function`) + - πŸ“ Tests that Environment model correctly stores values. +- πŸ“¦ **test_task_manager** (`Module`) `[CRITICAL]` + - πŸ“ Unit tests for TaskManager lifecycle, CRUD, log buffering, and filtering. + - πŸ—οΈ Layer: Core + - πŸ”’ Invariant: TaskManager state changes are deterministic and testable with mocked dependencies. + - Ζ’ **_make_manager** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_cleanup_manager** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_init_creates_empty_tasks** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_init_loads_persisted_tasks** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_init_starts_flusher_thread** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_task_returns_none_for_missing** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_task_returns_existing** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_all_tasks** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_tasks_with_status_filter** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_tasks_with_plugin_filter** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_tasks_with_pagination** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_tasks_completed_only** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_create_task_success** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_create_task_unknown_plugin_raises** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_create_task_invalid_params_raises** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_add_log_appends_to_task_and_buffer** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_add_log_skips_nonexistent_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_flush_logs_writes_to_persistence** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_flush_task_logs_writes_single_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_flush_logs_requeues_on_failure** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_clear_all_non_active** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_clear_by_status** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_clear_preserves_awaiting_input** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_subscribe_creates_queue** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_unsubscribe_removes_queue** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_multiple_subscribers** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_await_input_sets_status** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_await_input_not_running_raises** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_await_input_nonexistent_raises** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_resume_with_password** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_resume_not_awaiting_raises** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_resume_empty_passwords_raises** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.tests.test_dashboards_api** (`Module`) + - πŸ“ Comprehensive contract-driven tests for Dashboard Hub API + - πŸ—οΈ Layer: Domain (Tests) + - Ζ’ **mock_deps** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboards_success** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboards_with_search** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboards_empty** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboards_superset_failure** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboards_env_not_found** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboards_invalid_pagination** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_database_mappings_success** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_database_mappings_env_not_found** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboard_detail_success** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboard_detail_env_not_found** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboard_tasks_history_success** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboard_tasks_history_sorting** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboard_thumbnail_success** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboard_thumbnail_env_not_found** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboard_thumbnail_202** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_migrate_dashboards_success** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_migrate_dashboards_pre_checks** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_migrate_dashboards_env_not_found** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_backup_dashboards_success** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_backup_dashboards_pre_checks** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_backup_dashboards_env_not_found** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_backup_dashboards_with_schedule** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_task_matches_dashboard_logic** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **test_dashboards_api** (`Test`) + - πŸ“ Verify GET /api/dashboards contract compliance +- πŸ“¦ **test_datasets_api** (`Test`) + - πŸ“ Verify GET /api/datasets contract compliance +- πŸ“¦ **test_pagination_boundaries** (`Test`) + - πŸ“ Verify pagination validation for GET endpoints +- πŸ“¦ **test_resource_hubs** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for backend/tests/test_resource_hubs.py + - πŸ—οΈ Layer: Unknown + - Ζ’ **mock_deps** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboards_success** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboards_not_found** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboards_search** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_datasets_success** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_datasets_not_found** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_datasets_search** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_datasets_service_failure** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboards_pagination_zero_page** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_dashboards_pagination_oversize** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_datasets_pagination_zero_page** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_datasets_pagination_oversize** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **test_task_logger** (`Module`) + - πŸ“ Unit tests for TaskLogger and TaskContext. + - πŸ—οΈ Layer: Test + - β„‚ **TestTaskLogger** (`Class`) + - πŸ“ Test suite for TaskLogger. + - Ζ’ **setup_method** (`Function`) + - πŸ“ Setup for each test method. + - Ζ’ **test_init** (`Function`) + - πŸ“ Test TaskLogger initialization. + - Ζ’ **test_with_source** (`Function`) + - πŸ“ Test creating a sub-logger with different source. + - Ζ’ **test_debug** (`Function`) + - πŸ“ Test debug log level. + - Ζ’ **test_info** (`Function`) + - πŸ“ Test info log level. + - Ζ’ **test_warning** (`Function`) + - πŸ“ Test warning log level. + - Ζ’ **test_error** (`Function`) + - πŸ“ Test error log level. + - Ζ’ **test_error_with_metadata** (`Function`) + - πŸ“ Test error logging with metadata. + - Ζ’ **test_progress** (`Function`) + - πŸ“ Test progress logging. + - Ζ’ **test_progress_clamping** (`Function`) + - πŸ“ Test progress value clamping (0-100). + - Ζ’ **test_source_override** (`Function`) + - πŸ“ Test overriding the default source. + - Ζ’ **test_sub_logger_source_independence** (`Function`) + - πŸ“ Test sub-logger independence from parent. + - β„‚ **TestTaskContext** (`Class`) + - πŸ“ Test suite for TaskContext. + - Ζ’ **setup_method** (`Function`) + - πŸ“ Setup for each test method. + - Ζ’ **test_init** (`Function`) + - πŸ“ Test TaskContext initialization. + - Ζ’ **test_task_id_property** (`Function`) + - πŸ“ Test task_id property. + - Ζ’ **test_logger_property** (`Function`) + - πŸ“ Test logger property. + - Ζ’ **test_params_property** (`Function`) + - πŸ“ Test params property. + - Ζ’ **test_get_param** (`Function`) + - πŸ“ Test getting a specific parameter. + - Ζ’ **test_create_sub_context** (`Function`) + - πŸ“ Test creating a sub-context with different source. + - Ζ’ **test_context_logger_delegates_to_task_logger** (`Function`) + - πŸ“ Test context logger delegates to TaskLogger. + - Ζ’ **test_sub_context_with_source** (`Function`) + - πŸ“ Test sub-context logger uses new source. + - Ζ’ **test_multiple_sub_contexts** (`Function`) + - πŸ“ Test creating multiple sub-contexts. +- πŸ“¦ **test_smoke_plugins** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for backend/tests/test_smoke_plugins.py + - πŸ—οΈ Layer: Unknown + - Ζ’ **test_plugins_load_successfully** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_task_manager_initializes_with_plugins** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- Ζ’ **test_belief_scope_logs_entry_action_exit_at_debug** (`Function`) + - πŸ“ Test that belief_scope generates [ID][Entry], [ID][Action], and [ID][Exit] logs at DEBUG level. +- Ζ’ **test_belief_scope_error_handling** (`Function`) + - πŸ“ Test that belief_scope logs Coherence:Failed on exception. +- Ζ’ **test_belief_scope_success_coherence** (`Function`) + - πŸ“ Test that belief_scope logs Coherence:OK on success. +- Ζ’ **test_belief_scope_not_visible_at_info** (`Function`) + - πŸ“ Test that belief_scope Entry/Exit/Coherence logs are NOT visible at INFO level. +- Ζ’ **test_task_log_level_default** (`Function`) + - πŸ“ Test that default task log level is INFO. +- Ζ’ **test_should_log_task_level** (`Function`) + - πŸ“ Test that should_log_task_level correctly filters log levels. +- Ζ’ **test_configure_logger_task_log_level** (`Function`) + - πŸ“ Test that configure_logger updates task_log_level. +- Ζ’ **test_enable_belief_state_flag** (`Function`) + - πŸ“ Test that enable_belief_state flag controls belief_scope logging. +- πŸ“¦ **test_auth** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for backend/tests/test_auth.py + - πŸ—οΈ Layer: Unknown + - Ζ’ **db_session** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **auth_service** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **auth_repo** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_create_user** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_authenticate_user** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_create_session** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_role_permission_association** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_user_role_association** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_ad_group_mapping** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **test_log_persistence** (`Module`) `[CRITICAL]` + - πŸ“ Unit tests for TaskLogPersistenceService. + - πŸ—οΈ Layer: Test + - β„‚ **TestLogPersistence** (`Class`) `[CRITICAL]` + - πŸ“ Test suite for TaskLogPersistenceService. + - Ζ’ **setup_class** (`Function`) + - πŸ“ Setup test database and service instance. + - Ζ’ **teardown_class** (`Function`) + - πŸ“ Clean up test database. + - Ζ’ **setup_method** (`Function`) + - πŸ“ Setup for each test method β€” clean task_logs table. + - Ζ’ **test_add_logs_single** (`Function`) + - πŸ“ Test adding a single log entry. + - Ζ’ **test_add_logs_batch** (`Function`) + - πŸ“ Test adding multiple log entries in batch. + - Ζ’ **test_add_logs_empty** (`Function`) + - πŸ“ Test adding empty log list (should be no-op). + - Ζ’ **test_get_logs_by_task_id** (`Function`) + - πŸ“ Test retrieving logs by task ID. + - Ζ’ **test_get_logs_with_filters** (`Function`) + - πŸ“ Test retrieving logs with level and source filters. + - Ζ’ **test_get_logs_with_pagination** (`Function`) + - πŸ“ Test retrieving logs with pagination. + - Ζ’ **test_get_logs_with_search** (`Function`) + - πŸ“ Test retrieving logs with search query. + - Ζ’ **test_get_log_stats** (`Function`) + - πŸ“ Test retrieving log statistics. + - Ζ’ **test_get_sources** (`Function`) + - πŸ“ Test retrieving unique log sources. + - Ζ’ **test_delete_logs_for_task** (`Function`) + - πŸ“ Test deleting logs by task ID. + - Ζ’ **test_delete_logs_for_tasks** (`Function`) + - πŸ“ Test deleting logs for multiple tasks. + - Ζ’ **test_delete_logs_for_tasks_empty** (`Function`) + - πŸ“ Test deleting with empty list (no-op). + - Ζ’ **_patched** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.tests.core.test_mapping_service** (`Module`) + - πŸ“ Unit tests for the IdMappingService matching UUIDs to integer IDs. + - πŸ—οΈ Layer: Domain + - Ζ’ **db_session** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_all_resources** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_sync_environment_upserts_correctly** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_remote_id_returns_integer** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_remote_ids_batch_returns_dict** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_sync_environment_updates_existing_mapping** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_sync_environment_skips_resources_without_uuid** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_sync_environment_handles_api_error_gracefully** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_all_resources** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_remote_id_returns_none_for_missing** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_get_remote_ids_batch_returns_empty_for_empty_input** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_mapping_service_alignment_with_test_data** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_sync_environment_requires_existing_env** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_sync_environment_deletes_stale_mappings** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **test_defensive_guards** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for backend/tests/core/test_defensive_guards.py + - πŸ—οΈ Layer: Unknown + - Ζ’ **test_git_service_get_repo_path_guard** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_superset_client_import_dashboard_guard** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.tests.core.test_migration_engine** (`Module`) + - πŸ“ Unit tests for MigrationEngine's cross-filter patching algorithms. + - πŸ—οΈ Layer: Domain + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_remote_ids_batch** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **_write_dashboard_yaml** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_patch_dashboard_metadata_replaces_chart_ids** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_patch_dashboard_metadata_replaces_dataset_ids** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_patch_dashboard_metadata_skips_when_no_metadata** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_patch_dashboard_metadata_handles_missing_targets** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_extract_chart_uuids_from_archive** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_transform_yaml_replaces_database_uuid** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_transform_yaml_ignores_unmapped_uuid** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_transform_zip_end_to_end** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_transform_zip_invalid_path** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **test_transform_yaml_nonexistent_file** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) diff --git a/.ai/shots/critical_module.py b/.ai/shots/critical_module.py index 490b25d..79a9db3 100644 --- a/.ai/shots/critical_module.py +++ b/.ai/shots/critical_module.py @@ -3,76 +3,28 @@ # @SEMANTICS: Finance, ACID, Transfer, Ledger # @PURPOSE: Core banking transaction processor with ACID guarantees. # @LAYER: Domain (Core) -# @RELATION: DEPENDS_ON -> [DEF:Infra:PostgresDB] -# @RELATION: DEPENDS_ON -> [DEF:Infra:AuditLog] +# @RELATION: DEPENDS_ON ->[DEF:Infra:PostgresDB] # # @INVARIANT: Total system balance must remain constant (Double-Entry Bookkeeping). # @INVARIANT: Negative transfers are strictly forbidden. -# @INVARIANT: No partial commit must occur under failure (ACID Atomicity). -# @TEST_CONTRACT: TransferInput -> -# { -# required_fields: { -# sender_id: str, -# receiver_id: str, -# amount: Decimal -# }, -# invariants: [ -# "amount > 0", -# "sender_id != receiver_id" -# ], -# constraints: [ -# "sender must exist", -# "receiver must exist" -# ] -# } +# --- Test Specifications (The "What" and "Why", not the "Data") --- +# @TEST_CONTRACT: Input -> TransferInputDTO, Output -> TransferResultDTO -# @TEST_CONTRACT: TransferResult -> -# { -# required_fields: { -# tx_id: str, -# status: str, -# new_balance: Decimal -# }, -# invariants: [ -# "status == COMPLETED implies balance mutation occurred" -# ] -# } +# Happy Path +# @TEST_SCENARIO: sufficient_funds -> Returns COMPLETED, balances updated. +# @TEST_FIXTURE: sufficient_funds -> file:./__tests__/fixtures/transfers.json#happy_path -# @TEST_FIXTURE: sufficient_funds -> -# { -# sender_balance: 500.00, -# receiver_balance: 100.00, -# amount: 100.00 -# } +# Edge Cases (CRITICAL) +# @TEST_SCENARIO: insufficient_funds -> Throws BusinessRuleViolation("INSUFFICIENT_FUNDS"). +# @TEST_SCENARIO: negative_amount -> Throws BusinessRuleViolation("Transfer amount must be positive."). +# @TEST_SCENARIO: self_transfer -> Throws BusinessRuleViolation("Cannot transfer to self."). +# @TEST_SCENARIO: audit_failure -> Throws RuntimeError("TRANSACTION_ABORTED"). +# @TEST_SCENARIO: concurrency_conflict -> Throws DBTransactionError. -# @TEST_EDGE: insufficient_funds -> -# { -# sender_balance: 50.00, -# receiver_balance: 100.00, -# amount: 100.00 -# } -# -# @TEST_EDGE: negative_amount -> -# { -# sender_balance: 500.00, -# receiver_balance: 100.00, -# amount: -10.00 -# } -# -# @TEST_EDGE: self_transfer -> -# { -# sender_id: "acc_A", -# receiver_id: "acc_A", -# amount: 10.00 -# } - -# @TEST_EDGE: audit_failure -> raises Exception -# @TEST_EDGE: concurrency_conflict -> special: concurrent_execution - -# @TEST_INVARIANT: total_balance_constant -> verifies: [sufficient_funds, concurrency_conflict] -# @TEST_INVARIANT: no_partial_commit -> verifies: [audit_failure] -# @TEST_INVARIANT: negative_transfer_forbidden -> verifies: [negative_amount] +# Linking Tests to Invariants +# @TEST_INVARIANT: total_balance_constant -> VERIFIED_BY: [sufficient_funds, concurrency_conflict] +# @TEST_INVARIANT: negative_transfer_forbidden -> VERIFIED_BY: [negative_amount] from decimal import Decimal diff --git a/backend/src/api/routes/__tests__/test_migration_routes.py b/backend/src/api/routes/__tests__/test_migration_routes.py index 6863eff..66e5b57 100644 --- a/backend/src/api/routes/__tests__/test_migration_routes.py +++ b/backend/src/api/routes/__tests__/test_migration_routes.py @@ -407,4 +407,104 @@ async def test_execute_migration_invalid_env_raises_400(_mock_env): assert exc.value.status_code == 400 +@pytest.mark.asyncio +async def test_dry_run_migration_returns_diff_and_risk(db_session): + # @TEST_EDGE: missing_target_datasource -> validates high risk item generation + # @TEST_EDGE: breaking_reference -> validates high risk on missing dataset link + from src.api.routes.migration import dry_run_migration + from src.models.dashboard import DashboardSelection + + env_source = MagicMock() + env_source.id = "src" + env_source.name = "Source" + env_source.url = "http://source" + env_source.username = "admin" + env_source.password = "admin" + env_source.verify_ssl = False + env_source.timeout = 30 + + env_target = MagicMock() + env_target.id = "tgt" + env_target.name = "Target" + env_target.url = "http://target" + env_target.username = "admin" + env_target.password = "admin" + env_target.verify_ssl = False + env_target.timeout = 30 + + cm = _make_sync_config_manager([env_source, env_target]) + selection = DashboardSelection( + selected_ids=[42], + source_env_id="src", + target_env_id="tgt", + replace_db_config=False, + fix_cross_filters=True, + ) + + with patch("src.api.routes.migration.SupersetClient") as MockClient, \ + patch("src.api.routes.migration.MigrationDryRunService") as MockService: + source_client = MagicMock() + target_client = MagicMock() + MockClient.side_effect = [source_client, target_client] + + service_instance = MagicMock() + service_payload = { + "generated_at": "2026-02-27T00:00:00+00:00", + "selection": selection.model_dump(), + "selected_dashboard_titles": ["Sales"], + "diff": { + "dashboards": {"create": [], "update": [{"uuid": "dash-1"}], "delete": []}, + "charts": {"create": [{"uuid": "chart-1"}], "update": [], "delete": []}, + "datasets": {"create": [{"uuid": "dataset-1"}], "update": [], "delete": []}, + }, + "summary": { + "dashboards": {"create": 0, "update": 1, "delete": 0}, + "charts": {"create": 1, "update": 0, "delete": 0}, + "datasets": {"create": 1, "update": 0, "delete": 0}, + "selected_dashboards": 1, + }, + "risk": { + "score": 75, + "level": "high", + "items": [ + {"code": "missing_datasource"}, + {"code": "breaking_reference"}, + ], + }, + } + service_instance.run.return_value = service_payload + MockService.return_value = service_instance + + result = await dry_run_migration(selection=selection, config_manager=cm, db=db_session, _=None) + + assert result["summary"]["dashboards"]["update"] == 1 + assert result["summary"]["charts"]["create"] == 1 + assert result["summary"]["datasets"]["create"] == 1 + assert result["risk"]["score"] > 0 + assert any(item["code"] == "missing_datasource" for item in result["risk"]["items"]) + assert any(item["code"] == "breaking_reference" for item in result["risk"]["items"]) + + +@pytest.mark.asyncio +async def test_dry_run_migration_rejects_same_environment(db_session): + from src.api.routes.migration import dry_run_migration + from src.models.dashboard import DashboardSelection + + env = MagicMock() + env.id = "same" + env.name = "Same" + env.url = "http://same" + env.username = "admin" + env.password = "admin" + env.verify_ssl = False + env.timeout = 30 + + cm = _make_sync_config_manager([env]) + selection = DashboardSelection(selected_ids=[1], source_env_id="same", target_env_id="same") + + with pytest.raises(HTTPException) as exc: + await dry_run_migration(selection=selection, config_manager=cm, db=db_session, _=None) + assert exc.value.status_code == 400 + + # [/DEF:backend.src.api.routes.__tests__.test_migration_routes:Module] diff --git a/backend/src/api/routes/migration.py b/backend/src/api/routes/migration.py index ccf16c6..7a599c5 100644 --- a/backend/src/api/routes/migration.py +++ b/backend/src/api/routes/migration.py @@ -14,6 +14,7 @@ from ...core.database import get_db from ...models.dashboard import DashboardMetadata, DashboardSelection from ...core.superset_client import SupersetClient from ...core.logger import belief_scope +from ...core.migration.dry_run_orchestrator import MigrationDryRunService from ...core.mapping_service import IdMappingService from ...models.mapping import ResourceMapping @@ -83,6 +84,44 @@ async def execute_migration( raise HTTPException(status_code=500, detail=f"Failed to create migration task: {str(e)}") # [/DEF:execute_migration:Function] + +# [DEF:dry_run_migration:Function] +# @PURPOSE: Build pre-flight diff and risk summary without applying migration. +# @PRE: Selection and environments are valid. +# @POST: Returns deterministic JSON diff and risk scoring. +@router.post("/migration/dry-run", response_model=Dict[str, Any]) +async def dry_run_migration( + selection: DashboardSelection, + config_manager=Depends(get_config_manager), + db: Session = Depends(get_db), + _ = Depends(has_permission("plugin:migration", "EXECUTE")) +): + with belief_scope("dry_run_migration"): + environments = config_manager.get_environments() + env_map = {env.id: env for env in environments} + source_env = env_map.get(selection.source_env_id) + target_env = env_map.get(selection.target_env_id) + if not source_env or not target_env: + raise HTTPException(status_code=400, detail="Invalid source or target environment") + if selection.source_env_id == selection.target_env_id: + raise HTTPException(status_code=400, detail="Source and target environments must be different") + if not selection.selected_ids: + raise HTTPException(status_code=400, detail="No dashboards selected for dry run") + + service = MigrationDryRunService() + source_client = SupersetClient(source_env) + target_client = SupersetClient(target_env) + try: + return service.run( + selection=selection, + source_client=source_client, + target_client=target_client, + db=db, + ) + except ValueError as exc: + raise HTTPException(status_code=500, detail=str(exc)) from exc +# [/DEF:dry_run_migration:Function] + # [DEF:get_migration_settings:Function] # @PURPOSE: Get current migration Cron string explicitly. @router.get("/migration/settings", response_model=Dict[str, str]) @@ -221,4 +260,4 @@ async def trigger_sync_now( } # [/DEF:trigger_sync_now:Function] -# [/DEF:backend.src.api.routes.migration:Module] \ No newline at end of file +# [/DEF:backend.src.api.routes.migration:Module] diff --git a/backend/src/core/migration/__init__.py b/backend/src/core/migration/__init__.py new file mode 100644 index 0000000..360f617 --- /dev/null +++ b/backend/src/core/migration/__init__.py @@ -0,0 +1,12 @@ +# [DEF:backend.src.core.migration.__init__:Module] +# @TIER: TRIVIAL +# @SEMANTICS: migration, package, exports +# @PURPOSE: Namespace package for migration pre-flight orchestration components. +# @LAYER: Core + +from .dry_run_orchestrator import MigrationDryRunService +from .archive_parser import MigrationArchiveParser + +__all__ = ["MigrationDryRunService", "MigrationArchiveParser"] + +# [/DEF:backend.src.core.migration.__init__:Module] diff --git a/backend/src/core/migration/archive_parser.py b/backend/src/core/migration/archive_parser.py new file mode 100644 index 0000000..a8be8ff --- /dev/null +++ b/backend/src/core/migration/archive_parser.py @@ -0,0 +1,139 @@ +# [DEF:backend.src.core.migration.archive_parser:Module] +# @TIER: STANDARD +# @SEMANTICS: migration, zip, parser, yaml, metadata +# @PURPOSE: Parse Superset export ZIP archives into normalized object catalogs for diffing. +# @LAYER: Core +# @RELATION: DEPENDS_ON -> backend.src.core.logger +# @INVARIANT: Parsing is read-only and never mutates archive files. + +import json +import tempfile +import zipfile +from pathlib import Path +from typing import Any, Dict, List, Optional + +import yaml + +from ..logger import logger, belief_scope + + +# [DEF:MigrationArchiveParser:Class] +# @PURPOSE: Extract normalized dashboards/charts/datasets metadata from ZIP archives. +class MigrationArchiveParser: + # [DEF:extract_objects_from_zip:Function] + # @PURPOSE: Extract object catalogs from Superset archive. + # @PRE: zip_path points to a valid readable ZIP. + # @POST: Returns object lists grouped by resource type. + # @RETURN: Dict[str, List[Dict[str, Any]]] + def extract_objects_from_zip(self, zip_path: str) -> Dict[str, List[Dict[str, Any]]]: + with belief_scope("MigrationArchiveParser.extract_objects_from_zip"): + result: Dict[str, List[Dict[str, Any]]] = { + "dashboards": [], + "charts": [], + "datasets": [], + } + with tempfile.TemporaryDirectory() as temp_dir_str: + temp_dir = Path(temp_dir_str) + with zipfile.ZipFile(zip_path, "r") as zip_file: + zip_file.extractall(temp_dir) + + result["dashboards"] = self._collect_yaml_objects(temp_dir, "dashboards") + result["charts"] = self._collect_yaml_objects(temp_dir, "charts") + result["datasets"] = self._collect_yaml_objects(temp_dir, "datasets") + + return result + # [/DEF:extract_objects_from_zip:Function] + + # [DEF:_collect_yaml_objects:Function] + # @PURPOSE: Read and normalize YAML manifests for one object type. + # @PRE: object_type is one of dashboards/charts/datasets. + # @POST: Returns only valid normalized objects. + def _collect_yaml_objects(self, root_dir: Path, object_type: str) -> List[Dict[str, Any]]: + with belief_scope("MigrationArchiveParser._collect_yaml_objects"): + files = list(root_dir.glob(f"**/{object_type}/**/*.yaml")) + list(root_dir.glob(f"**/{object_type}/*.yaml")) + objects: List[Dict[str, Any]] = [] + for file_path in set(files): + try: + with open(file_path, "r") as file_obj: + payload = yaml.safe_load(file_obj) or {} + normalized = self._normalize_object_payload(payload, object_type) + if normalized: + objects.append(normalized) + except Exception as exc: + logger.reflect( + "[MigrationArchiveParser._collect_yaml_objects][REFLECT] skip_invalid_yaml path=%s error=%s", + file_path, + exc, + ) + return objects + # [/DEF:_collect_yaml_objects:Function] + + # [DEF:_normalize_object_payload:Function] + # @PURPOSE: Convert raw YAML payload to stable diff signature shape. + # @PRE: payload is parsed YAML mapping. + # @POST: Returns normalized descriptor with `uuid`, `title`, and `signature`. + def _normalize_object_payload(self, payload: Dict[str, Any], object_type: str) -> Optional[Dict[str, Any]]: + with belief_scope("MigrationArchiveParser._normalize_object_payload"): + if not isinstance(payload, dict): + return None + uuid = payload.get("uuid") + if not uuid: + return None + + if object_type == "dashboards": + title = payload.get("dashboard_title") or payload.get("title") + signature = { + "title": title, + "slug": payload.get("slug"), + "position_json": payload.get("position_json"), + "json_metadata": payload.get("json_metadata"), + "description": payload.get("description"), + "owners": payload.get("owners"), + } + return { + "uuid": str(uuid), + "title": title or f"Dashboard {uuid}", + "signature": json.dumps(signature, sort_keys=True, default=str), + "owners": payload.get("owners") or [], + } + + if object_type == "charts": + title = payload.get("slice_name") or payload.get("name") + signature = { + "title": title, + "viz_type": payload.get("viz_type"), + "params": payload.get("params"), + "query_context": payload.get("query_context"), + "datasource_uuid": payload.get("datasource_uuid"), + "dataset_uuid": payload.get("dataset_uuid"), + } + return { + "uuid": str(uuid), + "title": title or f"Chart {uuid}", + "signature": json.dumps(signature, sort_keys=True, default=str), + "dataset_uuid": payload.get("datasource_uuid") or payload.get("dataset_uuid"), + } + + if object_type == "datasets": + title = payload.get("table_name") or payload.get("name") + signature = { + "title": title, + "schema": payload.get("schema"), + "database_uuid": payload.get("database_uuid"), + "sql": payload.get("sql"), + "columns": payload.get("columns"), + "metrics": payload.get("metrics"), + } + return { + "uuid": str(uuid), + "title": title or f"Dataset {uuid}", + "signature": json.dumps(signature, sort_keys=True, default=str), + "database_uuid": payload.get("database_uuid"), + } + + return None + # [/DEF:_normalize_object_payload:Function] + + +# [/DEF:MigrationArchiveParser:Class] +# [/DEF:backend.src.core.migration.archive_parser:Module] diff --git a/backend/src/core/migration/dry_run_orchestrator.py b/backend/src/core/migration/dry_run_orchestrator.py new file mode 100644 index 0000000..29a6a1f --- /dev/null +++ b/backend/src/core/migration/dry_run_orchestrator.py @@ -0,0 +1,235 @@ +# [DEF:backend.src.core.migration.dry_run_orchestrator:Module] +# @TIER: STANDARD +# @SEMANTICS: migration, dry_run, diff, risk, superset +# @PURPOSE: Compute pre-flight migration diff and risk scoring without apply. +# @LAYER: Core +# @RELATION: DEPENDS_ON -> backend.src.core.superset_client +# @RELATION: DEPENDS_ON -> backend.src.core.migration_engine +# @RELATION: DEPENDS_ON -> backend.src.core.migration.archive_parser +# @RELATION: DEPENDS_ON -> backend.src.core.migration.risk_assessor +# @INVARIANT: Dry run is informative only and must not mutate target environment. + +from datetime import datetime, timezone +import json +from typing import Any, Dict, List + +from sqlalchemy.orm import Session + +from ...models.dashboard import DashboardSelection +from ...models.mapping import DatabaseMapping +from ..logger import logger, belief_scope +from .archive_parser import MigrationArchiveParser +from .risk_assessor import build_risks, score_risks +from ..migration_engine import MigrationEngine +from ..superset_client import SupersetClient +from ..utils.fileio import create_temp_file + + +# [DEF:MigrationDryRunService:Class] +# @PURPOSE: Build deterministic diff/risk payload for migration pre-flight. +class MigrationDryRunService: + # [DEF:__init__:Function] + # @PURPOSE: Wire parser dependency for archive object extraction. + # @PRE: parser can be omitted to use default implementation. + # @POST: Service is ready to calculate dry-run payload. + def __init__(self, parser: MigrationArchiveParser | None = None): + self.parser = parser or MigrationArchiveParser() + # [/DEF:__init__:Function] + + # [DEF:run:Function] + # @PURPOSE: Execute full dry-run computation for selected dashboards. + # @PRE: source/target clients are authenticated and selection validated by caller. + # @POST: Returns JSON-serializable pre-flight payload with summary, diff and risk. + # @SIDE_EFFECT: Reads source export archives and target metadata via network. + def run( + self, + selection: DashboardSelection, + source_client: SupersetClient, + target_client: SupersetClient, + db: Session, + ) -> Dict[str, Any]: + with belief_scope("MigrationDryRunService.run"): + logger.explore("[MigrationDryRunService.run][EXPLORE] starting dry-run pipeline") + engine = MigrationEngine() + db_mapping = self._load_db_mapping(db, selection) if selection.replace_db_config else {} + transformed = {"dashboards": {}, "charts": {}, "datasets": {}} + + dashboards_preview = source_client.get_dashboards_summary() + selected_preview = { + item["id"]: item + for item in dashboards_preview + if item.get("id") in selection.selected_ids + } + + for dashboard_id in selection.selected_ids: + exported_content, _ = source_client.export_dashboard(int(dashboard_id)) + with create_temp_file(content=exported_content, suffix=".zip") as source_zip: + with create_temp_file(suffix=".zip") as transformed_zip: + success = engine.transform_zip( + str(source_zip), + str(transformed_zip), + db_mapping, + strip_databases=False, + target_env_id=selection.target_env_id, + fix_cross_filters=selection.fix_cross_filters, + ) + if not success: + raise ValueError(f"Failed to transform export archive for dashboard {dashboard_id}") + extracted = self.parser.extract_objects_from_zip(str(transformed_zip)) + self._accumulate_objects(transformed, extracted) + + source_objects = {key: list(value.values()) for key, value in transformed.items()} + target_objects = self._build_target_signatures(target_client) + diff = { + "dashboards": self._build_object_diff(source_objects["dashboards"], target_objects["dashboards"]), + "charts": self._build_object_diff(source_objects["charts"], target_objects["charts"]), + "datasets": self._build_object_diff(source_objects["datasets"], target_objects["datasets"]), + } + risk = self._build_risks(source_objects, target_objects, diff, target_client) + + summary = { + "dashboards": {action: len(diff["dashboards"][action]) for action in ("create", "update", "delete")}, + "charts": {action: len(diff["charts"][action]) for action in ("create", "update", "delete")}, + "datasets": {action: len(diff["datasets"][action]) for action in ("create", "update", "delete")}, + "selected_dashboards": len(selection.selected_ids), + } + selected_titles = [ + selected_preview[dash_id]["title"] + for dash_id in selection.selected_ids + if dash_id in selected_preview + ] + + logger.reason("[MigrationDryRunService.run][REASON] dry-run payload assembled") + return { + "generated_at": datetime.now(timezone.utc).isoformat(), + "selection": selection.model_dump(), + "selected_dashboard_titles": selected_titles, + "diff": diff, + "summary": summary, + "risk": score_risks(risk), + } + # [/DEF:run:Function] + + # [DEF:_load_db_mapping:Function] + # @PURPOSE: Resolve UUID mapping for optional DB config replacement. + def _load_db_mapping(self, db: Session, selection: DashboardSelection) -> Dict[str, str]: + rows = db.query(DatabaseMapping).filter( + DatabaseMapping.source_env_id == selection.source_env_id, + DatabaseMapping.target_env_id == selection.target_env_id, + ).all() + return {row.source_db_uuid: row.target_db_uuid for row in rows} + # [/DEF:_load_db_mapping:Function] + + # [DEF:_accumulate_objects:Function] + # @PURPOSE: Merge extracted resources by UUID to avoid duplicates. + def _accumulate_objects(self, target: Dict[str, Dict[str, Dict[str, Any]]], source: Dict[str, List[Dict[str, Any]]]) -> None: + for object_type in ("dashboards", "charts", "datasets"): + for item in source.get(object_type, []): + uuid = item.get("uuid") + if uuid: + target[object_type][str(uuid)] = item + # [/DEF:_accumulate_objects:Function] + + # [DEF:_index_by_uuid:Function] + # @PURPOSE: Build UUID-index map for normalized resources. + def _index_by_uuid(self, objects: List[Dict[str, Any]]) -> Dict[str, Dict[str, Any]]: + indexed: Dict[str, Dict[str, Any]] = {} + for obj in objects: + uuid = obj.get("uuid") + if uuid: + indexed[str(uuid)] = obj + return indexed + # [/DEF:_index_by_uuid:Function] + + # [DEF:_build_object_diff:Function] + # @PURPOSE: Compute create/update/delete buckets by UUID+signature. + def _build_object_diff(self, source_objects: List[Dict[str, Any]], target_objects: List[Dict[str, Any]]) -> Dict[str, List[Dict[str, Any]]]: + target_index = self._index_by_uuid(target_objects) + created: List[Dict[str, Any]] = [] + updated: List[Dict[str, Any]] = [] + deleted: List[Dict[str, Any]] = [] + for source_obj in source_objects: + source_uuid = str(source_obj.get("uuid")) + target_obj = target_index.get(source_uuid) + if not target_obj: + created.append({"uuid": source_uuid, "title": source_obj.get("title")}) + continue + if source_obj.get("signature") != target_obj.get("signature"): + updated.append({ + "uuid": source_uuid, + "title": source_obj.get("title"), + "target_title": target_obj.get("title"), + }) + return {"create": created, "update": updated, "delete": deleted} + # [/DEF:_build_object_diff:Function] + + # [DEF:_build_target_signatures:Function] + # @PURPOSE: Pull target metadata and normalize it into comparable signatures. + def _build_target_signatures(self, client: SupersetClient) -> Dict[str, List[Dict[str, Any]]]: + _, dashboards = client.get_dashboards(query={ + "columns": ["uuid", "dashboard_title", "slug", "position_json", "json_metadata", "description", "owners"], + }) + _, datasets = client.get_datasets(query={ + "columns": ["uuid", "table_name", "schema", "database_uuid", "sql", "columns", "metrics"], + }) + _, charts = client.get_charts(query={ + "columns": ["uuid", "slice_name", "viz_type", "params", "query_context", "datasource_uuid", "dataset_uuid"], + }) + return { + "dashboards": [{ + "uuid": str(item.get("uuid")), + "title": item.get("dashboard_title"), + "owners": item.get("owners") or [], + "signature": json.dumps({ + "title": item.get("dashboard_title"), + "slug": item.get("slug"), + "position_json": item.get("position_json"), + "json_metadata": item.get("json_metadata"), + "description": item.get("description"), + "owners": item.get("owners"), + }, sort_keys=True, default=str), + } for item in dashboards if item.get("uuid")], + "datasets": [{ + "uuid": str(item.get("uuid")), + "title": item.get("table_name"), + "database_uuid": item.get("database_uuid"), + "signature": json.dumps({ + "title": item.get("table_name"), + "schema": item.get("schema"), + "database_uuid": item.get("database_uuid"), + "sql": item.get("sql"), + "columns": item.get("columns"), + "metrics": item.get("metrics"), + }, sort_keys=True, default=str), + } for item in datasets if item.get("uuid")], + "charts": [{ + "uuid": str(item.get("uuid")), + "title": item.get("slice_name") or item.get("name"), + "dataset_uuid": item.get("datasource_uuid") or item.get("dataset_uuid"), + "signature": json.dumps({ + "title": item.get("slice_name") or item.get("name"), + "viz_type": item.get("viz_type"), + "params": item.get("params"), + "query_context": item.get("query_context"), + "datasource_uuid": item.get("datasource_uuid"), + "dataset_uuid": item.get("dataset_uuid"), + }, sort_keys=True, default=str), + } for item in charts if item.get("uuid")], + } + # [/DEF:_build_target_signatures:Function] + + # [DEF:_build_risks:Function] + # @PURPOSE: Build risk items for missing datasource, broken refs, overwrite, owner mismatch. + def _build_risks( + self, + source_objects: Dict[str, List[Dict[str, Any]]], + target_objects: Dict[str, List[Dict[str, Any]]], + diff: Dict[str, Dict[str, List[Dict[str, Any]]]], + target_client: SupersetClient, + ) -> List[Dict[str, Any]]: + return build_risks(source_objects, target_objects, diff, target_client) + # [/DEF:_build_risks:Function] + + +# [/DEF:MigrationDryRunService:Class] +# [/DEF:backend.src.core.migration.dry_run_orchestrator:Module] diff --git a/backend/src/core/migration/risk_assessor.py b/backend/src/core/migration/risk_assessor.py new file mode 100644 index 0000000..d296d69 --- /dev/null +++ b/backend/src/core/migration/risk_assessor.py @@ -0,0 +1,119 @@ +# [DEF:backend.src.core.migration.risk_assessor:Module] +# @TIER: STANDARD +# @SEMANTICS: migration, dry_run, risk, scoring +# @PURPOSE: Risk evaluation helpers for migration pre-flight reporting. +# @LAYER: Core +# @RELATION: USED_BY -> backend.src.core.migration.dry_run_orchestrator + +from typing import Any, Dict, List + +from ..superset_client import SupersetClient + + +# [DEF:index_by_uuid:Function] +# @PURPOSE: Build UUID-index from normalized objects. +def index_by_uuid(objects: List[Dict[str, Any]]) -> Dict[str, Dict[str, Any]]: + indexed: Dict[str, Dict[str, Any]] = {} + for obj in objects: + uuid = obj.get("uuid") + if uuid: + indexed[str(uuid)] = obj + return indexed +# [/DEF:index_by_uuid:Function] + + +# [DEF:extract_owner_identifiers:Function] +# @PURPOSE: Normalize owner payloads for stable comparison. +def extract_owner_identifiers(owners: Any) -> List[str]: + if not isinstance(owners, list): + return [] + ids: List[str] = [] + for owner in owners: + if isinstance(owner, dict): + if owner.get("username"): + ids.append(str(owner["username"])) + elif owner.get("id") is not None: + ids.append(str(owner["id"])) + elif owner is not None: + ids.append(str(owner)) + return sorted(set(ids)) +# [/DEF:extract_owner_identifiers:Function] + + +# [DEF:build_risks:Function] +# @PURPOSE: Build risk list from computed diffs and target catalog state. +def build_risks( + source_objects: Dict[str, List[Dict[str, Any]]], + target_objects: Dict[str, List[Dict[str, Any]]], + diff: Dict[str, Dict[str, List[Dict[str, Any]]]], + target_client: SupersetClient, +) -> List[Dict[str, Any]]: + risks: List[Dict[str, Any]] = [] + for object_type in ("dashboards", "charts", "datasets"): + for item in diff[object_type]["update"]: + risks.append({ + "code": "overwrite_existing", + "severity": "medium", + "object_type": object_type[:-1], + "object_uuid": item["uuid"], + "message": f"Object will be updated in target: {item.get('title') or item['uuid']}", + }) + + target_dataset_uuids = set(index_by_uuid(target_objects["datasets"]).keys()) + _, target_databases = target_client.get_databases(query={"columns": ["uuid"]}) + target_database_uuids = {str(item.get("uuid")) for item in target_databases if item.get("uuid")} + + for dataset in source_objects["datasets"]: + db_uuid = dataset.get("database_uuid") + if db_uuid and str(db_uuid) not in target_database_uuids: + risks.append({ + "code": "missing_datasource", + "severity": "high", + "object_type": "dataset", + "object_uuid": dataset.get("uuid"), + "message": f"Target datasource is missing for dataset {dataset.get('title') or dataset.get('uuid')}", + }) + + for chart in source_objects["charts"]: + ds_uuid = chart.get("dataset_uuid") + if ds_uuid and str(ds_uuid) not in target_dataset_uuids: + risks.append({ + "code": "breaking_reference", + "severity": "high", + "object_type": "chart", + "object_uuid": chart.get("uuid"), + "message": f"Chart references dataset not found on target: {ds_uuid}", + }) + + source_dash = index_by_uuid(source_objects["dashboards"]) + target_dash = index_by_uuid(target_objects["dashboards"]) + for item in diff["dashboards"]["update"]: + source_obj = source_dash.get(item["uuid"]) + target_obj = target_dash.get(item["uuid"]) + if not source_obj or not target_obj: + continue + source_owners = extract_owner_identifiers(source_obj.get("owners")) + target_owners = extract_owner_identifiers(target_obj.get("owners")) + if source_owners and target_owners and source_owners != target_owners: + risks.append({ + "code": "owner_mismatch", + "severity": "low", + "object_type": "dashboard", + "object_uuid": item["uuid"], + "message": f"Owner mismatch for dashboard {item.get('title') or item['uuid']}", + }) + return risks +# [/DEF:build_risks:Function] + + +# [DEF:score_risks:Function] +# @PURPOSE: Aggregate risk list into score and level. +def score_risks(risk_items: List[Dict[str, Any]]) -> Dict[str, Any]: + weights = {"high": 25, "medium": 10, "low": 5} + score = min(100, sum(weights.get(item.get("severity", "low"), 5) for item in risk_items)) + level = "low" if score < 25 else "medium" if score < 60 else "high" + return {"score": score, "level": level, "items": risk_items} +# [/DEF:score_risks:Function] + + +# [/DEF:backend.src.core.migration.risk_assessor:Module] diff --git a/backend/src/core/superset_client.py b/backend/src/core/superset_client.py index 5fbf196..37b97e7 100644 --- a/backend/src/core/superset_client.py +++ b/backend/src/core/superset_client.py @@ -336,6 +336,25 @@ class SupersetClient: } # [/DEF:get_dashboard_detail:Function] + # [DEF:get_charts:Function] + # @PURPOSE: Fetches all charts with pagination support. + # @PARAM: query (Optional[Dict]) - Optional query params/columns/filters. + # @PRE: Client is authenticated. + # @POST: Returns total count and charts list. + # @RETURN: Tuple[int, List[Dict]] + def get_charts(self, query: Optional[Dict] = None) -> Tuple[int, List[Dict]]: + with belief_scope("get_charts"): + validated_query = self._validate_query_params(query or {}) + if "columns" not in validated_query: + validated_query["columns"] = ["id", "uuid", "slice_name", "viz_type"] + + paginated_data = self._fetch_all_pages( + endpoint="/chart/", + pagination_options={"base_query": validated_query, "results_field": "result"}, + ) + return len(paginated_data), paginated_data + # [/DEF:get_charts:Function] + # [DEF:_extract_chart_ids_from_layout:Function] # @PURPOSE: Traverses dashboard layout metadata and extracts chart IDs from common keys. # @PRE: payload can be dict/list/scalar. diff --git a/backend/tests/core/migration/test_archive_parser.py b/backend/tests/core/migration/test_archive_parser.py new file mode 100644 index 0000000..050bca3 --- /dev/null +++ b/backend/tests/core/migration/test_archive_parser.py @@ -0,0 +1,62 @@ +# [DEF:backend.tests.core.migration.test_archive_parser:Module] +# +# @TIER: STANDARD +# @PURPOSE: Unit tests for MigrationArchiveParser ZIP extraction contract. +# @LAYER: Domain +# @RELATION: VERIFIES -> backend.src.core.migration.archive_parser +# +import os +import sys +import tempfile +import zipfile +from pathlib import Path + +import yaml + +backend_dir = str(Path(__file__).parent.parent.parent.parent.resolve()) +if backend_dir not in sys.path: + sys.path.insert(0, backend_dir) + +from src.core.migration.archive_parser import MigrationArchiveParser + + +def test_extract_objects_from_zip_collects_all_types(): + parser = MigrationArchiveParser() + with tempfile.TemporaryDirectory() as td: + td_path = Path(td) + zip_path = td_path / "objects.zip" + src_dir = td_path / "src" + (src_dir / "dashboards").mkdir(parents=True) + (src_dir / "charts").mkdir(parents=True) + (src_dir / "datasets").mkdir(parents=True) + + with open(src_dir / "dashboards" / "dash.yaml", "w") as file_obj: + yaml.dump({"uuid": "dash-u1", "dashboard_title": "D1", "json_metadata": "{}"}, file_obj) + with open(src_dir / "charts" / "chart.yaml", "w") as file_obj: + yaml.dump({"uuid": "chart-u1", "slice_name": "C1", "viz_type": "bar"}, file_obj) + with open(src_dir / "datasets" / "dataset.yaml", "w") as file_obj: + yaml.dump({"uuid": "ds-u1", "table_name": "orders", "database_uuid": "db-u1"}, file_obj) + + with zipfile.ZipFile(zip_path, "w") as zip_obj: + for root, _, files in os.walk(src_dir): + for file_name in files: + file_path = Path(root) / file_name + zip_obj.write(file_path, file_path.relative_to(src_dir)) + + extracted = parser.extract_objects_from_zip(str(zip_path)) + + if len(extracted["dashboards"]) != 1: + raise AssertionError("dashboards extraction size mismatch") + if extracted["dashboards"][0]["uuid"] != "dash-u1": + raise AssertionError("dashboard uuid mismatch") + if len(extracted["charts"]) != 1: + raise AssertionError("charts extraction size mismatch") + if extracted["charts"][0]["uuid"] != "chart-u1": + raise AssertionError("chart uuid mismatch") + if len(extracted["datasets"]) != 1: + raise AssertionError("datasets extraction size mismatch") + if extracted["datasets"][0]["uuid"] != "ds-u1": + raise AssertionError("dataset uuid mismatch") + + +# [/DEF:backend.tests.core.migration.test_archive_parser:Module] diff --git a/backend/tests/core/migration/test_dry_run_orchestrator.py b/backend/tests/core/migration/test_dry_run_orchestrator.py new file mode 100644 index 0000000..20ba409 --- /dev/null +++ b/backend/tests/core/migration/test_dry_run_orchestrator.py @@ -0,0 +1,110 @@ +# [DEF:backend.tests.core.migration.test_dry_run_orchestrator:Module] +# +# @TIER: STANDARD +# @PURPOSE: Unit tests for MigrationDryRunService diff and risk computation contracts. +# @LAYER: Domain +# @RELATION: VERIFIES -> backend.src.core.migration.dry_run_orchestrator +# +import json +import sys +from pathlib import Path +from unittest.mock import MagicMock, patch + +from sqlalchemy import create_engine +from sqlalchemy.orm import sessionmaker +from sqlalchemy.pool import StaticPool + +backend_dir = str(Path(__file__).parent.parent.parent.parent.resolve()) +if backend_dir not in sys.path: + sys.path.insert(0, backend_dir) + +from src.core.migration.dry_run_orchestrator import MigrationDryRunService +from src.models.dashboard import DashboardSelection +from src.models.mapping import Base + + +def _load_fixture() -> dict: + fixture_path = Path(__file__).parents[2] / "fixtures" / "migration_dry_run_fixture.json" + return json.loads(fixture_path.read_text()) + + +def _make_session(): + engine = create_engine( + "sqlite:///:memory:", + connect_args={"check_same_thread": False}, + poolclass=StaticPool, + ) + Base.metadata.create_all(engine) + Session = sessionmaker(bind=engine) + return Session() + + +def test_migration_dry_run_service_builds_diff_and_risk(): + # @TEST_CONTRACT: dry_run_result_contract -> { + # required_fields: {diff: object, summary: object, risk: object}, + # invariants: ["risk.score >= 0", "summary.selected_dashboards == len(selection.selected_ids)"] + # } + # @TEST_FIXTURE: migration_dry_run_fixture -> backend/tests/fixtures/migration_dry_run_fixture.json + # @TEST_EDGE: missing_target_datasource -> fixture.transformed_zip_objects.datasets[0].database_uuid + # @TEST_EDGE: breaking_reference -> fixture.transformed_zip_objects.charts[0].dataset_uuid + fixture = _load_fixture() + db = _make_session() + selection = DashboardSelection( + selected_ids=[42], + source_env_id="src", + target_env_id="tgt", + replace_db_config=False, + fix_cross_filters=True, + ) + + source_client = MagicMock() + source_client.get_dashboards_summary.return_value = fixture["source_dashboard_summary"] + source_client.export_dashboard.return_value = (b"PK\x03\x04", "source.zip") + + target_client = MagicMock() + target_client.get_dashboards.return_value = ( + len(fixture["target"]["dashboards"]), + fixture["target"]["dashboards"], + ) + target_client.get_datasets.return_value = ( + len(fixture["target"]["datasets"]), + fixture["target"]["datasets"], + ) + target_client.get_charts.return_value = ( + len(fixture["target"]["charts"]), + fixture["target"]["charts"], + ) + target_client.get_databases.return_value = ( + len(fixture["target"]["databases"]), + fixture["target"]["databases"], + ) + + parser = MagicMock() + parser.extract_objects_from_zip.return_value = fixture["transformed_zip_objects"] + service = MigrationDryRunService(parser=parser) + + with patch("src.core.migration.dry_run_orchestrator.MigrationEngine") as EngineMock: + engine = MagicMock() + engine.transform_zip.return_value = True + EngineMock.return_value = engine + result = service.run(selection, source_client, target_client, db) + + if "summary" not in result: + raise AssertionError("summary is missing in dry-run payload") + if result["summary"]["selected_dashboards"] != 1: + raise AssertionError("selected_dashboards summary mismatch") + if result["summary"]["dashboards"]["update"] != 1: + raise AssertionError("dashboard update count mismatch") + if result["summary"]["charts"]["create"] != 1: + raise AssertionError("chart create count mismatch") + if result["summary"]["datasets"]["create"] != 1: + raise AssertionError("dataset create count mismatch") + + risk_codes = {item["code"] for item in result["risk"]["items"]} + if "missing_datasource" not in risk_codes: + raise AssertionError("missing_datasource risk is not detected") + if "breaking_reference" not in risk_codes: + raise AssertionError("breaking_reference risk is not detected") + + +# [/DEF:backend.tests.core.migration.test_dry_run_orchestrator:Module] diff --git a/backend/tests/fixtures/migration_dry_run_fixture.json b/backend/tests/fixtures/migration_dry_run_fixture.json new file mode 100644 index 0000000..d0cc08e --- /dev/null +++ b/backend/tests/fixtures/migration_dry_run_fixture.json @@ -0,0 +1,58 @@ +{ + "source_dashboard_summary": [ + { + "id": 42, + "title": "Sales" + } + ], + "target": { + "dashboards": [ + { + "uuid": "dash-1", + "dashboard_title": "Sales Old", + "slug": "sales-old", + "position_json": "{}", + "json_metadata": "{}", + "description": "", + "owners": [ + { + "username": "owner-a" + } + ] + } + ], + "datasets": [], + "charts": [], + "databases": [] + }, + "transformed_zip_objects": { + "dashboards": [ + { + "uuid": "dash-1", + "title": "Sales New", + "signature": "{\"title\":\"Sales New\"}", + "owners": [ + { + "username": "owner-b" + } + ] + } + ], + "charts": [ + { + "uuid": "chart-1", + "title": "Chart A", + "signature": "{\"title\":\"Chart A\"}", + "dataset_uuid": "dataset-404" + } + ], + "datasets": [ + { + "uuid": "dataset-1", + "title": "orders", + "signature": "{\"title\":\"orders\"}", + "database_uuid": "db-missing" + } + ] + } +} diff --git a/frontend/src/routes/migration/+page.svelte b/frontend/src/routes/migration/+page.svelte index 1a54421..6540deb 100644 --- a/frontend/src/routes/migration/+page.svelte +++ b/frontend/src/routes/migration/+page.svelte @@ -24,6 +24,7 @@ import type { DashboardMetadata, DashboardSelection, + MigrationDryRunResult, } from "../../types/dashboard"; import { t } from "$lib/i18n"; import { Button, Card, PageHeader } from "$lib/ui"; @@ -44,6 +45,8 @@ let mappings: any[] = []; let suggestions: any[] = []; let fetchingDbs = false; + let dryRunLoading = false; + let dryRunResult: MigrationDryRunResult | null = null; // UI State for Modals let showLogViewer = false; @@ -253,6 +256,7 @@ error = ""; try { + dryRunResult = null; const selection: DashboardSelection = { selected_ids: selectedDashboardIds, source_env_id: sourceEnvId, @@ -296,6 +300,57 @@ } } // [/DEF:startMigration:Function] + + // [DEF:startDryRun:Function] + /** + * @purpose Builds pre-flight diff and risk summary without applying migration. + * @pre source/target environments and selected dashboards are valid. + * @post dryRunResult is populated with backend response. + * @UX_STATE: Idle -> Dry Run button is enabled when selection is valid. + * @UX_STATE: Loading -> Dry Run button shows "Dry Run..." and stays disabled. + * @UX_STATE: Error -> error banner is displayed and dryRunResult resets to null. + * @UX_FEEDBACK: User sees summary cards + risk block + JSON details after success. + * @UX_RECOVERY: User can adjust selection and press Dry Run again. + */ + async function startDryRun() { + if (!sourceEnvId || !targetEnvId) { + error = + $t.migration?.select_both_envs || + "Please select both source and target environments."; + return; + } + if (sourceEnvId === targetEnvId) { + error = + $t.migration?.different_envs || + "Source and target environments must be different."; + return; + } + if (selectedDashboardIds.length === 0) { + error = + $t.migration?.select_dashboards || + "Please select at least one dashboard to migrate."; + return; + } + + error = ""; + dryRunLoading = true; + try { + const selection: DashboardSelection = { + selected_ids: selectedDashboardIds, + source_env_id: sourceEnvId, + target_env_id: targetEnvId, + replace_db_config: replaceDb, + fix_cross_filters: fixCrossFilters, + }; + dryRunResult = await api.postApi("/migration/dry-run", selection); + } catch (e) { + error = e.message; + dryRunResult = null; + } finally { + dryRunLoading = false; + } + } + // [/DEF:startDryRun:Function] @@ -417,15 +472,70 @@ {/if} - +
+ + + +
+ + {#if dryRunResult} +
+

Pre-flight Diff

+
+
+
Dashboards
+
create: {dryRunResult.summary.dashboards.create}
+
update: {dryRunResult.summary.dashboards.update}
+
delete: {dryRunResult.summary.dashboards.delete}
+
+
+
Charts
+
create: {dryRunResult.summary.charts.create}
+
update: {dryRunResult.summary.charts.update}
+
delete: {dryRunResult.summary.charts.delete}
+
+
+
Datasets
+
create: {dryRunResult.summary.datasets.create}
+
update: {dryRunResult.summary.datasets.update}
+
delete: {dryRunResult.summary.datasets.delete}
+
+
+ +
+
Risk
+
+ score: {dryRunResult.risk.score}, level: {dryRunResult.risk.level} +
+
+ issues: {dryRunResult.risk.items.length} +
+
+ +
+ Diff JSON +
{JSON.stringify(dryRunResult, null, 2)}
+
+
+ {/if} {/if} diff --git a/frontend/src/types/dashboard.ts b/frontend/src/types/dashboard.ts index 161208b..d02fbfa 100644 --- a/frontend/src/types/dashboard.ts +++ b/frontend/src/types/dashboard.ts @@ -16,5 +16,48 @@ export interface DashboardSelection { source_env_id: string; target_env_id: string; replace_db_config?: boolean; + fix_cross_filters?: boolean; } -// [/DEF:DashboardTypes:Module] \ No newline at end of file + +export interface DiffObjectRef { + uuid: string; + title?: string; + target_title?: string; +} + +export interface DiffBucket { + create: DiffObjectRef[]; + update: DiffObjectRef[]; + delete: DiffObjectRef[]; +} + +export interface DryRunRiskItem { + code: string; + severity: "low" | "medium" | "high"; + object_type: string; + object_uuid: string; + message: string; +} + +export interface MigrationDryRunResult { + generated_at: string; + selection: DashboardSelection; + selected_dashboard_titles: string[]; + diff: { + dashboards: DiffBucket; + charts: DiffBucket; + datasets: DiffBucket; + }; + summary: { + dashboards: Record<"create" | "update" | "delete", number>; + charts: Record<"create" | "update" | "delete", number>; + datasets: Record<"create" | "update" | "delete", number>; + selected_dashboards: number; + }; + risk: { + score: number; + level: "low" | "medium" | "high"; + items: DryRunRiskItem[]; + }; +} +// [/DEF:DashboardTypes:Module] diff --git a/semantics/semantic_map.json b/semantics/semantic_map.json index e162592..2c4fe2c 100644 --- a/semantics/semantic_map.json +++ b/semantics/semantic_map.json @@ -1,7 +1,45 @@ { "project_root": ".", - "generated_at": "2026-02-25T20:19:23.427050", + "generated_at": "2026-02-27T15:09:17.130685", "modules": [ + { + "name": "check_test_data", + "type": "Module", + "tier": "TRIVIAL", + "start_line": 1, + "end_line": 27, + "tags": { + "PURPOSE": "Auto-generated module for check_test_data.py", + "TIER": "TRIVIAL", + "LAYER": "Unknown" + }, + "relations": [], + "children": [ + { + "name": "check_file", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 3, + "end_line": 3, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "backend.src.services.reports.report_service", "type": "Module", @@ -1358,7 +1396,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 214, + "end_line": 288, "tags": { "TIER": "STANDARD", "SEMANTICS": "api, client, fetch, rest", @@ -1368,11 +1406,71 @@ "relations": [], "children": [ { - "name": "getWsUrl", + "name": "buildApiError", "type": "Function", "tier": "STANDARD", "start_line": 12, - "end_line": 27, + "end_line": 25, + "tags": { + "PURPOSE": "Creates a normalized Error object for failed API responses.", + "PRE": "response is a failed fetch Response object.", + "POST": "Returned error contains message and status fields." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 12 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 12 + } + ], + "score": 0.7 + } + }, + { + "name": "notifyApiError", + "type": "Function", + "tier": "STANDARD", + "start_line": 27, + "end_line": 42, + "tags": { + "PURPOSE": "Shows toast for API errors with explicit handling of critical statuses.", + "PRE": "error is an Error instance.", + "POST": "User gets visible toast feedback for request failure." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 27 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 27 + } + ], + "score": 0.7 + } + }, + { + "name": "getWsUrl", + "type": "Function", + "tier": "STANDARD", + "start_line": 44, + "end_line": 59, "tags": { "PURPOSE": "Returns the WebSocket URL for a specific task, with fallback logic.", "PRE": "taskId is provided.", @@ -1388,12 +1486,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 12 + "line_number": 44 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 12 + "line_number": 44 } ], "score": 0.7 @@ -1403,8 +1501,8 @@ "name": "getAuthHeaders", "type": "Function", "tier": "STANDARD", - "start_line": 29, - "end_line": 43, + "start_line": 61, + "end_line": 75, "tags": { "PURPOSE": "Returns headers with Authorization if token exists." }, @@ -1416,32 +1514,32 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 29 + "line_number": 61 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 29 + "line_number": 61 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 29 + "line_number": 61 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 29 + "line_number": 61 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 29 + "line_number": 61 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 29 + "line_number": 61 } ], "score": 0.0 @@ -1451,8 +1549,8 @@ "name": "fetchApi", "type": "Function", "tier": "STANDARD", - "start_line": 45, - "end_line": 73, + "start_line": 77, + "end_line": 101, "tags": { "PURPOSE": "Generic GET request wrapper.", "PRE": "endpoint string is provided.", @@ -1468,12 +1566,42 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 45 + "line_number": 77 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 45 + "line_number": 77 + } + ], + "score": 0.7 + } + }, + { + "name": "fetchApiBlob", + "type": "Function", + "tier": "STANDARD", + "start_line": 103, + "end_line": 131, + "tags": { + "PURPOSE": "Generic GET wrapper for binary payloads.", + "PRE": "endpoint string is provided.", + "POST": "Returns Blob or throws on error." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 } ], "score": 0.7 @@ -1483,8 +1611,8 @@ "name": "postApi", "type": "Function", "tier": "STANDARD", - "start_line": 75, - "end_line": 106, + "start_line": 133, + "end_line": 160, "tags": { "PURPOSE": "Generic POST request wrapper.", "PRE": "endpoint and body are provided.", @@ -1500,12 +1628,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 75 + "line_number": 133 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 75 + "line_number": 133 } ], "score": 0.7 @@ -1515,8 +1643,8 @@ "name": "requestApi", "type": "Function", "tier": "STANDARD", - "start_line": 108, - "end_line": 143, + "start_line": 162, + "end_line": 194, "tags": { "PURPOSE": "Generic request wrapper.", "PRE": "endpoint and method are provided.", @@ -1530,12 +1658,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 108 + "line_number": 162 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 108 + "line_number": 162 } ], "score": 0.7 @@ -1545,8 +1673,8 @@ "name": "api", "type": "Data", "tier": "STANDARD", - "start_line": 145, - "end_line": 212, + "start_line": 196, + "end_line": 286, "tags": { "PURPOSE": "API client object with specific methods." }, @@ -1923,13 +2051,16 @@ "type": "Store", "tier": "CRITICAL", "start_line": 1, - "end_line": 95, + "end_line": 108, "tags": { "TIER": "CRITICAL", "PURPOSE": "Manage Task Drawer visibility and resource-to-task mapping", "LAYER": "UI", "INVARIANT": "resourceTaskMap always reflects current task associations", "UX_STATE": "Closed -> Drawer hidden, no active task", + "TEST_CONTRACT": "TaskDrawerStore ->", + "TEST_FIXTURE": "valid_store_state -> {\"isOpen\": true, \"activeTaskId\": \"test_1\", \"resourceTaskMap\": {\"res1\": {\"taskId\": \"test_1\", \"status\": \"RUNNING\"}}}", + "TEST_INVARIANT": "state_management -> verifies: [valid_store_state]", "PARAM": "{string} resourceId - Resource ID", "RETURNS": "{Object|null} Task info or null if no active task" }, @@ -1946,7 +2077,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 95, + "end_line": 108, "tags": { "PURPOSE": "Auto-generated module for frontend/src/lib/stores/taskDrawer.js", "TIER": "TRIVIAL", @@ -1958,24 +2089,6 @@ "name": "openDrawerForTask", "type": "Function", "tier": "TRIVIAL", - "start_line": 26, - "end_line": 26, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "openDrawer", - "type": "Function", - "tier": "TRIVIAL", "start_line": 39, "end_line": 39, "tags": { @@ -1991,7 +2104,7 @@ } }, { - "name": "closeDrawer", + "name": "openDrawer", "type": "Function", "tier": "TRIVIAL", "start_line": 52, @@ -2008,12 +2121,30 @@ "score": 1.0 } }, + { + "name": "closeDrawer", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 65, + "end_line": 65, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "updateResourceTask", "type": "Function", "tier": "TRIVIAL", - "start_line": 67, - "end_line": 67, + "start_line": 80, + "end_line": 80, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -2030,8 +2161,8 @@ "name": "getTaskForResource", "type": "Function", "tier": "TRIVIAL", - "start_line": 87, - "end_line": 87, + "start_line": 100, + "end_line": 100, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -2183,6 +2314,189 @@ "score": 1.0 } }, + { + "name": "environmentContext", + "type": "Store", + "tier": "STANDARD", + "start_line": 1, + "end_line": 141, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Global selected environment context for navigation and safety cues.", + "LAYER": "UI-State" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "environmentContext", + "type": "Module", + "tier": "TRIVIAL", + "start_line": 1, + "end_line": 141, + "tags": { + "PURPOSE": "Auto-generated module for frontend/src/lib/stores/environmentContext.js", + "TIER": "TRIVIAL", + "LAYER": "Unknown" + }, + "relations": [], + "children": [ + { + "name": "getStoredSelectedEnvId", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 21, + "end_line": 21, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "persistSelectedEnvId", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 26, + "end_line": 26, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "hasAuthToken", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 35, + "end_line": 35, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "resolveSelectedEnvId", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 40, + "end_line": 40, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "applySelectedEnvId", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 52, + "end_line": 52, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "refreshEnvironmentContext", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 61, + "end_line": 61, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "initializeEnvironmentContext", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 114, + "end_line": 114, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "setSelectedEnvironment", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 124, + "end_line": 124, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "activity", "type": "Store", @@ -2464,11 +2778,11 @@ { "name": "frontend.src.lib.stores.__tests__.test_taskDrawer", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 1, "end_line": 160, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "SEMANTICS": "task-drawer, store, mapping, tests", "PURPOSE": "Unit tests for task drawer store", "LAYER": "UI", @@ -2626,7 +2940,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 93, + "end_line": 107, "tags": { "TIER": "CRITICAL", "SEMANTICS": "frontend, api_client, reports, wrapper", @@ -2684,11 +2998,15 @@ "type": "Function", "tier": "STANDARD", "start_line": 58, - "end_line": 74, + "end_line": 88, "tags": { "PURPOSE": "Fetch unified report list using existing request wrapper.", "PRE": "valid auth context for protected endpoint.", - "POST": "Returns parsed payload or structured error for UI-state mapping." + "POST": "Returns parsed payload or structured error for UI-state mapping.", + "TEST_CONTRACT": "GetReportsApi ->", + "TEST_FIXTURE": "valid_get_reports -> {\"options\": {\"page\": 1}}", + "TEST_EDGE": "api_fetch_failure -> api.fetchApi throws error", + "TEST_INVARIANT": "error_normalization -> verifies: [api_fetch_failure]" }, "relations": [], "children": [], @@ -2702,8 +3020,8 @@ "name": "getReportDetail", "type": "Function", "tier": "STANDARD", - "start_line": 76, - "end_line": 91, + "start_line": 90, + "end_line": 105, "tags": { "PURPOSE": "Fetch one report detail by report_id.", "PRE": "reportId is non-empty string; valid auth context.", @@ -2904,11 +3222,11 @@ { "name": "frontend.src.lib.api.__tests__.reports_api", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 1, "end_line": 213, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "SEMANTICS": "tests, reports, api-client, query-string, error-normalization", "PURPOSE": "Unit tests for reports API client functions: query string building, error normalization, and fetch wrappers.", "LAYER": "Infra (Tests)", @@ -3366,7 +3684,7 @@ "type": "Component", "tier": "CRITICAL", "start_line": 1, - "end_line": 717, + "end_line": 801, "tags": { "TIER": "CRITICAL", "PURPOSE": "Slide-out assistant chat panel for natural language command execution and task tracking.", @@ -3377,7 +3695,8 @@ "UX_STATE": "Error -> Failed action rendered as assistant failed message.", "UX_FEEDBACK": "Started operation surfaces task_id and quick action to open task drawer.", "UX_RECOVERY": "User can retry command or action from input and action buttons.", - "UX_TEST": "NeedsConfirmation -> {click: confirm action, expected: started response with task_id}" + "UX_TEST": "NeedsConfirmation -> {click: confirm action, expected: started response with task_id}", + "TEST_DATA": "assistant_llm_not_configured -> {\"llmStatus\":{\"configured\":false,\"reason\":\"invalid_api_key\"}}" }, "relations": [], "children": [ @@ -3385,8 +3704,8 @@ "name": "loadHistory", "type": "Function", "tier": "STANDARD", - "start_line": 68, - "end_line": 114, + "start_line": 89, + "end_line": 135, "tags": { "PURPOSE": "Load current conversation history when panel becomes visible.", "PRE": "Panel is open and history request is not already running.", @@ -3405,8 +3724,8 @@ "name": "loadConversations", "type": "Function", "tier": "STANDARD", - "start_line": 116, - "end_line": 155, + "start_line": 137, + "end_line": 176, "tags": { "PURPOSE": "Load paginated conversation summaries for quick switching UI.", "PRE": "Panel is open and request not already running.", @@ -3424,8 +3743,8 @@ "name": "loadOlderMessages", "type": "Function", "tier": "STANDARD", - "start_line": 157, - "end_line": 199, + "start_line": 178, + "end_line": 220, "tags": { "PURPOSE": "Lazy-load older messages for active conversation when user scrolls to top.", "PRE": "History has next page and active conversation is known.", @@ -3443,8 +3762,8 @@ "name": "appendLocalUserMessage", "type": "Function", "tier": "STANDARD", - "start_line": 216, - "end_line": 234, + "start_line": 238, + "end_line": 256, "tags": { "PURPOSE": "Add optimistic local user message before backend response.", "PRE": "text is non-empty command text.", @@ -3462,8 +3781,8 @@ "name": "appendAssistantResponse", "type": "Function", "tier": "STANDARD", - "start_line": 236, - "end_line": 259, + "start_line": 258, + "end_line": 281, "tags": { "PURPOSE": "Normalize and append assistant response payload to chat list.", "PRE": "response follows assistant message response contract.", @@ -3481,8 +3800,8 @@ "name": "handleSend", "type": "Function", "tier": "STANDARD", - "start_line": 284, - "end_line": 324, + "start_line": 306, + "end_line": 346, "tags": { "PURPOSE": "Submit user command to assistant orchestration API.", "PRE": "input contains a non-empty command and current request is not loading.", @@ -3501,8 +3820,8 @@ "name": "selectConversation", "type": "Function", "tier": "STANDARD", - "start_line": 326, - "end_line": 345, + "start_line": 348, + "end_line": 367, "tags": { "PURPOSE": "Switch active chat context to selected conversation item.", "PRE": "conversation carries valid conversation_id.", @@ -3520,8 +3839,8 @@ "name": "startNewConversation", "type": "Function", "tier": "STANDARD", - "start_line": 347, - "end_line": 366, + "start_line": 369, + "end_line": 388, "tags": { "PURPOSE": "Create local empty chat context that will be persisted on first message.", "PRE": "Panel is open.", @@ -3539,8 +3858,8 @@ "name": "handleAction", "type": "Function", "tier": "STANDARD", - "start_line": 368, - "end_line": 420, + "start_line": 390, + "end_line": 469, "tags": { "PURPOSE": "Execute assistant action button behavior (open task/reports, confirm, cancel).", "PRE": "action object is produced by assistant response contract.", @@ -3559,8 +3878,8 @@ "name": "handleKeydown", "type": "Function", "tier": "STANDARD", - "start_line": 422, - "end_line": 435, + "start_line": 471, + "end_line": 484, "tags": { "PURPOSE": "Submit command by Enter while preserving multiline input with Shift+Enter.", "PRE": "Keyboard event received from chat input.", @@ -3578,8 +3897,8 @@ "name": "stateClass", "type": "Function", "tier": "STANDARD", - "start_line": 437, - "end_line": 456, + "start_line": 486, + "end_line": 505, "tags": { "PURPOSE": "Map assistant state to visual badge style class.", "PRE": "state is a nullable assistant state string.", @@ -3597,8 +3916,8 @@ "name": "handleHistoryScroll", "type": "Function", "tier": "STANDARD", - "start_line": 458, - "end_line": 472, + "start_line": 507, + "end_line": 521, "tags": { "PURPOSE": "Trigger lazy history fetch when user scroll reaches top boundary.", "PRE": "Scroll event emitted by history viewport container.", @@ -3622,127 +3941,112 @@ { "store": "app", "type": "READS_FROM", - "line": 27 + "line": 44 }, { "store": "lib", "type": "READS_FROM", - "line": 28 + "line": 45 }, { "store": "lib", "type": "READS_FROM", - "line": 29 + "line": 46 }, { "store": "lib", "type": "READS_FROM", - "line": 30 + "line": 47 }, { "store": "lib", "type": "READS_FROM", - "line": 35 + "line": 52 }, { "store": "lib", "type": "READS_FROM", - "line": 42 + "line": 59 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 60 }, { "store": "assistantChatStore", "type": "READS_FROM", - "line": 65 + "line": 86 }, { "store": "assistantChatStore", "type": "READS_FROM", - "line": 66 + "line": 87 }, { "store": "t", "type": "READS_FROM", - "line": 263 + "line": 285 }, { "store": "t", "type": "READS_FROM", - "line": 264 + "line": 286 }, { "store": "t", "type": "READS_FROM", - "line": 315 + "line": 337 }, { "store": "t", "type": "READS_FROM", - "line": 413 + "line": 462 }, { "store": "t", "type": "READS_FROM", - "line": 495 + "line": 555 }, { "store": "t", "type": "WRITES_TO", - "line": 501 + "line": 561 }, { "store": "t", "type": "READS_FROM", - "line": 512 + "line": 573 }, { "store": "t", "type": "READS_FROM", - "line": 518 + "line": 577 }, { "store": "t", "type": "READS_FROM", - "line": 529 + "line": 580 }, { "store": "t", "type": "READS_FROM", - "line": 538 + "line": 583 }, { "store": "t", "type": "READS_FROM", - "line": 571 + "line": 594 }, { "store": "t", "type": "READS_FROM", - "line": 586 + "line": 600 }, { "store": "t", "type": "READS_FROM", - "line": 593 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 599 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 601 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 602 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 603 + "line": 611 }, { "store": "t", @@ -3752,22 +4056,17 @@ { "store": "t", "type": "READS_FROM", - "line": 621 + "line": 653 }, { "store": "t", "type": "READS_FROM", - "line": 629 + "line": 668 }, { "store": "t", "type": "READS_FROM", - "line": 642 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 648 + "line": 675 }, { "store": "t", @@ -3777,17 +4076,62 @@ { "store": "t", "type": "READS_FROM", - "line": 685 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 700 + "line": 683 }, { "store": "t", "type": "READS_FROM", - "line": 709 + "line": 684 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 685 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 702 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 703 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 711 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 724 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 730 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 763 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 767 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 782 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 793 } ] }, @@ -3796,7 +4140,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 755, + "end_line": 839, "tags": { "PURPOSE": "Auto-generated module for frontend/src/lib/components/assistant/AssistantChatPanel.svelte", "TIER": "TRIVIAL", @@ -3808,8 +4152,8 @@ "name": "buildConversationTitle", "type": "Function", "tier": "TRIVIAL", - "start_line": 261, - "end_line": 261, + "start_line": 283, + "end_line": 283, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -3826,8 +4170,8 @@ "name": "setConversationFilter", "type": "Function", "tier": "TRIVIAL", - "start_line": 267, - "end_line": 267, + "start_line": 289, + "end_line": 289, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -3844,8 +4188,8 @@ "name": "formatConversationTime", "type": "Function", "tier": "TRIVIAL", - "start_line": 277, - "end_line": 277, + "start_line": 299, + "end_line": 299, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -3857,62 +4201,23 @@ "issues": [], "score": 1.0 } - } - ], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "frontend.src.lib.components.assistant.__tests__.assistant_confirmation_integration", - "type": "Module", - "tier": "STANDARD", - "start_line": 1, - "end_line": 50, - "tags": { - "TIER": "STANDARD", - "SEMANTICS": "assistant, confirmation, integration-test, ux", - "PURPOSE": "Validate confirm/cancel UX contract bindings in assistant chat panel source.", - "LAYER": "UI Tests", - "INVARIANT": "Confirm/cancel action handling must remain explicit and confirmation-id bound." - }, - "relations": [ + }, { - "type": "VERIFIES", - "target": "frontend/src/lib/components/assistant/AssistantChatPanel.svelte" - } - ], - "children": [ - { - "name": "assistant_confirmation_contract_tests", + "name": "loadLlmStatus", "type": "Function", - "tier": "STANDARD", - "start_line": 18, - "end_line": 49, + "tier": "TRIVIAL", + "start_line": 527, + "end_line": 527, "tags": { - "PURPOSE": "Assert that confirmation UX flow and API bindings are preserved in chat panel.", - "PRE": "Assistant panel source file exists and is readable.", - "POST": "Test guarantees explicit confirm/cancel guards and failed-action recovery path." + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [ - { - "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 18 - }, - { - "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 18 - } - ], - "score": 0.7 + "issues": [], + "score": 1.0 } } ], @@ -4018,7 +4323,7 @@ "type": "Component", "tier": "CRITICAL", "start_line": 1, - "end_line": 71, + "end_line": 104, "tags": { "TIER": "CRITICAL", "SEMANTICS": "reports, card, type-profile, accessibility, fallback", @@ -4043,57 +4348,27 @@ { "store": "lib", "type": "READS_FROM", - "line": 17 + "line": 32 }, { "store": "props", "type": "WRITES_TO", - "line": 20 - }, - { - "store": "derived", - "type": "WRITES_TO", - "line": 23 - }, - { - "store": "derived", - "type": "WRITES_TO", - "line": 24 - }, - { - "store": "t", - "type": "WRITES_TO", "line": 35 }, { - "store": "t", - "type": "WRITES_TO", - "line": 36 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 37 - }, - { - "store": "t", + "store": "derived", "type": "WRITES_TO", "line": 38 }, { - "store": "t", - "type": "READS_FROM", + "store": "derived", + "type": "WRITES_TO", "line": 39 }, { "store": "t", - "type": "READS_FROM", - "line": 43 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 45 + "type": "WRITES_TO", + "line": 56 }, { "store": "t", @@ -4103,22 +4378,52 @@ { "store": "t", "type": "WRITES_TO", - "line": 57 + "line": 58 }, { "store": "t", "type": "WRITES_TO", - "line": 57 + "line": 59 }, { "store": "t", "type": "READS_FROM", - "line": 61 + "line": 60 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 64 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 66 }, { "store": "t", "type": "WRITES_TO", - "line": 67 + "line": 81 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 81 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 81 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 88 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 99 } ] }, @@ -4127,7 +4432,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 71, + "end_line": 104, "tags": { "PURPOSE": "Auto-generated module for frontend/src/lib/components/reports/ReportCard.svelte", "TIER": "TRIVIAL", @@ -4139,8 +4444,8 @@ "name": "getStatusClass", "type": "Function", "tier": "TRIVIAL", - "start_line": 26, - "end_line": 26, + "start_line": 43, + "end_line": 43, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4157,8 +4462,8 @@ "name": "getStatusLabel", "type": "Function", "tier": "TRIVIAL", - "start_line": 34, - "end_line": 34, + "start_line": 55, + "end_line": 55, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4175,8 +4480,8 @@ "name": "formatDate", "type": "Function", "tier": "TRIVIAL", - "start_line": 42, - "end_line": 42, + "start_line": 63, + "end_line": 63, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4193,8 +4498,8 @@ "name": "onSelect", "type": "Function", "tier": "TRIVIAL", - "start_line": 49, - "end_line": 49, + "start_line": 70, + "end_line": 70, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4219,7 +4524,7 @@ "type": "Component", "tier": "CRITICAL", "start_line": 1, - "end_line": 37, + "end_line": 51, "tags": { "TIER": "CRITICAL", "SEMANTICS": "reports, list, card, unified, mixed-types", @@ -4245,7 +4550,7 @@ { "store": "props", "type": "WRITES_TO", - "line": 19 + "line": 33 } ] }, @@ -4254,7 +4559,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 37, + "end_line": 51, "tags": { "PURPOSE": "Auto-generated module for frontend/src/lib/components/reports/ReportsList.svelte", "TIER": "TRIVIAL", @@ -4266,8 +4571,8 @@ "name": "handleSelect", "type": "Function", "tier": "TRIVIAL", - "start_line": 22, - "end_line": 22, + "start_line": 36, + "end_line": 36, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4292,7 +4597,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 61, + "end_line": 73, "tags": { "TIER": "CRITICAL", "SEMANTICS": "reports, ui, profiles, fallback, mapping", @@ -4312,11 +4617,15 @@ "type": "Function", "tier": "STANDARD", "start_line": 49, - "end_line": 59, + "end_line": 71, "tags": { "PURPOSE": "Resolve visual profile by task type with guaranteed fallback.", "PRE": "taskType may be known/unknown/empty.", - "POST": "Returns one profile object." + "POST": "Returns one profile object.", + "TEST_CONTRACT": "GetReportTypeProfileModel ->", + "TEST_FIXTURE": "valid_type -> {\"taskType\": \"migration\"}", + "TEST_EDGE": "invalid_type -> {\"taskType\": \"invalid\"}", + "TEST_INVARIANT": "fallbacks_to_unknown -> verifies: [invalid_type]" }, "relations": [], "children": [], @@ -4338,7 +4647,7 @@ "type": "Component", "tier": "CRITICAL", "start_line": 1, - "end_line": 66, + "end_line": 107, "tags": { "TIER": "CRITICAL", "SEMANTICS": "reports, detail, diagnostics, next-actions, placeholders", @@ -4360,77 +4669,77 @@ { "store": "lib", "type": "READS_FROM", - "line": 15 + "line": 30 }, { "store": "props", "type": "WRITES_TO", - "line": 17 + "line": 32 }, { "store": "t", "type": "READS_FROM", - "line": 21 + "line": 36 }, { "store": "t", "type": "READS_FROM", - "line": 27 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 29 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 35 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 38 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 41 - }, - { - "store": "t", - "type": "WRITES_TO", "line": 42 }, { "store": "t", - "type": "WRITES_TO", - "line": 43 - }, - { - "store": "t", - "type": "WRITES_TO", + "type": "READS_FROM", "line": 44 }, { "store": "t", - "type": "WRITES_TO", - "line": 45 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 49 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 50 + "type": "READS_FROM", + "line": 51 }, { "store": "t", "type": "WRITES_TO", "line": 55 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 59 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 63 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 67 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 71 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 75 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 82 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 86 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 95 } ] }, @@ -4439,7 +4748,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 66, + "end_line": 107, "tags": { "PURPOSE": "Auto-generated module for frontend/src/lib/components/reports/ReportDetailPanel.svelte", "TIER": "TRIVIAL", @@ -4451,8 +4760,8 @@ "name": "notProvided", "type": "Function", "tier": "TRIVIAL", - "start_line": 19, - "end_line": 19, + "start_line": 34, + "end_line": 34, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4469,8 +4778,8 @@ "name": "formatDate", "type": "Function", "tier": "TRIVIAL", - "start_line": 26, - "end_line": 26, + "start_line": 41, + "end_line": 41, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4555,11 +4864,11 @@ { "name": "frontend.src.lib.components.reports.__tests__.reports_page.integration", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 1, "end_line": 40, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "SEMANTICS": "tests, reports, integration, mixed-types, rendering", "PURPOSE": "Integration-style checks for unified mixed-type reports rendering expectations.", "LAYER": "UI (Tests)", @@ -4604,11 +4913,11 @@ { "name": "frontend.src.lib.components.reports.__tests__.report_type_profiles", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 1, "end_line": 32, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "SEMANTICS": "tests, reports, type-profiles, fallback", "PURPOSE": "Validate report type profile mapping and unknown fallback behavior.", "LAYER": "UI (Tests)", @@ -4630,11 +4939,11 @@ { "name": "frontend.src.lib.components.reports.__tests__.report_card.ux", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 4, - "end_line": 73, + "end_line": 75, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "SEMANTICS": "reports, ux-tests, card, states, recovery", "PURPOSE": "Test UX states and transitions for ReportCard component", "LAYER": "UI", @@ -4659,11 +4968,11 @@ { "name": "frontend.src.lib.components.reports.__tests__.report_detail.ux", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 4, "end_line": 74, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "SEMANTICS": "reports, ux-tests, detail, diagnostics, recovery", "PURPOSE": "Test UX states and recovery for ReportDetailPanel component", "LAYER": "UI", @@ -4687,11 +4996,11 @@ { "name": "frontend.src.lib.components.reports.__tests__.report_detail.integration", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 1, "end_line": 45, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "SEMANTICS": "tests, reports, detail, recovery-guidance, integration", "PURPOSE": "Validate detail-panel behavior for failed reports and recovery guidance visibility.", "LAYER": "UI (Tests)", @@ -4758,7 +5067,7 @@ "type": "Component", "tier": "CRITICAL", "start_line": 1, - "end_line": 305, + "end_line": 321, "tags": { "TIER": "CRITICAL", "PURPOSE": "Persistent left sidebar with resource categories navigation", @@ -4781,82 +5090,67 @@ { "store": "app", "type": "READS_FROM", - "line": 18 + "line": 32 }, { "store": "lib", "type": "READS_FROM", - "line": 24 - }, - { - "store": "lib", - "type": "READS_FROM", - "line": 25 - }, - { - "store": "app", - "type": "READS_FROM", - "line": 26 - }, - { - "store": "lib", - "type": "READS_FROM", - "line": 27 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 33 - }, - { - "store": "t", - "type": "READS_FROM", "line": 38 }, { - "store": "t", + "store": "lib", "type": "READS_FROM", - "line": 43 + "line": 39 + }, + { + "store": "app", + "type": "READS_FROM", + "line": 40 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 41 }, { "store": "t", "type": "READS_FROM", - "line": 48 + "line": 47 }, { "store": "t", "type": "READS_FROM", - "line": 53 + "line": 51 }, { "store": "t", "type": "READS_FROM", - "line": 58 + "line": 55 }, { "store": "t", "type": "READS_FROM", - "line": 60 + "line": 59 }, { "store": "t", "type": "READS_FROM", - "line": 67 + "line": 63 }, { "store": "t", "type": "READS_FROM", - "line": 71 + "line": 68 }, { "store": "t", "type": "READS_FROM", - "line": 75 + "line": 70 }, { "store": "t", "type": "READS_FROM", - "line": 80 + "line": 77 }, { "store": "t", @@ -4866,77 +5160,92 @@ { "store": "t", "type": "READS_FROM", - "line": 82 + "line": 85 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 90 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 91 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 92 }, { "store": "sidebarStore", "type": "READS_FROM", - "line": 97 + "line": 107 }, { "store": "sidebarStore", "type": "WRITES_TO", - "line": 98 - }, - { - "store": "sidebarStore", - "type": "WRITES_TO", - "line": 99 - }, - { - "store": "sidebarStore", - "type": "WRITES_TO", - "line": 100 - }, - { - "store": "sidebarStore", - "type": "WRITES_TO", - "line": 101 - }, - { - "store": "page", - "type": "READS_FROM", "line": 108 }, { - "store": "page", - "type": "READS_FROM", - "line": 108 + "store": "sidebarStore", + "type": "WRITES_TO", + "line": 109 }, { - "store": "page", - "type": "READS_FROM", + "store": "sidebarStore", + "type": "WRITES_TO", "line": 110 }, { - "store": "page", + "store": "sidebarStore", "type": "WRITES_TO", - "line": 114 + "line": 111 }, { "store": "page", "type": "READS_FROM", - "line": 170 + "line": 118 + }, + { + "store": "page", + "type": "READS_FROM", + "line": 118 + }, + { + "store": "page", + "type": "READS_FROM", + "line": 120 + }, + { + "store": "page", + "type": "WRITES_TO", + "line": 124 + }, + { + "store": "page", + "type": "READS_FROM", + "line": 180 }, { "store": "t", "type": "READS_FROM", - "line": 204 + "line": 216 }, { "store": "t", "type": "READS_FROM", - "line": 288 + "line": 304 }, { "store": "t", "type": "WRITES_TO", - "line": 296 + "line": 312 }, { "store": "t", "type": "WRITES_TO", - "line": 299 + "line": 315 } ] }, @@ -4945,7 +5254,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 305, + "end_line": 321, "tags": { "PURPOSE": "Auto-generated module for frontend/src/lib/components/layout/Sidebar.svelte", "TIER": "TRIVIAL", @@ -4957,8 +5266,8 @@ "name": "buildCategories", "type": "Function", "tier": "TRIVIAL", - "start_line": 29, - "end_line": 29, + "start_line": 43, + "end_line": 43, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4975,8 +5284,8 @@ "name": "handleItemClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 118, - "end_line": 118, + "start_line": 128, + "end_line": 128, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4993,8 +5302,8 @@ "name": "handleCategoryToggle", "type": "Function", "tier": "TRIVIAL", - "start_line": 127, - "end_line": 127, + "start_line": 137, + "end_line": 137, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5011,8 +5320,8 @@ "name": "handleSubItemClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 149, - "end_line": 149, + "start_line": 159, + "end_line": 159, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5029,8 +5338,8 @@ "name": "handleToggleClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 158, - "end_line": 158, + "start_line": 168, + "end_line": 168, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5047,8 +5356,8 @@ "name": "handleOverlayClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 164, - "end_line": 164, + "start_line": 174, + "end_line": 174, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5073,7 +5382,7 @@ "type": "Component", "tier": "CRITICAL", "start_line": 1, - "end_line": 229, + "end_line": 537, "tags": { "TIER": "CRITICAL", "PURPOSE": "Unified top navigation bar with Logo, Search, Activity, and User menu", @@ -5100,117 +5409,192 @@ { "store": "app", "type": "READS_FROM", - "line": 20 + "line": 34 + }, + { + "store": "app", + "type": "READS_FROM", + "line": 35 }, { "store": "lib", "type": "READS_FROM", - "line": 21 + "line": 36 }, { "store": "lib", "type": "READS_FROM", - "line": 26 + "line": 37 }, { "store": "lib", "type": "READS_FROM", - "line": 27 + "line": 38 }, { "store": "lib", "type": "READS_FROM", - "line": 28 + "line": 43 }, { "store": "lib", "type": "READS_FROM", - "line": 29 + "line": 44 }, { "store": "lib", "type": "READS_FROM", - "line": 30 + "line": 45 }, { "store": "lib", "type": "READS_FROM", - "line": 31 + "line": 46 }, { "store": "lib", "type": "READS_FROM", - "line": 32 + "line": 47 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 48 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 49 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 55 }, { "store": "sidebarStore", "type": "READS_FROM", - "line": 39 + "line": 71 }, { "store": "activityStore", "type": "READS_FROM", - "line": 40 + "line": 72 }, { "store": "activityStore", "type": "READS_FROM", - "line": 41 + "line": 73 }, { "store": "auth", "type": "READS_FROM", - "line": 42 + "line": 74 }, { - "store": "t", - "type": "WRITES_TO", - "line": 109 + "store": "environmentContextStore", + "type": "READS_FROM", + "line": 75 + }, + { + "store": "environmentContextStore", + "type": "READS_FROM", + "line": 76 + }, + { + "store": "selectedEnvironmentStore", + "type": "READS_FROM", + "line": 77 }, { "store": "t", "type": "READS_FROM", - "line": 122 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 132 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 146 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 147 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 160 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 180 + "line": 200 }, { "store": "t", "type": "READS_FROM", - "line": 198 + "line": 207 }, { "store": "t", "type": "READS_FROM", - "line": 212 + "line": 214 }, { "store": "t", "type": "READS_FROM", - "line": 222 + "line": 221 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 343 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 358 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 370 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 382 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 386 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 429 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 430 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 454 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 455 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 468 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 488 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 506 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 520 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 530 } ] }, @@ -5219,7 +5603,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 229, + "end_line": 537, "tags": { "PURPOSE": "Auto-generated module for frontend/src/lib/components/layout/TopNavbar.svelte", "TIER": "TRIVIAL", @@ -5231,8 +5615,8 @@ "name": "toggleUserMenu", "type": "Function", "tier": "TRIVIAL", - "start_line": 44, - "end_line": 44, + "start_line": 80, + "end_line": 80, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5249,8 +5633,8 @@ "name": "closeUserMenu", "type": "Function", "tier": "TRIVIAL", - "start_line": 49, - "end_line": 49, + "start_line": 85, + "end_line": 85, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5267,8 +5651,8 @@ "name": "handleLogout", "type": "Function", "tier": "TRIVIAL", - "start_line": 53, - "end_line": 53, + "start_line": 89, + "end_line": 89, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5285,8 +5669,8 @@ "name": "handleActivityClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 59, - "end_line": 59, + "start_line": 95, + "end_line": 95, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5303,8 +5687,8 @@ "name": "handleAssistantClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 71, - "end_line": 71, + "start_line": 107, + "end_line": 107, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5321,8 +5705,8 @@ "name": "handleSearchFocus", "type": "Function", "tier": "TRIVIAL", - "start_line": 75, - "end_line": 75, + "start_line": 111, + "end_line": 111, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5336,11 +5720,11 @@ } }, { - "name": "handleSearchBlur", + "name": "clearSearchState", "type": "Function", "tier": "TRIVIAL", - "start_line": 79, - "end_line": 79, + "start_line": 116, + "end_line": 116, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5357,8 +5741,8 @@ "name": "handleDocumentClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 83, - "end_line": 83, + "start_line": 122, + "end_line": 122, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5375,8 +5759,116 @@ "name": "handleHamburgerClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 93, - "end_line": 93, + "start_line": 132, + "end_line": 132, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleGlobalEnvironmentChange", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 137, + "end_line": 137, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "buildSearchResultSections", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 144, + "end_line": 144, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "triggerSearch", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 228, + "end_line": 228, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleSearchInput", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 280, + "end_line": 280, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "openSearchResult", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 290, + "end_line": 290, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleSearchKeydown", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 303, + "end_line": 303, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5549,7 +6041,7 @@ "type": "Component", "tier": "CRITICAL", "start_line": 1, - "end_line": 364, + "end_line": 759, "tags": { "TIER": "CRITICAL", "PURPOSE": "Global task drawer for monitoring background operations", @@ -5559,7 +6051,8 @@ "INVARIANT": "Drawer shows logs for active task or remains closed", "UX_STATE": "InputRequired -> Interactive form rendered in drawer", "UX_FEEDBACK": "Back button returns to task list", - "UX_RECOVERY": "Back button shows task list when viewing task details" + "UX_RECOVERY": "Back button shows task list when viewing task details", + "TEST_DATA": "llm_task_success_with_pass_result -> {\"activeTaskDetails\":{\"plugin_id\":\"llm_dashboard_validation\",\"status\":\"SUCCESS\",\"result\":{\"status\":\"PASS\"}}}" }, "relations": [], "children": [ @@ -5567,8 +6060,8 @@ "name": "disconnectWebSocket", "type": "Function", "tier": "STANDARD", - "start_line": 121, - "end_line": 135, + "start_line": 384, + "end_line": 398, "tags": { "PURPOSE": "Disconnects the active WebSocket connection", "PRE": "ws may or may not be initialized", @@ -5587,8 +6080,8 @@ "name": "loadRecentTasks", "type": "Function", "tier": "STANDARD", - "start_line": 137, - "end_line": 160, + "start_line": 400, + "end_line": 423, "tags": { "PURPOSE": "Load recent tasks for list mode display", "PRE": "User is on task drawer or api is ready.", @@ -5606,8 +6099,8 @@ "name": "selectTask", "type": "Function", "tier": "STANDARD", - "start_line": 162, - "end_line": 175, + "start_line": 425, + "end_line": 438, "tags": { "PURPOSE": "Select a task from list to view details", "PRE": "task is a valid task object", @@ -5625,8 +6118,8 @@ "name": "goBackToList", "type": "Function", "tier": "STANDARD", - "start_line": 177, - "end_line": 194, + "start_line": 440, + "end_line": 457, "tags": { "PURPOSE": "Return to task list view from task details", "PRE": "Drawer is open and activeTaskId is set", @@ -5651,112 +6144,227 @@ { "store": "lib", "type": "READS_FROM", - "line": 22 + "line": 39 }, { "store": "lib", "type": "READS_FROM", - "line": 23 - }, - { - "store": "lib", - "type": "READS_FROM", - "line": 26 - }, - { - "store": "lib", - "type": "READS_FROM", - "line": 27 - }, - { - "store": "lib", - "type": "READS_FROM", - "line": 28 - }, - { - "store": "taskDrawerStore", - "type": "READS_FROM", "line": 40 }, { - "store": "taskDrawerStore", - "type": "WRITES_TO", - "line": 41 + "store": "lib", + "type": "READS_FROM", + "line": 43 }, { - "store": "taskDrawerStore", - "type": "WRITES_TO", - "line": 42 - }, - { - "store": "assistantChatStore", + "store": "lib", "type": "READS_FROM", "line": 44 }, { - "store": "t", + "store": "lib", + "type": "READS_FROM", + "line": 45 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 46 + }, + { + "store": "taskDrawerStore", + "type": "READS_FROM", + "line": 66 + }, + { + "store": "taskDrawerStore", "type": "WRITES_TO", - "line": 223 + "line": 67 + }, + { + "store": "taskDrawerStore", + "type": "WRITES_TO", + "line": 68 + }, + { + "store": "assistantChatStore", + "type": "READS_FROM", + "line": 70 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 159 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 229 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 229 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 229 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 229 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 241 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 252 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 252 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 252 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 266 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 293 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 305 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 333 }, { "store": "t", "type": "WRITES_TO", - "line": 240 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 247 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 248 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 273 + "line": 501 }, { "store": "t", "type": "WRITES_TO", - "line": 278 + "line": 518 }, { "store": "t", "type": "READS_FROM", - "line": 301 + "line": 524 }, { "store": "t", "type": "READS_FROM", - "line": 308 + "line": 524 }, { "store": "t", "type": "READS_FROM", - "line": 317 + "line": 562 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 567 }, { "store": "t", "type": "READS_FROM", - "line": 321 + "line": 583 }, { "store": "t", "type": "READS_FROM", - "line": 334 + "line": 606 }, { "store": "t", "type": "READS_FROM", - "line": 349 + "line": 624 }, { "store": "t", "type": "READS_FROM", - "line": 360 + "line": 627 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 635 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 642 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 651 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 655 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 662 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 682 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 689 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 699 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 703 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 716 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 744 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 755 } ] }, @@ -5765,7 +6373,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 366, + "end_line": 761, "tags": { "PURPOSE": "Auto-generated module for frontend/src/lib/components/layout/TaskDrawer.svelte", "TIER": "TRIVIAL", @@ -5777,8 +6385,8 @@ "name": "handleClose", "type": "Function", "tier": "TRIVIAL", - "start_line": 57, - "end_line": 57, + "start_line": 83, + "end_line": 83, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5795,8 +6403,8 @@ "name": "goToReportsPage", "type": "Function", "tier": "TRIVIAL", - "start_line": 62, - "end_line": 62, + "start_line": 88, + "end_line": 88, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5813,8 +6421,260 @@ "name": "handleGlobalKeydown", "type": "Function", "tier": "TRIVIAL", - "start_line": 67, - "end_line": 67, + "start_line": 93, + "end_line": 93, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "normalizeTaskId", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 100, + "end_line": 100, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "isTaskFinished", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 111, + "end_line": 111, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "resolveLlmValidationStatus", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 120, + "end_line": 120, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "llmValidationBadgeClass", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 129, + "end_line": 129, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "stopTaskDetailsPolling", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 139, + "end_line": 139, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "loadEnvironmentOptions", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 146, + "end_line": 146, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "resolveEnvironmentName", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 156, + "end_line": 156, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "resolveEnvironmentId", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 162, + "end_line": 162, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "loadActiveTaskDetails", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 172, + "end_line": 172, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "extractPrimaryDashboardId", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 187, + "end_line": 187, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "buildTaskSummary", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 206, + "end_line": 206, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleOpenDashboardDeepLink", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 290, + "end_line": 290, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleShowDiff", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 302, + "end_line": 302, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleOpenLlmReport", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 329, + "end_line": 329, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5831,8 +6691,8 @@ "name": "connectWebSocket", "type": "Function", "tier": "TRIVIAL", - "start_line": 75, - "end_line": 75, + "start_line": 346, + "end_line": 346, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -5952,7 +6812,7 @@ "type": "Page", "tier": "CRITICAL", "start_line": 1, - "end_line": 45, + "end_line": 56, "tags": { "TIER": "CRITICAL", "PURPOSE": "Redirect to Dashboard Hub as per UX requirements", @@ -6000,7 +6860,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 16, - "end_line": 79, + "end_line": 93, "tags": { "TIER": "STANDARD", "SEMANTICS": "app-layout, auth-gating, navigation-shell", @@ -6022,13 +6882,13 @@ "type": "Page", "tier": "CRITICAL", "start_line": 1, - "end_line": 783, + "end_line": 939, "tags": { "TIER": "CRITICAL", "PURPOSE": "Dataset Hub - Dedicated hub for datasets with mapping progress", "LAYER": "UI", "RELATION": "BINDS_TO -> sidebarStore, taskDrawerStore", - "INVARIANT": "Always shows environment selector and dataset grid", + "INVARIANT": "Always shows datasets for the active environment from context store", "UX_STATE": "BulkAction-Modal -> Map Columns or Generate Docs modal open", "UX_FEEDBACK": "Floating panel slides up from bottom when items selected", "UX_RECOVERY": "Refresh button reloads dataset list" @@ -6046,7 +6906,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 783, + "end_line": 939, "tags": { "PURPOSE": "Auto-generated module for frontend/src/routes/datasets/+page.svelte", "TIER": "TRIVIAL", @@ -6054,48 +6914,12 @@ }, "relations": [], "children": [ - { - "name": "loadEnvironments", - "type": "Function", - "tier": "TRIVIAL", - "start_line": 74, - "end_line": 74, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, { "name": "loadDatasets", "type": "Function", "tier": "TRIVIAL", - "start_line": 94, - "end_line": 94, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "handleEnvChange", - "type": "Function", - "tier": "TRIVIAL", - "start_line": 146, - "end_line": 146, + "start_line": 99, + "end_line": 99, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6112,8 +6936,8 @@ "name": "handleSearch", "type": "Function", "tier": "TRIVIAL", - "start_line": 154, - "end_line": 154, + "start_line": 155, + "end_line": 155, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6130,8 +6954,8 @@ "name": "handlePageChange", "type": "Function", "tier": "TRIVIAL", - "start_line": 159, - "end_line": 159, + "start_line": 160, + "end_line": 160, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6148,8 +6972,8 @@ "name": "handlePageSizeChange", "type": "Function", "tier": "TRIVIAL", - "start_line": 165, - "end_line": 165, + "start_line": 166, + "end_line": 166, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6166,8 +6990,8 @@ "name": "updateSelectionState", "type": "Function", "tier": "TRIVIAL", - "start_line": 172, - "end_line": 172, + "start_line": 173, + "end_line": 173, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6184,8 +7008,8 @@ "name": "handleCheckboxChange", "type": "Function", "tier": "TRIVIAL", - "start_line": 181, - "end_line": 181, + "start_line": 183, + "end_line": 183, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6202,8 +7026,8 @@ "name": "handleSelectAll", "type": "Function", "tier": "TRIVIAL", - "start_line": 192, - "end_line": 192, + "start_line": 194, + "end_line": 194, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6220,8 +7044,8 @@ "name": "handleSelectVisible", "type": "Function", "tier": "TRIVIAL", - "start_line": 213, - "end_line": 213, + "start_line": 218, + "end_line": 218, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6238,8 +7062,8 @@ "name": "handleAction", "type": "Function", "tier": "TRIVIAL", - "start_line": 224, - "end_line": 224, + "start_line": 229, + "end_line": 229, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6256,8 +7080,8 @@ "name": "handleBulkMapColumns", "type": "Function", "tier": "TRIVIAL", - "start_line": 242, - "end_line": 242, + "start_line": 249, + "end_line": 249, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6274,8 +7098,8 @@ "name": "handleBulkGenerateDocs", "type": "Function", "tier": "TRIVIAL", - "start_line": 297, - "end_line": 297, + "start_line": 314, + "end_line": 314, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6292,8 +7116,8 @@ "name": "handleTaskStatusClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 328, - "end_line": 328, + "start_line": 348, + "end_line": 348, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6310,8 +7134,8 @@ "name": "getTaskStatusIcon", "type": "Function", "tier": "TRIVIAL", - "start_line": 336, - "end_line": 336, + "start_line": 358, + "end_line": 358, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6328,8 +7152,8 @@ "name": "getMappingProgressClass", "type": "Function", "tier": "TRIVIAL", - "start_line": 353, - "end_line": 353, + "start_line": 375, + "end_line": 375, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6354,7 +7178,7 @@ "type": "Page", "tier": "CRITICAL", "start_line": 1, - "end_line": 393, + "end_line": 401, "tags": { "TIER": "CRITICAL", "PURPOSE": "Dataset Detail View - Shows detailed dataset information with columns, SQL, and linked dashboards", @@ -6378,7 +7202,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 393, + "end_line": 401, "tags": { "PURPOSE": "Auto-generated module for frontend/src/routes/datasets/[id]/+page.svelte", "TIER": "TRIVIAL", @@ -6390,8 +7214,8 @@ "name": "loadDatasetDetail", "type": "Function", "tier": "TRIVIAL", - "start_line": 39, - "end_line": 39, + "start_line": 52, + "end_line": 52, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6408,8 +7232,8 @@ "name": "navigateToDashboard", "type": "Function", "tier": "TRIVIAL", - "start_line": 60, - "end_line": 60, + "start_line": 73, + "end_line": 73, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6426,8 +7250,8 @@ "name": "goBack", "type": "Function", "tier": "TRIVIAL", - "start_line": 65, - "end_line": 65, + "start_line": 78, + "end_line": 78, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6444,8 +7268,8 @@ "name": "getColumnTypeClass", "type": "Function", "tier": "TRIVIAL", - "start_line": 70, - "end_line": 70, + "start_line": 83, + "end_line": 83, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6462,8 +7286,8 @@ "name": "getMappingProgress", "type": "Function", "tier": "TRIVIAL", - "start_line": 94, - "end_line": 94, + "start_line": 107, + "end_line": 107, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6488,7 +7312,7 @@ "type": "Component", "tier": "CRITICAL", "start_line": 1, - "end_line": 194, + "end_line": 223, "tags": { "TIER": "CRITICAL", "SEMANTICS": "reports, unified, filters, loading, empty, error", @@ -6511,92 +7335,92 @@ { "store": "lib", "type": "READS_FROM", - "line": 22 + "line": 37 }, { "store": "lib", "type": "READS_FROM", - "line": 23 + "line": 38 }, { "store": "lib", "type": "READS_FROM", - "line": 24 + "line": 39 }, { "store": "lib", "type": "READS_FROM", - "line": 25 - }, - { - "store": "lib", - "type": "READS_FROM", - "line": 26 - }, - { - "store": "t", - "type": "READS_FROM", "line": 40 }, { - "store": "t", + "store": "lib", "type": "READS_FROM", - "line": 42 + "line": 41 }, { "store": "t", "type": "READS_FROM", - "line": 43 + "line": 55 }, { "store": "t", "type": "READS_FROM", - "line": 48 + "line": 57 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 58 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 63 }, { "store": "t", "type": "WRITES_TO", - "line": 115 + "line": 130 }, { "store": "t", "type": "READS_FROM", - "line": 146 + "line": 161 }, { "store": "t", "type": "READS_FROM", - "line": 153 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 160 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 166 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 166 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 171 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 175 + "line": 168 }, { "store": "t", "type": "READS_FROM", "line": 177 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 188 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 188 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 195 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 201 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 206 } ] }, @@ -6605,7 +7429,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 194, + "end_line": 223, "tags": { "PURPOSE": "Auto-generated module for frontend/src/routes/reports/+page.svelte", "TIER": "TRIVIAL", @@ -6617,8 +7441,8 @@ "name": "buildQuery", "type": "Function", "tier": "TRIVIAL", - "start_line": 55, - "end_line": 55, + "start_line": 70, + "end_line": 70, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6635,8 +7459,8 @@ "name": "loadReports", "type": "Function", "tier": "TRIVIAL", - "start_line": 66, - "end_line": 66, + "start_line": 81, + "end_line": 81, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6653,8 +7477,8 @@ "name": "hasActiveFilters", "type": "Function", "tier": "TRIVIAL", - "start_line": 83, - "end_line": 83, + "start_line": 98, + "end_line": 98, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6671,8 +7495,8 @@ "name": "clearFilters", "type": "Function", "tier": "TRIVIAL", - "start_line": 87, - "end_line": 87, + "start_line": 102, + "end_line": 102, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6689,6 +7513,152 @@ "name": "onFilterChange", "type": "Function", "tier": "TRIVIAL", + "start_line": 111, + "end_line": 111, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "onSelectReport", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 118, + "end_line": 118, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "+page", + "type": "Module", + "tier": "TRIVIAL", + "start_line": 1, + "end_line": 344, + "tags": { + "PURPOSE": "Auto-generated module for frontend/src/routes/reports/llm/[taskId]/+page.svelte", + "TIER": "TRIVIAL", + "LAYER": "Unknown" + }, + "relations": [], + "children": [ + { + "name": "formatDate", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 45, + "end_line": 45, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "formatMs", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 52, + "end_line": 52, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "getDashboardCheckResult", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 59, + "end_line": 59, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "getCheckResultClasses", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 70, + "end_line": 70, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "loadReport", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 78, + "end_line": 78, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "backToReports", + "type": "Function", + "tier": "TRIVIAL", "start_line": 96, "end_line": 96, "tags": { @@ -6704,11 +7674,11 @@ } }, { - "name": "onSelectReport", + "name": "openTaskDetails", "type": "Function", "tier": "TRIVIAL", - "start_line": 103, - "end_line": 103, + "start_line": 100, + "end_line": 100, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6926,7 +7896,7 @@ "type": "Page", "tier": "STANDARD", "start_line": 12, - "end_line": 109, + "end_line": 121, "tags": { "UX_STATE": "Idle -> Showing dashboard grid with actions.", "UX_FEEDBACK": "Toast -> Error messages on fetch failure.", @@ -6938,8 +7908,8 @@ "name": "fetchEnvironments", "type": "Function", "tier": "STANDARD", - "start_line": 34, - "end_line": 52, + "start_line": 39, + "end_line": 56, "tags": { "PURPOSE": "Fetches the list of available environments.", "PRE": "None.", @@ -6953,12 +7923,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 34 + "line_number": 39 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 34 + "line_number": 39 } ], "score": 0.7 @@ -6968,8 +7938,8 @@ "name": "fetchDashboards", "type": "Function", "tier": "STANDARD", - "start_line": 54, - "end_line": 72, + "start_line": 58, + "end_line": 76, "tags": { "PURPOSE": "Fetches dashboards for a specific environment.", "PRE": "envId is a valid environment ID.", @@ -6983,12 +7953,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 54 + "line_number": 58 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 54 + "line_number": 58 } ], "score": 0.7 @@ -7006,13 +7976,13 @@ "type": "Page", "tier": "CRITICAL", "start_line": 1, - "end_line": 1675, + "end_line": 1689, "tags": { "TIER": "CRITICAL", "PURPOSE": "Dashboard Hub - Central hub for managing dashboards with Git status and task actions", "LAYER": "UI", "RELATION": "BINDS_TO -> sidebarStore, taskDrawerStore", - "INVARIANT": "Always shows environment selector and dashboard grid", + "INVARIANT": "Always shows dashboards for the active environment from context store", "UX_STATE": "BulkAction-Modal -> Migration or Backup modal open", "UX_FEEDBACK": "Floating panel slides up from bottom when items selected", "UX_RECOVERY": "Refresh button reloads dashboard list" @@ -7030,7 +8000,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 1675, + "end_line": 1689, "tags": { "PURPOSE": "Auto-generated module for frontend/src/routes/dashboards/+page.svelte", "TIER": "TRIVIAL", @@ -7042,26 +8012,8 @@ "name": "handleDocumentClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 89, - "end_line": 89, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "loadEnvironments", - "type": "Function", - "tier": "TRIVIAL", - "start_line": 101, - "end_line": 101, + "start_line": 110, + "end_line": 110, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7078,26 +8030,8 @@ "name": "loadDashboards", "type": "Function", "tier": "TRIVIAL", - "start_line": 124, - "end_line": 124, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "handleEnvChange", - "type": "Function", - "tier": "TRIVIAL", - "start_line": 179, - "end_line": 179, + "start_line": 122, + "end_line": 122, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7114,8 +8048,8 @@ "name": "handleSearch", "type": "Function", "tier": "TRIVIAL", - "start_line": 187, - "end_line": 187, + "start_line": 177, + "end_line": 177, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7132,8 +8066,8 @@ "name": "handlePageChange", "type": "Function", "tier": "TRIVIAL", - "start_line": 192, - "end_line": 192, + "start_line": 182, + "end_line": 182, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7150,8 +8084,8 @@ "name": "handlePageSizeChange", "type": "Function", "tier": "TRIVIAL", - "start_line": 198, - "end_line": 198, + "start_line": 188, + "end_line": 188, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7168,6 +8102,24 @@ "name": "updateSelectionState", "type": "Function", "tier": "TRIVIAL", + "start_line": 195, + "end_line": 195, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleCheckboxChange", + "type": "Function", + "tier": "TRIVIAL", "start_line": 205, "end_line": 205, "tags": { @@ -7182,30 +8134,12 @@ "score": 1.0 } }, - { - "name": "handleCheckboxChange", - "type": "Function", - "tier": "TRIVIAL", - "start_line": 215, - "end_line": 215, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, { "name": "handleSelectAll", "type": "Function", "tier": "TRIVIAL", - "start_line": 226, - "end_line": 226, + "start_line": 216, + "end_line": 216, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7222,8 +8156,8 @@ "name": "handleSelectVisible", "type": "Function", "tier": "TRIVIAL", - "start_line": 237, - "end_line": 237, + "start_line": 227, + "end_line": 227, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7240,8 +8174,8 @@ "name": "toggleActionDropdown", "type": "Function", "tier": "TRIVIAL", - "start_line": 248, - "end_line": 248, + "start_line": 238, + "end_line": 238, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7258,8 +8192,8 @@ "name": "closeActionDropdown", "type": "Function", "tier": "TRIVIAL", - "start_line": 255, - "end_line": 255, + "start_line": 245, + "end_line": 245, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7276,8 +8210,8 @@ "name": "handleAction", "type": "Function", "tier": "TRIVIAL", - "start_line": 260, - "end_line": 260, + "start_line": 250, + "end_line": 250, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7294,8 +8228,8 @@ "name": "handleValidate", "type": "Function", "tier": "TRIVIAL", - "start_line": 304, - "end_line": 304, + "start_line": 294, + "end_line": 294, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7312,8 +8246,8 @@ "name": "handleTargetEnvChange", "type": "Function", "tier": "TRIVIAL", - "start_line": 342, - "end_line": 342, + "start_line": 332, + "end_line": 332, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7330,8 +8264,8 @@ "name": "loadDatabases", "type": "Function", "tier": "TRIVIAL", - "start_line": 355, - "end_line": 355, + "start_line": 345, + "end_line": 345, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7348,8 +8282,8 @@ "name": "handleMappingUpdate", "type": "Function", "tier": "TRIVIAL", - "start_line": 373, - "end_line": 373, + "start_line": 363, + "end_line": 363, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7366,8 +8300,8 @@ "name": "loadDbMappings", "type": "Function", "tier": "TRIVIAL", - "start_line": 380, - "end_line": 380, + "start_line": 370, + "end_line": 370, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7384,8 +8318,8 @@ "name": "handleBulkMigrate", "type": "Function", "tier": "TRIVIAL", - "start_line": 411, - "end_line": 411, + "start_line": 401, + "end_line": 401, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7402,8 +8336,8 @@ "name": "handleBulkBackup", "type": "Function", "tier": "TRIVIAL", - "start_line": 457, - "end_line": 457, + "start_line": 445, + "end_line": 445, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7420,8 +8354,8 @@ "name": "handleTaskStatusClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 494, - "end_line": 494, + "start_line": 482, + "end_line": 482, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7438,8 +8372,8 @@ "name": "navigateToDashboardDetail", "type": "Function", "tier": "TRIVIAL", - "start_line": 503, - "end_line": 503, + "start_line": 491, + "end_line": 491, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7456,6 +8390,24 @@ "name": "getStatusBadgeClass", "type": "Function", "tier": "TRIVIAL", + "start_line": 498, + "end_line": 498, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "isGitBusy", + "type": "Function", + "tier": "TRIVIAL", "start_line": 510, "end_line": 510, "tags": { @@ -7470,30 +8422,12 @@ "score": 1.0 } }, - { - "name": "isGitBusy", - "type": "Function", - "tier": "TRIVIAL", - "start_line": 522, - "end_line": 522, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, { "name": "setGitBusy", "type": "Function", "tier": "TRIVIAL", - "start_line": 526, - "end_line": 526, + "start_line": 514, + "end_line": 514, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7510,8 +8444,8 @@ "name": "ensureGitConfigs", "type": "Function", "tier": "TRIVIAL", - "start_line": 535, - "end_line": 535, + "start_line": 523, + "end_line": 523, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7528,8 +8462,8 @@ "name": "updateDashboardGitState", "type": "Function", "tier": "TRIVIAL", - "start_line": 541, - "end_line": 541, + "start_line": 529, + "end_line": 529, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7546,8 +8480,8 @@ "name": "refreshDashboardGitState", "type": "Function", "tier": "TRIVIAL", - "start_line": 549, - "end_line": 549, + "start_line": 537, + "end_line": 537, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7564,8 +8498,8 @@ "name": "handleGitInit", "type": "Function", "tier": "TRIVIAL", - "start_line": 568, - "end_line": 568, + "start_line": 556, + "end_line": 556, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7582,8 +8516,8 @@ "name": "handleGitSync", "type": "Function", "tier": "TRIVIAL", - "start_line": 594, - "end_line": 594, + "start_line": 592, + "end_line": 592, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7600,8 +8534,8 @@ "name": "handleGitCommit", "type": "Function", "tier": "TRIVIAL", - "start_line": 607, - "end_line": 607, + "start_line": 605, + "end_line": 605, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7618,8 +8552,8 @@ "name": "handleGitPull", "type": "Function", "tier": "TRIVIAL", - "start_line": 635, - "end_line": 635, + "start_line": 633, + "end_line": 633, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7636,8 +8570,8 @@ "name": "handleGitPush", "type": "Function", "tier": "TRIVIAL", - "start_line": 649, - "end_line": 649, + "start_line": 647, + "end_line": 647, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7654,8 +8588,8 @@ "name": "getTaskStatusIcon", "type": "Function", "tier": "TRIVIAL", - "start_line": 664, - "end_line": 664, + "start_line": 662, + "end_line": 662, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7672,8 +8606,8 @@ "name": "getPaginationRange", "type": "Function", "tier": "TRIVIAL", - "start_line": 681, - "end_line": 681, + "start_line": 679, + "end_line": 679, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7698,13 +8632,14 @@ "type": "Page", "tier": "CRITICAL", "start_line": 1, - "end_line": 208, + "end_line": 690, "tags": { "TIER": "CRITICAL", "PURPOSE": "Dashboard Detail View - Overview of charts and datasets linked to a dashboard", "LAYER": "UI", "RELATION": "BINDS_TO -> dashboard detail API", - "INVARIANT": "Shows dashboard metadata, charts, and datasets for selected environment" + "INVARIANT": "Shows dashboard metadata, charts, and datasets for selected environment", + "TEST_DATA": "llm_unconfigured -> {\"llmStatus\":{\"configured\":false,\"reason\":\"invalid_api_key\"}}" }, "relations": [], "children": [], @@ -7719,7 +8654,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 208, + "end_line": 690, "tags": { "PURPOSE": "Auto-generated module for frontend/src/routes/dashboards/[id]/+page.svelte", "TIER": "TRIVIAL", @@ -7727,12 +8662,210 @@ }, "relations": [], "children": [ + { + "name": "loadDashboardPage", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 59, + "end_line": 59, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "loadDashboardDetail", "type": "Function", "tier": "TRIVIAL", - "start_line": 29, - "end_line": 29, + "start_line": 68, + "end_line": 68, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "loadTaskHistory", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 87, + "end_line": 87, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "releaseThumbnailUrl", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 104, + "end_line": 104, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "loadThumbnail", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 111, + "end_line": 111, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "runBackupTask", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 136, + "end_line": 136, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "runLlmValidationTask", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 165, + "end_line": 165, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "openLlmReport", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 204, + "end_line": 204, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "toTaskTypeLabel", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 213, + "end_line": 213, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "getTaskStatusClasses", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 220, + "end_line": 220, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "getValidationStatus", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 232, + "end_line": 232, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "getValidationStatusClasses", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 249, + "end_line": 249, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7749,8 +8882,8 @@ "name": "goBack", "type": "Function", "tier": "TRIVIAL", - "start_line": 48, - "end_line": 48, + "start_line": 259, + "end_line": 259, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7767,8 +8900,8 @@ "name": "openDataset", "type": "Function", "tier": "TRIVIAL", - "start_line": 52, - "end_line": 52, + "start_line": 263, + "end_line": 263, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7785,8 +8918,26 @@ "name": "formatDate", "type": "Function", "tier": "TRIVIAL", - "start_line": 56, - "end_line": 56, + "start_line": 267, + "end_line": 267, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "loadLlmStatus", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 274, + "end_line": 274, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9793,7 +10944,7 @@ "type": "Page", "tier": "CRITICAL", "start_line": 1, - "end_line": 1491, + "end_line": 1535, "tags": { "TIER": "CRITICAL", "PURPOSE": "Consolidated Settings Page - All settings in one place with tabbed navigation", @@ -9802,7 +10953,9 @@ "INVARIANT": "Always shows tabbed interface with all settings categories", "UX_STATE": "Error -> Shows error banner with retry button", "UX_FEEDBACK": "Toast notifications on save success/failure", - "UX_RECOVERY": "Refresh button reloads settings data" + "UX_RECOVERY": "Refresh button reloads settings data", + "TEST_DATA": "load_settings_success -> {\"environments\":[{\"id\":\"env1\",\"name\":\"Dev\",\"url\":\"http://dev\"}],\"llm\":{\"default_provider\":\"openai\"}}", + "TEST_EDGE": "load_failed -> shows error banner with retry button" }, "relations": [], "children": [], @@ -9817,7 +10970,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 1491, + "end_line": 1535, "tags": { "PURPOSE": "Auto-generated module for frontend/src/routes/settings/+page.svelte", "TIER": "TRIVIAL", @@ -9829,8 +10982,8 @@ "name": "normalizeTab", "type": "Function", "tier": "TRIVIAL", - "start_line": 67, - "end_line": 67, + "start_line": 85, + "end_line": 85, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9847,8 +11000,8 @@ "name": "readTabFromUrl", "type": "Function", "tier": "TRIVIAL", - "start_line": 79, - "end_line": 79, + "start_line": 100, + "end_line": 100, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9865,8 +11018,8 @@ "name": "writeTabToUrl", "type": "Function", "tier": "TRIVIAL", - "start_line": 89, - "end_line": 89, + "start_line": 110, + "end_line": 110, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9883,8 +11036,8 @@ "name": "loadSettings", "type": "Function", "tier": "TRIVIAL", - "start_line": 114, - "end_line": 114, + "start_line": 135, + "end_line": 135, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9901,8 +11054,8 @@ "name": "normalizeLlmSettings", "type": "Function", "tier": "TRIVIAL", - "start_line": 129, - "end_line": 129, + "start_line": 150, + "end_line": 150, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9919,42 +11072,6 @@ "name": "isMultimodalModel", "type": "Function", "tier": "TRIVIAL", - "start_line": 153, - "end_line": 153, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "getProviderById", - "type": "Function", - "tier": "TRIVIAL", - "start_line": 167, - "end_line": 167, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "isDashboardValidationBindingValid", - "type": "Function", - "tier": "TRIVIAL", "start_line": 174, "end_line": 174, "tags": { @@ -9969,12 +11086,48 @@ "score": 1.0 } }, + { + "name": "getProviderById", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 188, + "end_line": 188, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "isDashboardValidationBindingValid", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 195, + "end_line": 195, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "handleTabChange", "type": "Function", "tier": "TRIVIAL", - "start_line": 182, - "end_line": 182, + "start_line": 203, + "end_line": 203, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9991,8 +11144,8 @@ "name": "loadMigrationSettings", "type": "Function", "tier": "TRIVIAL", - "start_line": 210, - "end_line": 210, + "start_line": 231, + "end_line": 231, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -10009,8 +11162,8 @@ "name": "loadMappingsPage", "type": "Function", "tier": "TRIVIAL", - "start_line": 223, - "end_line": 223, + "start_line": 244, + "end_line": 244, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -10027,8 +11180,8 @@ "name": "onMappingsSearchInput", "type": "Function", "tier": "TRIVIAL", - "start_line": 241, - "end_line": 241, + "start_line": 262, + "end_line": 262, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -10045,8 +11198,8 @@ "name": "onMappingsFilterChange", "type": "Function", "tier": "TRIVIAL", - "start_line": 249, - "end_line": 249, + "start_line": 270, + "end_line": 270, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -10063,8 +11216,8 @@ "name": "goToMappingsPage", "type": "Function", "tier": "TRIVIAL", - "start_line": 254, - "end_line": 254, + "start_line": 275, + "end_line": 275, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -10081,8 +11234,8 @@ "name": "saveMigrationSettings", "type": "Function", "tier": "TRIVIAL", - "start_line": 260, - "end_line": 260, + "start_line": 281, + "end_line": 281, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -10099,8 +11252,8 @@ "name": "triggerSyncNow", "type": "Function", "tier": "TRIVIAL", - "start_line": 278, - "end_line": 278, + "start_line": 293, + "end_line": 293, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -10117,8 +11270,8 @@ "name": "handleSave", "type": "Function", "tier": "TRIVIAL", - "start_line": 296, - "end_line": 296, + "start_line": 311, + "end_line": 311, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -10135,8 +11288,8 @@ "name": "handleTestEnv", "type": "Function", "tier": "TRIVIAL", - "start_line": 312, - "end_line": 312, + "start_line": 327, + "end_line": 327, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -10153,8 +11306,8 @@ "name": "editEnv", "type": "Function", "tier": "TRIVIAL", - "start_line": 337, - "end_line": 337, + "start_line": 352, + "end_line": 352, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -10171,8 +11324,8 @@ "name": "resetEnvForm", "type": "Function", "tier": "TRIVIAL", - "start_line": 348, - "end_line": 348, + "start_line": 366, + "end_line": 366, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -10189,8 +11342,8 @@ "name": "handleAddOrUpdateEnv", "type": "Function", "tier": "TRIVIAL", - "start_line": 364, - "end_line": 364, + "start_line": 383, + "end_line": 383, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -10207,8 +11360,8 @@ "name": "handleDeleteEnv", "type": "Function", "tier": "TRIVIAL", - "start_line": 400, - "end_line": 400, + "start_line": 416, + "end_line": 416, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -10583,7 +11736,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 93, + "end_line": 105, "tags": { "PURPOSE": "Dashboard management page for Git integration.", "LAYER": "Page", @@ -10595,8 +11748,8 @@ "name": "fetchEnvironments", "type": "Function", "tier": "STANDARD", - "start_line": 22, - "end_line": 38, + "start_line": 27, + "end_line": 42, "tags": { "PURPOSE": "Fetches the list of deployment environments from the API.", "PRE": "Component is mounted.", @@ -10610,12 +11763,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 22 + "line_number": 27 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 22 + "line_number": 27 } ], "score": 0.7 @@ -10625,8 +11778,8 @@ "name": "fetchDashboards", "type": "Function", "tier": "STANDARD", - "start_line": 40, - "end_line": 56, + "start_line": 44, + "end_line": 60, "tags": { "PURPOSE": "Fetches dashboards for a specific environment.", "PRE": "`envId` is a valid environment ID.", @@ -10640,12 +11793,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 40 + "line_number": 44 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 40 + "line_number": 44 } ], "score": 0.7 @@ -10675,14 +11828,44 @@ "line": 14 }, { - "store": "t", + "store": "lib", + "type": "READS_FROM", + "line": 19 + }, + { + "store": "environmentContextStore", + "type": "WRITES_TO", + "line": 34 + }, + { + "store": "environmentContextStore", + "type": "WRITES_TO", + "line": 35 + }, + { + "store": "environmentContextStore", + "type": "READS_FROM", + "line": 64 + }, + { + "store": "environmentContextStore", + "type": "READS_FROM", + "line": 66 + }, + { + "store": "environmentContextStore", "type": "WRITES_TO", "line": 67 }, + { + "store": "environmentContextStore", + "type": "WRITES_TO", + "line": 69 + }, { "store": "t", "type": "WRITES_TO", - "line": 70 + "line": 79 }, { "store": "t", @@ -10692,12 +11875,17 @@ { "store": "t", "type": "WRITES_TO", - "line": 84 + "line": 94 }, { "store": "t", "type": "WRITES_TO", - "line": 88 + "line": 96 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 100 } ] }, @@ -12465,7 +13653,7 @@ "type": "Component", "tier": "CRITICAL", "start_line": 1, - "end_line": 241, + "end_line": 256, "tags": { "TIER": "CRITICAL", "SEMANTICS": "task, log, viewer, inline, realtime", @@ -12482,8 +13670,8 @@ "name": "handleRealTimeLogs", "type": "Action", "tier": "STANDARD", - "start_line": 46, - "end_line": 63, + "start_line": 61, + "end_line": 78, "tags": { "PURPOSE": "Sync real-time logs to the current log list", "PRE": "None", @@ -12501,8 +13689,8 @@ "name": "fetchLogs", "type": "Function", "tier": "STANDARD", - "start_line": 65, - "end_line": 85, + "start_line": 80, + "end_line": 100, "tags": { "PURPOSE": "Fetches logs for a given task ID", "PRE": "taskId is set", @@ -12520,8 +13708,8 @@ "name": "handleFilterChange", "type": "Function", "tier": "STANDARD", - "start_line": 87, - "end_line": 95, + "start_line": 102, + "end_line": 110, "tags": { "PURPOSE": "Updates filter conditions for the log viewer", "PRE": "event contains detail with source and level", @@ -12539,8 +13727,8 @@ "name": "handleRefresh", "type": "Function", "tier": "STANDARD", - "start_line": 97, - "end_line": 105, + "start_line": 112, + "end_line": 120, "tags": { "PURPOSE": "Refreshes the logs by polling the API", "PRE": "None", @@ -12558,8 +13746,8 @@ "name": "showInline", "type": "Component", "tier": "STANDARD", - "start_line": 133, - "end_line": 170, + "start_line": 148, + "end_line": 185, "tags": { "PURPOSE": "Shows inline logs -->", "LAYER": "UI -->", @@ -12578,8 +13766,8 @@ "name": "showModal", "type": "Component", "tier": "STANDARD", - "start_line": 172, - "end_line": 239, + "start_line": 187, + "end_line": 254, "tags": { "PURPOSE": "Shows modal logs -->", "LAYER": "UI -->", @@ -12607,72 +13795,72 @@ { "store": "bindable", "type": "WRITES_TO", - "line": 29 + "line": 44 }, { "store": "props", "type": "WRITES_TO", - "line": 34 + "line": 49 }, { "store": "state", "type": "WRITES_TO", - "line": 38 + "line": 53 }, { "store": "state", "type": "WRITES_TO", - "line": 39 + "line": 54 }, { "store": "state", "type": "WRITES_TO", - "line": 40 + "line": 55 }, { "store": "state", "type": "WRITES_TO", - "line": 42 + "line": 57 }, { "store": "derived", "type": "WRITES_TO", - "line": 44 + "line": 59 }, { "store": "effect", "type": "READS_FROM", - "line": 50 + "line": 65 }, { "store": "effect", "type": "READS_FROM", - "line": 107 + "line": 122 }, { "store": "t", "type": "READS_FROM", - "line": 147 + "line": 162 }, { "store": "t", "type": "WRITES_TO", - "line": 157 + "line": 172 }, { "store": "t", "type": "READS_FROM", - "line": 206 + "line": 221 }, { "store": "t", "type": "WRITES_TO", - "line": 214 + "line": 229 }, { "store": "t", "type": "READS_FROM", - "line": 220 + "line": 235 } ] }, @@ -14929,11 +16117,11 @@ { "name": "frontend.src.components.__tests__.task_log_viewer", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 1, - "end_line": 128, + "end_line": 131, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "SEMANTICS": "tests, task-log, viewer, mount, components", "PURPOSE": "Unit tests for TaskLogViewer component by mounting it and observing the DOM.", "LAYER": "UI (Tests)", @@ -17376,7 +18564,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 351, + "end_line": 371, "tags": { "TIER": "STANDARD", "PURPOSE": "UI form for managing LLM provider configurations.", @@ -17413,47 +18601,42 @@ { "store": "t", "type": "WRITES_TO", - "line": 78 + "line": 80 }, { "store": "t", "type": "WRITES_TO", - "line": 87 + "line": 89 }, { "store": "t", "type": "READS_FROM", - "line": 91 + "line": 93 }, { "store": "t", "type": "READS_FROM", - "line": 100 + "line": 102 }, { "store": "t", "type": "WRITES_TO", - "line": 146 + "line": 161 }, { "store": "t", "type": "READS_FROM", - "line": 155 + "line": 170 }, { "store": "t", "type": "READS_FROM", - "line": 167 + "line": 182 }, { "store": "t", "type": "READS_FROM", - "line": 167 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 175 + "line": 182 }, { "store": "t", @@ -17463,37 +18646,27 @@ { "store": "t", "type": "READS_FROM", - "line": 207 + "line": 205 }, { "store": "t", "type": "READS_FROM", - "line": 221 + "line": 222 }, { "store": "t", "type": "READS_FROM", "line": 236 }, + { + "store": "t", + "type": "READS_FROM", + "line": 251 + }, { "store": "t", "type": "WRITES_TO", - "line": 256 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 277 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 285 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 285 + "line": 271 }, { "store": "t", @@ -17503,27 +18676,42 @@ { "store": "t", "type": "READS_FROM", - "line": 310 + "line": 300 }, { "store": "t", "type": "READS_FROM", - "line": 316 + "line": 300 }, { "store": "t", "type": "READS_FROM", - "line": 317 + "line": 307 }, { "store": "t", "type": "READS_FROM", - "line": 330 + "line": 325 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 331 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 332 }, { "store": "t", "type": "READS_FROM", "line": 345 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 365 } ] }, @@ -17532,7 +18720,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 351, + "end_line": 371, "tags": { "PURPOSE": "Auto-generated module for frontend/src/components/llm/ProviderConfig.svelte", "TIER": "TRIVIAL", @@ -17544,8 +18732,8 @@ "name": "isMultimodalModel", "type": "Function", "tier": "TRIVIAL", - "start_line": 32, - "end_line": 32, + "start_line": 34, + "end_line": 34, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -17562,8 +18750,8 @@ "name": "resetForm", "type": "Function", "tier": "TRIVIAL", - "start_line": 46, - "end_line": 46, + "start_line": 48, + "end_line": 48, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -17580,8 +18768,8 @@ "name": "handleEdit", "type": "Function", "tier": "TRIVIAL", - "start_line": 59, - "end_line": 59, + "start_line": 61, + "end_line": 61, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -17598,8 +18786,8 @@ "name": "testConnection", "type": "Function", "tier": "TRIVIAL", - "start_line": 75, - "end_line": 75, + "start_line": 77, + "end_line": 77, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -17616,8 +18804,8 @@ "name": "handleSubmit", "type": "Function", "tier": "TRIVIAL", - "start_line": 107, - "end_line": 107, + "start_line": 109, + "end_line": 109, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -17634,8 +18822,8 @@ "name": "toggleActive", "type": "Function", "tier": "TRIVIAL", - "start_line": 131, - "end_line": 131, + "start_line": 133, + "end_line": 133, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -17850,7 +19038,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 284, + "end_line": 299, "tags": { "TIER": "CRITICAL", "SEMANTICS": "app, main, entrypoint, fastapi", @@ -17981,13 +19169,17 @@ "type": "Function", "tier": "CRITICAL", "start_line": 144, - "end_line": 245, + "end_line": 260, "tags": { "PURPOSE": "Provides a WebSocket endpoint for real-time log streaming of a task with server-side filtering.", "PRE": "task_id must be a valid task ID.", "POST": "WebSocket connection is managed and logs are streamed until disconnect.", "TIER": "CRITICAL", - "UX_STATE": "Connecting -> Streaming -> (Disconnected)" + "UX_STATE": "Connecting -> Streaming -> (Disconnected)", + "TEST_CONTRACT": "WebSocketLogStreamApi ->", + "TEST_FIXTURE": "valid_ws_connection -> {\"task_id\": \"test_1\", \"source\": \"plugin\"}", + "TEST_EDGE": "empty_task_logs -> waits for new logs", + "TEST_INVARIANT": "consistent_streaming -> verifies: [valid_ws_connection]" }, "relations": [], "children": [], @@ -18001,8 +19193,8 @@ "name": "StaticFiles", "type": "Mount", "tier": "STANDARD", - "start_line": 247, - "end_line": 283, + "start_line": 262, + "end_line": 298, "tags": { "SEMANTICS": "static, frontend, spa", "PURPOSE": "Mounts the frontend build directory to serve static assets." @@ -18013,8 +19205,8 @@ "name": "serve_spa", "type": "Function", "tier": "STANDARD", - "start_line": 254, - "end_line": 272, + "start_line": 269, + "end_line": 287, "tags": { "PURPOSE": "Serves the SPA frontend for any path not matched by API routes.", "PRE": "frontend_path exists.", @@ -18032,8 +19224,8 @@ "name": "read_root", "type": "Function", "tier": "STANDARD", - "start_line": 274, - "end_line": 282, + "start_line": 289, + "end_line": 297, "tags": { "PURPOSE": "A simple root endpoint to confirm that the API is running when frontend is missing.", "PRE": "None.", @@ -18058,8 +19250,8 @@ "name": "matches_filters", "type": "Function", "tier": "TRIVIAL", - "start_line": 179, - "end_line": 179, + "start_line": 194, + "end_line": 194, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -21203,7 +22395,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 83, + "end_line": 84, "tags": { "TIER": "STANDARD", "SEMANTICS": "config, models, pydantic", @@ -21243,7 +22435,7 @@ "type": "DataClass", "tier": "STANDARD", "start_line": 25, - "end_line": 37, + "end_line": 38, "tags": { "PURPOSE": "Represents a Superset environment configuration." }, @@ -21259,8 +22451,8 @@ "name": "LoggingConfig", "type": "DataClass", "tier": "STANDARD", - "start_line": 39, - "end_line": 48, + "start_line": 40, + "end_line": 49, "tags": { "PURPOSE": "Defines the configuration for the application's logging system." }, @@ -21276,8 +22468,8 @@ "name": "GlobalSettings", "type": "DataClass", "tier": "STANDARD", - "start_line": 50, - "end_line": 74, + "start_line": 51, + "end_line": 75, "tags": { "PURPOSE": "Represents global application settings." }, @@ -21293,8 +22485,8 @@ "name": "AppConfig", "type": "DataClass", "tier": "STANDARD", - "start_line": 76, - "end_line": 81, + "start_line": 77, + "end_line": 82, "tags": { "PURPOSE": "The root configuration model containing all application settings." }, @@ -22796,7 +23988,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 234, + "end_line": 249, "tags": { "TIER": "CRITICAL", "SEMANTICS": "mapping, ids, synchronization, environments, cross-filters", @@ -22821,10 +24013,14 @@ "type": "Class", "tier": "CRITICAL", "start_line": 23, - "end_line": 233, + "end_line": 248, "tags": { "TIER": "CRITICAL", - "PURPOSE": "Service handling the cataloging and retrieval of remote Superset Integer IDs." + "PURPOSE": "Service handling the cataloging and retrieval of remote Superset Integer IDs.", + "TEST_CONTRACT": "IdMappingServiceModel ->", + "TEST_FIXTURE": "valid_mapping_service -> {\"db_session\": \"MockSession()\"}", + "TEST_EDGE": "get_batch_empty_list -> returns empty dict", + "TEST_INVARIANT": "resilient_fetching -> verifies: [sync_api_failure]" }, "relations": [], "children": [ @@ -22832,8 +24028,8 @@ "name": "__init__", "type": "Function", "tier": "STANDARD", - "start_line": 28, - "end_line": 34, + "start_line": 43, + "end_line": 49, "tags": { "PURPOSE": "Initializes the mapping service." }, @@ -22845,32 +24041,32 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 28 + "line_number": 43 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 28 + "line_number": 43 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 28 + "line_number": 43 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 28 + "line_number": 43 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 28 + "line_number": 43 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 28 + "line_number": 43 } ], "score": 0.0 @@ -22880,8 +24076,8 @@ "name": "start_scheduler", "type": "Function", "tier": "STANDARD", - "start_line": 36, - "end_line": 65, + "start_line": 51, + "end_line": 80, "tags": { "PURPOSE": "Starts the background scheduler with a given cron string.", "PARAM": "superset_client_factory - Function to get a client for an environment." @@ -22894,32 +24090,32 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 36 + "line_number": 51 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 36 + "line_number": 51 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 36 + "line_number": 51 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 36 + "line_number": 51 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 36 + "line_number": 51 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 36 + "line_number": 51 } ], "score": 0.0 @@ -22929,8 +24125,8 @@ "name": "sync_environment", "type": "Function", "tier": "STANDARD", - "start_line": 67, - "end_line": 184, + "start_line": 82, + "end_line": 199, "tags": { "PURPOSE": "Fully synchronizes mapping for a specific environment.", "PARAM": "superset_client - Instance capable of hitting the Superset API.", @@ -22949,8 +24145,8 @@ "name": "get_remote_id", "type": "Function", "tier": "STANDARD", - "start_line": 186, - "end_line": 205, + "start_line": 201, + "end_line": 220, "tags": { "PURPOSE": "Retrieves the remote integer ID for a given universal UUID.", "PARAM": "uuid (str)", @@ -22964,47 +24160,47 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 186 + "line_number": 201 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 186 + "line_number": 201 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 186 + "line_number": 201 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 186 + "line_number": 201 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 186 + "line_number": 201 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 186 + "line_number": 201 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 186 + "line_number": 201 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 186 + "line_number": 201 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 186 + "line_number": 201 } ], "score": 0.0 @@ -23014,8 +24210,8 @@ "name": "get_remote_ids_batch", "type": "Function", "tier": "STANDARD", - "start_line": 207, - "end_line": 231, + "start_line": 222, + "end_line": 246, "tags": { "PURPOSE": "Retrieves remote integer IDs for a list of universal UUIDs efficiently.", "PARAM": "uuids (List[str])", @@ -23029,47 +24225,47 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 207 + "line_number": 222 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 207 + "line_number": 222 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 207 + "line_number": 222 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 207 + "line_number": 222 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 207 + "line_number": 222 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 207 + "line_number": 222 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 207 + "line_number": 222 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 207 + "line_number": 222 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 207 + "line_number": 222 } ], "score": 0.0 @@ -23097,8 +24293,8 @@ "name": "sync_all", "type": "Function", "tier": "TRIVIAL", - "start_line": 47, - "end_line": 47, + "start_line": 62, + "end_line": 62, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -23829,7 +25025,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 179, + "end_line": 271, "tags": { "TIER": "STANDARD", "PURPOSE": "Unit tests for authentication module", @@ -23846,8 +25042,8 @@ "name": "db_session", "type": "Function", "tier": "TRIVIAL", - "start_line": 33, - "end_line": 33, + "start_line": 35, + "end_line": 35, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -23864,8 +25060,8 @@ "name": "auth_service", "type": "Function", "tier": "TRIVIAL", - "start_line": 47, - "end_line": 47, + "start_line": 49, + "end_line": 49, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -23882,8 +25078,8 @@ "name": "auth_repo", "type": "Function", "tier": "TRIVIAL", - "start_line": 52, - "end_line": 52, + "start_line": 54, + "end_line": 54, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -23900,8 +25096,8 @@ "name": "test_create_user", "type": "Function", "tier": "TRIVIAL", - "start_line": 56, - "end_line": 56, + "start_line": 58, + "end_line": 58, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -23918,8 +25114,8 @@ "name": "test_authenticate_user", "type": "Function", "tier": "TRIVIAL", - "start_line": 75, - "end_line": 75, + "start_line": 77, + "end_line": 77, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -23936,8 +25132,8 @@ "name": "test_create_session", "type": "Function", "tier": "TRIVIAL", - "start_line": 101, - "end_line": 101, + "start_line": 103, + "end_line": 103, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -23954,8 +25150,8 @@ "name": "test_role_permission_association", "type": "Function", "tier": "TRIVIAL", - "start_line": 120, - "end_line": 120, + "start_line": 122, + "end_line": 122, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -23972,8 +25168,8 @@ "name": "test_user_role_association", "type": "Function", "tier": "TRIVIAL", - "start_line": 140, - "end_line": 140, + "start_line": 142, + "end_line": 142, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -23990,8 +25186,98 @@ "name": "test_ad_group_mapping", "type": "Function", "tier": "TRIVIAL", - "start_line": 162, - "end_line": 162, + "start_line": 164, + "end_line": 164, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_authenticate_user_updates_last_login", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 181, + "end_line": 181, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_authenticate_inactive_user", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 199, + "end_line": 199, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_verify_password_empty_hash", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 215, + "end_line": 215, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_provision_adfs_user_new", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 221, + "end_line": 221, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_provision_adfs_user_existing", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 247, + "end_line": 247, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -24428,7 +25714,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 397, + "end_line": 395, "tags": { "SEMANTICS": "network, http, client, api, requests, session, authentication", "PURPOSE": "\u0418\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0443\u044e HTTP-\u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Superset API, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0435\u0439, retry-\u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a.", @@ -24691,7 +25977,7 @@ "type": "Class", "tier": "STANDARD", "start_line": 89, - "end_line": 395, + "end_line": 393, "tags": { "PURPOSE": "\u0418\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 HTTP-\u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 API, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u0435\u0441\u0441\u0438\u0438, \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e, \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432." }, @@ -24763,7 +26049,7 @@ "type": "Function", "tier": "STANDARD", "start_line": 201, - "end_line": 215, + "end_line": 214, "tags": { "PURPOSE": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.", "PRE": "APIClient is initialized and authenticated or can be authenticated.", @@ -24773,16 +26059,32 @@ "children": [], "compliance": { "valid": true, - "issues": [], - "score": 1.0 + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 201 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 201 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 201 + } + ], + "score": 0.55 } }, { "name": "request", "type": "Function", "tier": "STANDARD", - "start_line": 217, - "end_line": 242, + "start_line": 216, + "end_line": 240, "tags": { "PURPOSE": "\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441 \u043a API.", "PARAM": "raw_response (bool) - \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043b\u0438 \u0441\u044b\u0440\u043e\u0439 \u043e\u0442\u0432\u0435\u0442.", @@ -24795,16 +26097,32 @@ "children": [], "compliance": { "valid": true, - "issues": [], - "score": 1.0 + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 216 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 216 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 216 + } + ], + "score": 0.55 } }, { "name": "_handle_http_error", "type": "Function", "tier": "STANDARD", - "start_line": 244, - "end_line": 262, + "start_line": 242, + "end_line": 260, "tags": { "PURPOSE": "(Helper) \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 HTTP \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.", "PARAM": "endpoint (str) - \u042d\u043d\u0434\u043f\u043e\u0438\u043d\u0442.", @@ -24823,8 +26141,8 @@ "name": "_handle_network_error", "type": "Function", "tier": "STANDARD", - "start_line": 264, - "end_line": 279, + "start_line": 262, + "end_line": 277, "tags": { "PURPOSE": "(Helper) \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 `NetworkError`.", "PARAM": "url (str) - URL.", @@ -24843,8 +26161,8 @@ "name": "upload_file", "type": "Function", "tier": "STANDARD", - "start_line": 281, - "end_line": 310, + "start_line": 279, + "end_line": 308, "tags": { "PURPOSE": "\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0444\u0430\u0439\u043b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 multipart/form-data.", "PARAM": "timeout (Optional[int]) - \u0422\u0430\u0439\u043c\u0430\u0443\u0442.", @@ -24865,8 +26183,8 @@ "name": "_perform_upload", "type": "Function", "tier": "STANDARD", - "start_line": 312, - "end_line": 338, + "start_line": 310, + "end_line": 336, "tags": { "PURPOSE": "(Helper) \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 POST \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u0444\u0430\u0439\u043b\u043e\u043c.", "PARAM": "timeout (Optional[int]) - \u0422\u0430\u0439\u043c\u0430\u0443\u0442.", @@ -24886,8 +26204,8 @@ "name": "fetch_paginated_count", "type": "Function", "tier": "STANDARD", - "start_line": 340, - "end_line": 352, + "start_line": 338, + "end_line": 350, "tags": { "PURPOSE": "\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438.", "PARAM": "count_field (str) - \u041f\u043e\u043b\u0435 \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c.", @@ -24907,8 +26225,8 @@ "name": "fetch_paginated_data", "type": "Function", "tier": "STANDARD", - "start_line": 354, - "end_line": 393, + "start_line": 352, + "end_line": 391, "tags": { "PURPOSE": "\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043f\u0430\u0433\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430.", "PARAM": "pagination_options (Dict[str, Any]) - \u041e\u043f\u0446\u0438\u0438 \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438.", @@ -25540,7 +26858,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 177, + "end_line": 190, "tags": { "SEMANTICS": "task, logger, context, plugin, attribution", "PURPOSE": "Provides a dedicated logger for tasks with automatic source attribution.", @@ -25560,14 +26878,17 @@ "type": "Class", "tier": "CRITICAL", "start_line": 13, - "end_line": 175, + "end_line": 188, "tags": { "SEMANTICS": "logger, task, source, attribution", "PURPOSE": "A wrapper around TaskManager._add_log that carries task_id and source context.", "TIER": "CRITICAL", "INVARIANT": "All log calls include the task_id and source.", - "TEST_DATA": "task_logger -> {\"task_id\": \"test_123\", \"source\": \"test_plugin\"}", - "UX_STATE": "Idle -> Logging -> (system records log)" + "UX_STATE": "Idle -> Logging -> (system records log)", + "TEST_CONTRACT": "TaskLoggerModel ->", + "TEST_FIXTURE": "valid_task_logger -> {\"task_id\": \"test_123\", \"add_log_fn\": lambda *args: None, \"source\": \"test_plugin\"}", + "TEST_EDGE": "invalid_add_log_fn -> raises TypeError", + "TEST_INVARIANT": "consistent_delegation -> verifies: [valid_task_logger]" }, "relations": [], "children": [ @@ -25575,8 +26896,8 @@ "name": "__init__", "type": "Function", "tier": "STANDARD", - "start_line": 34, - "end_line": 50, + "start_line": 47, + "end_line": 63, "tags": { "PURPOSE": "Initialize the TaskLogger with task context.", "PRE": "add_log_fn is a callable that accepts (task_id, level, message, context, source, metadata).", @@ -25595,8 +26916,8 @@ "name": "with_source", "type": "Function", "tier": "STANDARD", - "start_line": 52, - "end_line": 65, + "start_line": 65, + "end_line": 78, "tags": { "PURPOSE": "Create a sub-logger with a different default source.", "PRE": "source is a non-empty string.", @@ -25616,8 +26937,8 @@ "name": "_log", "type": "Function", "tier": "STANDARD", - "start_line": 67, - "end_line": 91, + "start_line": 80, + "end_line": 104, "tags": { "PURPOSE": "Internal method to log a message at a given level.", "PRE": "level is a valid log level string.", @@ -25637,8 +26958,8 @@ "name": "debug", "type": "Function", "tier": "STANDARD", - "start_line": 93, - "end_line": 107, + "start_line": 106, + "end_line": 120, "tags": { "PURPOSE": "Log a DEBUG level message.", "PRE": "message is a string.", @@ -25657,8 +26978,8 @@ "name": "info", "type": "Function", "tier": "STANDARD", - "start_line": 109, - "end_line": 123, + "start_line": 122, + "end_line": 136, "tags": { "PURPOSE": "Log an INFO level message.", "PRE": "message is a string.", @@ -25677,8 +26998,8 @@ "name": "warning", "type": "Function", "tier": "STANDARD", - "start_line": 125, - "end_line": 139, + "start_line": 138, + "end_line": 152, "tags": { "PURPOSE": "Log a WARNING level message.", "PRE": "message is a string.", @@ -25697,8 +27018,8 @@ "name": "error", "type": "Function", "tier": "STANDARD", - "start_line": 141, - "end_line": 155, + "start_line": 154, + "end_line": 168, "tags": { "PURPOSE": "Log an ERROR level message.", "PRE": "message is a string.", @@ -25717,8 +27038,8 @@ "name": "progress", "type": "Function", "tier": "STANDARD", - "start_line": 157, - "end_line": 173, + "start_line": 170, + "end_line": 186, "tags": { "PURPOSE": "Log a progress update with percentage.", "PRE": "percent is between 0 and 100.", @@ -25752,7 +27073,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 454, + "end_line": 481, "tags": { "TIER": "CRITICAL", "SEMANTICS": "persistence, sqlite, sqlalchemy, task, storage", @@ -25768,12 +27089,16 @@ "type": "Class", "tier": "CRITICAL", "start_line": 22, - "end_line": 240, + "end_line": 254, "tags": { "TIER": "CRITICAL", "SEMANTICS": "persistence, service, database, sqlalchemy", "PURPOSE": "Provides methods to save and load tasks from the tasks.db database using SQLAlchemy.", - "INVARIANT": "Persistence must handle potentially missing task fields natively." + "INVARIANT": "Persistence must handle potentially missing task fields natively.", + "TEST_CONTRACT": "TaskPersistenceService ->", + "TEST_FIXTURE": "valid_task_persistence -> {\"task_id\": \"123\", \"status\": \"PENDING\"}", + "TEST_EDGE": "load_corrupt_json_params -> handled gracefully", + "TEST_INVARIANT": "accurate_round_trip -> verifies: [valid_task_persistence, load_corrupt_json_params]" }, "relations": [], "children": [ @@ -25781,8 +27106,8 @@ "name": "_json_load_if_needed", "type": "Function", "tier": "STANDARD", - "start_line": 28, - "end_line": 48, + "start_line": 42, + "end_line": 62, "tags": { "PURPOSE": "Safely load JSON strings from DB if necessary", "PRE": "value is an arbitrary database value", @@ -25800,8 +27125,8 @@ "name": "_parse_datetime", "type": "Function", "tier": "STANDARD", - "start_line": 50, - "end_line": 65, + "start_line": 64, + "end_line": 79, "tags": { "PURPOSE": "Safely parse a datetime string from the database", "PRE": "value is an ISO string or datetime object", @@ -25819,8 +27144,8 @@ "name": "_resolve_environment_id", "type": "Function", "tier": "STANDARD", - "start_line": 67, - "end_line": 81, + "start_line": 81, + "end_line": 95, "tags": { "TIER": "STANDARD", "PURPOSE": "Resolve environment id based on provided value or fallback to default", @@ -25839,8 +27164,8 @@ "name": "__init__", "type": "Function", "tier": "STANDARD", - "start_line": 83, - "end_line": 91, + "start_line": 97, + "end_line": 105, "tags": { "PURPOSE": "Initializes the persistence service.", "PRE": "None.", @@ -25858,8 +27183,8 @@ "name": "persist_task", "type": "Function", "tier": "STANDARD", - "start_line": 93, - "end_line": 153, + "start_line": 107, + "end_line": 167, "tags": { "PURPOSE": "Persists or updates a single task in the database.", "PRE": "isinstance(task, Task)", @@ -25879,8 +27204,8 @@ "name": "persist_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 155, - "end_line": 164, + "start_line": 169, + "end_line": 178, "tags": { "PURPOSE": "Persists multiple tasks.", "PRE": "isinstance(tasks, list)", @@ -25899,8 +27224,8 @@ "name": "load_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 166, - "end_line": 218, + "start_line": 180, + "end_line": 232, "tags": { "PURPOSE": "Loads tasks from the database.", "PRE": "limit is an integer.", @@ -25920,8 +27245,8 @@ "name": "delete_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 220, - "end_line": 238, + "start_line": 234, + "end_line": 252, "tags": { "PURPOSE": "Deletes specific tasks from the database.", "PRE": "task_ids is a list of strings.", @@ -25947,13 +27272,17 @@ "name": "TaskLogPersistenceService", "type": "Class", "tier": "CRITICAL", - "start_line": 242, - "end_line": 453, + "start_line": 256, + "end_line": 480, "tags": { "SEMANTICS": "persistence, service, database, log, sqlalchemy", "PURPOSE": "Provides methods to save and query task logs from the task_logs table.", "TIER": "CRITICAL", - "INVARIANT": "Log entries are batch-inserted for performance." + "INVARIANT": "Log entries are batch-inserted for performance.", + "TEST_CONTRACT": "TaskLogPersistenceService ->", + "TEST_FIXTURE": "valid_log_batch -> {\"task_id\": \"123\", \"logs\": [{\"level\": \"INFO\", \"message\": \"msg\"}]}", + "TEST_EDGE": "add_logs_db_error -> rollback and log error", + "TEST_INVARIANT": "accurate_log_aggregation -> verifies: [valid_log_batch]" }, "relations": [ { @@ -25966,8 +27295,8 @@ "name": "__init__", "type": "Function", "tier": "STANDARD", - "start_line": 254, - "end_line": 261, + "start_line": 281, + "end_line": 288, "tags": { "TIER": "STANDARD", "PURPOSE": "Initializes the TaskLogPersistenceService", @@ -25986,8 +27315,8 @@ "name": "add_logs", "type": "Function", "tier": "STANDARD", - "start_line": 263, - "end_line": 292, + "start_line": 290, + "end_line": 319, "tags": { "PURPOSE": "Batch insert log entries for a task.", "PRE": "logs is a list of LogEntry objects.", @@ -26007,8 +27336,8 @@ "name": "get_logs", "type": "Function", "tier": "STANDARD", - "start_line": 294, - "end_line": 344, + "start_line": 321, + "end_line": 371, "tags": { "PURPOSE": "Query logs for a task with filtering and pagination.", "PRE": "task_id is a valid task ID.", @@ -26028,8 +27357,8 @@ "name": "get_log_stats", "type": "Function", "tier": "STANDARD", - "start_line": 346, - "end_line": 389, + "start_line": 373, + "end_line": 416, "tags": { "PURPOSE": "Get statistics about logs for a task.", "PRE": "task_id is a valid task ID.", @@ -26049,8 +27378,8 @@ "name": "get_sources", "type": "Function", "tier": "STANDARD", - "start_line": 391, - "end_line": 408, + "start_line": 418, + "end_line": 435, "tags": { "PURPOSE": "Get unique sources for a task's logs.", "PRE": "task_id is a valid task ID.", @@ -26070,8 +27399,8 @@ "name": "delete_logs_for_task", "type": "Function", "tier": "STANDARD", - "start_line": 410, - "end_line": 429, + "start_line": 437, + "end_line": 456, "tags": { "PURPOSE": "Delete all logs for a specific task.", "PRE": "task_id is a valid task ID.", @@ -26091,8 +27420,8 @@ "name": "delete_logs_for_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 431, - "end_line": 451, + "start_line": 458, + "end_line": 478, "tags": { "PURPOSE": "Delete all logs for multiple tasks.", "PRE": "task_ids is a list of task IDs.", @@ -26118,8 +27447,8 @@ "name": "json_serializable", "type": "Function", "tier": "TRIVIAL", - "start_line": 116, - "end_line": 116, + "start_line": 130, + "end_line": 130, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -26144,7 +27473,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 596, + "end_line": 621, "tags": { "TIER": "CRITICAL", "SEMANTICS": "task, manager, lifecycle, execution, state", @@ -26152,7 +27481,11 @@ "LAYER": "Core", "RELATION": "Depends on PluginLoader to get plugin instances. It is used by the API layer to create and query tasks.", "INVARIANT": "Task IDs are unique.", - "CONSTRAINT": "Must use belief_scope for logging." + "CONSTRAINT": "Must use belief_scope for logging.", + "TEST_CONTRACT": "TaskManagerModule -> {", + "TEST_FIXTURE": "valid_module -> {\"manager_initialized\": true}", + "TEST_EDGE": "external_failure -> {\"db_unavailable\": true}", + "TEST_INVARIANT": "logger_compliance -> verifies: [valid_module]" }, "relations": [], "children": [ @@ -26160,13 +27493,17 @@ "name": "TaskManager", "type": "Class", "tier": "CRITICAL", - "start_line": 24, - "end_line": 595, + "start_line": 35, + "end_line": 620, "tags": { "SEMANTICS": "task, manager, lifecycle, execution, state", "PURPOSE": "Manages the lifecycle of tasks, including their creation, execution, and state tracking.", "TIER": "CRITICAL", - "INVARIANT": "Log entries are never deleted after being added to a task." + "INVARIANT": "Log entries are never deleted after being added to a task.", + "TEST_CONTRACT": "TaskManagerModel ->", + "TEST_FIXTURE": "valid_manager -> {\"plugin_loader\": \"MockPluginLoader()\"}", + "TEST_EDGE": "create_task_invalid_params -> raises ValueError", + "TEST_INVARIANT": "lifecycle_management -> verifies: [valid_manager]" }, "relations": [], "children": [ @@ -26174,8 +27511,8 @@ "name": "__init__", "type": "Function", "tier": "STANDARD", - "start_line": 39, - "end_line": 70, + "start_line": 64, + "end_line": 95, "tags": { "PURPOSE": "Initialize the TaskManager with dependencies.", "PRE": "plugin_loader is initialized.", @@ -26194,8 +27531,8 @@ "name": "_flusher_loop", "type": "Function", "tier": "STANDARD", - "start_line": 72, - "end_line": 81, + "start_line": 97, + "end_line": 106, "tags": { "PURPOSE": "Background thread that periodically flushes log buffer to database.", "PRE": "TaskManager is initialized.", @@ -26209,17 +27546,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 72 + "line_number": 97 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 72 + "line_number": 97 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 72 + "line_number": 97 } ], "score": 0.55 @@ -26229,8 +27566,8 @@ "name": "_flush_logs", "type": "Function", "tier": "STANDARD", - "start_line": 83, - "end_line": 107, + "start_line": 108, + "end_line": 132, "tags": { "PURPOSE": "Flush all buffered logs to the database.", "PRE": "None.", @@ -26244,17 +27581,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 83 + "line_number": 108 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 83 + "line_number": 108 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 83 + "line_number": 108 } ], "score": 0.55 @@ -26264,8 +27601,8 @@ "name": "_flush_task_logs", "type": "Function", "tier": "STANDARD", - "start_line": 109, - "end_line": 125, + "start_line": 134, + "end_line": 150, "tags": { "PURPOSE": "Flush logs for a specific task immediately.", "PRE": "task_id exists.", @@ -26284,8 +27621,8 @@ "name": "create_task", "type": "Function", "tier": "STANDARD", - "start_line": 127, - "end_line": 154, + "start_line": 152, + "end_line": 179, "tags": { "PURPOSE": "Creates and queues a new task for execution.", "PRE": "Plugin with plugin_id exists. Params are valid.", @@ -26306,8 +27643,8 @@ "name": "_run_task", "type": "Function", "tier": "STANDARD", - "start_line": 156, - "end_line": 220, + "start_line": 181, + "end_line": 245, "tags": { "PURPOSE": "Internal method to execute a task with TaskContext support.", "PRE": "Task exists in registry.", @@ -26326,8 +27663,8 @@ "name": "resolve_task", "type": "Function", "tier": "STANDARD", - "start_line": 222, - "end_line": 244, + "start_line": 247, + "end_line": 269, "tags": { "PURPOSE": "Resumes a task that is awaiting mapping.", "PRE": "Task exists and is in AWAITING_MAPPING state.", @@ -26347,8 +27684,8 @@ "name": "wait_for_resolution", "type": "Function", "tier": "STANDARD", - "start_line": 246, - "end_line": 266, + "start_line": 271, + "end_line": 291, "tags": { "PURPOSE": "Pauses execution and waits for a resolution signal.", "PRE": "Task exists.", @@ -26367,8 +27704,8 @@ "name": "wait_for_input", "type": "Function", "tier": "STANDARD", - "start_line": 268, - "end_line": 287, + "start_line": 293, + "end_line": 312, "tags": { "PURPOSE": "Pauses execution and waits for user input.", "PRE": "Task exists.", @@ -26387,8 +27724,8 @@ "name": "get_task", "type": "Function", "tier": "STANDARD", - "start_line": 289, - "end_line": 298, + "start_line": 314, + "end_line": 323, "tags": { "PURPOSE": "Retrieves a task by its ID.", "PRE": "task_id is a string.", @@ -26408,8 +27745,8 @@ "name": "get_all_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 300, - "end_line": 308, + "start_line": 325, + "end_line": 333, "tags": { "PURPOSE": "Retrieves all registered tasks.", "PRE": "None.", @@ -26428,8 +27765,8 @@ "name": "get_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 310, - "end_line": 348, + "start_line": 335, + "end_line": 373, "tags": { "PURPOSE": "Retrieves tasks with pagination and optional status filter.", "PRE": "limit and offset are non-negative integers.", @@ -26449,8 +27786,8 @@ "name": "get_task_logs", "type": "Function", "tier": "STANDARD", - "start_line": 350, - "end_line": 380, + "start_line": 375, + "end_line": 405, "tags": { "PURPOSE": "Retrieves logs for a specific task (from memory for running, persistence for completed).", "PRE": "task_id is a string.", @@ -26470,8 +27807,8 @@ "name": "get_task_log_stats", "type": "Function", "tier": "STANDARD", - "start_line": 382, - "end_line": 391, + "start_line": 407, + "end_line": 416, "tags": { "PURPOSE": "Get statistics about logs for a task.", "PRE": "task_id is a valid task ID.", @@ -26491,8 +27828,8 @@ "name": "get_task_log_sources", "type": "Function", "tier": "STANDARD", - "start_line": 393, - "end_line": 402, + "start_line": 418, + "end_line": 427, "tags": { "PURPOSE": "Get unique sources for a task's logs.", "PRE": "task_id is a valid task ID.", @@ -26512,8 +27849,8 @@ "name": "_add_log", "type": "Function", "tier": "STANDARD", - "start_line": 404, - "end_line": 454, + "start_line": 429, + "end_line": 479, "tags": { "PURPOSE": "Adds a log entry to a task buffer and notifies subscribers.", "PRE": "Task exists.", @@ -26532,8 +27869,8 @@ "name": "subscribe_logs", "type": "Function", "tier": "STANDARD", - "start_line": 456, - "end_line": 469, + "start_line": 481, + "end_line": 494, "tags": { "PURPOSE": "Subscribes to real-time logs for a task.", "PRE": "task_id is a string.", @@ -26553,8 +27890,8 @@ "name": "unsubscribe_logs", "type": "Function", "tier": "STANDARD", - "start_line": 471, - "end_line": 484, + "start_line": 496, + "end_line": 509, "tags": { "PURPOSE": "Unsubscribes from real-time logs for a task.", "PRE": "task_id is a string, queue is asyncio.Queue.", @@ -26573,8 +27910,8 @@ "name": "load_persisted_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 486, - "end_line": 496, + "start_line": 511, + "end_line": 521, "tags": { "PURPOSE": "Load persisted tasks using persistence service.", "PRE": "None.", @@ -26592,8 +27929,8 @@ "name": "await_input", "type": "Function", "tier": "STANDARD", - "start_line": 498, - "end_line": 518, + "start_line": 523, + "end_line": 543, "tags": { "PURPOSE": "Transition a task to AWAITING_INPUT state with input request.", "PRE": "Task exists and is in RUNNING state.", @@ -26613,8 +27950,8 @@ "name": "resume_task_with_password", "type": "Function", "tier": "STANDARD", - "start_line": 520, - "end_line": 547, + "start_line": 545, + "end_line": 572, "tags": { "PURPOSE": "Resume a task that is awaiting input with provided passwords.", "PRE": "Task exists and is in AWAITING_INPUT state.", @@ -26634,8 +27971,8 @@ "name": "clear_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 549, - "end_line": 593, + "start_line": 574, + "end_line": 618, "tags": { "PURPOSE": "Clears tasks based on status filter (also deletes associated logs).", "PRE": "status is Optional[TaskStatus].", @@ -26662,8 +27999,8 @@ "name": "sort_key", "type": "Function", "tier": "TRIVIAL", - "start_line": 336, - "end_line": 336, + "start_line": 361, + "end_line": 361, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -26688,7 +28025,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 127, + "end_line": 135, "tags": { "TIER": "STANDARD", "SEMANTICS": "task, models, pydantic, enum, state", @@ -26743,12 +28080,15 @@ "type": "Class", "tier": "CRITICAL", "start_line": 43, - "end_line": 55, + "end_line": 63, "tags": { "SEMANTICS": "log, entry, record, pydantic", "PURPOSE": "A Pydantic model representing a single, structured log entry associated with a task.", "TIER": "CRITICAL", - "INVARIANT": "Each log entry has a unique timestamp and source." + "INVARIANT": "Each log entry has a unique timestamp and source.", + "TEST_CONTRACT": "LogEntryModel ->", + "TEST_FIXTURE": "valid_log_entry -> {\"message\": \"Plugin initialized\"}", + "TEST_EDGE": "empty_message -> {\"message\": \"\"}" }, "relations": [], "children": [], @@ -26762,8 +28102,8 @@ "name": "TaskLog", "type": "Class", "tier": "STANDARD", - "start_line": 57, - "end_line": 73, + "start_line": 65, + "end_line": 81, "tags": { "SEMANTICS": "task, log, persistent, pydantic", "PURPOSE": "A Pydantic model representing a persisted log entry from the database.", @@ -26786,8 +28126,8 @@ "name": "LogFilter", "type": "Class", "tier": "STANDARD", - "start_line": 75, - "end_line": 85, + "start_line": 83, + "end_line": 93, "tags": { "SEMANTICS": "log, filter, query, pydantic", "PURPOSE": "Filter parameters for querying task logs.", @@ -26805,8 +28145,8 @@ "name": "LogStats", "type": "Class", "tier": "STANDARD", - "start_line": 87, - "end_line": 95, + "start_line": 95, + "end_line": 103, "tags": { "SEMANTICS": "log, stats, aggregation, pydantic", "PURPOSE": "Statistics about log entries for a task.", @@ -26824,8 +28164,8 @@ "name": "Task", "type": "Class", "tier": "STANDARD", - "start_line": 97, - "end_line": 125, + "start_line": 105, + "end_line": 133, "tags": { "TIER": "STANDARD", "SEMANTICS": "task, job, execution, state, pydantic", @@ -26837,8 +28177,8 @@ "name": "__init__", "type": "Function", "tier": "STANDARD", - "start_line": 115, - "end_line": 124, + "start_line": 123, + "end_line": 132, "tags": { "PURPOSE": "Initializes the Task model and validates input_request for AWAITING_INPUT status.", "PRE": "If status is AWAITING_INPUT, input_request must be provided.", @@ -26992,7 +28332,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 123, + "end_line": 137, "tags": { "SEMANTICS": "task, context, plugin, execution, logger", "PURPOSE": "Provides execution context passed to plugins during task execution.", @@ -27012,13 +28352,17 @@ "type": "Class", "tier": "CRITICAL", "start_line": 16, - "end_line": 121, + "end_line": 135, "tags": { "SEMANTICS": "context, task, execution, plugin", "PURPOSE": "A container passed to plugin.execute() providing the logger and other task-specific utilities.", "TIER": "CRITICAL", "INVARIANT": "logger is always a valid TaskLogger instance.", - "UX_STATE": "Idle -> Active -> Complete" + "UX_STATE": "Idle -> Active -> Complete", + "TEST_CONTRACT": "TaskContextInit ->", + "TEST_FIXTURE": "valid_context -> {\"task_id\": \"123\", \"add_log_fn\": lambda *args: None, \"params\": {\"k\": \"v\"}, \"default_source\": \"plugin\"}", + "TEST_EDGE": "missing_add_log_fn -> raises TypeError", + "TEST_INVARIANT": "logger_initialized -> verifies: [valid_context]" }, "relations": [], "children": [ @@ -27026,8 +28370,8 @@ "name": "__init__", "type": "Function", "tier": "STANDARD", - "start_line": 34, - "end_line": 57, + "start_line": 48, + "end_line": 71, "tags": { "PURPOSE": "Initialize the TaskContext with task-specific resources.", "PRE": "task_id is a valid task identifier, add_log_fn is callable.", @@ -27046,8 +28390,8 @@ "name": "task_id", "type": "Function", "tier": "STANDARD", - "start_line": 59, - "end_line": 68, + "start_line": 73, + "end_line": 82, "tags": { "PURPOSE": "Get the task ID.", "PRE": "TaskContext must be initialized.", @@ -27066,8 +28410,8 @@ "name": "logger", "type": "Function", "tier": "STANDARD", - "start_line": 70, - "end_line": 79, + "start_line": 84, + "end_line": 93, "tags": { "PURPOSE": "Get the TaskLogger instance for this context.", "PRE": "TaskContext must be initialized.", @@ -27086,8 +28430,8 @@ "name": "params", "type": "Function", "tier": "STANDARD", - "start_line": 81, - "end_line": 90, + "start_line": 95, + "end_line": 104, "tags": { "PURPOSE": "Get the task parameters.", "PRE": "TaskContext must be initialized.", @@ -27106,8 +28450,8 @@ "name": "get_param", "type": "Function", "tier": "STANDARD", - "start_line": 92, - "end_line": 102, + "start_line": 106, + "end_line": 116, "tags": { "PURPOSE": "Get a specific parameter value with optional default.", "PRE": "TaskContext must be initialized.", @@ -27127,8 +28471,8 @@ "name": "create_sub_context", "type": "Function", "tier": "STANDARD", - "start_line": 104, - "end_line": 119, + "start_line": 118, + "end_line": 133, "tags": { "PURPOSE": "Create a sub-context with a different default source.", "PRE": "source is a non-empty string.", @@ -27155,8 +28499,8 @@ "name": "execute", "type": "Function", "tier": "TRIVIAL", - "start_line": 27, - "end_line": 27, + "start_line": 41, + "end_line": 41, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -27366,12 +28710,37 @@ "score": 1.0 } }, + { + "name": "_is_valid_runtime_api_key", + "type": "Function", + "tier": "STANDARD", + "start_line": 23, + "end_line": 34, + "tags": { + "PURPOSE": "Validate decrypted runtime API key presence/shape.", + "PRE": "value can be None.", + "POST": "Returns True only for non-placeholder key." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 23 + } + ], + "score": 0.85 + } + }, { "name": "get_providers", "type": "Function", "tier": "STANDARD", - "start_line": 22, - "end_line": 48, + "start_line": 36, + "end_line": 62, "tags": { "PURPOSE": "Retrieve all LLM provider configurations.", "PRE": "User is authenticated.", @@ -27385,7 +28754,32 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 22 + "line_number": 36 + } + ], + "score": 0.85 + } + }, + { + "name": "get_llm_status", + "type": "Function", + "tier": "STANDARD", + "start_line": 65, + "end_line": 93, + "tags": { + "PURPOSE": "Returns whether LLM runtime is configured for dashboard validation.", + "PRE": "User is authenticated.", + "POST": "configured=true only when an active provider with valid decrypted key exists." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 65 } ], "score": 0.85 @@ -27395,8 +28789,8 @@ "name": "create_provider", "type": "Function", "tier": "STANDARD", - "start_line": 50, - "end_line": 74, + "start_line": 95, + "end_line": 119, "tags": { "PURPOSE": "Create a new LLM provider configuration.", "PRE": "User is authenticated and has admin permissions.", @@ -27410,7 +28804,7 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 50 + "line_number": 95 } ], "score": 0.85 @@ -27420,8 +28814,8 @@ "name": "update_provider", "type": "Function", "tier": "STANDARD", - "start_line": 76, - "end_line": 104, + "start_line": 121, + "end_line": 149, "tags": { "PURPOSE": "Update an existing LLM provider configuration.", "PRE": "User is authenticated and has admin permissions.", @@ -27435,7 +28829,7 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 76 + "line_number": 121 } ], "score": 0.85 @@ -27445,8 +28839,8 @@ "name": "delete_provider", "type": "Function", "tier": "STANDARD", - "start_line": 106, - "end_line": 123, + "start_line": 151, + "end_line": 168, "tags": { "PURPOSE": "Delete an LLM provider configuration.", "PRE": "User is authenticated and has admin permissions.", @@ -27460,7 +28854,7 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 106 + "line_number": 151 } ], "score": 0.85 @@ -27470,8 +28864,8 @@ "name": "test_connection", "type": "Function", "tier": "STANDARD", - "start_line": 125, - "end_line": 168, + "start_line": 170, + "end_line": 213, "tags": { "PURPOSE": "Test connection to an LLM provider.", "PRE": "User is authenticated.", @@ -27485,7 +28879,7 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 125 + "line_number": 170 } ], "score": 0.85 @@ -27495,8 +28889,8 @@ "name": "test_provider_config", "type": "Function", "tier": "STANDARD", - "start_line": 170, - "end_line": 205, + "start_line": 215, + "end_line": 250, "tags": { "PURPOSE": "Test connection with a provided configuration (not yet saved).", "PRE": "User is authenticated.", @@ -27510,7 +28904,7 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 170 + "line_number": 215 } ], "score": 0.85 @@ -28390,7 +29784,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 136, + "end_line": 138, "tags": { "TIER": "STANDARD", "SEMANTICS": "api, environments, superset, databases", @@ -28429,7 +29823,7 @@ "type": "DataClass", "tier": "STANDARD", "start_line": 29, - "end_line": 35, + "end_line": 36, "tags": {}, "relations": [], "children": [], @@ -28443,8 +29837,8 @@ "name": "DatabaseResponse", "type": "DataClass", "tier": "STANDARD", - "start_line": 37, - "end_line": 42, + "start_line": 38, + "end_line": 43, "tags": {}, "relations": [], "children": [], @@ -28458,8 +29852,8 @@ "name": "get_environments", "type": "Function", "tier": "STANDARD", - "start_line": 44, - "end_line": 72, + "start_line": 45, + "end_line": 74, "tags": { "PURPOSE": "List all configured environments.", "LAYER": "API", @@ -28480,8 +29874,8 @@ "name": "update_environment_schedule", "type": "Function", "tier": "STANDARD", - "start_line": 74, - "end_line": 106, + "start_line": 76, + "end_line": 108, "tags": { "PURPOSE": "Update backup schedule for an environment.", "LAYER": "API", @@ -28502,8 +29896,8 @@ "name": "get_environment_databases", "type": "Function", "tier": "STANDARD", - "start_line": 108, - "end_line": 134, + "start_line": 110, + "end_line": 136, "tags": { "PURPOSE": "Fetch the list of databases from a specific environment.", "LAYER": "API", @@ -30097,7 +31491,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 1850, + "end_line": 2015, "tags": { "TIER": "STANDARD", "SEMANTICS": "api, assistant, chat, command, confirmation", @@ -30767,11 +32161,101 @@ } }, { - "name": "_parse_command", + "name": "_get_environment_name_by_id", "type": "Function", "tier": "STANDARD", "start_line": 582, - "end_line": 754, + "end_line": 591, + "tags": { + "PURPOSE": "Resolve human-readable environment name by id.", + "PRE": "environment id may be None.", + "POST": "Returns matching environment name or fallback id." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 582 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 582 + } + ], + "score": 0.7 + } + }, + { + "name": "_extract_result_deep_links", + "type": "Function", + "tier": "STANDARD", + "start_line": 594, + "end_line": 647, + "tags": { + "PURPOSE": "Build deep-link actions to verify task result from assistant chat.", + "PRE": "task object is available.", + "POST": "Returns zero or more assistant actions for dashboard open/diff." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 594 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 594 + } + ], + "score": 0.7 + } + }, + { + "name": "_build_task_observability_summary", + "type": "Function", + "tier": "STANDARD", + "start_line": 650, + "end_line": 710, + "tags": { + "PURPOSE": "Build compact textual summary for completed tasks to reduce \"black box\" effect.", + "PRE": "task may contain plugin-specific result payload.", + "POST": "Returns non-empty summary line for known task types or empty string fallback." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 650 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 650 + } + ], + "score": 0.7 + } + }, + { + "name": "_parse_command", + "type": "Function", + "tier": "STANDARD", + "start_line": 713, + "end_line": 885, "tags": { "PURPOSE": "Deterministically parse RU/EN command text into intent payload.", "PRE": "message contains raw user text and config manager resolves environments.", @@ -30785,12 +32269,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 582 + "line_number": 713 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 582 + "line_number": 713 } ], "score": 0.7 @@ -30800,8 +32284,8 @@ "name": "_check_any_permission", "type": "Function", "tier": "STANDARD", - "start_line": 757, - "end_line": 771, + "start_line": 888, + "end_line": 902, "tags": { "PURPOSE": "Validate user against alternative permission checks (logical OR).", "PRE": "checks list contains resource-action tuples.", @@ -30815,12 +32299,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 757 + "line_number": 888 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 757 + "line_number": 888 } ], "score": 0.7 @@ -30830,8 +32314,8 @@ "name": "_has_any_permission", "type": "Function", "tier": "STANDARD", - "start_line": 774, - "end_line": 784, + "start_line": 905, + "end_line": 915, "tags": { "PURPOSE": "Check whether user has at least one permission tuple from the provided list.", "PRE": "current_user and checks list are valid.", @@ -30845,12 +32329,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 774 + "line_number": 905 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 774 + "line_number": 905 } ], "score": 0.7 @@ -30860,8 +32344,8 @@ "name": "_build_tool_catalog", "type": "Function", "tier": "STANDARD", - "start_line": 787, - "end_line": 898, + "start_line": 918, + "end_line": 1029, "tags": { "PURPOSE": "Build current-user tool catalog for LLM planner with operation contracts and defaults.", "PRE": "current_user is authenticated; config/db are available.", @@ -30875,12 +32359,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 787 + "line_number": 918 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 787 + "line_number": 918 } ], "score": 0.7 @@ -30890,8 +32374,8 @@ "name": "_coerce_intent_entities", "type": "Function", "tier": "STANDARD", - "start_line": 901, - "end_line": 918, + "start_line": 1032, + "end_line": 1049, "tags": { "PURPOSE": "Normalize intent entity value types from LLM output to route-compatible values.", "PRE": "intent contains entities dict or missing entities.", @@ -30905,12 +32389,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 901 + "line_number": 1032 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 901 + "line_number": 1032 } ], "score": 0.7 @@ -30920,8 +32404,8 @@ "name": "_confirmation_summary", "type": "Function", "tier": "STANDARD", - "start_line": 925, - "end_line": 958, + "start_line": 1056, + "end_line": 1089, "tags": { "PURPOSE": "Build human-readable confirmation prompt for an intent before execution.", "PRE": "intent contains operation and entities fields.", @@ -30935,12 +32419,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 925 + "line_number": 1056 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 925 + "line_number": 1056 } ], "score": 0.7 @@ -30950,8 +32434,8 @@ "name": "_clarification_text_for_intent", "type": "Function", "tier": "STANDARD", - "start_line": 961, - "end_line": 981, + "start_line": 1092, + "end_line": 1112, "tags": { "PURPOSE": "Convert technical missing-parameter errors into user-facing clarification prompts.", "PRE": "state was classified as needs_clarification for current intent/error combination.", @@ -30965,12 +32449,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 961 + "line_number": 1092 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 961 + "line_number": 1092 } ], "score": 0.7 @@ -30980,8 +32464,8 @@ "name": "_plan_intent_with_llm", "type": "Function", "tier": "STANDARD", - "start_line": 984, - "end_line": 1090, + "start_line": 1115, + "end_line": 1221, "tags": { "PURPOSE": "Use active LLM provider to select best tool/operation from dynamic catalog.", "PRE": "tools list contains allowed operations for current user.", @@ -30995,12 +32479,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 984 + "line_number": 1115 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 984 + "line_number": 1115 } ], "score": 0.7 @@ -31010,8 +32494,8 @@ "name": "_authorize_intent", "type": "Function", "tier": "STANDARD", - "start_line": 1093, - "end_line": 1101, + "start_line": 1224, + "end_line": 1232, "tags": { "PURPOSE": "Validate user permissions for parsed intent before confirmation/dispatch.", "PRE": "intent.operation is present for known assistant command domains.", @@ -31025,12 +32509,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1093 + "line_number": 1224 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1093 + "line_number": 1224 } ], "score": 0.7 @@ -31040,8 +32524,8 @@ "name": "_dispatch_intent", "type": "Function", "tier": "STANDARD", - "start_line": 1104, - "end_line": 1351, + "start_line": 1235, + "end_line": 1516, "tags": { "PURPOSE": "Execute parsed assistant intent via existing task/plugin/git services.", "PRE": "intent operation is known and actor permissions are validated per operation.", @@ -31055,12 +32539,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1104 + "line_number": 1235 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1104 + "line_number": 1235 } ], "score": 0.7 @@ -31070,8 +32554,8 @@ "name": "send_message", "type": "Function", "tier": "STANDARD", - "start_line": 1355, - "end_line": 1520, + "start_line": 1520, + "end_line": 1685, "tags": { "PURPOSE": "Parse assistant command, enforce safety gates, and dispatch executable intent.", "PRE": "Authenticated user is available and message text is non-empty.", @@ -31090,8 +32574,8 @@ "name": "confirm_operation", "type": "Function", "tier": "STANDARD", - "start_line": 1524, - "end_line": 1586, + "start_line": 1689, + "end_line": 1751, "tags": { "PURPOSE": "Execute previously requested risky operation after explicit user confirmation.", "PRE": "confirmation_id exists, belongs to current user, is pending, and not expired.", @@ -31110,8 +32594,8 @@ "name": "cancel_operation", "type": "Function", "tier": "STANDARD", - "start_line": 1590, - "end_line": 1643, + "start_line": 1755, + "end_line": 1808, "tags": { "PURPOSE": "Cancel pending risky operation and mark confirmation token as cancelled.", "PRE": "confirmation_id exists, belongs to current user, and is still pending.", @@ -31130,8 +32614,8 @@ "name": "list_conversations", "type": "Function", "tier": "STANDARD", - "start_line": 1646, - "end_line": 1730, + "start_line": 1811, + "end_line": 1895, "tags": { "PURPOSE": "Return paginated conversation list for current user with archived flag and last message preview.", "PRE": "Authenticated user context and valid pagination params.", @@ -31150,8 +32634,8 @@ "name": "get_history", "type": "Function", "tier": "STANDARD", - "start_line": 1734, - "end_line": 1805, + "start_line": 1899, + "end_line": 1970, "tags": { "PURPOSE": "Retrieve paginated assistant conversation history for current user.", "PRE": "Authenticated user is available and page params are valid.", @@ -31170,8 +32654,8 @@ "name": "get_assistant_audit", "type": "Function", "tier": "STANDARD", - "start_line": 1809, - "end_line": 1848, + "start_line": 1974, + "end_line": 2013, "tags": { "PURPOSE": "Return assistant audit decisions for current user from persistent and in-memory stores.", "PRE": "User has tasks:READ permission.", @@ -31190,8 +32674,8 @@ "name": "_label", "type": "Function", "tier": "TRIVIAL", - "start_line": 945, - "end_line": 945, + "start_line": 1076, + "end_line": 1076, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -31216,7 +32700,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 147, + "end_line": 189, "tags": { "TIER": "STANDARD", "SEMANTICS": "storage, files, upload, download, backup, repository", @@ -31336,6 +32820,36 @@ "issues": [], "score": 1.0 } + }, + { + "name": "get_file_by_path", + "type": "Function", + "tier": "STANDARD", + "start_line": 147, + "end_line": 187, + "tags": { + "PURPOSE": "Retrieve a file by validated absolute/relative path under storage root.", + "PRE": "path must resolve under configured storage root.", + "POST": "Returns a FileResponse for existing files.", + "PARAM": "path (str) - Absolute or storage-root-relative file path.", + "RETURN": "FileResponse - The file content." + }, + "relations": [ + { + "type": "CALLS", + "target": "StoragePlugin.get_storage_root" + }, + { + "type": "CALLS", + "target": "StoragePlugin.validate_path" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } } ], "compliance": { @@ -31349,7 +32863,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 132, + "end_line": 146, "tags": { "TIER": "CRITICAL", "SEMANTICS": "api, reports, list, detail, pagination, filters", @@ -31394,11 +32908,15 @@ "type": "Function", "tier": "STANDARD", "start_line": 60, - "end_line": 108, + "end_line": 122, "tags": { "PURPOSE": "Return paginated unified reports list.", "PRE": "authenticated/authorized request and validated query params.", - "POST": "deterministic error payload for invalid filters." + "POST": "deterministic error payload for invalid filters.", + "TEST_CONTRACT": "ListReportsApi ->", + "TEST_FIXTURE": "valid_list_request -> {\"page\": 1, \"page_size\": 20}", + "TEST_EDGE": "malformed_query -> raises HTTPException(400)", + "TEST_INVARIANT": "consistent_list_payload -> verifies: [valid_list_request]" }, "relations": [], "children": [], @@ -31412,8 +32930,8 @@ "name": "get_report_detail", "type": "Function", "tier": "STANDARD", - "start_line": 111, - "end_line": 130, + "start_line": 125, + "end_line": 144, "tags": { "PURPOSE": "Return one normalized report detail with diagnostics and next actions.", "PRE": "authenticated/authorized request and existing report_id.", @@ -31695,15 +33213,19 @@ { "name": "backend.src.api.routes.dashboards", "type": "Module", - "tier": "STANDARD", + "tier": "CRITICAL", "start_line": 1, - "end_line": 398, + "end_line": 638, "tags": { - "TIER": "STANDARD", + "TIER": "CRITICAL", "SEMANTICS": "api, dashboards, resources, hub", "PURPOSE": "API endpoints for the Dashboard Hub - listing dashboards with Git and task status", "LAYER": "API", - "INVARIANT": "All dashboard responses include git_status and last_task metadata" + "INVARIANT": "All dashboard responses include git_status and last_task metadata", + "TEST_CONTRACT": "DashboardsAPI -> {", + "TEST_FIXTURE": "dashboard_list_happy -> {", + "TEST_EDGE": "external_superset_failure -> {\"env_id\": \"bad_conn\", \"status\": 503}", + "TEST_INVARIANT": "metadata_consistency -> verifies: [dashboard_list_happy, empty_dashboards]" }, "relations": [ { @@ -31724,8 +33246,8 @@ "name": "GitStatus", "type": "DataClass", "tier": "STANDARD", - "start_line": 24, - "end_line": 30, + "start_line": 49, + "end_line": 55, "tags": {}, "relations": [], "children": [], @@ -31739,8 +33261,8 @@ "name": "LastTask", "type": "DataClass", "tier": "STANDARD", - "start_line": 32, - "end_line": 36, + "start_line": 57, + "end_line": 61, "tags": {}, "relations": [], "children": [], @@ -31754,8 +33276,8 @@ "name": "DashboardItem", "type": "DataClass", "tier": "STANDARD", - "start_line": 38, - "end_line": 47, + "start_line": 63, + "end_line": 72, "tags": {}, "relations": [], "children": [], @@ -31769,8 +33291,8 @@ "name": "DashboardsResponse", "type": "DataClass", "tier": "STANDARD", - "start_line": 49, - "end_line": 56, + "start_line": 74, + "end_line": 81, "tags": {}, "relations": [], "children": [], @@ -31784,8 +33306,8 @@ "name": "DashboardChartItem", "type": "DataClass", "tier": "STANDARD", - "start_line": 58, - "end_line": 66, + "start_line": 83, + "end_line": 91, "tags": {}, "relations": [], "children": [], @@ -31799,8 +33321,8 @@ "name": "DashboardDatasetItem", "type": "DataClass", "tier": "STANDARD", - "start_line": 68, - "end_line": 76, + "start_line": 93, + "end_line": 101, "tags": {}, "relations": [], "children": [], @@ -31814,8 +33336,38 @@ "name": "DashboardDetailResponse", "type": "DataClass", "tier": "STANDARD", - "start_line": 78, - "end_line": 91, + "start_line": 103, + "end_line": 116, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "DashboardTaskHistoryItem", + "type": "DataClass", + "tier": "STANDARD", + "start_line": 118, + "end_line": 128, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "DashboardTaskHistoryResponse", + "type": "DataClass", + "tier": "STANDARD", + "start_line": 130, + "end_line": 134, "tags": {}, "relations": [], "children": [], @@ -31829,8 +33381,8 @@ "name": "DatabaseMapping", "type": "DataClass", "tier": "STANDARD", - "start_line": 93, - "end_line": 100, + "start_line": 136, + "end_line": 143, "tags": {}, "relations": [], "children": [], @@ -31844,8 +33396,8 @@ "name": "DatabaseMappingsResponse", "type": "DataClass", "tier": "STANDARD", - "start_line": 102, - "end_line": 105, + "start_line": 145, + "end_line": 148, "tags": {}, "relations": [], "children": [], @@ -31859,8 +33411,8 @@ "name": "get_dashboards", "type": "Function", "tier": "STANDARD", - "start_line": 107, - "end_line": 185, + "start_line": 150, + "end_line": 228, "tags": { "PURPOSE": "Fetch list of dashboards from a specific environment with Git status and last task status", "PRE": "page_size must be between 1 and 100 if provided", @@ -31885,8 +33437,8 @@ "name": "get_database_mappings", "type": "Function", "tier": "STANDARD", - "start_line": 187, - "end_line": 227, + "start_line": 230, + "end_line": 283, "tags": { "PURPOSE": "Get database mapping suggestions between source and target environments", "PRE": "source_env_id and target_env_id are valid environment IDs", @@ -31911,8 +33463,8 @@ "name": "get_dashboard_detail", "type": "Function", "tier": "STANDARD", - "start_line": 229, - "end_line": 260, + "start_line": 285, + "end_line": 316, "tags": { "PURPOSE": "Fetch detailed dashboard info with related charts and datasets", "PRE": "env_id must be valid and dashboard_id must exist", @@ -31931,12 +33483,80 @@ "score": 1.0 } }, + { + "name": "_task_matches_dashboard", + "type": "Function", + "tier": "STANDARD", + "start_line": 319, + "end_line": 349, + "tags": { + "PURPOSE": "Checks whether task params are tied to a specific dashboard and environment.", + "PRE": "task-like object exposes plugin_id and params fields.", + "POST": "Returns True only for supported task plugins tied to dashboard_id (+optional env_id)." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 319 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 319 + } + ], + "score": 0.7 + } + }, + { + "name": "get_dashboard_tasks_history", + "type": "Function", + "tier": "STANDARD", + "start_line": 352, + "end_line": 409, + "tags": { + "PURPOSE": "Returns history of backup and LLM validation tasks for a dashboard.", + "PRE": "dashboard_id is valid integer.", + "POST": "Response contains sorted task history (newest first)." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_dashboard_thumbnail", + "type": "Function", + "tier": "STANDARD", + "start_line": 412, + "end_line": 500, + "tags": { + "PURPOSE": "Proxies Superset dashboard thumbnail with cache support.", + "PRE": "env_id must exist.", + "POST": "Returns image bytes or 202 when thumbnail is being prepared by Superset." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "MigrateRequest", "type": "DataClass", "tier": "STANDARD", - "start_line": 262, - "end_line": 269, + "start_line": 502, + "end_line": 509, "tags": {}, "relations": [], "children": [], @@ -31950,8 +33570,8 @@ "name": "TaskResponse", "type": "DataClass", "tier": "STANDARD", - "start_line": 271, - "end_line": 274, + "start_line": 511, + "end_line": 514, "tags": {}, "relations": [], "children": [], @@ -31965,8 +33585,8 @@ "name": "migrate_dashboards", "type": "Function", "tier": "STANDARD", - "start_line": 276, - "end_line": 334, + "start_line": 516, + "end_line": 574, "tags": { "PURPOSE": "Trigger bulk migration of dashboards from source to target environment", "PRE": "dashboard_ids is a non-empty list", @@ -31995,8 +33615,8 @@ "name": "BackupRequest", "type": "DataClass", "tier": "STANDARD", - "start_line": 336, - "end_line": 341, + "start_line": 576, + "end_line": 581, "tags": {}, "relations": [], "children": [], @@ -32010,8 +33630,8 @@ "name": "backup_dashboards", "type": "Function", "tier": "STANDARD", - "start_line": 343, - "end_line": 396, + "start_line": 583, + "end_line": 636, "tags": { "PURPOSE": "Trigger bulk backup of dashboards with optional cron schedule", "PRE": "dashboard_ids is a non-empty list", @@ -32035,6 +33655,24 @@ "issues": [], "score": 1.0 } + }, + { + "name": "_sort_key", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 370, + "end_line": 370, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } } ], "compliance": { @@ -32048,7 +33686,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 357, + "end_line": 498, "tags": { "TIER": "STANDARD", "PURPOSE": "Unit tests for Dashboards API endpoints", @@ -32065,12 +33703,13 @@ "name": "test_get_dashboards_success", "type": "Function", "tier": "STANDARD", - "start_line": 16, - "end_line": 61, + "start_line": 52, + "end_line": 87, "tags": { "TEST": "GET /api/dashboards returns 200 and valid schema", "PRE": "env_id exists", - "POST": "Response matches DashboardsResponse schema" + "POST": "Response matches DashboardsResponse schema", + "TEST_FIXTURE": "dashboard_list_happy -> {\"id\": 1, \"title\": \"Main Revenue\"}" }, "relations": [], "children": [], @@ -32080,22 +33719,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 16 + "line_number": 52 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 16 + "line_number": 52 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 16 + "line_number": 52 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 16 + "line_number": 52 } ], "score": 0.30000000000000004 @@ -32105,12 +33744,12 @@ "name": "test_get_dashboards_with_search", "type": "Function", "tier": "STANDARD", - "start_line": 64, - "end_line": 99, + "start_line": 90, + "end_line": 118, "tags": { "TEST": "GET /api/dashboards filters by search term", "PRE": "search parameter provided", - "POST": "Only matching dashboards returned" + "POST": "Filtered result count must match search" }, "relations": [], "children": [], @@ -32120,33 +33759,149 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 64 + "line_number": 90 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 64 + "line_number": 90 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 64 + "line_number": 90 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 64 + "line_number": 90 } ], "score": 0.30000000000000004 } }, + { + "name": "test_get_dashboards_empty", + "type": "Function", + "tier": "STANDARD", + "start_line": 121, + "end_line": 138, + "tags": { + "TEST_EDGE": "empty_dashboards -> {env_id: 'empty_env', expected_total: 0}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + } + ], + "score": 0.0 + } + }, + { + "name": "test_get_dashboards_superset_failure", + "type": "Function", + "tier": "STANDARD", + "start_line": 141, + "end_line": 156, + "tags": { + "TEST_EDGE": "external_superset_failure -> {env_id: 'bad_conn', status: 503}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 141 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 141 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 141 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 141 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 141 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 141 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 141 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 141 + } + ], + "score": 0.0 + } + }, { "name": "test_get_dashboards_env_not_found", "type": "Function", "tier": "STANDARD", - "start_line": 102, - "end_line": 119, + "start_line": 159, + "end_line": 171, "tags": { "TEST": "GET /api/dashboards returns 404 if env_id missing", "PRE": "env_id does not exist", @@ -32160,22 +33915,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 102 + "line_number": 159 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 102 + "line_number": 159 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 102 + "line_number": 159 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 102 + "line_number": 159 } ], "score": 0.30000000000000004 @@ -32185,8 +33940,8 @@ "name": "test_get_dashboards_invalid_pagination", "type": "Function", "tier": "STANDARD", - "start_line": 122, - "end_line": 146, + "start_line": 174, + "end_line": 191, "tags": { "TEST": "GET /api/dashboards returns 400 for invalid page/page_size", "PRE": "page < 1 or page_size > 100", @@ -32200,22 +33955,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 122 + "line_number": 174 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 122 + "line_number": 174 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 122 + "line_number": 174 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 122 + "line_number": 174 } ], "score": 0.30000000000000004 @@ -32225,8 +33980,8 @@ "name": "test_get_dashboard_detail_success", "type": "Function", "tier": "STANDARD", - "start_line": 149, - "end_line": 202, + "start_line": 194, + "end_line": 243, "tags": { "TEST": "GET /api/dashboards/{id} returns dashboard detail with charts and datasets" }, @@ -32238,42 +33993,42 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 194 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 194 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 194 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 194 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 194 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 194 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 194 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 194 } ], "score": 0.0 @@ -32283,8 +34038,8 @@ "name": "test_get_dashboard_detail_env_not_found", "type": "Function", "tier": "STANDARD", - "start_line": 205, - "end_line": 217, + "start_line": 246, + "end_line": 255, "tags": { "TEST": "GET /api/dashboards/{id} returns 404 for missing environment" }, @@ -32296,42 +34051,42 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 205 + "line_number": 246 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 205 + "line_number": 246 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 205 + "line_number": 246 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 205 + "line_number": 246 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 205 + "line_number": 246 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 205 + "line_number": 246 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 205 + "line_number": 246 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 205 + "line_number": 246 } ], "score": 0.0 @@ -32341,12 +34096,12 @@ "name": "test_migrate_dashboards_success", "type": "Function", "tier": "STANDARD", - "start_line": 220, - "end_line": 259, + "start_line": 258, + "end_line": 290, "tags": { "TEST": "POST /api/dashboards/migrate creates migration task", "PRE": "Valid source_env_id, target_env_id, dashboard_ids", - "POST": "Returns task_id" + "POST": "Returns task_id and create_task was called" }, "relations": [], "children": [], @@ -32356,22 +34111,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 220 + "line_number": 258 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 220 + "line_number": 258 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 220 + "line_number": 258 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 220 + "line_number": 258 } ], "score": 0.30000000000000004 @@ -32381,8 +34136,8 @@ "name": "test_migrate_dashboards_no_ids", "type": "Function", "tier": "STANDARD", - "start_line": 262, - "end_line": 283, + "start_line": 293, + "end_line": 311, "tags": { "TEST": "POST /api/dashboards/migrate returns 400 for empty dashboard_ids", "PRE": "dashboard_ids is empty", @@ -32396,37 +34151,35 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 262 + "line_number": 293 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 262 + "line_number": 293 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 262 + "line_number": 293 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 262 + "line_number": 293 } ], "score": 0.30000000000000004 } }, { - "name": "test_backup_dashboards_success", + "name": "test_migrate_dashboards_env_not_found", "type": "Function", "tier": "STANDARD", - "start_line": 286, - "end_line": 322, + "start_line": 314, + "end_line": 329, "tags": { - "TEST": "POST /api/dashboards/backup creates backup task", - "PRE": "Valid env_id, dashboard_ids", - "POST": "Returns task_id" + "PRE": "source_env_id and target_env_id are valid environment IDs" }, "relations": [], "children": [], @@ -32436,33 +34189,131 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 286 + "line_number": 314 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 314 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 286 + "line_number": 314 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 286 + "line_number": 314 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 314 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 286 + "line_number": 314 + } + ], + "score": 0.0 + } + }, + { + "name": "test_backup_dashboards_success", + "type": "Function", + "tier": "STANDARD", + "start_line": 332, + "end_line": 361, + "tags": { + "TEST": "POST /api/dashboards/backup creates backup task", + "PRE": "Valid env_id, dashboard_ids", + "POST": "Returns task_id and create_task was called" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 332 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 332 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 332 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 332 } ], "score": 0.30000000000000004 } }, + { + "name": "test_backup_dashboards_env_not_found", + "type": "Function", + "tier": "STANDARD", + "start_line": 364, + "end_line": 378, + "tags": { + "PRE": "env_id is a valid environment ID" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 364 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 364 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 364 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 364 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 364 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 364 + } + ], + "score": 0.0 + } + }, { "name": "test_get_database_mappings_success", "type": "Function", "tier": "STANDARD", - "start_line": 325, - "end_line": 354, + "start_line": 381, + "end_line": 411, "tags": { "TEST": "GET /api/dashboards/db-mappings returns mapping suggestions", "PRE": "Valid source_env_id, target_env_id", @@ -32476,33 +34327,197 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 325 + "line_number": 381 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 325 + "line_number": 381 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 325 + "line_number": 381 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 325 + "line_number": 381 } ], "score": 0.30000000000000004 } }, { - "name": "mock_get_dashboards", + "name": "test_get_database_mappings_env_not_found", + "type": "Function", + "tier": "STANDARD", + "start_line": 414, + "end_line": 421, + "tags": { + "PRE": "source_env_id and target_env_id are valid environment IDs" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 414 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 414 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 414 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 414 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 414 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 414 + } + ], + "score": 0.0 + } + }, + { + "name": "test_get_dashboard_tasks_history_filters_success", + "type": "Function", + "tier": "STANDARD", + "start_line": 424, + "end_line": 465, + "tags": { + "TEST": "GET /api/dashboards/{id}/tasks returns backup and llm tasks for dashboard" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 424 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 424 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 424 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 424 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 424 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 424 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 424 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 424 + } + ], + "score": 0.0 + } + }, + { + "name": "test_get_dashboard_thumbnail_success", + "type": "Function", + "tier": "STANDARD", + "start_line": 468, + "end_line": 495, + "tags": { + "TEST": "GET /api/dashboards/{id}/thumbnail proxies image bytes from Superset" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 468 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 468 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 468 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 468 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 468 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 468 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 468 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 468 + } + ], + "score": 0.0 + } + }, + { + "name": "mock_deps", "type": "Function", "tier": "TRIVIAL", - "start_line": 35, - "end_line": 35, + "start_line": 24, + "end_line": 24, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32519,8 +34534,26 @@ "name": "mock_get_dashboards", "type": "Function", "tier": "TRIVIAL", - "start_line": 81, - "end_line": 81, + "start_line": 100, + "end_line": 100, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_network_request", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 482, + "end_line": 482, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32549,11 +34582,11 @@ { "name": "backend.tests.test_reports_openapi_conformance", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 1, "end_line": 81, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "SEMANTICS": "tests, reports, openapi, conformance", "PURPOSE": "Validate implemented reports payload shape against OpenAPI-required top-level contract fields.", "LAYER": "Domain (Tests)", @@ -32684,11 +34717,11 @@ { "name": "backend.tests.test_reports_api", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 1, "end_line": 139, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "SEMANTICS": "tests, reports, api, contract, pagination, filtering", "PURPOSE": "Contract tests for GET /api/reports defaults, pagination, and filtering behavior.", "LAYER": "Domain (Tests)", @@ -32857,7 +34890,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 212, + "end_line": 300, "tags": { "TIER": "STANDARD", "SEMANTICS": "datasets, api, tests, pagination, mapping, docs", @@ -32876,8 +34909,8 @@ "name": "test_get_datasets_success", "type": "Function", "tier": "STANDARD", - "start_line": 18, - "end_line": 60, + "start_line": 53, + "end_line": 88, "tags": { "PURPOSE": "Validate successful datasets listing contract for an existing environment.", "TEST": "GET /api/datasets returns 200 and valid schema", @@ -32892,12 +34925,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 18 + "line_number": 53 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 18 + "line_number": 53 } ], "score": 0.7 @@ -32907,8 +34940,8 @@ "name": "test_get_datasets_env_not_found", "type": "Function", "tier": "STANDARD", - "start_line": 63, - "end_line": 80, + "start_line": 91, + "end_line": 104, "tags": { "TEST": "GET /api/datasets returns 404 if env_id missing", "PRE": "env_id does not exist", @@ -32922,22 +34955,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 63 + "line_number": 91 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 63 + "line_number": 91 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 63 + "line_number": 91 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 63 + "line_number": 91 } ], "score": 0.30000000000000004 @@ -32947,12 +34980,13 @@ "name": "test_get_datasets_invalid_pagination", "type": "Function", "tier": "STANDARD", - "start_line": 83, - "end_line": 107, + "start_line": 107, + "end_line": 132, "tags": { "TEST": "GET /api/datasets returns 400 for invalid page/page_size", "PRE": "page < 1 or page_size > 100", - "POST": "Returns 400 error" + "POST": "Returns 400 error", + "TEST_EDGE": "page_size > 100 exceeds max" }, "relations": [], "children": [], @@ -32962,22 +34996,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 83 + "line_number": 107 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 83 + "line_number": 107 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 83 + "line_number": 107 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 83 + "line_number": 107 } ], "score": 0.30000000000000004 @@ -32987,8 +35021,8 @@ "name": "test_map_columns_success", "type": "Function", "tier": "STANDARD", - "start_line": 110, - "end_line": 146, + "start_line": 135, + "end_line": 166, "tags": { "TEST": "POST /api/datasets/map-columns creates mapping task", "PRE": "Valid env_id, dataset_ids, source_type", @@ -33002,22 +35036,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 110 + "line_number": 135 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 110 + "line_number": 135 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 110 + "line_number": 135 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 110 + "line_number": 135 } ], "score": 0.30000000000000004 @@ -33027,8 +35061,8 @@ "name": "test_map_columns_invalid_source_type", "type": "Function", "tier": "STANDARD", - "start_line": 149, - "end_line": 170, + "start_line": 169, + "end_line": 187, "tags": { "TEST": "POST /api/datasets/map-columns returns 400 for invalid source_type", "PRE": "source_type is not 'postgresql' or 'xlsx'", @@ -33042,22 +35076,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 169 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 169 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 169 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 169 } ], "score": 0.30000000000000004 @@ -33067,8 +35101,8 @@ "name": "test_generate_docs_success", "type": "Function", "tier": "STANDARD", - "start_line": 173, - "end_line": 209, + "start_line": 190, + "end_line": 221, "tags": { "TEST": "POST /api/datasets/generate-docs creates doc generation task", "PRE": "Valid env_id, dataset_ids, llm_provider", @@ -33082,26 +35116,222 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 173 + "line_number": 190 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 173 + "line_number": 190 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 173 + "line_number": 190 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 173 + "line_number": 190 } ], "score": 0.30000000000000004 } + }, + { + "name": "test_map_columns_empty_ids", + "type": "Function", + "tier": "STANDARD", + "start_line": 224, + "end_line": 240, + "tags": { + "TEST": "POST /api/datasets/map-columns returns 400 for empty dataset_ids", + "PRE": "dataset_ids is empty", + "POST": "Returns 400 error" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 224 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 224 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 224 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 224 + } + ], + "score": 0.30000000000000004 + } + }, + { + "name": "test_generate_docs_empty_ids", + "type": "Function", + "tier": "STANDARD", + "start_line": 243, + "end_line": 259, + "tags": { + "TEST": "POST /api/datasets/generate-docs returns 400 for empty dataset_ids", + "PRE": "dataset_ids is empty", + "POST": "Returns 400 error" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 243 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 243 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 243 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 243 + } + ], + "score": 0.30000000000000004 + } + }, + { + "name": "test_generate_docs_env_not_found", + "type": "Function", + "tier": "STANDARD", + "start_line": 262, + "end_line": 279, + "tags": { + "TEST": "POST /api/datasets/generate-docs returns 404 for missing env", + "PRE": "env_id does not exist", + "POST": "Returns 404 error" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 262 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 262 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 262 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 262 + } + ], + "score": 0.30000000000000004 + } + }, + { + "name": "test_get_datasets_superset_failure", + "type": "Function", + "tier": "STANDARD", + "start_line": 282, + "end_line": 297, + "tags": { + "TEST_EDGE": "external_superset_failure -> {status: 503}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 282 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 282 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 282 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 282 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 282 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 282 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 282 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 282 + } + ], + "score": 0.0 + } + }, + { + "name": "mock_deps", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 25, + "end_line": 25, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } } ], "compliance": { @@ -33113,11 +35343,11 @@ { "name": "backend.tests.test_reports_detail_api", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 1, "end_line": 84, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "SEMANTICS": "tests, reports, api, detail, diagnostics", "PURPOSE": "Contract tests for GET /api/reports/{report_id} detail endpoint behavior.", "LAYER": "Domain (Tests)", @@ -33936,8 +36166,8 @@ "name": "_run_async", "type": "Function", "tier": "TRIVIAL", - "start_line": 27, - "end_line": 36, + "start_line": 28, + "end_line": 37, "tags": { "TIER": "TRIVIAL", "PURPOSE": "Execute async endpoint handler in synchronous test context.", @@ -33956,8 +36186,8 @@ "name": "_FakeTask", "type": "Class", "tier": "TRIVIAL", - "start_line": 37, - "end_line": 47, + "start_line": 38, + "end_line": 48, "tags": { "TIER": "TRIVIAL", "PURPOSE": "Lightweight task stub used by assistant API tests." @@ -33974,8 +36204,8 @@ "name": "_FakeTaskManager", "type": "Class", "tier": "TRIVIAL", - "start_line": 48, - "end_line": 71, + "start_line": 49, + "end_line": 72, "tags": { "TIER": "TRIVIAL", "PURPOSE": "Minimal async-compatible TaskManager fixture for deterministic test flows." @@ -33992,8 +36222,8 @@ "name": "_FakeConfigManager", "type": "Class", "tier": "TRIVIAL", - "start_line": 72, - "end_line": 83, + "start_line": 73, + "end_line": 84, "tags": { "TIER": "TRIVIAL", "PURPOSE": "Environment config fixture with dev/prod aliases for parser tests." @@ -34010,8 +36240,8 @@ "name": "_admin_user", "type": "Function", "tier": "TRIVIAL", - "start_line": 84, - "end_line": 94, + "start_line": 85, + "end_line": 95, "tags": { "TIER": "TRIVIAL", "PURPOSE": "Build admin principal fixture.", @@ -34030,8 +36260,8 @@ "name": "_limited_user", "type": "Function", "tier": "TRIVIAL", - "start_line": 95, - "end_line": 105, + "start_line": 96, + "end_line": 106, "tags": { "TIER": "TRIVIAL", "PURPOSE": "Build non-admin principal fixture.", @@ -34050,8 +36280,8 @@ "name": "_FakeQuery", "type": "Class", "tier": "TRIVIAL", - "start_line": 106, - "end_line": 137, + "start_line": 107, + "end_line": 138, "tags": { "TIER": "TRIVIAL", "PURPOSE": "Minimal chainable query object for fake SQLAlchemy-like DB behavior in tests." @@ -34068,8 +36298,8 @@ "name": "_FakeDb", "type": "Class", "tier": "TRIVIAL", - "start_line": 138, - "end_line": 187, + "start_line": 139, + "end_line": 188, "tags": { "TIER": "TRIVIAL", "PURPOSE": "In-memory fake database implementing subset of Session interface used by assistant routes." @@ -34086,8 +36316,8 @@ "name": "_clear_assistant_state", "type": "Function", "tier": "TRIVIAL", - "start_line": 188, - "end_line": 200, + "start_line": 189, + "end_line": 201, "tags": { "TIER": "TRIVIAL", "PURPOSE": "Reset in-memory assistant registries for isolation between tests.", @@ -34106,8 +36336,8 @@ "name": "test_unknown_command_returns_needs_clarification", "type": "Function", "tier": "STANDARD", - "start_line": 201, - "end_line": 220, + "start_line": 202, + "end_line": 221, "tags": { "PURPOSE": "Unknown command should return clarification state and unknown intent.", "PRE": "Fake dependencies provide admin user and deterministic task/config/db services.", @@ -34121,12 +36351,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 201 + "line_number": 202 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 201 + "line_number": 202 } ], "score": 0.7 @@ -34136,8 +36366,8 @@ "name": "test_capabilities_question_returns_successful_help", "type": "Function", "tier": "STANDARD", - "start_line": 223, - "end_line": 243, + "start_line": 224, + "end_line": 244, "tags": { "PURPOSE": "Capability query should return deterministic help response, not clarification.", "PRE": "User sends natural-language \"what can you do\" style query.", @@ -34151,12 +36381,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 223 + "line_number": 224 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 223 + "line_number": 224 } ], "score": 0.7 @@ -34166,8 +36396,8 @@ "name": "test_non_admin_command_returns_denied", "type": "Function", "tier": "STANDARD", - "start_line": 244, - "end_line": 264, + "start_line": 245, + "end_line": 265, "tags": { "PURPOSE": "Non-admin user must receive denied state for privileged command.", "PRE": "Limited principal executes privileged git branch command.", @@ -34181,12 +36411,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 244 + "line_number": 245 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 244 + "line_number": 245 } ], "score": 0.7 @@ -34196,8 +36426,8 @@ "name": "test_migration_to_prod_requires_confirmation_and_can_be_confirmed", "type": "Function", "tier": "STANDARD", - "start_line": 265, - "end_line": 301, + "start_line": 266, + "end_line": 302, "tags": { "PURPOSE": "Migration to prod must require confirmation and then start task after explicit confirm.", "PRE": "Admin principal submits dangerous migration command.", @@ -34211,12 +36441,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 265 + "line_number": 266 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 265 + "line_number": 266 } ], "score": 0.7 @@ -34226,8 +36456,8 @@ "name": "test_status_query_returns_task_status", "type": "Function", "tier": "STANDARD", - "start_line": 302, - "end_line": 348, + "start_line": 303, + "end_line": 349, "tags": { "PURPOSE": "Task status command must surface current status text for existing task id.", "PRE": "At least one task exists after confirmed operation.", @@ -34241,12 +36471,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 302 + "line_number": 303 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 302 + "line_number": 303 } ], "score": 0.7 @@ -34256,8 +36486,8 @@ "name": "test_status_query_without_task_id_returns_latest_user_task", "type": "Function", "tier": "STANDARD", - "start_line": 349, - "end_line": 394, + "start_line": 350, + "end_line": 395, "tags": { "PURPOSE": "Status command without explicit task_id should resolve to latest task for current user.", "PRE": "User has at least one created task in task manager history.", @@ -34271,12 +36501,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 349 + "line_number": 350 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 349 + "line_number": 350 } ], "score": 0.7 @@ -34286,7 +36516,7 @@ "name": "test_llm_validation_with_dashboard_ref_requires_confirmation", "type": "Function", "tier": "STANDARD", - "start_line": 395, + "start_line": 396, "end_line": null, "tags": { "PURPOSE": "LLM validation with dashboard_ref should now require confirmation before dispatch.", @@ -34299,8 +36529,8 @@ "name": "test_list_conversations_groups_by_conversation_and_marks_archived", "type": "Function", "tier": "STANDARD", - "start_line": 423, - "end_line": 470, + "start_line": 424, + "end_line": 471, "tags": { "PURPOSE": "Conversations endpoint must group messages and compute archived marker by inactivity threshold.", "PRE": "Fake DB contains two conversations with different update timestamps.", @@ -34314,17 +36544,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 423 + "line_number": 424 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 423 + "line_number": 424 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 423 + "line_number": 424 } ], "score": 0.55 @@ -34334,8 +36564,8 @@ "name": "test_history_from_latest_returns_recent_page_first", "type": "Function", "tier": "STANDARD", - "start_line": 473, - "end_line": 511, + "start_line": 474, + "end_line": 512, "tags": { "PURPOSE": "History endpoint from_latest mode must return newest page while preserving chronological order in chunk.", "PRE": "Conversation has more messages than single page size.", @@ -34349,17 +36579,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 473 + "line_number": 474 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 473 + "line_number": 474 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 473 + "line_number": 474 } ], "score": 0.55 @@ -34369,8 +36599,8 @@ "name": "test_list_conversations_archived_only_filters_active", "type": "Function", "tier": "STANDARD", - "start_line": 514, - "end_line": 560, + "start_line": 515, + "end_line": 561, "tags": { "PURPOSE": "archived_only mode must return only archived conversations.", "PRE": "Dataset includes one active and one archived conversation.", @@ -34384,17 +36614,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 514 + "line_number": 515 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 514 + "line_number": 515 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 514 + "line_number": 515 } ], "score": 0.55 @@ -34404,8 +36634,8 @@ "name": "test_guarded_operation_always_requires_confirmation", "type": "Function", "tier": "STANDARD", - "start_line": 563, - "end_line": 588, + "start_line": 564, + "end_line": 589, "tags": { "PURPOSE": "Non-dangerous (guarded) commands must still require confirmation before execution.", "PRE": "Admin user sends a backup command that was previously auto-executed.", @@ -34419,17 +36649,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 563 + "line_number": 564 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 563 + "line_number": 564 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 563 + "line_number": 564 } ], "score": 0.55 @@ -34439,35 +36669,111 @@ "name": "test_guarded_operation_confirm_roundtrip", "type": "Function", "tier": "STANDARD", - "start_line": 591, - "end_line": 627, + "start_line": 592, + "end_line": null, "tags": { "PURPOSE": "Guarded operation must execute successfully after explicit confirmation.", "PRE": "Admin user sends a non-dangerous migration command (dev \u2192 dev).", "POST": "After confirmation, response transitions to started/success with task_id." }, "relations": [], - "children": [], + "children": [ + { + "name": "test_confirm_nonexistent_id_returns_404", + "type": "Function", + "tier": "STANDARD", + "start_line": 628, + "end_line": null, + "tags": { + "PURPOSE": "Confirming a non-existent ID should raise 404.", + "PRE": "user tries to confirm a random/fake UUID.", + "POST": "FastAPI HTTPException with status 404." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + { + "message": "Unclosed Anchor: [DEF:test_confirm_nonexistent_id_returns_404:Function] started at line 628", + "severity": "ERROR", + "line_number": 628 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 628 + }, + { + "message": "Unclosed Anchor: [DEF:test_confirm_nonexistent_id_returns_404:Function] started at line 628", + "severity": "ERROR", + "line_number": 628 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 628 + }, + { + "message": "Unclosed Anchor: [DEF:test_confirm_nonexistent_id_returns_404:Function] started at line 628", + "severity": "ERROR", + "line_number": 628 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 628 + }, + { + "message": "Unclosed Anchor: [DEF:test_confirm_nonexistent_id_returns_404:Function] started at line 628", + "severity": "ERROR", + "line_number": 628 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 628 + } + ], + "score": 0.0 + } + } + ], "compliance": { - "valid": true, + "valid": false, "issues": [ { - "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 591 + "message": "Unclosed Anchor: [DEF:test_guarded_operation_confirm_roundtrip:Function] started at line 592", + "severity": "ERROR", + "line_number": 592 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 591 + "line_number": 592 + }, + { + "message": "Unclosed Anchor: [DEF:test_guarded_operation_confirm_roundtrip:Function] started at line 592", + "severity": "ERROR", + "line_number": 592 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 591 + "line_number": 592 + }, + { + "message": "Unclosed Anchor: [DEF:test_guarded_operation_confirm_roundtrip:Function] started at line 592", + "severity": "ERROR", + "line_number": 592 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 592 } ], - "score": 0.55 + "score": 0.0 } } ], @@ -34475,24 +36781,24 @@ "valid": false, "issues": [ { - "message": "Unclosed Anchor: [DEF:test_llm_validation_with_dashboard_ref_requires_confirmation:Function] started at line 395", + "message": "Unclosed Anchor: [DEF:test_llm_validation_with_dashboard_ref_requires_confirmation:Function] started at line 396", "severity": "ERROR", - "line_number": 395 + "line_number": 396 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 395 + "line_number": 396 }, { - "message": "Unclosed Anchor: [DEF:test_llm_validation_with_dashboard_ref_requires_confirmation:Function] started at line 395", + "message": "Unclosed Anchor: [DEF:test_llm_validation_with_dashboard_ref_requires_confirmation:Function] started at line 396", "severity": "ERROR", - "line_number": 395 + "line_number": 396 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 395 + "line_number": 396 } ], "score": 0.0 @@ -34502,8 +36808,8 @@ "name": "__init__", "type": "Function", "tier": "TRIVIAL", - "start_line": 41, - "end_line": 41, + "start_line": 42, + "end_line": 42, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34520,8 +36826,8 @@ "name": "__init__", "type": "Function", "tier": "TRIVIAL", - "start_line": 52, - "end_line": 52, + "start_line": 53, + "end_line": 53, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34538,8 +36844,8 @@ "name": "create_task", "type": "Function", "tier": "TRIVIAL", - "start_line": 55, - "end_line": 55, + "start_line": 56, + "end_line": 56, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34556,8 +36862,8 @@ "name": "get_task", "type": "Function", "tier": "TRIVIAL", - "start_line": 61, - "end_line": 61, + "start_line": 62, + "end_line": 62, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34574,8 +36880,8 @@ "name": "get_tasks", "type": "Function", "tier": "TRIVIAL", - "start_line": 67, - "end_line": 67, + "start_line": 68, + "end_line": 68, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34592,8 +36898,8 @@ "name": "get_environments", "type": "Function", "tier": "TRIVIAL", - "start_line": 76, - "end_line": 76, + "start_line": 77, + "end_line": 77, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34610,8 +36916,8 @@ "name": "__init__", "type": "Function", "tier": "TRIVIAL", - "start_line": 110, - "end_line": 110, + "start_line": 111, + "end_line": 111, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34628,8 +36934,8 @@ "name": "filter", "type": "Function", "tier": "TRIVIAL", - "start_line": 113, - "end_line": 113, + "start_line": 114, + "end_line": 114, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34646,8 +36952,8 @@ "name": "order_by", "type": "Function", "tier": "TRIVIAL", - "start_line": 116, - "end_line": 116, + "start_line": 117, + "end_line": 117, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34664,8 +36970,8 @@ "name": "first", "type": "Function", "tier": "TRIVIAL", - "start_line": 119, - "end_line": 119, + "start_line": 120, + "end_line": 120, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34682,8 +36988,8 @@ "name": "all", "type": "Function", "tier": "TRIVIAL", - "start_line": 122, - "end_line": 122, + "start_line": 123, + "end_line": 123, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34700,8 +37006,8 @@ "name": "count", "type": "Function", "tier": "TRIVIAL", - "start_line": 125, - "end_line": 125, + "start_line": 126, + "end_line": 126, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34718,8 +37024,8 @@ "name": "offset", "type": "Function", "tier": "TRIVIAL", - "start_line": 128, - "end_line": 128, + "start_line": 129, + "end_line": 129, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34736,8 +37042,8 @@ "name": "limit", "type": "Function", "tier": "TRIVIAL", - "start_line": 132, - "end_line": 132, + "start_line": 133, + "end_line": 133, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34754,8 +37060,8 @@ "name": "__init__", "type": "Function", "tier": "TRIVIAL", - "start_line": 142, - "end_line": 142, + "start_line": 143, + "end_line": 143, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34772,8 +37078,8 @@ "name": "add", "type": "Function", "tier": "TRIVIAL", - "start_line": 147, - "end_line": 147, + "start_line": 148, + "end_line": 148, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34790,8 +37096,8 @@ "name": "merge", "type": "Function", "tier": "TRIVIAL", - "start_line": 158, - "end_line": 158, + "start_line": 159, + "end_line": 159, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34808,8 +37114,8 @@ "name": "query", "type": "Function", "tier": "TRIVIAL", - "start_line": 171, - "end_line": 171, + "start_line": 172, + "end_line": 172, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34826,8 +37132,8 @@ "name": "commit", "type": "Function", "tier": "TRIVIAL", - "start_line": 180, - "end_line": 180, + "start_line": 181, + "end_line": 181, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34844,8 +37150,8 @@ "name": "rollback", "type": "Function", "tier": "TRIVIAL", - "start_line": 183, - "end_line": 183, + "start_line": 184, + "end_line": 184, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -34876,7 +37182,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 346, + "end_line": 410, "tags": { "TIER": "STANDARD", "PURPOSE": "Unit tests for migration API route handlers.", @@ -35127,8 +37433,8 @@ "name": "test_trigger_sync_now_creates_env_row_and_syncs", "type": "Function", "tier": "TRIVIAL", - "start_line": 256, - "end_line": 256, + "start_line": 257, + "end_line": 257, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -35145,8 +37451,8 @@ "name": "test_trigger_sync_now_rejects_empty_environments", "type": "Function", "tier": "TRIVIAL", - "start_line": 286, - "end_line": 286, + "start_line": 287, + "end_line": 287, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -35163,8 +37469,8 @@ "name": "test_trigger_sync_now_handles_partial_failure", "type": "Function", "tier": "TRIVIAL", - "start_line": 300, - "end_line": 300, + "start_line": 301, + "end_line": 301, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -35181,8 +37487,80 @@ "name": "test_trigger_sync_now_idempotent_env_upsert", "type": "Function", "tier": "TRIVIAL", - "start_line": 330, - "end_line": 330, + "start_line": 331, + "end_line": 331, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboards_success", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 350, + "end_line": 350, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboards_invalid_env_raises_404", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 364, + "end_line": 364, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_execute_migration_success", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 375, + "end_line": 375, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_execute_migration_invalid_env_raises_400", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 394, + "end_line": 394, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -35443,7 +37821,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 61, + "end_line": 116, "tags": { "TIER": "TRIVIAL", "SEMANTICS": "database, task, record, sqlalchemy, sqlite", @@ -35481,11 +37859,15 @@ "type": "Class", "tier": "CRITICAL", "start_line": 37, - "end_line": 59, + "end_line": 114, "tags": { "PURPOSE": "Represents a single persistent log entry for a task.", "TIER": "CRITICAL", - "INVARIANT": "Each log entry belongs to exactly one task." + "INVARIANT": "Each log entry belongs to exactly one task.", + "TEST_CONTRACT": "TaskLogCreate ->", + "TEST_FIXTURE": "basic_info_log ->", + "TEST_EDGE": "empty_message ->", + "TEST_INVARIANT": "exact_one_task_association -> verifies: [basic_info_log, missing_required_field]" }, "relations": [ { @@ -35712,7 +38094,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 149, + "end_line": 229, "tags": { "TIER": "CRITICAL", "SEMANTICS": "reports, models, pydantic, normalization, pagination", @@ -35772,12 +38154,15 @@ "type": "Class", "tier": "CRITICAL", "start_line": 45, - "end_line": 54, + "end_line": 67, "tags": { "TIER": "CRITICAL", "INVARIANT": "The properties accurately describe error state.", "SEMANTICS": "error, context, payload", - "PURPOSE": "Error and recovery context for failed/partial reports." + "PURPOSE": "Error and recovery context for failed/partial reports.", + "TEST_CONTRACT": "ErrorContextModel ->", + "TEST_FIXTURE": "basic_error -> {\"message\": \"Connection timeout\", \"code\": \"ERR_504\", \"next_actions\": [\"retry\"]}", + "TEST_EDGE": "missing_message -> {\"code\": \"ERR_504\"}" }, "relations": [], "children": [], @@ -35791,13 +38176,17 @@ "name": "TaskReport", "type": "Class", "tier": "CRITICAL", - "start_line": 57, - "end_line": 80, + "start_line": 70, + "end_line": 123, "tags": { "TIER": "CRITICAL", "INVARIANT": "Must represent canonical task record attributes.", "SEMANTICS": "report, model, summary", - "PURPOSE": "Canonical normalized report envelope for one task execution." + "PURPOSE": "Canonical normalized report envelope for one task execution.", + "TEST_CONTRACT": "TaskReportModel ->", + "TEST_FIXTURE": "valid_task_report ->", + "TEST_EDGE": "invalid_task_type -> {\"report_id\": \"rep-123\", \"task_id\": \"task-456\", \"task_type\": \"invalid_type\", \"status\": \"success\", \"updated_at\": \"2026-02-26T12:00:00Z\", \"summary\": \"Done\"}", + "TEST_INVARIANT": "non_empty_validators -> verifies: [empty_report_id, empty_summary]" }, "relations": [], "children": [], @@ -35811,13 +38200,17 @@ "name": "ReportQuery", "type": "Class", "tier": "CRITICAL", - "start_line": 83, - "end_line": 119, + "start_line": 126, + "end_line": 181, "tags": { "TIER": "CRITICAL", "INVARIANT": "Time and pagination queries are mutually consistent.", "SEMANTICS": "query, filter, search", - "PURPOSE": "Query object for server-side report filtering, sorting, and pagination." + "PURPOSE": "Query object for server-side report filtering, sorting, and pagination.", + "TEST_CONTRACT": "ReportQueryModel ->", + "TEST_FIXTURE": "valid_query -> {\"page\": 1, \"page_size\":20, \"sort_by\": \"updated_at\", \"sort_order\": \"desc\"}", + "TEST_EDGE": "invalid_time_range -> {\"time_from\": \"2026-02-26T12:00:00Z\", \"time_to\": \"2026-02-25T12:00:00Z\"}", + "TEST_INVARIANT": "attribute_constraints_enforced -> verifies: [invalid_page_size_large, invalid_sort_by, invalid_time_range]" }, "relations": [], "children": [], @@ -35831,13 +38224,16 @@ "name": "ReportCollection", "type": "Class", "tier": "CRITICAL", - "start_line": 122, - "end_line": 134, + "start_line": 184, + "end_line": 206, "tags": { "TIER": "CRITICAL", "INVARIANT": "Represents paginated data correctly.", "SEMANTICS": "collection, pagination", - "PURPOSE": "Paginated collection of normalized task reports." + "PURPOSE": "Paginated collection of normalized task reports.", + "TEST_CONTRACT": "ReportCollectionModel ->", + "TEST_FIXTURE": "empty_collection -> {\"items\": [], \"total\": 0, \"page\": 1, \"page_size\": 20, \"has_next\": False, \"applied_filters\": {}}", + "TEST_EDGE": "negative_total -> {\"items\": [], \"total\": -5, \"page\": 1, \"page_size\": 20, \"has_next\": False, \"applied_filters\": {}}" }, "relations": [], "children": [], @@ -35851,13 +38247,16 @@ "name": "ReportDetailView", "type": "Class", "tier": "CRITICAL", - "start_line": 137, - "end_line": 147, + "start_line": 209, + "end_line": 227, "tags": { "TIER": "CRITICAL", "INVARIANT": "Incorporates a report and logs correctly.", "SEMANTICS": "view, detail, logs", - "PURPOSE": "Detailed report representation including diagnostics and recovery actions." + "PURPOSE": "Detailed report representation including diagnostics and recovery actions.", + "TEST_CONTRACT": "ReportDetailViewModel ->", + "TEST_FIXTURE": "valid_detail -> {\"report\": {\"report_id\": \"rep-1\", \"task_id\": \"task-1\", \"task_type\": \"backup\", \"status\": \"success\", \"updated_at\": \"2026-02-26T12:00:00Z\", \"summary\": \"Done\"}}", + "TEST_EDGE": "missing_report -> {}" }, "relations": [], "children": [], @@ -35871,8 +38270,8 @@ "name": "_non_empty_str", "type": "Function", "tier": "TRIVIAL", - "start_line": 76, - "end_line": 76, + "start_line": 119, + "end_line": 119, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -35889,8 +38288,8 @@ "name": "_validate_sort_by", "type": "Function", "tier": "TRIVIAL", - "start_line": 101, - "end_line": 101, + "start_line": 163, + "end_line": 163, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -35907,8 +38306,8 @@ "name": "_validate_sort_order", "type": "Function", "tier": "TRIVIAL", - "start_line": 109, - "end_line": 109, + "start_line": 171, + "end_line": 171, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -35925,8 +38324,8 @@ "name": "_validate_time_range", "type": "Function", "tier": "TRIVIAL", - "start_line": 115, - "end_line": 115, + "start_line": 177, + "end_line": 177, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -36453,11 +38852,11 @@ { "name": "test_report_models", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 1, "end_line": 235, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "PURPOSE": "Unit tests for report Pydantic models and their validators", "LAYER": "Domain" }, @@ -36938,25 +39337,15 @@ } ], "compliance": { - "valid": false, + "valid": true, "issues": [ { - "message": "Missing Mandatory Tag: @SEMANTICS (required for CRITICAL tier)", - "severity": "ERROR", - "line_number": 1 - }, - { - "message": "Missing Mandatory Tag: @INVARIANT (required for CRITICAL tier)", - "severity": "ERROR", - "line_number": 1 - }, - { - "message": "Missing @INVARIANT tag (required for CRITICAL tier)", - "severity": "ERROR", + "message": "Missing Mandatory Tag: @SEMANTICS (required for STANDARD tier)", + "severity": "WARNING", "line_number": 1 } ], - "score": 0.0 + "score": 0.775 } }, { @@ -37490,7 +39879,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 171, + "end_line": 183, "tags": { "TIER": "STANDARD", "SEMANTICS": "service, llm, provider, encryption", @@ -37513,11 +39902,15 @@ "type": "Class", "tier": "CRITICAL", "start_line": 17, - "end_line": 48, + "end_line": 60, "tags": { "TIER": "CRITICAL", "PURPOSE": "Handles encryption and decryption of sensitive data like API keys.", - "INVARIANT": "Uses a secret key from environment or a default one (fallback only for dev)." + "INVARIANT": "Uses a secret key from environment or a default one (fallback only for dev).", + "TEST_CONTRACT": "EncryptionManagerModel ->", + "TEST_FIXTURE": "basic_encryption_cycle -> {\"data\": \"my_secret_key\"}", + "TEST_EDGE": "empty_string_encryption -> {\"data\": \"\"}", + "TEST_INVARIANT": "symmetric_encryption -> verifies: [basic_encryption_cycle, empty_string_encryption]" }, "relations": [], "children": [ @@ -37525,8 +39918,8 @@ "name": "EncryptionManager.__init__", "type": "Function", "tier": "STANDARD", - "start_line": 22, - "end_line": 29, + "start_line": 34, + "end_line": 41, "tags": { "PURPOSE": "Initialize the encryption manager with a Fernet key.", "PRE": "ENCRYPTION_KEY env var must be set or use default dev key.", @@ -37544,8 +39937,8 @@ "name": "EncryptionManager.encrypt", "type": "Function", "tier": "STANDARD", - "start_line": 31, - "end_line": 38, + "start_line": 43, + "end_line": 50, "tags": { "PURPOSE": "Encrypt a plaintext string.", "PRE": "data must be a non-empty string.", @@ -37563,8 +39956,8 @@ "name": "EncryptionManager.decrypt", "type": "Function", "tier": "STANDARD", - "start_line": 40, - "end_line": 47, + "start_line": 52, + "end_line": 59, "tags": { "PURPOSE": "Decrypt an encrypted string.", "PRE": "encrypted_data must be a valid Fernet-encrypted string.", @@ -37589,8 +39982,8 @@ "name": "LLMProviderService", "type": "Class", "tier": "STANDARD", - "start_line": 50, - "end_line": 169, + "start_line": 62, + "end_line": 181, "tags": { "TIER": "STANDARD", "PURPOSE": "Service to manage LLM provider lifecycle." @@ -37601,8 +39994,8 @@ "name": "LLMProviderService.__init__", "type": "Function", "tier": "STANDARD", - "start_line": 54, - "end_line": 61, + "start_line": 66, + "end_line": 73, "tags": { "PURPOSE": "Initialize the service with database session.", "PRE": "db must be a valid SQLAlchemy Session.", @@ -37620,8 +40013,8 @@ "name": "get_all_providers", "type": "Function", "tier": "STANDARD", - "start_line": 63, - "end_line": 71, + "start_line": 75, + "end_line": 83, "tags": { "TIER": "STANDARD", "PURPOSE": "Returns all configured LLM providers.", @@ -37640,8 +40033,8 @@ "name": "get_provider", "type": "Function", "tier": "STANDARD", - "start_line": 73, - "end_line": 81, + "start_line": 85, + "end_line": 93, "tags": { "TIER": "STANDARD", "PURPOSE": "Returns a single LLM provider by ID.", @@ -37660,8 +40053,8 @@ "name": "create_provider", "type": "Function", "tier": "STANDARD", - "start_line": 83, - "end_line": 103, + "start_line": 95, + "end_line": 115, "tags": { "TIER": "STANDARD", "PURPOSE": "Creates a new LLM provider with encrypted API key.", @@ -37680,8 +40073,8 @@ "name": "update_provider", "type": "Function", "tier": "STANDARD", - "start_line": 105, - "end_line": 128, + "start_line": 117, + "end_line": 140, "tags": { "TIER": "STANDARD", "PURPOSE": "Updates an existing LLM provider.", @@ -37700,8 +40093,8 @@ "name": "delete_provider", "type": "Function", "tier": "STANDARD", - "start_line": 130, - "end_line": 143, + "start_line": 142, + "end_line": 155, "tags": { "TIER": "STANDARD", "PURPOSE": "Deletes an LLM provider.", @@ -37720,8 +40113,8 @@ "name": "get_decrypted_api_key", "type": "Function", "tier": "STANDARD", - "start_line": 145, - "end_line": 167, + "start_line": 157, + "end_line": 179, "tags": { "TIER": "STANDARD", "PURPOSE": "Returns the decrypted API key for a provider.", @@ -37747,8 +40140,8 @@ "name": "__init__", "type": "Function", "tier": "TRIVIAL", - "start_line": 26, - "end_line": 26, + "start_line": 38, + "end_line": 38, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -37765,8 +40158,8 @@ "name": "encrypt", "type": "Function", "tier": "TRIVIAL", - "start_line": 35, - "end_line": 35, + "start_line": 47, + "end_line": 47, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -37783,8 +40176,8 @@ "name": "decrypt", "type": "Function", "tier": "TRIVIAL", - "start_line": 44, - "end_line": 44, + "start_line": 56, + "end_line": 56, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -37801,8 +40194,8 @@ "name": "__init__", "type": "Function", "tier": "TRIVIAL", - "start_line": 58, - "end_line": 58, + "start_line": 70, + "end_line": 70, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -38530,11 +40923,11 @@ { "name": "test_encryption_manager", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 1, "end_line": 126, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "SEMANTICS": "encryption, security, fernet, api-keys, tests", "PURPOSE": "Unit tests for EncryptionManager encrypt/decrypt functionality.", "LAYER": "Domain", @@ -39193,7 +41586,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 215, + "end_line": 251, "tags": { "TIER": "STANDARD", "SEMANTICS": "resource-service, tests, dashboards, datasets, activity", @@ -39328,7 +41721,7 @@ "type": "Function", "tier": "STANDARD", "start_line": 134, - "end_line": 151, + "end_line": 153, "tags": { "TEST": "_get_git_status_for_dashboard returns None when no repo exists", "PRE": "GitService returns None for repo", @@ -39367,8 +41760,8 @@ "name": "test_get_last_task_for_resource", "type": "Function", "tier": "STANDARD", - "start_line": 154, - "end_line": 183, + "start_line": 156, + "end_line": 185, "tags": { "TEST": "_get_last_task_for_resource returns most recent task for resource", "PRE": "tasks list with matching resource_id", @@ -39382,22 +41775,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 154 + "line_number": 156 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 154 + "line_number": 156 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 154 + "line_number": 156 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 154 + "line_number": 156 } ], "score": 0.30000000000000004 @@ -39407,8 +41800,8 @@ "name": "test_extract_resource_name_from_task", "type": "Function", "tier": "STANDARD", - "start_line": 186, - "end_line": 212, + "start_line": 188, + "end_line": 214, "tags": { "TEST": "_extract_resource_name_from_task extracts name from params", "PRE": "task has resource_name in params", @@ -39422,22 +41815,102 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 186 + "line_number": 188 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 186 + "line_number": 188 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 186 + "line_number": 188 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 186 + "line_number": 188 + } + ], + "score": 0.30000000000000004 + } + }, + { + "name": "test_get_last_task_for_resource_empty_tasks", + "type": "Function", + "tier": "STANDARD", + "start_line": 217, + "end_line": 228, + "tags": { + "TEST": "_get_last_task_for_resource returns None for empty tasks list", + "PRE": "tasks is empty list", + "POST": "Returns None" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 217 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 217 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 217 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 217 + } + ], + "score": 0.30000000000000004 + } + }, + { + "name": "test_get_last_task_for_resource_no_match", + "type": "Function", + "tier": "STANDARD", + "start_line": 231, + "end_line": 248, + "tags": { + "TEST": "_get_last_task_for_resource returns None when no tasks match resource_id", + "PRE": "tasks list has no matching resource_id", + "POST": "Returns None" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 231 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 231 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 231 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 231 } ], "score": 0.30000000000000004 @@ -39455,7 +41928,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 157, + "end_line": 171, "tags": { "TIER": "CRITICAL", "SEMANTICS": "reports, normalization, tasks, fallback", @@ -39546,13 +42019,17 @@ "type": "Function", "tier": "STANDARD", "start_line": 110, - "end_line": 155, + "end_line": 169, "tags": { "PURPOSE": "Convert one Task to canonical TaskReport envelope.", "PRE": "task has valid id and plugin_id fields.", "POST": "Returns TaskReport with required fields and deterministic fallback behavior.", "PARAM": "task (Task) - Source task.", - "RETURN": "TaskReport - Canonical normalized report." + "RETURN": "TaskReport - Canonical normalized report.", + "TEST_CONTRACT": "NormalizeTaskReport ->", + "TEST_FIXTURE": "valid_task -> {\"task\": \"MockTask(id='1', plugin_id='superset-migration', status=TaskStatus.SUCCESS)\"}", + "TEST_EDGE": "unknown_plugin_type -> {\"task\": \"MockTask(plugin_id='unknown-plugin', status=TaskStatus.PENDING)\"}", + "TEST_INVARIANT": "deterministic_normalization -> verifies: [valid_task, task_with_error, unknown_plugin_type]" }, "relations": [], "children": [], @@ -39574,7 +42051,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 94, + "end_line": 114, "tags": { "TIER": "CRITICAL", "SEMANTICS": "reports, type_profiles, normalization, fallback", @@ -39628,13 +42105,17 @@ "type": "Function", "tier": "STANDARD", "start_line": 68, - "end_line": 80, + "end_line": 91, "tags": { "PURPOSE": "Resolve canonical task type from plugin/task identifier with guaranteed fallback.", "PRE": "plugin_id may be None or unknown.", "POST": "Always returns one of TaskType enum values.", "PARAM": "plugin_id (Optional[str]) - Source plugin/task identifier from task record.", - "RETURN": "TaskType - Resolved canonical type or UNKNOWN fallback." + "RETURN": "TaskType - Resolved canonical type or UNKNOWN fallback.", + "TEST_CONTRACT": "ResolveTaskType ->", + "TEST_FIXTURE": "valid_plugin -> {\"plugin_id\": \"superset-migration\"}", + "TEST_EDGE": "unknown_plugin -> {\"plugin_id\": \"invalid-plugin\"}", + "TEST_INVARIANT": "fallback_to_unknown -> verifies: [empty_plugin, none_plugin, unknown_plugin]" }, "relations": [], "children": [], @@ -39648,14 +42129,18 @@ "name": "get_type_profile", "type": "Function", "tier": "STANDARD", - "start_line": 83, - "end_line": 92, + "start_line": 94, + "end_line": 112, "tags": { "PURPOSE": "Return deterministic profile metadata for a task type.", "PRE": "task_type may be known or unknown.", "POST": "Returns a profile dict and never raises for unknown types.", "PARAM": "task_type (TaskType) - Canonical task type.", - "RETURN": "Dict[str, Any] - Profile metadata used by normalization and UI contracts." + "RETURN": "Dict[str, Any] - Profile metadata used by normalization and UI contracts.", + "TEST_CONTRACT": "GetTypeProfile ->", + "TEST_FIXTURE": "valid_profile -> {\"task_type\": \"migration\"}", + "TEST_EDGE": "missing_profile -> {\"task_type\": \"some_new_type\"}", + "TEST_INVARIANT": "always_returns_dict -> verifies: [valid_profile, missing_profile]" }, "relations": [], "children": [], @@ -39677,7 +42162,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 205, + "end_line": 218, "tags": { "TIER": "CRITICAL", "SEMANTICS": "reports, service, aggregation, filtering, pagination, detail", @@ -39705,13 +42190,17 @@ "type": "Class", "tier": "CRITICAL", "start_line": 23, - "end_line": 203, + "end_line": 216, "tags": { "PURPOSE": "Service layer for list/detail report retrieval and normalization.", "TIER": "CRITICAL", "PRE": "TaskManager dependency is initialized.", "POST": "Provides deterministic list/detail report responses.", - "INVARIANT": "Service methods are read-only over task history source." + "INVARIANT": "Service methods are read-only over task history source.", + "TEST_CONTRACT": "ReportsServiceModel ->", + "TEST_FIXTURE": "valid_service -> {\"task_manager\": \"MockTaskManager()\"}", + "TEST_EDGE": "report_not_found -> get_report_detail returns None", + "TEST_INVARIANT": "consistent_pagination -> verifies: [valid_service]" }, "relations": [], "children": [ @@ -39719,8 +42208,8 @@ "name": "__init__", "type": "Function", "tier": "CRITICAL", - "start_line": 30, - "end_line": 40, + "start_line": 43, + "end_line": 53, "tags": { "TIER": "CRITICAL", "PURPOSE": "Initialize service with TaskManager dependency.", @@ -39741,8 +42230,8 @@ "name": "_load_normalized_reports", "type": "Function", "tier": "STANDARD", - "start_line": 42, - "end_line": 53, + "start_line": 55, + "end_line": 66, "tags": { "PURPOSE": "Build normalized reports from all available tasks.", "PRE": "Task manager returns iterable task history records.", @@ -39762,8 +42251,8 @@ "name": "_to_utc_datetime", "type": "Function", "tier": "STANDARD", - "start_line": 55, - "end_line": 69, + "start_line": 68, + "end_line": 82, "tags": { "PURPOSE": "Normalize naive/aware datetime values to UTC-aware datetime for safe comparisons.", "PRE": "value is either datetime or None.", @@ -39784,8 +42273,8 @@ "name": "_datetime_sort_key", "type": "Function", "tier": "STANDARD", - "start_line": 71, - "end_line": 84, + "start_line": 84, + "end_line": 97, "tags": { "PURPOSE": "Produce stable numeric sort key for report timestamps.", "PRE": "report contains updated_at datetime.", @@ -39806,8 +42295,8 @@ "name": "_matches_query", "type": "Function", "tier": "STANDARD", - "start_line": 86, - "end_line": 114, + "start_line": 99, + "end_line": 127, "tags": { "PURPOSE": "Apply query filtering to a report.", "PRE": "report and query are normalized schema instances.", @@ -39828,8 +42317,8 @@ "name": "_sort_reports", "type": "Function", "tier": "STANDARD", - "start_line": 116, - "end_line": 136, + "start_line": 129, + "end_line": 149, "tags": { "PURPOSE": "Sort reports deterministically according to query settings.", "PRE": "reports contains only TaskReport items.", @@ -39850,8 +42339,8 @@ "name": "list_reports", "type": "Function", "tier": "STANDARD", - "start_line": 138, - "end_line": 164, + "start_line": 151, + "end_line": 177, "tags": { "PURPOSE": "Return filtered, sorted, paginated report collection.", "PRE": "query has passed schema validation.", @@ -39871,8 +42360,8 @@ "name": "get_report_detail", "type": "Function", "tier": "STANDARD", - "start_line": 166, - "end_line": 202, + "start_line": 179, + "end_line": 215, "tags": { "PURPOSE": "Return one normalized report with timeline/diagnostics/next actions.", "PRE": "report_id exists in normalized report set.", @@ -39905,11 +42394,11 @@ { "name": "test_report_service", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 1, - "end_line": 181, + "end_line": 183, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "PURPOSE": "Unit tests for ReportsService list/detail operations", "LAYER": "Domain" }, @@ -40104,8 +42593,8 @@ "name": "test_applied_filters_echoed", "type": "Function", "tier": "TRIVIAL", - "start_line": 128, - "end_line": 128, + "start_line": 130, + "end_line": 130, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -40122,8 +42611,8 @@ "name": "_make_service", "type": "Function", "tier": "TRIVIAL", - "start_line": 140, - "end_line": 140, + "start_line": 142, + "end_line": 142, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -40140,8 +42629,8 @@ "name": "test_detail_found", "type": "Function", "tier": "TRIVIAL", - "start_line": 146, - "end_line": 146, + "start_line": 148, + "end_line": 148, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -40158,8 +42647,8 @@ "name": "test_detail_not_found", "type": "Function", "tier": "TRIVIAL", - "start_line": 153, - "end_line": 153, + "start_line": 155, + "end_line": 155, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -40176,8 +42665,8 @@ "name": "test_detail_includes_timeline", "type": "Function", "tier": "TRIVIAL", - "start_line": 158, - "end_line": 158, + "start_line": 160, + "end_line": 160, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -40194,8 +42683,8 @@ "name": "test_detail_failed_task_has_next_actions", "type": "Function", "tier": "TRIVIAL", - "start_line": 168, - "end_line": 168, + "start_line": 170, + "end_line": 170, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -40212,8 +42701,8 @@ "name": "test_detail_success_task_no_error_next_actions", "type": "Function", "tier": "TRIVIAL", - "start_line": 174, - "end_line": 174, + "start_line": 176, + "end_line": 176, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -40228,35 +42717,25 @@ } ], "compliance": { - "valid": false, + "valid": true, "issues": [ { - "message": "Missing Mandatory Tag: @SEMANTICS (required for CRITICAL tier)", - "severity": "ERROR", - "line_number": 1 - }, - { - "message": "Missing Mandatory Tag: @INVARIANT (required for CRITICAL tier)", - "severity": "ERROR", - "line_number": 1 - }, - { - "message": "Missing @INVARIANT tag (required for CRITICAL tier)", - "severity": "ERROR", + "message": "Missing Mandatory Tag: @SEMANTICS (required for STANDARD tier)", + "severity": "WARNING", "line_number": 1 } ], - "score": 0.0 + "score": 0.775 } }, { "name": "backend.tests.test_report_normalizer", "type": "Module", - "tier": "CRITICAL", + "tier": "STANDARD", "start_line": 1, "end_line": 51, "tags": { - "TIER": "CRITICAL", + "TIER": "STANDARD", "SEMANTICS": "tests, reports, normalizer, fallback", "PURPOSE": "Validate unknown task type fallback and partial payload normalization behavior.", "LAYER": "Domain (Tests)", @@ -42160,12 +44639,62 @@ "score": 0.7 } }, + { + "name": "_is_masked_or_invalid_api_key", + "type": "Function", + "tier": "STANDARD", + "start_line": 33, + "end_line": 45, + "tags": { + "PURPOSE": "Guards against placeholder or malformed API keys in runtime.", + "PRE": "value may be None.", + "POST": "Returns True when value cannot be used for authenticated provider calls." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 33 + } + ], + "score": 0.85 + } + }, + { + "name": "_json_safe_value", + "type": "Function", + "tier": "STANDARD", + "start_line": 47, + "end_line": 59, + "tags": { + "PURPOSE": "Recursively normalize payload values for JSON serialization.", + "PRE": "value may be nested dict/list with datetime values.", + "POST": "datetime values are converted to ISO strings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 47 + } + ], + "score": 0.85 + } + }, { "name": "DashboardValidationPlugin", "type": "Class", "tier": "STANDARD", - "start_line": 33, - "end_line": 248, + "start_line": 61, + "end_line": 311, "tags": { "PURPOSE": "Plugin for automated dashboard health analysis using LLMs." }, @@ -42180,8 +44709,8 @@ "name": "DashboardValidationPlugin.execute", "type": "Function", "tier": "STANDARD", - "start_line": 64, - "end_line": 247, + "start_line": 92, + "end_line": 310, "tags": { "PURPOSE": "Executes the dashboard validation task with TaskContext support.", "PARAM": "context (Optional[TaskContext]) - Task context for logging with source attribution.", @@ -42204,7 +44733,7 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 33 + "line_number": 61 } ], "score": 0.7 @@ -42214,8 +44743,8 @@ "name": "DocumentationPlugin", "type": "Class", "tier": "STANDARD", - "start_line": 250, - "end_line": 405, + "start_line": 313, + "end_line": 467, "tags": { "PURPOSE": "Plugin for automated dataset documentation using LLMs." }, @@ -42230,8 +44759,8 @@ "name": "DocumentationPlugin.execute", "type": "Function", "tier": "STANDARD", - "start_line": 281, - "end_line": 404, + "start_line": 344, + "end_line": 466, "tags": { "PURPOSE": "Executes the dataset documentation task with TaskContext support.", "PARAM": "context (Optional[TaskContext]) - Task context for logging with source attribution.", @@ -42254,7 +44783,7 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 250 + "line_number": 313 } ], "score": 0.7 @@ -42265,7 +44794,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 407, + "end_line": 469, "tags": { "PURPOSE": "Auto-generated module for backend/src/plugins/llm_analysis/plugin.py", "TIER": "TRIVIAL", @@ -42277,8 +44806,8 @@ "name": "id", "type": "Function", "tier": "TRIVIAL", - "start_line": 38, - "end_line": 38, + "start_line": 66, + "end_line": 66, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42295,8 +44824,8 @@ "name": "name", "type": "Function", "tier": "TRIVIAL", - "start_line": 42, - "end_line": 42, + "start_line": 70, + "end_line": 70, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42313,8 +44842,8 @@ "name": "description", "type": "Function", "tier": "TRIVIAL", - "start_line": 46, - "end_line": 46, + "start_line": 74, + "end_line": 74, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42331,8 +44860,8 @@ "name": "version", "type": "Function", "tier": "TRIVIAL", - "start_line": 50, - "end_line": 50, + "start_line": 78, + "end_line": 78, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42349,8 +44878,8 @@ "name": "get_schema", "type": "Function", "tier": "TRIVIAL", - "start_line": 53, - "end_line": 53, + "start_line": 81, + "end_line": 81, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42367,8 +44896,8 @@ "name": "execute", "type": "Function", "tier": "TRIVIAL", - "start_line": 71, - "end_line": 71, + "start_line": 99, + "end_line": 99, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42385,8 +44914,8 @@ "name": "id", "type": "Function", "tier": "TRIVIAL", - "start_line": 255, - "end_line": 255, + "start_line": 318, + "end_line": 318, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42403,8 +44932,8 @@ "name": "name", "type": "Function", "tier": "TRIVIAL", - "start_line": 259, - "end_line": 259, + "start_line": 322, + "end_line": 322, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42421,8 +44950,8 @@ "name": "description", "type": "Function", "tier": "TRIVIAL", - "start_line": 263, - "end_line": 263, + "start_line": 326, + "end_line": 326, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42439,8 +44968,8 @@ "name": "version", "type": "Function", "tier": "TRIVIAL", - "start_line": 267, - "end_line": 267, + "start_line": 330, + "end_line": 330, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42457,8 +44986,8 @@ "name": "get_schema", "type": "Function", "tier": "TRIVIAL", - "start_line": 270, - "end_line": 270, + "start_line": 333, + "end_line": 333, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42475,8 +45004,8 @@ "name": "execute", "type": "Function", "tier": "TRIVIAL", - "start_line": 288, - "end_line": 288, + "start_line": 351, + "end_line": 351, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42500,8 +45029,8 @@ "name": "ScreenshotService", "type": "Class", "tier": "STANDARD", - "start_line": 25, - "end_line": 415, + "start_line": 26, + "end_line": 416, "tags": { "PURPOSE": "Handles capturing screenshots of Superset dashboards." }, @@ -42511,8 +45040,8 @@ "name": "ScreenshotService.__init__", "type": "Function", "tier": "STANDARD", - "start_line": 28, - "end_line": 33, + "start_line": 29, + "end_line": 34, "tags": { "PURPOSE": "Initializes the ScreenshotService with environment configuration.", "PRE": "env is a valid Environment object." @@ -42525,12 +45054,12 @@ { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 28 + "line_number": 29 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 28 + "line_number": 29 } ], "score": 0.6 @@ -42540,8 +45069,8 @@ "name": "ScreenshotService.capture_dashboard", "type": "Function", "tier": "STANDARD", - "start_line": 35, - "end_line": 414, + "start_line": 36, + "end_line": 415, "tags": { "PURPOSE": "Captures a full-page screenshot of a dashboard using Playwright and CDP.", "PRE": "dashboard_id is a valid string, output_path is a writable path.", @@ -42564,7 +45093,7 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 25 + "line_number": 26 } ], "score": 0.7 @@ -42574,8 +45103,8 @@ "name": "LLMClient", "type": "Class", "tier": "STANDARD", - "start_line": 417, - "end_line": 653, + "start_line": 418, + "end_line": 669, "tags": { "PURPOSE": "Wrapper for LLM provider APIs." }, @@ -42585,8 +45114,8 @@ "name": "LLMClient.__init__", "type": "Function", "tier": "STANDARD", - "start_line": 420, - "end_line": 438, + "start_line": 421, + "end_line": 454, "tags": { "PURPOSE": "Initializes the LLMClient with provider settings.", "PRE": "api_key, base_url, and default_model are non-empty strings." @@ -42599,12 +45128,12 @@ { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 420 + "line_number": 421 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 420 + "line_number": 421 } ], "score": 0.6 @@ -42614,8 +45143,8 @@ "name": "LLMClient._supports_json_response_format", "type": "Function", "tier": "STANDARD", - "start_line": 440, - "end_line": 458, + "start_line": 456, + "end_line": 474, "tags": { "PURPOSE": "Detect whether provider/model is likely compatible with response_format=json_object.", "PRE": "Client initialized with base_url and default_model.", @@ -42629,12 +45158,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 440 + "line_number": 456 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 440 + "line_number": 456 } ], "score": 0.7 @@ -42644,8 +45173,8 @@ "name": "LLMClient.get_json_completion", "type": "Function", "tier": "STANDARD", - "start_line": 460, - "end_line": 580, + "start_line": 476, + "end_line": 596, "tags": { "PURPOSE": "Helper to handle LLM calls with JSON mode and fallback parsing.", "PRE": "messages is a list of valid message dictionaries.", @@ -42664,8 +45193,8 @@ "name": "LLMClient.analyze_dashboard", "type": "Function", "tier": "STANDARD", - "start_line": 582, - "end_line": 652, + "start_line": 598, + "end_line": 668, "tags": { "PURPOSE": "Sends dashboard data (screenshot + logs) to LLM for health analysis.", "PRE": "screenshot_path exists, logs is a list of strings.", @@ -42687,7 +45216,7 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 417 + "line_number": 418 } ], "score": 0.7 @@ -42698,7 +45227,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 655, + "end_line": 671, "tags": { "PURPOSE": "Auto-generated module for backend/src/plugins/llm_analysis/service.py", "TIER": "TRIVIAL", @@ -42710,8 +45239,8 @@ "name": "__init__", "type": "Function", "tier": "TRIVIAL", - "start_line": 31, - "end_line": 31, + "start_line": 32, + "end_line": 32, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42728,8 +45257,8 @@ "name": "capture_dashboard", "type": "Function", "tier": "TRIVIAL", - "start_line": 44, - "end_line": 44, + "start_line": 45, + "end_line": 45, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42746,8 +45275,8 @@ "name": "switch_tabs", "type": "Function", "tier": "TRIVIAL", - "start_line": 254, - "end_line": 254, + "start_line": 255, + "end_line": 255, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42764,8 +45293,8 @@ "name": "__init__", "type": "Function", "tier": "TRIVIAL", - "start_line": 423, - "end_line": 423, + "start_line": 424, + "end_line": 424, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42782,8 +45311,8 @@ "name": "_supports_json_response_format", "type": "Function", "tier": "TRIVIAL", - "start_line": 444, - "end_line": 444, + "start_line": 460, + "end_line": 460, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42800,8 +45329,8 @@ "name": "_should_retry", "type": "Function", "tier": "TRIVIAL", - "start_line": 465, - "end_line": 465, + "start_line": 481, + "end_line": 481, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42818,8 +45347,8 @@ "name": "get_json_completion", "type": "Function", "tier": "TRIVIAL", - "start_line": 479, - "end_line": 479, + "start_line": 495, + "end_line": 495, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -42836,8 +45365,8 @@ "name": "analyze_dashboard", "type": "Function", "tier": "TRIVIAL", - "start_line": 587, - "end_line": 587, + "start_line": 603, + "end_line": 603, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -45472,98 +48001,446 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 73, + "end_line": 366, "tags": { "TIER": "STANDARD", - "PURPOSE": "Contract-driven tests for Dashboard Hub API", + "PURPOSE": "Comprehensive contract-driven tests for Dashboard Hub API", "LAYER": "Domain (Tests)", - "SEMANTICS": "tests, dashboards, api, contract" + "SEMANTICS": "tests, dashboards, api, contract, remediation", + "TEST_FIXTURE": "expected_count: 1" }, - "relations": [ - { - "type": "TESTS", - "target": "backend.src.api.routes.dashboards" - } - ], + "relations": [], "children": [ { - "name": "test_get_dashboards_success", + "name": "mock_deps", "type": "Function", - "tier": "STANDARD", - "start_line": 15, - "end_line": 53, + "tier": "TRIVIAL", + "start_line": 23, + "end_line": 23, "tags": { - "TEST": "GET /api/dashboards returns 200 and valid schema", - "PRE": "env_id exists", - "POST": "Response matches DashboardsResponse schema" + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [ - { - "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 15 - }, - { - "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 15 - }, - { - "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 15 - }, - { - "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 15 - } - ], - "score": 0.30000000000000004 + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboards_success", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 54, + "end_line": 54, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboards_with_search", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 83, + "end_line": 83, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboards_empty", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 99, + "end_line": 99, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboards_superset_failure", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 115, + "end_line": 115, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } }, { "name": "test_get_dashboards_env_not_found", "type": "Function", - "tier": "STANDARD", - "start_line": 55, - "end_line": 71, + "tier": "TRIVIAL", + "start_line": 129, + "end_line": 129, "tags": { - "TEST": "GET /api/dashboards returns 404 if env_id missing", - "PRE": "env_id does not exist", - "POST": "Returns 404 error" + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" }, "relations": [], "children": [], "compliance": { "valid": true, - "issues": [ - { - "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 55 - }, - { - "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 55 - }, - { - "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 55 - }, - { - "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 55 - } - ], - "score": 0.30000000000000004 + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboards_invalid_pagination", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 135, + "end_line": 135, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_database_mappings_success", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 152, + "end_line": 152, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_database_mappings_env_not_found", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 167, + "end_line": 167, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboard_detail_success", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 174, + "end_line": 174, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboard_detail_env_not_found", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 194, + "end_line": 194, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboard_tasks_history_success", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 201, + "end_line": 201, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboard_tasks_history_sorting", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 213, + "end_line": 213, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboard_thumbnail_success", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 240, + "end_line": 240, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboard_thumbnail_env_not_found", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 253, + "end_line": 253, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboard_thumbnail_202", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 258, + "end_line": 258, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_migrate_dashboards_success", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 279, + "end_line": 279, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_migrate_dashboards_pre_checks", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 291, + "end_line": 291, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_migrate_dashboards_env_not_found", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 299, + "end_line": 299, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_backup_dashboards_success", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 310, + "end_line": 310, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_backup_dashboards_pre_checks", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 321, + "end_line": 321, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_backup_dashboards_env_not_found", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 327, + "end_line": 327, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_backup_dashboards_with_schedule", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 336, + "end_line": 336, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_task_matches_dashboard_logic", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 356, + "end_line": 356, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 } } ], @@ -45578,7 +48455,7 @@ "type": "Test", "tier": "STANDARD", "start_line": 9, - "end_line": 78, + "end_line": 82, "tags": { "PURPOSE": "Verify GET /api/dashboards contract compliance", "TEST": "Search filter works" @@ -45595,8 +48472,8 @@ "name": "test_datasets_api", "type": "Test", "tier": "STANDARD", - "start_line": 80, - "end_line": 123, + "start_line": 84, + "end_line": 127, "tags": { "PURPOSE": "Verify GET /api/datasets contract compliance", "TEST": "Negative - Service failure returns 503" @@ -45609,12 +48486,30 @@ "score": 1.0 } }, + { + "name": "test_pagination_boundaries", + "type": "Test", + "tier": "STANDARD", + "start_line": 130, + "end_line": 156, + "tags": { + "PURPOSE": "Verify pagination validation for GET endpoints", + "TEST": "page<1 and page_size>100 return 400" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "test_resource_hubs", "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 123, + "end_line": 156, "tags": { "PURPOSE": "Auto-generated module for backend/tests/test_resource_hubs.py", "TIER": "TRIVIAL", @@ -45644,8 +48539,8 @@ "name": "test_get_dashboards_success", "type": "Function", "tier": "TRIVIAL", - "start_line": 58, - "end_line": 58, + "start_line": 62, + "end_line": 62, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -45662,24 +48557,6 @@ "name": "test_get_dashboards_not_found", "type": "Function", "tier": "TRIVIAL", - "start_line": 67, - "end_line": 67, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "test_get_dashboards_search", - "type": "Function", - "tier": "TRIVIAL", "start_line": 71, "end_line": 71, "tags": { @@ -45694,12 +48571,30 @@ "score": 1.0 } }, + { + "name": "test_get_dashboards_search", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 75, + "end_line": 75, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "test_get_datasets_success", "type": "Function", "tier": "TRIVIAL", - "start_line": 87, - "end_line": 87, + "start_line": 91, + "end_line": 91, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -45716,24 +48611,6 @@ "name": "test_get_datasets_not_found", "type": "Function", "tier": "TRIVIAL", - "start_line": 100, - "end_line": 100, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "test_get_datasets_search", - "type": "Function", - "tier": "TRIVIAL", "start_line": 104, "end_line": 104, "tags": { @@ -45748,12 +48625,102 @@ "score": 1.0 } }, + { + "name": "test_get_datasets_search", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 108, + "end_line": 108, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "test_get_datasets_service_failure", "type": "Function", "tier": "TRIVIAL", - "start_line": 116, - "end_line": 116, + "start_line": 120, + "end_line": 120, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboards_pagination_zero_page", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 134, + "end_line": 134, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_dashboards_pagination_oversize", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 140, + "end_line": 140, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_datasets_pagination_zero_page", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 146, + "end_line": 146, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_datasets_pagination_oversize", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 151, + "end_line": 151, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL"