diff --git a/.ai/MODULE_MAP.md b/.ai/MODULE_MAP.md index b3e2481..f7ee076 100644 --- a/.ai/MODULE_MAP.md +++ b/.ai/MODULE_MAP.md @@ -2,12 +2,12 @@ > High-level module structure for AI Context. Generated automatically. -**Generated:** 2026-02-24T21:04:43.328895 +**Generated:** 2026-02-25T20:19:23.587354 ## Summary -- **Total Modules:** 74 -- **Total Entities:** 1571 +- **Total Modules:** 77 +- **Total Entities:** 1811 ## Module Hierarchy @@ -54,9 +54,9 @@ ### πŸ“ `routes/` - πŸ—οΈ **Layers:** API, UI (API) - - πŸ“Š **Tiers:** CRITICAL: 2, STANDARD: 182, TRIVIAL: 4 + - πŸ“Š **Tiers:** CRITICAL: 2, STANDARD: 187, TRIVIAL: 5 - πŸ“„ **Files:** 17 - - πŸ“¦ **Entities:** 188 + - πŸ“¦ **Entities:** 194 **Key Entities:** @@ -92,9 +92,9 @@ ### πŸ“ `__tests__/` - πŸ—οΈ **Layers:** API, Domain (Tests), UI (API Tests) - - πŸ“Š **Tiers:** CRITICAL: 3, STANDARD: 33, TRIVIAL: 81 - - πŸ“„ **Files:** 7 - - πŸ“¦ **Entities:** 117 + - πŸ“Š **Tiers:** CRITICAL: 3, STANDARD: 36, TRIVIAL: 98 + - πŸ“„ **Files:** 8 + - πŸ“¦ **Entities:** 137 **Key Entities:** @@ -126,9 +126,9 @@ ### πŸ“ `core/` - πŸ—οΈ **Layers:** Core - - πŸ“Š **Tiers:** STANDARD: 116, TRIVIAL: 7 - - πŸ“„ **Files:** 9 - - πŸ“¦ **Entities:** 123 + - πŸ“Š **Tiers:** CRITICAL: 2, STANDARD: 125, TRIVIAL: 8 + - πŸ“„ **Files:** 10 + - πŸ“¦ **Entities:** 135 **Key Entities:** @@ -138,6 +138,8 @@ - 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) @@ -150,8 +152,6 @@ - Scans a specified directory for Python modules, dynamically ... - β„‚ **SchedulerService** (Class) - Provides a service to manage scheduled backup tasks. - - β„‚ **SessionLocal** (Class) `[TRIVIAL]` - - A session factory for the main mappings database. **Dependencies:** @@ -159,7 +159,7 @@ - πŸ”— DEPENDS_ON -> ConfigModels - πŸ”— DEPENDS_ON -> PyYAML - πŸ”— DEPENDS_ON -> backend.src.core.auth.config - - πŸ”— DEPENDS_ON -> backend.src.models.mapping + - πŸ”— DEPENDS_ON -> backend.src.core.logger ### πŸ“ `auth/` @@ -210,9 +210,9 @@ ### πŸ“ `__tests__/` - πŸ—οΈ **Layers:** Infra - - πŸ“Š **Tiers:** STANDARD: 9 + - πŸ“Š **Tiers:** STANDARD: 11, TRIVIAL: 1 - πŸ“„ **Files:** 1 - - πŸ“¦ **Entities:** 9 + - πŸ“¦ **Entities:** 12 **Key Entities:** @@ -296,9 +296,9 @@ ### πŸ“ `models/` - πŸ—οΈ **Layers:** Domain, Model - - πŸ“Š **Tiers:** CRITICAL: 9, STANDARD: 21, TRIVIAL: 21 + - πŸ“Š **Tiers:** CRITICAL: 9, STANDARD: 22, TRIVIAL: 22 - πŸ“„ **Files:** 11 - - πŸ“¦ **Entities:** 51 + - πŸ“¦ **Entities:** 53 **Key Entities:** @@ -334,14 +334,16 @@ ### πŸ“ `__tests__/` - πŸ—οΈ **Layers:** Domain - - πŸ“Š **Tiers:** STANDARD: 1, TRIVIAL: 1 - - πŸ“„ **Files:** 1 - - πŸ“¦ **Entities:** 2 + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 1, TRIVIAL: 27 + - πŸ“„ **Files:** 2 + - πŸ“¦ **Entities:** 29 **Key Entities:** - πŸ“¦ **test_models** (Module) `[TRIVIAL]` - Unit tests for data models + - πŸ“¦ **test_report_models** (Module) `[CRITICAL]` + - Unit tests for report Pydantic models and their validators ### πŸ“ `plugins/` @@ -483,9 +485,9 @@ ### πŸ“ `scripts/` - πŸ—οΈ **Layers:** Scripts, Unknown - - πŸ“Š **Tiers:** STANDARD: 17, TRIVIAL: 2 - - πŸ“„ **Files:** 5 - - πŸ“¦ **Entities:** 19 + - πŸ“Š **Tiers:** STANDARD: 26, TRIVIAL: 2 + - πŸ“„ **Files:** 6 + - πŸ“¦ **Entities:** 28 **Key Entities:** @@ -497,6 +499,8 @@ - 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... @@ -540,17 +544,21 @@ ### πŸ“ `__tests__/` - - πŸ—οΈ **Layers:** Domain Tests, Service - - πŸ“Š **Tiers:** STANDARD: 14 - - πŸ“„ **Files:** 2 - - πŸ“¦ **Entities:** 14 + - πŸ—οΈ **Layers:** Domain, Domain Tests, Service + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 21, TRIVIAL: 7 + - πŸ“„ **Files:** 3 + - πŸ“¦ **Entities:** 29 **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) `[CRITICAL]` + - Unit tests for EncryptionManager encrypt/decrypt functionali... **Dependencies:** @@ -584,41 +592,63 @@ ### πŸ“ `__tests__/` - - πŸ—οΈ **Layers:** Domain (Tests) - - πŸ“Š **Tiers:** CRITICAL: 1, TRIVIAL: 2 - - πŸ“„ **Files:** 1 - - πŸ“¦ **Entities:** 3 + - πŸ—οΈ **Layers:** Domain, Domain (Tests) + - πŸ“Š **Tiers:** CRITICAL: 2, TRIVIAL: 19 + - πŸ“„ **Files:** 2 + - πŸ“¦ **Entities:** 21 **Key Entities:** - πŸ“¦ **backend.tests.test_report_normalizer** (Module) `[CRITICAL]` - Validate unknown task type fallback and partial payload norm... + - πŸ“¦ **test_report_service** (Module) `[CRITICAL]` + - Unit tests for ReportsService list/detail operations ### πŸ“ `tests/` - - πŸ—οΈ **Layers:** Domain (Tests), Test, Unknown - - πŸ“Š **Tiers:** STANDARD: 54, TRIVIAL: 19 - - πŸ“„ **Files:** 7 - - πŸ“¦ **Entities:** 73 + - πŸ—οΈ **Layers:** Core, Domain (Tests), Test, Unknown + - πŸ“Š **Tiers:** CRITICAL: 6, STANDARD: 80, TRIVIAL: 57 + - πŸ“„ **Files:** 10 + - πŸ“¦ **Entities:** 143 **Key Entities:** - - β„‚ **TestLogPersistence** (Class) + - β„‚ **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) - Contract-driven tests for Dashboard Hub API - πŸ“¦ **test_auth** (Module) `[TRIVIAL]` - Auto-generated module for backend/tests/test_auth.py - - πŸ“¦ **test_log_persistence** (Module) + - πŸ“¦ **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_task_logger** (Module) - - Unit tests for TaskLogger and TaskContext. + - πŸ“¦ **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/` @@ -650,6 +680,18 @@ - 🧩 **TaskList** (Component) - Displays a list of tasks with their status and execution det... + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** UI (Tests) + - πŸ“Š **Tiers:** CRITICAL: 1 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 1 + + **Key Entities:** + + - πŸ“¦ **frontend.src.components.__tests__.task_log_viewer** (Module) `[CRITICAL]` + - Unit tests for TaskLogViewer component by mounting it and ob... + ### πŸ“ `auth/` - πŸ—οΈ **Layers:** Component @@ -811,6 +853,24 @@ - πŸ”— DEPENDS_ON -> [DEF:api_module] - πŸ”— DEPENDS_ON -> frontend.src.lib.api.api_module + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** Infra (Tests) + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 3 + - πŸ“„ **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) `[CRITICAL]` + - Unit tests for reports API client functions: query string bu... + ### πŸ“ `auth/` - πŸ—οΈ **Layers:** Feature @@ -1027,9 +1087,15 @@ ### πŸ“ `mocks/` - - πŸ“Š **Tiers:** STANDARD: 3 - - πŸ“„ **Files:** 3 - - πŸ“¦ **Entities:** 3 + - πŸ—οΈ **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/` @@ -1148,9 +1214,9 @@ ### πŸ“ `dashboards/` - πŸ—οΈ **Layers:** UI, Unknown - - πŸ“Š **Tiers:** CRITICAL: 1, TRIVIAL: 27 + - πŸ“Š **Tiers:** CRITICAL: 1, TRIVIAL: 37 - πŸ“„ **Files:** 1 - - πŸ“¦ **Entities:** 28 + - πŸ“¦ **Entities:** 38 **Key Entities:** @@ -1259,9 +1325,9 @@ ### πŸ“ `settings/` - πŸ—οΈ **Layers:** UI, Unknown - - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 1, TRIVIAL: 14 + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 1, TRIVIAL: 23 - πŸ“„ **Files:** 2 - - πŸ“¦ **Entities:** 16 + - πŸ“¦ **Entities:** 25 **Key Entities:** @@ -1445,10 +1511,13 @@ graph TD __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 @@ -1461,9 +1530,12 @@ graph TD 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 @@ -1483,6 +1555,7 @@ graph TD 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 @@ -1493,7 +1566,11 @@ graph TD reports-->|DEPENDS_ON|backend reports-->|DEPENDS_ON|backend __tests__-->|TESTS|backend + __tests__-->|TESTS|backend tests-->|TESTS|backend + tests-->|TESTS|backend + core-->|VERIFIES|backend + core-->|VERIFIES|backend __tests__-->|VERIFIES|components __tests__-->|VERIFIES|lib __tests__-->|VERIFIES|lib diff --git a/.ai/PROJECT_MAP.md b/.ai/PROJECT_MAP.md index 853a508..348a6cd 100644 --- a/.ai/PROJECT_MAP.md +++ b/.ai/PROJECT_MAP.md @@ -280,6 +280,9 @@ - πŸ“ 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 @@ -308,6 +311,16 @@ - πŸ“ Retrieve paginated assistant conversation history. - Ζ’ **getAssistantConversations** (`Function`) - πŸ“ Retrieve paginated conversation list for assistant sidebar/history switcher. +- πŸ“¦ **frontend.src.lib.api.__tests__.reports_api** (`Module`) `[CRITICAL]` + - πŸ“ 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 @@ -696,7 +709,8 @@ - πŸ—οΈ Layer: UI - πŸ”’ Invariant: Shows both local login form and ADFS SSO button. - ⬅️ READS_FROM `app` - - ⬅️ READS_FROM `auth` + - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `t` - Ζ’ **handleLogin** (`Function`) - πŸ“ Submits the local login form to the backend. - Ζ’ **handleADFSLogin** (`Function`) @@ -765,6 +779,26 @@ - πŸ“ 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]` @@ -789,8 +823,8 @@ - πŸ—οΈ Layer: Domain - πŸ”’ Invariant: Only accessible by users with Admin role. - ⬅️ READS_FROM `lib` - - ⬅️ READS_FROM `t` - ➑️ WRITES_TO `t` + - ⬅️ READS_FROM `t` - Ζ’ **loadData** (`Function`) - πŸ“ Fetches roles and available permissions. - Ζ’ **openCreateModal** (`Function`) @@ -806,8 +840,8 @@ - πŸ—οΈ Layer: Feature - πŸ”’ Invariant: Only accessible by users with "admin:users" permission. - ⬅️ READS_FROM `lib` - - ⬅️ READS_FROM `t` - ➑️ WRITES_TO `t` + - ⬅️ READS_FROM `t` - Ζ’ **loadData** (`Function`) - πŸ“ Fetches users and roles from the backend. - Ζ’ **openCreateModal** (`Function`) @@ -905,10 +939,12 @@ - πŸ“ 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 @@ -916,6 +952,12 @@ - πŸ“¦ **+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]` @@ -928,7 +970,19 @@ - πŸ“ Auto-detected function (orphan) - Ζ’ **handleTabChange** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) - - Ζ’ **getTabClass** (`Function`) `[TRIVIAL]` + - Ζ’ **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) @@ -947,6 +1001,8 @@ - 🧩 **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`) @@ -954,6 +1010,8 @@ - πŸ—οΈ 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`) @@ -983,6 +1041,8 @@ - πŸ“ 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`) @@ -1084,7 +1144,9 @@ - πŸ—οΈ 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`) @@ -1161,6 +1223,7 @@ - πŸ—οΈ Layer: UI - ⬅️ READS_FROM `selectedTask` - ➑️ WRITES_TO `selectedTask` + - ⬅️ READS_FROM `t` - Ζ’ **fetchTasks** (`Function`) - πŸ“ Fetches the list of recent tasks from the API. - Ζ’ **clearTasks** (`Function`) @@ -1180,9 +1243,9 @@ - 🧩 **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 `selectedTask` - - ➑️ WRITES_TO `taskLogs` + - ➑️ WRITES_TO `t` - Ζ’ **connect** (`Function`) - πŸ“ Establishes WebSocket connection with exponential backoff and filter parameters. - Ζ’ **handleFilterChange** (`Function`) @@ -1285,6 +1348,10 @@ - πŸ—οΈ Layer: Unknown - Ζ’ **statusColor** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **frontend.src.components.__tests__.task_log_viewer** (`Module`) `[CRITICAL]` + - πŸ“ 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 @@ -1538,6 +1605,26 @@ - πŸ“ 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 @@ -1679,6 +1766,8 @@ - πŸ“ 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]` @@ -1854,10 +1943,16 @@ - πŸ”— 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, and re-packages. + - πŸ“ 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 @@ -1881,6 +1976,26 @@ - β„‚ **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 @@ -2108,6 +2223,12 @@ - πŸ“ 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 @@ -2429,6 +2550,14 @@ - πŸ“ 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) @@ -2611,6 +2740,8 @@ - πŸ“ 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`) @@ -2631,6 +2762,8 @@ - πŸ“ 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 @@ -2702,9 +2835,14 @@ - πŸ“¦ **DashboardChartItem** (`DataClass`) - πŸ“¦ **DashboardDatasetItem** (`DataClass`) - πŸ“¦ **DashboardDetailResponse** (`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` @@ -2719,11 +2857,6 @@ - πŸ“ Trigger bulk backup of dashboards with optional cron schedule - πŸ”— DISPATCHES -> `BackupPlugin` - πŸ”— CALLS -> `task_manager.create_task` - - πŸ“¦ **DatabaseMapping** (`DataClass`) - - πŸ“¦ **DatabaseMappingsResponse** (`DataClass`) - - Ζ’ **get_database_mappings** (`Function`) - - πŸ“ Get database mapping suggestions between source and target environments - - πŸ”— CALLS -> `MappingService.get_suggestions` - πŸ“¦ **backend.src.api.routes.__tests__.test_dashboards** (`Module`) - πŸ“ Unit tests for Dashboards API endpoints - πŸ—οΈ Layer: API @@ -2910,14 +3043,18 @@ - πŸ“ 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_missing_dashboard_returns_needs_clarification** (`Function`) - - πŸ“ LLM validation command without resolvable dashboard id must request clarification instead of generic failure. - - Ζ’ **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_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. - Ζ’ **__init__** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) - Ζ’ **__init__** (`Function`) `[TRIVIAL]` @@ -2958,6 +3095,43 @@ - πŸ“ 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) - πŸ“¦ **backend.src.models.config** (`Module`) - πŸ“ Defines database schema for persisted application configuration. - πŸ—οΈ Layer: Domain @@ -3005,6 +3179,8 @@ - πŸ—οΈ 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`) @@ -3013,6 +3189,8 @@ - πŸ“ 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 @@ -3098,6 +3276,61 @@ - πŸ—οΈ Layer: Domain - Ζ’ **test_environment_model** (`Function`) - πŸ“ Tests that Environment model correctly stores values. +- πŸ“¦ **test_report_models** (`Module`) `[CRITICAL]` + - πŸ“ 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 @@ -3253,6 +3486,38 @@ - πŸ“ 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`) `[CRITICAL]` + - πŸ“ 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 @@ -3341,6 +3606,43 @@ - πŸ“ Return filtered, sorted, paginated report collection. - Ζ’ **get_report_detail** (`Function`) - πŸ“ Return one normalized report with timeline/diagnostics/next actions. +- πŸ“¦ **test_report_service** (`Module`) `[CRITICAL]` + - πŸ“ 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`) `[CRITICAL]` - πŸ“ Validate unknown task type fallback and partial payload normalization behavior. - πŸ—οΈ Layer: Domain (Tests) @@ -3633,8 +3935,139 @@ - πŸ—οΈ 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`) - πŸ“ Contract-driven tests for Dashboard Hub API - πŸ—οΈ Layer: Domain (Tests) @@ -3714,6 +4147,13 @@ - πŸ“ 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`) @@ -3751,23 +4191,23 @@ - πŸ“ Auto-detected function (orphan) - Ζ’ **test_ad_group_mapping** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) -- πŸ“¦ **test_log_persistence** (`Module`) +- πŸ“¦ **test_log_persistence** (`Module`) `[CRITICAL]` - πŸ“ Unit tests for TaskLogPersistenceService. - πŸ—οΈ Layer: Test - - β„‚ **TestLogPersistence** (`Class`) + - β„‚ **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. - - Ζ’ **teardown_method** (`Function`) - - πŸ“ Cleanup after each test method. - - Ζ’ **test_add_log_single** (`Function`) + - πŸ“ Setup for each test method β€” clean task_logs table. + - Ζ’ **test_add_logs_single** (`Function`) - πŸ“ Test adding a single log entry. - - Ζ’ **test_add_log_batch** (`Function`) + - Ζ’ **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`) @@ -3778,7 +4218,82 @@ - πŸ“ Test retrieving logs with search query. - Ζ’ **test_get_log_stats** (`Function`) - πŸ“ Test retrieving log statistics. - - Ζ’ **test_get_log_sources** (`Function`) + - Ζ’ **test_get_sources** (`Function`) - πŸ“ Test retrieving unique log sources. - - Ζ’ **test_delete_logs_by_task_id** (`Function`) + - Ζ’ **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/backend/src/api/routes/dashboards.py b/backend/src/api/routes/dashboards.py index 69d2922..64f6458 100644 --- a/backend/src/api/routes/dashboards.py +++ b/backend/src/api/routes/dashboards.py @@ -24,7 +24,9 @@ router = APIRouter(prefix="/api/dashboards", tags=["Dashboards"]) # [DEF:GitStatus:DataClass] class GitStatus(BaseModel): branch: Optional[str] = None - sync_status: Optional[str] = Field(None, pattern="^OK|DIFF$") + sync_status: Optional[str] = Field(None, pattern="^OK|DIFF|NO_REPO|ERROR$") + has_repo: Optional[bool] = None + has_changes_for_commit: Optional[bool] = None # [/DEF:GitStatus:DataClass] # [DEF:LastTask:DataClass] diff --git a/backend/src/core/superset_client.py b/backend/src/core/superset_client.py index 351909a..5fbf196 100644 --- a/backend/src/core/superset_client.py +++ b/backend/src/core/superset_client.py @@ -788,7 +788,9 @@ class SupersetClient: # @POST: Returns a dictionary with at least page and page_size. def _validate_query_params(self, query: Optional[Dict]) -> Dict: with belief_scope("_validate_query_params"): - base_query = {"page": 0, "page_size": 1000} + # Superset list endpoints commonly cap page_size at 100. + # Using 100 avoids partial fetches when larger values are silently truncated. + base_query = {"page": 0, "page_size": 100} return {**base_query, **(query or {})} # [/DEF:_validate_query_params:Function] diff --git a/backend/src/services/resource_service.py b/backend/src/services/resource_service.py index 11825fb..9b1a437 100644 --- a/backend/src/services/resource_service.py +++ b/backend/src/services/resource_service.py @@ -161,7 +161,12 @@ class ResourceService: try: repo = self.git_service.get_repo(dashboard_id) if not repo: - return None + return { + 'branch': None, + 'sync_status': 'NO_REPO', + 'has_repo': False, + 'has_changes_for_commit': False + } # Check if there are uncommitted changes try: @@ -170,6 +175,7 @@ class ResourceService: # Check for uncommitted changes is_dirty = repo.is_dirty() + has_changes_for_commit = repo.is_dirty(untracked_files=True) # Check for unpushed commits unpushed = len(list(repo.iter_commits(f'{branch}@{{u}}..{branch}'))) if '@{u}' in str(repo.refs) else 0 @@ -181,14 +187,26 @@ class ResourceService: return { 'branch': branch, - 'sync_status': sync_status + 'sync_status': sync_status, + 'has_repo': True, + 'has_changes_for_commit': has_changes_for_commit } except Exception: logger.warning(f"[ResourceService][Warning] Failed to get git status for dashboard {dashboard_id}") - return None + return { + 'branch': None, + 'sync_status': 'ERROR', + 'has_repo': True, + 'has_changes_for_commit': False + } except Exception: # No repo exists for this dashboard - return None + return { + 'branch': None, + 'sync_status': 'NO_REPO', + 'has_repo': False, + 'has_changes_for_commit': False + } # [/DEF:_get_git_status_for_dashboard:Function] # [DEF:_get_last_task_for_resource:Function] diff --git a/frontend/src/lib/i18n/locales/en.json b/frontend/src/lib/i18n/locales/en.json index afc3a41..5ddf210 100644 --- a/frontend/src/lib/i18n/locales/en.json +++ b/frontend/src/lib/i18n/locales/en.json @@ -359,6 +359,10 @@ "task_done": "Done", "task_failed": "Failed", "task_waiting": "Waiting", + "status_repo": "Repo linked", + "status_no_repo": "No repo", + "status_changes": "Changes pending", + "status_no_changes": "No changes", "status_synced": "Synced", "status_diff": "Diff", "status_error": "Error", diff --git a/frontend/src/lib/i18n/locales/ru.json b/frontend/src/lib/i18n/locales/ru.json index 1b89af7..abca7a9 100644 --- a/frontend/src/lib/i18n/locales/ru.json +++ b/frontend/src/lib/i18n/locales/ru.json @@ -357,6 +357,10 @@ "task_done": "Π“ΠΎΡ‚ΠΎΠ²ΠΎ", "task_failed": "Ошибка", "task_waiting": "ОТиданиС", + "status_repo": "Π•ΡΡ‚ΡŒ Ρ€Π΅ΠΏΠΎ", + "status_no_repo": "НСт Ρ€Π΅ΠΏΠΎ", + "status_changes": "Π•ΡΡ‚ΡŒ измСнСния", + "status_no_changes": "НСт ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ", "status_synced": "Π‘ΠΈΠ½Ρ…Ρ€ΠΎΠ½ΠΈΠ·ΠΈΡ€ΠΎΠ²Π°Π½ΠΎ", "status_diff": "Различия", "status_error": "Ошибка", diff --git a/frontend/src/routes/dashboards/+page.svelte b/frontend/src/routes/dashboards/+page.svelte index ef7daa6..a20744b 100644 --- a/frontend/src/routes/dashboards/+page.svelte +++ b/frontend/src/routes/dashboards/+page.svelte @@ -23,6 +23,8 @@ import { openDrawerForTask } from "$lib/stores/taskDrawer.js"; import { api } from "$lib/api.js"; import { debounce } from "$lib/utils/debounce.js"; + import { addToast } from "$lib/toasts.js"; + import { gitService } from "../../services/gitService.js"; import MappingTable from "$components/MappingTable.svelte"; // State @@ -65,6 +67,8 @@ // Validation state let validatingIds = new Set(); + let gitBusyIds = new Set(); + let cachedGitConfigs = []; // Environment options - will be loaded from API let environments = []; @@ -142,7 +146,12 @@ id: d.id, title: d.title, slug: d.slug, - gitStatus: d.git_status?.sync_status?.toLowerCase() || null, + git: { + status: d.git_status?.sync_status?.toLowerCase() || "no_repo", + branch: d.git_status?.branch || null, + hasRepo: d.git_status?.has_repo === true, + hasChangesForCommit: d.git_status?.has_changes_for_commit === true, + }, lastTask: d.last_task ? { status: d.last_task.status?.toLowerCase() || null, @@ -510,6 +519,147 @@ } } + function isGitBusy(dashboardId) { + return gitBusyIds.has(dashboardId); + } + + function setGitBusy(dashboardId, busy) { + if (busy) { + gitBusyIds.add(dashboardId); + } else { + gitBusyIds.delete(dashboardId); + } + gitBusyIds = new Set(gitBusyIds); + } + + async function ensureGitConfigs() { + if (cachedGitConfigs.length > 0) return cachedGitConfigs; + cachedGitConfigs = await gitService.getConfigs(); + return cachedGitConfigs; + } + + function updateDashboardGitState(dashboardId, nextGit) { + dashboards = dashboards.map((dashboard) => + dashboard.id === dashboardId + ? { ...dashboard, git: { ...dashboard.git, ...nextGit } } + : dashboard, + ); + } + + async function refreshDashboardGitState(dashboardId) { + try { + const status = await gitService.getStatus(dashboardId); + updateDashboardGitState(dashboardId, { + status: status?.is_dirty ? "diff" : "ok", + branch: status?.current_branch || null, + hasRepo: true, + hasChangesForCommit: Boolean(status?.is_dirty), + }); + } catch (_err) { + updateDashboardGitState(dashboardId, { + status: "no_repo", + branch: null, + hasRepo: false, + hasChangesForCommit: false, + }); + } + } + + async function handleGitInit(dashboard) { + setGitBusy(dashboard.id, true); + try { + const configs = await ensureGitConfigs(); + if (!configs.length) { + addToast($t.git?.no_servers_configured || "No Git config found", "error"); + return; + } + + const config = configs[0]; + const defaultRemote = config?.default_repository + ? `${String(config.url || "").replace(/\/$/, "")}/${config.default_repository}.git` + : ""; + const remoteUrl = prompt($t.git?.remote_url || "Remote URL", defaultRemote); + if (!remoteUrl) return; + + await gitService.initRepository(dashboard.id, config.id, remoteUrl.trim()); + addToast($t.git?.init_success || "Repository initialized", "success"); + await refreshDashboardGitState(dashboard.id); + } catch (err) { + addToast(err?.message || "Git init failed", "error"); + } finally { + setGitBusy(dashboard.id, false); + } + } + + async function handleGitSync(dashboard) { + setGitBusy(dashboard.id, true); + try { + await gitService.sync(dashboard.id, selectedEnv || null); + addToast($t.git?.sync_success || "Synced", "success"); + await refreshDashboardGitState(dashboard.id); + } catch (err) { + addToast(err?.message || "Git sync failed", "error"); + } finally { + setGitBusy(dashboard.id, false); + } + } + + async function handleGitCommit(dashboard) { + if (!dashboard.git?.hasRepo) { + addToast($t.git?.not_linked || "Repository not linked", "error"); + return; + } + if (!dashboard.git?.hasChangesForCommit) { + addToast($t.git?.nothing_to_commit || "No changes to commit", "error"); + return; + } + + const message = prompt( + $t.git?.commit_message || "Commit message", + `Update dashboard ${dashboard.title}`, + ); + if (!message?.trim()) return; + + setGitBusy(dashboard.id, true); + try { + await gitService.commit(dashboard.id, message.trim()); + addToast($t.git?.commit_success || "Committed", "success"); + await refreshDashboardGitState(dashboard.id); + } catch (err) { + addToast(err?.message || "Git commit failed", "error"); + } finally { + setGitBusy(dashboard.id, false); + } + } + + async function handleGitPull(dashboard) { + if (!dashboard.git?.hasRepo) return; + setGitBusy(dashboard.id, true); + try { + await gitService.pull(dashboard.id); + addToast($t.git?.pull_success || "Pulled", "success"); + await refreshDashboardGitState(dashboard.id); + } catch (err) { + addToast(err?.message || "Git pull failed", "error"); + } finally { + setGitBusy(dashboard.id, false); + } + } + + async function handleGitPush(dashboard) { + if (!dashboard.git?.hasRepo) return; + setGitBusy(dashboard.id, true); + try { + await gitService.push(dashboard.id); + addToast($t.git?.push_success || "Pushed", "success"); + await refreshDashboardGitState(dashboard.id); + } catch (err) { + addToast(err?.message || "Git push failed", "error"); + } finally { + setGitBusy(dashboard.id, false); + } + } + // Get task status icon function getTaskStatusIcon(status) { if (!status) return ""; @@ -736,19 +886,24 @@
- {#if dashboard.gitStatus} +
- {#if dashboard.gitStatus.toLowerCase() === "ok"} - βœ“ {$t.dashboard?.status_synced } - {:else if dashboard.gitStatus.toLowerCase() === "diff"} - ! {$t.dashboard?.status_diff } - {/if} + {dashboard.git?.hasRepo + ? ($t.dashboard?.status_repo || "Repo") + : ($t.dashboard?.status_no_repo || "No Repo")} - {:else} - - - {/if} + {#if dashboard.git?.hasRepo} + + {dashboard.git?.hasChangesForCommit + ? ($t.dashboard?.status_changes || "Diff") + : ($t.dashboard?.status_no_changes || "Synced")} + + {/if} +
@@ -785,6 +940,73 @@
+ {#if !dashboard.git?.hasRepo} + + {:else} + + + + + {/if} +
+ {:else if activeTab === "git"} + + {:else if activeTab === "llm"}
diff --git a/semantics/semantic_map.json b/semantics/semantic_map.json index 3d81f65..e162592 100644 --- a/semantics/semantic_map.json +++ b/semantics/semantic_map.json @@ -1,6 +1,6 @@ { "project_root": ".", - "generated_at": "2026-02-24T21:04:43.210838", + "generated_at": "2026-02-25T20:19:23.427050", "modules": [ { "name": "backend.src.services.reports.report_service", @@ -2596,6 +2596,31 @@ "score": 1.0 } }, + { + "name": "mock_env_public", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 6, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Mock for $env/static/public SvelteKit module in vitest", + "LAYER": "UI (Tests)" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @SEMANTICS (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.775 + } + }, { "name": "frontend.src.lib.api.reports", "type": "Module", @@ -2876,6 +2901,123 @@ "score": 1.0 } }, + { + "name": "frontend.src.lib.api.__tests__.reports_api", + "type": "Module", + "tier": "CRITICAL", + "start_line": 1, + "end_line": 213, + "tags": { + "TIER": "CRITICAL", + "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)", + "INVARIANT": "Pure functions produce deterministic output. Async wrappers propagate structured errors." + }, + "relations": [ + { + "type": "TESTS", + "target": "frontend.src.lib.api.reports" + } + ], + "children": [ + { + "name": "TestBuildReportQueryString", + "type": "Class", + "tier": "STANDARD", + "start_line": 30, + "end_line": 95, + "tags": { + "PURPOSE": "Validate query string construction from filter options.", + "PRE": "Options object with various filter fields.", + "POST": "Correct URLSearchParams string produced." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 30 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 30 + } + ], + "score": 0.5499999999999999 + } + }, + { + "name": "TestNormalizeApiError", + "type": "Class", + "tier": "STANDARD", + "start_line": 97, + "end_line": 130, + "tags": { + "PURPOSE": "Validate error normalization for UI-state mapping.", + "PRE": "Various error types (Error, string, object).", + "POST": "Always returns {message, code, retryable} object." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + } + ], + "score": 0.5499999999999999 + } + }, + { + "name": "TestGetReportsAsync", + "type": "Class", + "tier": "STANDARD", + "start_line": 132, + "end_line": 211, + "tags": { + "PURPOSE": "Validate getReports and getReportDetail with mocked api.fetchApi.", + "PRE": "api.fetchApi is mocked via vi.mock.", + "POST": "Functions call correct endpoints and propagate results/errors." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 132 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 132 + } + ], + "score": 0.5499999999999999 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "Select", "type": "Component", @@ -3224,7 +3366,7 @@ "type": "Component", "tier": "CRITICAL", "start_line": 1, - "end_line": 702, + "end_line": 717, "tags": { "TIER": "CRITICAL", "PURPOSE": "Slide-out assistant chat panel for natural language command execution and task tracking.", @@ -3398,7 +3540,7 @@ "type": "Function", "tier": "STANDARD", "start_line": 368, - "end_line": 412, + "end_line": 420, "tags": { "PURPOSE": "Execute assistant action button behavior (open task/reports, confirm, cancel).", "PRE": "action object is produced by assistant response contract.", @@ -3417,8 +3559,8 @@ "name": "handleKeydown", "type": "Function", "tier": "STANDARD", - "start_line": 414, - "end_line": 427, + "start_line": 422, + "end_line": 435, "tags": { "PURPOSE": "Submit command by Enter while preserving multiline input with Shift+Enter.", "PRE": "Keyboard event received from chat input.", @@ -3436,8 +3578,8 @@ "name": "stateClass", "type": "Function", "tier": "STANDARD", - "start_line": 429, - "end_line": 448, + "start_line": 437, + "end_line": 456, "tags": { "PURPOSE": "Map assistant state to visual badge style class.", "PRE": "state is a nullable assistant state string.", @@ -3455,8 +3597,8 @@ "name": "handleHistoryScroll", "type": "Function", "tier": "STANDARD", - "start_line": 450, - "end_line": 464, + "start_line": 458, + "end_line": 472, "tags": { "PURPOSE": "Trigger lazy history fetch when user scroll reaches top boundary.", "PRE": "Scroll event emitted by history viewport container.", @@ -3520,47 +3662,132 @@ { "store": "t", "type": "READS_FROM", - "line": 487 + "line": 263 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 264 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 315 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 413 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 495 }, { "store": "t", "type": "WRITES_TO", - "line": 493 + "line": 501 }, { "store": "t", "type": "READS_FROM", - "line": 585 + "line": 512 }, { "store": "t", "type": "READS_FROM", - "line": 591 + "line": 518 }, { "store": "t", "type": "READS_FROM", - "line": 619 + "line": 529 }, { "store": "t", "type": "READS_FROM", - "line": 638 + "line": 538 }, { "store": "t", "type": "READS_FROM", - "line": 670 + "line": 571 }, { "store": "t", - "type": "WRITES_TO", + "type": "READS_FROM", + "line": 586 + }, + { + "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 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 620 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 621 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 629 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 642 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 648 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 681 + }, + { + "store": "t", + "type": "READS_FROM", "line": 685 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 700 + }, { "store": "t", "type": "READS_FROM", - "line": 694 + "line": 709 } ] }, @@ -3569,7 +3796,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 740, + "end_line": 755, "tags": { "PURPOSE": "Auto-generated module for frontend/src/lib/components/assistant/AssistantChatPanel.svelte", "TIER": "TRIVIAL", @@ -3873,6 +4100,16 @@ "type": "WRITES_TO", "line": 57 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 57 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 57 + }, { "store": "t", "type": "READS_FROM", @@ -4155,6 +4392,31 @@ "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", + "line": 44 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 45 + }, { "store": "t", "type": "WRITES_TO", @@ -4370,7 +4632,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 4, - "end_line": 72, + "end_line": 73, "tags": { "TIER": "CRITICAL", "SEMANTICS": "reports, ux-tests, card, states, recovery", @@ -4905,6 +5167,11 @@ "type": "WRITES_TO", "line": 109 }, + { + "store": "t", + "type": "READS_FROM", + "line": 122 + }, { "store": "t", "type": "WRITES_TO", @@ -6466,7 +6733,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 158, + "end_line": 160, "tags": { "TIER": "STANDARD", "SEMANTICS": "login, auth, ui, form", @@ -6481,8 +6748,8 @@ "name": "handleLogin", "type": "Function", "tier": "STANDARD", - "start_line": 24, - "end_line": 75, + "start_line": 25, + "end_line": 77, "tags": { "PURPOSE": "Submits the local login form to the backend.", "PRE": "Username and password are not empty.", @@ -6496,12 +6763,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 24 + "line_number": 25 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 24 + "line_number": 25 } ], "score": 0.7 @@ -6511,8 +6778,8 @@ "name": "handleADFSLogin", "type": "Function", "tier": "STANDARD", - "start_line": 77, - "end_line": 84, + "start_line": 79, + "end_line": 86, "tags": { "PURPOSE": "Redirects the user to the ADFS login endpoint." }, @@ -6524,32 +6791,32 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 77 + "line_number": 79 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 77 + "line_number": 79 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 77 + "line_number": 79 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 77 + "line_number": 79 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 77 + "line_number": 79 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 77 + "line_number": 79 } ], "score": 0.0 @@ -6567,10 +6834,70 @@ "type": "READS_FROM", "line": 17 }, + { + "store": "lib", + "type": "READS_FROM", + "line": 18 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 33 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 63 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 68 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 71 + }, { "store": "auth", "type": "READS_FROM", - "line": 87 + "line": 89 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 97 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 107 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 118 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 133 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 133 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 143 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 152 } ] }, @@ -6679,7 +7006,7 @@ "type": "Page", "tier": "CRITICAL", "start_line": 1, - "end_line": 1258, + "end_line": 1675, "tags": { "TIER": "CRITICAL", "PURPOSE": "Dashboard Hub - Central hub for managing dashboards with Git status and task actions", @@ -6703,7 +7030,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 1258, + "end_line": 1675, "tags": { "PURPOSE": "Auto-generated module for frontend/src/routes/dashboards/+page.svelte", "TIER": "TRIVIAL", @@ -6715,8 +7042,8 @@ "name": "handleDocumentClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 83, - "end_line": 83, + "start_line": 89, + "end_line": 89, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6733,8 +7060,8 @@ "name": "loadEnvironments", "type": "Function", "tier": "TRIVIAL", - "start_line": 95, - "end_line": 95, + "start_line": 101, + "end_line": 101, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6751,8 +7078,8 @@ "name": "loadDashboards", "type": "Function", "tier": "TRIVIAL", - "start_line": 118, - "end_line": 118, + "start_line": 124, + "end_line": 124, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6769,8 +7096,8 @@ "name": "handleEnvChange", "type": "Function", "tier": "TRIVIAL", - "start_line": 168, - "end_line": 168, + "start_line": 179, + "end_line": 179, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6787,42 +7114,6 @@ "name": "handleSearch", "type": "Function", "tier": "TRIVIAL", - "start_line": 176, - "end_line": 176, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "handlePageChange", - "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": "handlePageSizeChange", - "type": "Function", - "tier": "TRIVIAL", "start_line": 187, "end_line": 187, "tags": { @@ -6837,12 +7128,48 @@ "score": 1.0 } }, + { + "name": "handlePageChange", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 192, + "end_line": 192, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handlePageSizeChange", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 198, + "end_line": 198, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "updateSelectionState", "type": "Function", "tier": "TRIVIAL", - "start_line": 194, - "end_line": 194, + "start_line": 205, + "end_line": 205, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6859,24 +7186,6 @@ "name": "handleCheckboxChange", "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": "handleSelectAll", - "type": "Function", - "tier": "TRIVIAL", "start_line": 215, "end_line": 215, "tags": { @@ -6892,7 +7201,7 @@ } }, { - "name": "handleSelectVisible", + "name": "handleSelectAll", "type": "Function", "tier": "TRIVIAL", "start_line": 226, @@ -6910,7 +7219,7 @@ } }, { - "name": "toggleActionDropdown", + "name": "handleSelectVisible", "type": "Function", "tier": "TRIVIAL", "start_line": 237, @@ -6927,12 +7236,30 @@ "score": 1.0 } }, + { + "name": "toggleActionDropdown", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 248, + "end_line": 248, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "closeActionDropdown", "type": "Function", "tier": "TRIVIAL", - "start_line": 244, - "end_line": 244, + "start_line": 255, + "end_line": 255, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6949,8 +7276,8 @@ "name": "handleAction", "type": "Function", "tier": "TRIVIAL", - "start_line": 249, - "end_line": 249, + "start_line": 260, + "end_line": 260, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6967,8 +7294,8 @@ "name": "handleValidate", "type": "Function", "tier": "TRIVIAL", - "start_line": 293, - "end_line": 293, + "start_line": 304, + "end_line": 304, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6985,8 +7312,8 @@ "name": "handleTargetEnvChange", "type": "Function", "tier": "TRIVIAL", - "start_line": 327, - "end_line": 327, + "start_line": 342, + "end_line": 342, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7003,8 +7330,8 @@ "name": "loadDatabases", "type": "Function", "tier": "TRIVIAL", - "start_line": 340, - "end_line": 340, + "start_line": 355, + "end_line": 355, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7021,8 +7348,8 @@ "name": "handleMappingUpdate", "type": "Function", "tier": "TRIVIAL", - "start_line": 358, - "end_line": 358, + "start_line": 373, + "end_line": 373, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7039,8 +7366,8 @@ "name": "loadDbMappings", "type": "Function", "tier": "TRIVIAL", - "start_line": 365, - "end_line": 365, + "start_line": 380, + "end_line": 380, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7057,8 +7384,8 @@ "name": "handleBulkMigrate", "type": "Function", "tier": "TRIVIAL", - "start_line": 396, - "end_line": 396, + "start_line": 411, + "end_line": 411, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7075,8 +7402,8 @@ "name": "handleBulkBackup", "type": "Function", "tier": "TRIVIAL", - "start_line": 439, - "end_line": 439, + "start_line": 457, + "end_line": 457, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7093,8 +7420,8 @@ "name": "handleTaskStatusClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 476, - "end_line": 476, + "start_line": 494, + "end_line": 494, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7111,42 +7438,6 @@ "name": "navigateToDashboardDetail", "type": "Function", "tier": "TRIVIAL", - "start_line": 485, - "end_line": 485, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "getStatusBadgeClass", - "type": "Function", - "tier": "TRIVIAL", - "start_line": 490, - "end_line": 490, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "getTaskStatusIcon", - "type": "Function", - "tier": "TRIVIAL", "start_line": 503, "end_line": 503, "tags": { @@ -7161,12 +7452,228 @@ "score": 1.0 } }, + { + "name": "getStatusBadgeClass", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 510, + "end_line": 510, + "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": 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, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "ensureGitConfigs", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 535, + "end_line": 535, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "updateDashboardGitState", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 541, + "end_line": 541, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "refreshDashboardGitState", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 549, + "end_line": 549, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleGitInit", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 568, + "end_line": 568, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleGitSync", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 594, + "end_line": 594, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleGitCommit", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 607, + "end_line": 607, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleGitPull", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 635, + "end_line": 635, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "handleGitPush", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 649, + "end_line": 649, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "getTaskStatusIcon", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 664, + "end_line": 664, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "getPaginationRange", "type": "Function", "tier": "TRIVIAL", - "start_line": 520, - "end_line": 520, + "start_line": 681, + "end_line": 681, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7422,11 +7929,26 @@ "type": "READS_FROM", "line": 16 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 51 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 111 + }, { "store": "t", "type": "READS_FROM", "line": 124 }, + { + "store": "t", + "type": "READS_FROM", + "line": 132 + }, { "store": "t", "type": "WRITES_TO", @@ -7677,11 +8199,26 @@ "type": "READS_FROM", "line": 15 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 53 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 118 + }, { "store": "t", "type": "READS_FROM", "line": 135 }, + { + "store": "t", + "type": "READS_FROM", + "line": 144 + }, { "store": "t", "type": "WRITES_TO", @@ -7819,7 +8356,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 350, + "end_line": 356, "tags": { "TIER": "STANDARD", "SEMANTICS": "admin, adfs, mappings, configuration, logging", @@ -7856,7 +8393,7 @@ "type": "Function", "tier": "STANDARD", "start_line": 78, - "end_line": 108, + "end_line": 111, "tags": { "PURPOSE": "Submits a new AD Group to Role mapping to the backend.", "PRE": "'newMapping' object contains valid 'ad_group' and 'role_id'.", @@ -7876,8 +8413,8 @@ "name": "loadLoggingConfig", "type": "Function", "tier": "STANDARD", - "start_line": 110, - "end_line": 135, + "start_line": 113, + "end_line": 138, "tags": { "PURPOSE": "Fetches current logging configuration from the backend.", "PRE": "Component is mounted and user has active session.", @@ -7897,8 +8434,8 @@ "name": "saveLoggingConfig", "type": "Function", "tier": "STANDARD", - "start_line": 137, - "end_line": 162, + "start_line": 140, + "end_line": 168, "tags": { "PURPOSE": "Saves logging configuration to the backend.", "PRE": "loggingConfig contains valid values.", @@ -7929,58 +8466,143 @@ { "store": "t", "type": "WRITES_TO", - "line": 174 + "line": 70 }, { "store": "t", "type": "READS_FROM", - "line": 179 + "line": 92 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 105 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 106 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 160 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 161 }, { "store": "t", "type": "WRITES_TO", + "line": 180 + }, + { + "store": "t", + "type": "READS_FROM", "line": 185 }, { "store": "t", "type": "WRITES_TO", - "line": 189 + "line": 191 }, { "store": "t", "type": "WRITES_TO", - "line": 197 + "line": 195 }, { "store": "t", "type": "WRITES_TO", - "line": 198 + "line": 203 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 204 }, { "store": "t", "type": "READS_FROM", - "line": 219 + "line": 225 }, { "store": "t", "type": "WRITES_TO", - "line": 300 + "line": 237 }, { "store": "t", "type": "WRITES_TO", - "line": 303 + "line": 241 }, { "store": "t", "type": "WRITES_TO", - "line": 311 + "line": 247 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 256 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 260 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 269 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 281 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 284 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 292 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 292 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 295 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 306 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 309 }, { "store": "t", "type": "WRITES_TO", "line": 314 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 317 + }, { "store": "t", "type": "WRITES_TO", @@ -7988,13 +8610,18 @@ }, { "store": "t", - "type": "READS_FROM", - "line": 332 + "type": "WRITES_TO", + "line": 326 }, { "store": "t", "type": "READS_FROM", "line": 338 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 344 } ] }, @@ -8003,7 +8630,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 314, + "end_line": 315, "tags": { "TIER": "STANDARD", "SEMANTICS": "admin, llm, settings, provider, configuration", @@ -8031,108 +8658,118 @@ }, { "store": "t", - "type": "READS_FROM", - "line": 141 + "type": "WRITES_TO", + "line": 126 }, { "store": "t", "type": "READS_FROM", - "line": 144 + "line": 128 }, { "store": "t", "type": "READS_FROM", - "line": 151 + "line": 142 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 145 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 152 }, { "store": "t", "type": "WRITES_TO", - "line": 158 + "line": 159 }, { "store": "t", "type": "READS_FROM", - "line": 169 + "line": 170 }, { "store": "t", "type": "WRITES_TO", - "line": 175 + "line": 176 }, { "store": "t", "type": "READS_FROM", - "line": 184 + "line": 185 }, { "store": "t", "type": "READS_FROM", - "line": 187 + "line": 188 }, { "store": "t", "type": "READS_FROM", - "line": 194 + "line": 195 }, { "store": "t", "type": "WRITES_TO", - "line": 201 + "line": 202 }, { "store": "t", "type": "READS_FROM", - "line": 210 + "line": 211 }, { "store": "t", "type": "READS_FROM", - "line": 218 + "line": 219 }, { "store": "t", "type": "WRITES_TO", - "line": 225 + "line": 226 }, { "store": "t", "type": "READS_FROM", - "line": 236 + "line": 237 }, { "store": "t", "type": "WRITES_TO", - "line": 243 + "line": 244 }, { "store": "t", "type": "READS_FROM", - "line": 256 + "line": 257 }, { "store": "t", "type": "READS_FROM", - "line": 259 + "line": 260 }, { "store": "t", "type": "READS_FROM", - "line": 266 + "line": 267 }, { "store": "t", "type": "READS_FROM", - "line": 278 + "line": 279 }, { "store": "t", "type": "READS_FROM", - "line": 290 + "line": 291 }, { "store": "t", "type": "READS_FROM", - "line": 307 + "line": 308 } ] }, @@ -8141,7 +8778,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 314, + "end_line": 315, "tags": { "PURPOSE": "Auto-generated module for frontend/src/routes/admin/settings/llm/+page.svelte", "TIER": "TRIVIAL", @@ -8233,7 +8870,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 388, + "end_line": 450, "tags": { "SEMANTICS": "migration, dashboard, environment, selection, database-replacement", "PURPOSE": "Main dashboard for configuring and starting migrations.", @@ -8247,8 +8884,8 @@ "name": "fetchEnvironments", "type": "Function", "tier": "STANDARD", - "start_line": 54, - "end_line": 69, + "start_line": 58, + "end_line": 73, "tags": { "PURPOSE": "Fetches the list of environments from the API.", "PRE": "None.", @@ -8262,12 +8899,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 @@ -8277,8 +8914,8 @@ "name": "fetchDashboards", "type": "Function", "tier": "STANDARD", - "start_line": 71, - "end_line": 87, + "start_line": 75, + "end_line": 91, "tags": { "PURPOSE": "Fetches dashboards for the selected source environment.", "PRE": "envId is a valid environment ID.", @@ -8293,12 +8930,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 71 + "line_number": 75 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 71 + "line_number": 75 } ], "score": 0.7 @@ -8308,8 +8945,8 @@ "name": "fetchDatabases", "type": "Function", "tier": "STANDARD", - "start_line": 94, - "end_line": 123, + "start_line": 98, + "end_line": 132, "tags": { "PURPOSE": "Fetches databases from both environments and gets suggestions.", "PRE": "sourceEnvId and targetEnvId must be set.", @@ -8323,12 +8960,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 94 + "line_number": 98 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 94 + "line_number": 98 } ], "score": 0.7 @@ -8338,8 +8975,8 @@ "name": "handleMappingUpdate", "type": "Function", "tier": "STANDARD", - "start_line": 125, - "end_line": 153, + "start_line": 134, + "end_line": 165, "tags": { "PURPOSE": "Saves a mapping to the backend.", "PRE": "event.detail contains sourceUuid and targetUuid.", @@ -8353,12 +8990,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 125 + "line_number": 134 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 125 + "line_number": 134 } ], "score": 0.7 @@ -8368,8 +9005,8 @@ "name": "handleViewLogs", "type": "Function", "tier": "STANDARD", - "start_line": 155, - "end_line": 165, + "start_line": 167, + "end_line": 177, "tags": { "PURPOSE": "Opens the log viewer for a specific task.", "PRE": "event.detail contains task object.", @@ -8383,12 +9020,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 155 + "line_number": 167 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 155 + "line_number": 167 } ], "score": 0.7 @@ -8398,8 +9035,8 @@ "name": "handlePasswordPrompt", "type": "Function", "tier": "STANDARD", - "start_line": 167, - "end_line": 189, + "start_line": 179, + "end_line": 205, "tags": { "PURPOSE": "Reactive logic to show password prompt when a task is awaiting input.", "PRE": "selectedTask status is AWAITING_INPUT.", @@ -8413,12 +9050,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 167 + "line_number": 179 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 167 + "line_number": 179 } ], "score": 0.7 @@ -8428,8 +9065,8 @@ "name": "handleResumeMigration", "type": "Function", "tier": "STANDARD", - "start_line": 191, - "end_line": 209, + "start_line": 207, + "end_line": 226, "tags": { "PURPOSE": "Resumes a migration task with provided passwords.", "PRE": "event.detail contains passwords.", @@ -8443,12 +9080,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 191 + "line_number": 207 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 191 + "line_number": 207 } ], "score": 0.7 @@ -8458,8 +9095,8 @@ "name": "startMigration", "type": "Function", "tier": "STANDARD", - "start_line": 211, - "end_line": 266, + "start_line": 228, + "end_line": 298, "tags": { "PURPOSE": "Starts the migration process.", "PRE": "sourceEnvId and targetEnvId must be set and different.", @@ -8469,16 +9106,27 @@ "children": [], "compliance": { "valid": true, - "issues": [], - "score": 1.0 + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 228 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 228 + } + ], + "score": 0.7 } }, { "name": "DashboardSelectionSection", "type": "Component", "tier": "STANDARD", - "start_line": 306, - "end_line": 320, + "start_line": 340, + "end_line": 359, "tags": {}, "relations": [], "children": [], @@ -8488,42 +9136,42 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 306 + "line_number": 340 }, { "message": "Missing Mandatory Tag: @LAYER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 306 + "line_number": 340 }, { "message": "Missing Mandatory Tag: @SEMANTICS (required for STANDARD tier)", "severity": "WARNING", - "line_number": 306 + "line_number": 340 }, { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 306 + "line_number": 340 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 306 + "line_number": 340 }, { "message": "Missing Mandatory Tag: @LAYER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 306 + "line_number": 340 }, { "message": "Missing Mandatory Tag: @SEMANTICS (required for STANDARD tier)", "severity": "WARNING", - "line_number": 306 + "line_number": 340 }, { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 306 + "line_number": 340 } ], "score": 0.0 @@ -8545,132 +9193,112 @@ { "store": "lib", "type": "READS_FROM", - "line": 25 + "line": 28 }, { "store": "lib", "type": "READS_FROM", - "line": 26 + "line": 29 }, { "store": "selectedTask", "type": "READS_FROM", - "line": 176 + "line": 189 }, { "store": "selectedTask", "type": "READS_FROM", - "line": 176 + "line": 190 }, { "store": "selectedTask", "type": "READS_FROM", - "line": 176 + "line": 191 }, { "store": "selectedTask", "type": "WRITES_TO", - "line": 177 + "line": 193 }, { "store": "selectedTask", "type": "READS_FROM", - "line": 183 + "line": 199 }, { "store": "selectedTask", "type": "READS_FROM", - "line": 183 + "line": 199 }, { "store": "selectedTask", "type": "READS_FROM", - "line": 196 + "line": 212 }, { "store": "selectedTask", "type": "READS_FROM", - "line": 200 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 205 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 219 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 223 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 227 + "line": 216 }, { "store": "t", "type": "READS_FROM", - "line": 252 + "line": 222 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 237 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 243 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 249 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 282 }, { "store": "t", "type": "WRITES_TO", - "line": 271 + "line": 303 }, { "store": "selectedTask", "type": "READS_FROM", - "line": 275 + "line": 307 }, { "store": "t", "type": "READS_FROM", - "line": 280 + "line": 312 }, { "store": "t", "type": "READS_FROM", - "line": 286 + "line": 318 }, { "store": "t", "type": "WRITES_TO", - "line": 295 + "line": 329 }, { "store": "t", "type": "WRITES_TO", - "line": 300 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 308 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 317 + "line": 334 }, { "store": "t", "type": "READS_FROM", - "line": 332 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 338 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 340 + "line": 343 }, { "store": "t", @@ -8680,7 +9308,32 @@ { "store": "t", "type": "READS_FROM", - "line": 364 + "line": 370 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 386 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 394 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 398 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 414 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 427 } ] }, @@ -8854,7 +9507,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 222, + "end_line": 225, "tags": { "TIER": "STANDARD", "SEMANTICS": "storage, files, management", @@ -9037,22 +9690,27 @@ { "store": "t", "type": "READS_FROM", - "line": 167 + "line": 170 }, { "store": "t", "type": "READS_FROM", - "line": 167 + "line": 170 }, { "store": "t", "type": "READS_FROM", - "line": 181 + "line": 184 }, { "store": "t", "type": "READS_FROM", - "line": 187 + "line": 190 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 204 } ] }, @@ -9061,7 +9719,7 @@ "type": "Component", "tier": "TRIVIAL", "start_line": 1, - "end_line": 26, + "end_line": 27, "tags": { "TIER": "TRIVIAL", "SEMANTICS": "mapper, page, tool", @@ -9080,6 +9738,16 @@ "store": "lib", "type": "READS_FROM", "line": 11 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 12 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 16 } ] }, @@ -9088,7 +9756,7 @@ "type": "Component", "tier": "TRIVIAL", "start_line": 1, - "end_line": 26, + "end_line": 27, "tags": { "TIER": "TRIVIAL", "SEMANTICS": "debug, page, tool", @@ -9107,6 +9775,16 @@ "store": "lib", "type": "READS_FROM", "line": 11 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 12 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 16 } ] }, @@ -9115,7 +9793,7 @@ "type": "Page", "tier": "CRITICAL", "start_line": 1, - "end_line": 964, + "end_line": 1491, "tags": { "TIER": "CRITICAL", "PURPOSE": "Consolidated Settings Page - All settings in one place with tabbed navigation", @@ -9139,7 +9817,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 964, + "end_line": 1491, "tags": { "PURPOSE": "Auto-generated module for frontend/src/routes/settings/+page.svelte", "TIER": "TRIVIAL", @@ -9147,12 +9825,66 @@ }, "relations": [], "children": [ + { + "name": "normalizeTab", + "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": "readTabFromUrl", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 79, + "end_line": 79, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "writeTabToUrl", + "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": "loadSettings", "type": "Function", "tier": "TRIVIAL", - "start_line": 65, - "end_line": 65, + "start_line": 114, + "end_line": 114, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9169,8 +9901,8 @@ "name": "normalizeLlmSettings", "type": "Function", "tier": "TRIVIAL", - "start_line": 80, - "end_line": 80, + "start_line": 129, + "end_line": 129, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9187,8 +9919,8 @@ "name": "isMultimodalModel", "type": "Function", "tier": "TRIVIAL", - "start_line": 103, - "end_line": 103, + "start_line": 153, + "end_line": 153, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9205,8 +9937,8 @@ "name": "getProviderById", "type": "Function", "tier": "TRIVIAL", - "start_line": 117, - "end_line": 117, + "start_line": 167, + "end_line": 167, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9223,8 +9955,8 @@ "name": "isDashboardValidationBindingValid", "type": "Function", "tier": "TRIVIAL", - "start_line": 122, - "end_line": 122, + "start_line": 174, + "end_line": 174, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9241,8 +9973,8 @@ "name": "handleTabChange", "type": "Function", "tier": "TRIVIAL", - "start_line": 130, - "end_line": 130, + "start_line": 182, + "end_line": 182, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9256,11 +9988,119 @@ } }, { - "name": "getTabClass", + "name": "loadMigrationSettings", "type": "Function", "tier": "TRIVIAL", - "start_line": 135, - "end_line": 135, + "start_line": 210, + "end_line": 210, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "loadMappingsPage", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 223, + "end_line": 223, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "onMappingsSearchInput", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 241, + "end_line": 241, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "onMappingsFilterChange", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 249, + "end_line": 249, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "goToMappingsPage", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 254, + "end_line": 254, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "saveMigrationSettings", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 260, + "end_line": 260, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "triggerSyncNow", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 278, + "end_line": 278, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9277,8 +10117,8 @@ "name": "handleSave", "type": "Function", "tier": "TRIVIAL", - "start_line": 142, - "end_line": 142, + "start_line": 296, + "end_line": 296, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9295,8 +10135,8 @@ "name": "handleTestEnv", "type": "Function", "tier": "TRIVIAL", - "start_line": 158, - "end_line": 158, + "start_line": 312, + "end_line": 312, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9313,8 +10153,8 @@ "name": "editEnv", "type": "Function", "tier": "TRIVIAL", - "start_line": 177, - "end_line": 177, + "start_line": 337, + "end_line": 337, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9331,8 +10171,8 @@ "name": "resetEnvForm", "type": "Function", "tier": "TRIVIAL", - "start_line": 188, - "end_line": 188, + "start_line": 348, + "end_line": 348, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9349,8 +10189,8 @@ "name": "handleAddOrUpdateEnv", "type": "Function", "tier": "TRIVIAL", - "start_line": 204, - "end_line": 204, + "start_line": 364, + "end_line": 364, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9367,8 +10207,8 @@ "name": "handleDeleteEnv", "type": "Function", "tier": "TRIVIAL", - "start_line": 237, - "end_line": 237, + "start_line": 400, + "end_line": 400, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -9419,7 +10259,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 40, + "end_line": 41, "tags": { "SEMANTICS": "settings, connections, page", "PURPOSE": "Page for managing database connection configurations.", @@ -9431,8 +10271,8 @@ "name": "handleSuccess", "type": "Function", "tier": "STANDARD", - "start_line": 13, - "end_line": 23, + "start_line": 14, + "end_line": 24, "tags": { "PURPOSE": "Refreshes the connection list after a successful creation.", "PRE": "listComponent must be bound.", @@ -9446,12 +10286,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 13 + "line_number": 14 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 13 + "line_number": 14 } ], "score": 0.7 @@ -9468,7 +10308,19 @@ } ], "score": 0.775 - } + }, + "data_flow": [ + { + "store": "lib", + "type": "READS_FROM", + "line": 10 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 29 + } + ] }, { "name": "GitSettingsPage", @@ -9628,6 +10480,101 @@ "store": "lib", "type": "READS_FROM", "line": 18 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 61 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 63 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 66 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 83 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 99 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 103 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 113 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 117 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 119 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 135 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 148 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 150 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 150 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 152 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 160 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 161 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 162 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 166 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 169 } ] }, @@ -9834,7 +10781,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 340, + "end_line": 341, "tags": { "SEMANTICS": "settings, ui, configuration", "PURPOSE": "The main settings page for the application, allowing management of environments and global settings.", @@ -9850,8 +10797,8 @@ "name": "loadSettings", "type": "Function", "tier": "STANDARD", - "start_line": 49, - "end_line": 66, + "start_line": 50, + "end_line": 67, "tags": { "PURPOSE": "Loads settings from the backend.", "PRE": "Component mounted or refresh requested.", @@ -9865,12 +10812,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 49 + "line_number": 50 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 49 + "line_number": 50 } ], "score": 0.7 @@ -9880,8 +10827,8 @@ "name": "handleSaveGlobal", "type": "Function", "tier": "STANDARD", - "start_line": 68, - "end_line": 85, + "start_line": 69, + "end_line": 86, "tags": { "PURPOSE": "Saves global settings to the backend.", "PRE": "settings.settings contains valid configuration.", @@ -9895,12 +10842,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 68 + "line_number": 69 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 68 + "line_number": 69 } ], "score": 0.7 @@ -9910,8 +10857,8 @@ "name": "handleAddOrUpdateEnv", "type": "Function", "tier": "STANDARD", - "start_line": 87, - "end_line": 111, + "start_line": 88, + "end_line": 112, "tags": { "PURPOSE": "Adds or updates an environment.", "PRE": "newEnv contains valid environment details.", @@ -9925,12 +10872,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 87 + "line_number": 88 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 87 + "line_number": 88 } ], "score": 0.7 @@ -9940,8 +10887,8 @@ "name": "handleDeleteEnv", "type": "Function", "tier": "STANDARD", - "start_line": 113, - "end_line": 134, + "start_line": 114, + "end_line": 135, "tags": { "PURPOSE": "Deletes an environment.", "PRE": "id of environment to delete is provided.", @@ -9956,12 +10903,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 113 + "line_number": 114 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 113 + "line_number": 114 } ], "score": 0.7 @@ -9971,8 +10918,8 @@ "name": "handleTestEnv", "type": "Function", "tier": "STANDARD", - "start_line": 136, - "end_line": 159, + "start_line": 137, + "end_line": 160, "tags": { "PURPOSE": "Tests the connection to an environment.", "PRE": "Environment ID is valid.", @@ -9987,12 +10934,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 136 + "line_number": 137 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 136 + "line_number": 137 } ], "score": 0.7 @@ -10002,8 +10949,8 @@ "name": "editEnv", "type": "Function", "tier": "STANDARD", - "start_line": 161, - "end_line": 172, + "start_line": 162, + "end_line": 173, "tags": { "PURPOSE": "Sets the form to edit an existing environment.", "PRE": "env object is provided.", @@ -10018,12 +10965,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 161 + "line_number": 162 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 161 + "line_number": 162 } ], "score": 0.7 @@ -10033,8 +10980,8 @@ "name": "resetEnvForm", "type": "Function", "tier": "STANDARD", - "start_line": 174, - "end_line": 195, + "start_line": 175, + "end_line": 196, "tags": { "PURPOSE": "Resets the environment form.", "PRE": "None.", @@ -10048,12 +10995,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 174 + "line_number": 175 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 174 + "line_number": 175 } ], "score": 0.7 @@ -10070,7 +11017,264 @@ } ], "score": 0.775 - } + }, + "data_flow": [ + { + "store": "t", + "type": "READS_FROM", + "line": 64 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 79 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 83 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 99 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 102 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 109 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 122 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 126 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 131 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 149 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 152 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 157 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 203 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 206 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 208 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 211 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 221 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 222 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 225 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 229 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 235 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 241 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 246 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 250 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 251 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 259 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 260 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 261 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 262 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 263 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 272 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 272 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 274 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 275 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 276 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 285 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 285 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 288 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 292 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 296 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 300 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 304 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 309 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 313 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 317 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 320 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 321 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 322 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 328 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 328 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 332 + } + ] }, { "name": "getConnections", @@ -11123,7 +12327,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 107, + "end_line": 108, "tags": { "SEMANTICS": "mapping, table, database, editor", "PURPOSE": "Displays and allows editing of database mappings.", @@ -11137,8 +12341,8 @@ "name": "updateMapping", "type": "Function", "tier": "STANDARD", - "start_line": 28, - "end_line": 46, + "start_line": 29, + "end_line": 47, "tags": { "PURPOSE": "Updates a mapping for a specific source database.", "PRE": "sourceUuid and targetUuid are provided.", @@ -11152,12 +12356,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 28 + "line_number": 29 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 28 + "line_number": 29 } ], "score": 0.7 @@ -11167,8 +12371,8 @@ "name": "getSuggestion", "type": "Function", "tier": "STANDARD", - "start_line": 48, - "end_line": 57, + "start_line": 49, + "end_line": 58, "tags": { "PURPOSE": "Finds a suggestion for a source database.", "PRE": "sourceUuid is provided.", @@ -11182,12 +12386,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 48 + "line_number": 49 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 48 + "line_number": 49 } ], "score": 0.7 @@ -11209,10 +12413,50 @@ "update" ], "data_flow": [ + { + "store": "lib", + "type": "READS_FROM", + "line": 14 + }, { "store": "props", "type": "WRITES_TO", - "line": 22 + "line": 23 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 66 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 67 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 68 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 85 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 93 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 95 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 97 } ] }, @@ -11410,11 +12654,21 @@ "type": "READS_FROM", "line": 147 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 157 + }, { "store": "t", "type": "READS_FROM", "line": 206 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 214 + }, { "store": "t", "type": "READS_FROM", @@ -12111,7 +13365,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 199, + "end_line": 200, "tags": { "SEMANTICS": "task, history, list, status, monitoring", "PURPOSE": "Displays a list of recent tasks with their status and allows selecting them for viewing logs.", @@ -12124,8 +13378,8 @@ "name": "fetchTasks", "type": "Function", "tier": "STANDARD", - "start_line": 19, - "end_line": 47, + "start_line": 20, + "end_line": 48, "tags": { "PURPOSE": "Fetches the list of recent tasks from the API.", "PRE": "None.", @@ -12139,12 +13393,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 19 + "line_number": 20 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 19 + "line_number": 20 } ], "score": 0.7 @@ -12154,8 +13408,8 @@ "name": "clearTasks", "type": "Function", "tier": "STANDARD", - "start_line": 49, - "end_line": 65, + "start_line": 50, + "end_line": 66, "tags": { "PURPOSE": "Clears tasks from the history, optionally filtered by status.", "PRE": "User confirms deletion via prompt.", @@ -12169,12 +13423,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 49 + "line_number": 50 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 49 + "line_number": 50 } ], "score": 0.7 @@ -12184,8 +13438,8 @@ "name": "selectTask", "type": "Function", "tier": "STANDARD", - "start_line": 67, - "end_line": 81, + "start_line": 68, + "end_line": 82, "tags": { "PURPOSE": "Selects a task and fetches its full details.", "PRE": "task object is provided.", @@ -12199,12 +13453,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 67 + "line_number": 68 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 67 + "line_number": 68 } ], "score": 0.7 @@ -12214,8 +13468,8 @@ "name": "getStatusColor", "type": "Function", "tier": "STANDARD", - "start_line": 83, - "end_line": 97, + "start_line": 84, + "end_line": 98, "tags": { "PURPOSE": "Returns the CSS color class for a given task status.", "PRE": "status string is provided.", @@ -12229,12 +13483,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 83 + "line_number": 84 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 83 + "line_number": 84 } ], "score": 0.7 @@ -12244,8 +13498,8 @@ "name": "onMount", "type": "Function", "tier": "STANDARD", - "start_line": 99, - "end_line": 107, + "start_line": 100, + "end_line": 108, "tags": { "PURPOSE": "Initializes the component by fetching tasks and starting polling.", "PRE": "Component is mounting.", @@ -12259,12 +13513,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 99 + "line_number": 100 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 99 + "line_number": 100 } ], "score": 0.7 @@ -12274,8 +13528,8 @@ "name": "onDestroy", "type": "Function", "tier": "STANDARD", - "start_line": 109, - "end_line": 116, + "start_line": 110, + "end_line": 117, "tags": { "PURPOSE": "Cleans up the polling interval when the component is destroyed.", "PRE": "Component is being destroyed.", @@ -12289,12 +13543,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 109 + "line_number": 110 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 109 + "line_number": 110 } ], "score": 0.7 @@ -12316,11 +13570,6 @@ { "store": "selectedTask", "type": "READS_FROM", - "line": 35 - }, - { - "store": "selectedTask", - "type": "WRITES_TO", "line": 36 }, { @@ -12331,12 +13580,82 @@ { "store": "selectedTask", "type": "WRITES_TO", - "line": 161 + "line": 38 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 55 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 78 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 123 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 128 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 135 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 136 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 137 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 145 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 151 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 155 }, { "store": "selectedTask", "type": "WRITES_TO", - "line": 161 + "line": 162 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 162 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 183 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 183 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 189 } ] }, @@ -12375,7 +13694,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 408, + "end_line": 409, "tags": { "TIER": "STANDARD", "SEMANTICS": "task, runner, logs, websocket", @@ -12389,8 +13708,8 @@ "name": "connect", "type": "Function", "tier": "STANDARD", - "start_line": 40, - "end_line": 142, + "start_line": 41, + "end_line": 143, "tags": { "PURPOSE": "Establishes WebSocket connection with exponential backoff and filter parameters.", "PRE": "selectedTask must be set in the store.", @@ -12408,8 +13727,8 @@ "name": "handleFilterChange", "type": "Function", "tier": "STANDARD", - "start_line": 144, - "end_line": 168, + "start_line": 145, + "end_line": 169, "tags": { "PURPOSE": "Handles filter changes and reconnects WebSocket with new parameters.", "PRE": "event.detail contains source and level filter values.", @@ -12423,12 +13742,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 144 + "line_number": 145 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 144 + "line_number": 145 } ], "score": 0.7 @@ -12438,8 +13757,8 @@ "name": "fetchTargetDatabases", "type": "Function", "tier": "STANDARD", - "start_line": 170, - "end_line": 191, + "start_line": 171, + "end_line": 192, "tags": { "PURPOSE": "Fetches available databases from target environment for mapping.", "PRE": "selectedTask must have to_env parameter set.", @@ -12453,12 +13772,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 170 + "line_number": 171 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 170 + "line_number": 171 } ], "score": 0.7 @@ -12468,8 +13787,8 @@ "name": "handleMappingResolve", "type": "Function", "tier": "STANDARD", - "start_line": 193, - "end_line": 227, + "start_line": 194, + "end_line": 228, "tags": { "PURPOSE": "Resolves missing database mapping and continues migration.", "PRE": "event.detail contains sourceDbUuid, targetDbUuid, targetDbName.", @@ -12483,12 +13802,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 193 + "line_number": 194 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 193 + "line_number": 194 } ], "score": 0.7 @@ -12498,8 +13817,8 @@ "name": "handlePasswordResume", "type": "Function", "tier": "STANDARD", - "start_line": 229, - "end_line": 249, + "start_line": 230, + "end_line": 250, "tags": { "PURPOSE": "Submits passwords and resumes paused migration task.", "PRE": "event.detail contains passwords object.", @@ -12513,12 +13832,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 229 + "line_number": 230 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 229 + "line_number": 230 } ], "score": 0.7 @@ -12528,8 +13847,8 @@ "name": "startDataTimeout", "type": "Function", "tier": "STANDARD", - "start_line": 251, - "end_line": 265, + "start_line": 252, + "end_line": 266, "tags": { "PURPOSE": "Starts timeout timer to detect idle connection.", "PRE": "connectionStatus is 'connected'.", @@ -12543,12 +13862,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 251 + "line_number": 252 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 251 + "line_number": 252 } ], "score": 0.7 @@ -12558,8 +13877,8 @@ "name": "resetDataTimeout", "type": "Function", "tier": "STANDARD", - "start_line": 267, - "end_line": 278, + "start_line": 268, + "end_line": 279, "tags": { "PURPOSE": "Resets data timeout timer when new data arrives.", "PRE": "dataTimeout must be set.", @@ -12573,12 +13892,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 267 + "line_number": 268 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 267 + "line_number": 268 } ], "score": 0.7 @@ -12588,8 +13907,8 @@ "name": "onMount", "type": "Function", "tier": "STANDARD", - "start_line": 280, - "end_line": 307, + "start_line": 281, + "end_line": 308, "tags": { "PURPOSE": "Initializes WebSocket connection when component mounts.", "PRE": "Component must be mounted in DOM.", @@ -12607,8 +13926,8 @@ "name": "onDestroy", "type": "Function", "tier": "STANDARD", - "start_line": 309, - "end_line": 318, + "start_line": 310, + "end_line": 319, "tags": {}, "relations": [], "children": [], @@ -12618,32 +13937,32 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 309 + "line_number": 310 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 309 + "line_number": 310 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 309 + "line_number": 310 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 309 + "line_number": 310 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 309 + "line_number": 310 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 309 + "line_number": 310 } ], "score": 0.0 @@ -12656,20 +13975,85 @@ "score": 1.0 }, "data_flow": [ + { + "store": "t", + "type": "READS_FROM", + "line": 139 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 223 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 225 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 245 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 247 + }, { "store": "selectedTask", "type": "READS_FROM", - "line": 323 + "line": 324 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 326 }, { "store": "selectedTask", "type": "WRITES_TO", - "line": 325 + "line": 326 }, { - "store": "selectedTask", + "store": "t", "type": "WRITES_TO", - "line": 358 + "line": 333 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 336 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 339 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 342 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 345 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 348 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 356 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 359 }, { "store": "selectedTask", @@ -12677,7 +14061,7 @@ "line": 359 }, { - "store": "selectedTask", + "store": "t", "type": "WRITES_TO", "line": 360 }, @@ -12686,6 +14070,11 @@ "type": "WRITES_TO", "line": 360 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 361 + }, { "store": "selectedTask", "type": "WRITES_TO", @@ -12694,17 +14083,47 @@ { "store": "selectedTask", "type": "WRITES_TO", + "line": 361 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 362 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 362 + }, + { + "store": "t", + "type": "WRITES_TO", "line": 365 }, { "store": "selectedTask", "type": "WRITES_TO", - "line": 373 + "line": 366 + }, + { + "store": "selectedTask", + "type": "WRITES_TO", + "line": 374 }, { "store": "taskLogs", "type": "WRITES_TO", - "line": 374 + "line": 375 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 382 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 387 } ] }, @@ -13474,7 +14893,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 114, + "end_line": 115, "tags": { "PURPOSE": "Auto-generated module for frontend/src/components/tasks/TaskResultPanel.svelte", "TIER": "TRIVIAL", @@ -13486,8 +14905,8 @@ "name": "statusColor", "type": "Function", "tier": "TRIVIAL", - "start_line": 7, - "end_line": 7, + "start_line": 8, + "end_line": 8, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -13507,6 +14926,32 @@ "score": 1.0 } }, + { + "name": "frontend.src.components.__tests__.task_log_viewer", + "type": "Module", + "tier": "CRITICAL", + "start_line": 1, + "end_line": 128, + "tags": { + "TIER": "CRITICAL", + "SEMANTICS": "tests, task-log, viewer, mount, components", + "PURPOSE": "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." + }, + "relations": [ + { + "type": "TESTS", + "target": "frontend.src.components.TaskLogViewer" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "FileList", "type": "Component", @@ -15208,6 +16653,21 @@ "type": "READS_FROM", "line": 180 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 186 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 195 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 204 + }, { "store": "t", "type": "READS_FROM", @@ -15423,11 +16883,31 @@ "type": "WRITES_TO", "line": 33 }, + { + "store": "t", + "type": "READS_FROM", + "line": 63 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 93 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 113 + }, { "store": "t", "type": "READS_FROM", "line": 145 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 154 + }, { "store": "t", "type": "READS_FROM", @@ -16180,7 +17660,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 78, + "end_line": 79, "tags": { "PURPOSE": "Auto-generated module for frontend/src/components/llm/ValidationReport.svelte", "TIER": "TRIVIAL", @@ -16192,8 +17672,8 @@ "name": "getStatusColor", "type": "Function", "tier": "TRIVIAL", - "start_line": 11, - "end_line": 11, + "start_line": 12, + "end_line": 12, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -16913,6 +18393,284 @@ "score": 0.775 } }, + { + "name": "backend.src.scripts.seed_superset_load_test", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": null, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "superset, load-test, charts, dashboards, seed, stress", + "PURPOSE": "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." + }, + "relations": [ + { + "type": "USES", + "target": "backend.src.core.config_manager.ConfigManager" + }, + { + "type": "USES", + "target": "backend.src.core.superset_client.SupersetClient" + } + ], + "children": [ + { + "name": "_parse_args", + "type": "Function", + "tier": "STANDARD", + "start_line": 29, + "end_line": 43, + "tags": { + "PURPOSE": "Parses CLI arguments for load-test data generation.", + "PRE": "Script is called from CLI.", + "POST": "Returns validated argument namespace." + }, + "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": 29 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 29 + } + ], + "score": 0.7 + } + }, + { + "name": "_extract_result_payload", + "type": "Function", + "tier": "STANDARD", + "start_line": 46, + "end_line": 55, + "tags": { + "PURPOSE": "Normalizes Superset API payloads that may be wrapped in `result`.", + "PRE": "payload is a JSON-decoded API response.", + "POST": "Returns the unwrapped object when present." + }, + "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": 46 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 46 + } + ], + "score": 0.7 + } + }, + { + "name": "_extract_created_id", + "type": "Function", + "tier": "STANDARD", + "start_line": 58, + "end_line": 70, + "tags": { + "PURPOSE": "Extracts object ID from create/update API response.", + "PRE": "payload is a JSON-decoded API response.", + "POST": "Returns integer object ID or None if missing." + }, + "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": 58 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 58 + } + ], + "score": 0.7 + } + }, + { + "name": "_generate_unique_name", + "type": "Function", + "tier": "STANDARD", + "start_line": 73, + "end_line": 86, + "tags": { + "PURPOSE": "Generates globally unique random names for charts/dashboards.", + "PRE": "used_names is mutable set for collision tracking.", + "POST": "Returns a unique string and stores it in used_names." + }, + "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": 73 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 73 + } + ], + "score": 0.7 + } + }, + { + "name": "_resolve_target_envs", + "type": "Function", + "tier": "STANDARD", + "start_line": 89, + "end_line": 118, + "tags": { + "PURPOSE": "Resolves requested environment IDs from configuration.", + "PRE": "env_ids is non-empty.", + "POST": "Returns mapping env_id -> configured environment object." + }, + "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": 89 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 89 + } + ], + "score": 0.7 + } + }, + { + "name": "_build_chart_template_pool", + "type": "Function", + "tier": "STANDARD", + "start_line": 121, + "end_line": 175, + "tags": { + "PURPOSE": "Builds a pool of source chart templates to clone in one environment.", + "PRE": "Client is authenticated.", + "POST": "Returns non-empty list of chart payload templates." + }, + "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": 121 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 121 + } + ], + "score": 0.7 + } + }, + { + "name": "seed_superset_load_data", + "type": "Function", + "tier": "STANDARD", + "start_line": 178, + "end_line": 280, + "tags": { + "PURPOSE": "Creates dashboards and cloned charts for load testing across target environments.", + "PRE": "Target environments must be reachable and authenticated.", + "POST": "Returns execution statistics dictionary.", + "SIDE_EFFECT": "Creates objects in Superset environments." + }, + "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": 178 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 178 + } + ], + "score": 0.7 + } + }, + { + "name": "main", + "type": "Function", + "tier": "STANDARD", + "start_line": 283, + "end_line": null, + "tags": { + "PURPOSE": "CLI entrypoint for Superset load-test data seeding.", + "PRE": "Command line arguments are valid.", + "POST": "Prints summary and exits with non-zero status on failure." + }, + "relations": [], + "children": [], + "compliance": { + "valid": false, + "issues": [ + { + "message": "Unclosed Anchor: [DEF:main:Function] started at line 283", + "severity": "ERROR", + "line_number": 283 + }, + { + "message": "Unclosed Anchor: [DEF:main:Function] started at line 283", + "severity": "ERROR", + "line_number": 283 + } + ], + "score": 0.0 + } + } + ], + "compliance": { + "valid": false, + "issues": [ + { + "message": "Unclosed Anchor: [DEF:backend.src.scripts.seed_superset_load_test:Module] started at line 1", + "severity": "ERROR", + "line_number": 1 + } + ], + "score": 0.0 + } + }, { "name": "test_dataset_dashboard_relations", "type": "Module", @@ -17829,7 +19587,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 834, + "end_line": 886, "tags": { "SEMANTICS": "superset, api, client, rest, http, dashboard, dataset, import, export", "PURPOSE": "\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Superset REST API, \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u044f \u043b\u043e\u0433\u0438\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044e.", @@ -17852,8 +19610,8 @@ "name": "SupersetClient", "type": "Class", "tier": "STANDARD", - "start_line": 25, - "end_line": 832, + "start_line": 26, + "end_line": 884, "tags": { "PURPOSE": "\u041a\u043b\u0430\u0441\u0441-\u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 Superset REST API, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430\u043c\u0438 \u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438." }, @@ -17863,8 +19621,8 @@ "name": "__init__", "type": "Function", "tier": "STANDARD", - "start_line": 28, - "end_line": 54, + "start_line": 29, + "end_line": 55, "tags": { "PURPOSE": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442.", "PRE": "`env` \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c Environment.", @@ -17883,8 +19641,8 @@ "name": "authenticate", "type": "Function", "tier": "STANDARD", - "start_line": 56, - "end_line": 64, + "start_line": 57, + "end_line": 65, "tags": { "PURPOSE": "Authenticates the client using the configured credentials.", "PRE": "self.network must be initialized with valid auth configuration.", @@ -17903,8 +19661,8 @@ "name": "headers", "type": "Function", "tier": "STANDARD", - "start_line": 67, - "end_line": 74, + "start_line": 68, + "end_line": 75, "tags": { "PURPOSE": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c.", "PRE": "APIClient is initialized and authenticated.", @@ -17922,8 +19680,8 @@ "name": "get_dashboards", "type": "Function", "tier": "STANDARD", - "start_line": 78, - "end_line": 98, + "start_line": 79, + "end_line": 99, "tags": { "PURPOSE": "\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044e.", "PARAM": "query (Optional[Dict]) - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043b\u044f API.", @@ -17943,8 +19701,8 @@ "name": "get_dashboards_summary", "type": "Function", "tier": "STANDARD", - "start_line": 100, - "end_line": 122, + "start_line": 101, + "end_line": 123, "tags": { "PURPOSE": "Fetches dashboard metadata optimized for the grid.", "PRE": "Client is authenticated.", @@ -17963,8 +19721,8 @@ "name": "get_dashboard", "type": "Function", "tier": "STANDARD", - "start_line": 124, - "end_line": 133, + "start_line": 125, + "end_line": 134, "tags": { "PURPOSE": "Fetches a single dashboard by ID.", "PRE": "Client is authenticated and dashboard_id exists.", @@ -17983,8 +19741,8 @@ "name": "get_chart", "type": "Function", "tier": "STANDARD", - "start_line": 135, - "end_line": 144, + "start_line": 136, + "end_line": 145, "tags": { "PURPOSE": "Fetches a single chart by ID.", "PRE": "Client is authenticated and chart_id exists.", @@ -18003,8 +19761,8 @@ "name": "get_dashboard_detail", "type": "Function", "tier": "STANDARD", - "start_line": 146, - "end_line": 336, + "start_line": 147, + "end_line": 337, "tags": { "PURPOSE": "Fetches detailed dashboard information including related charts and datasets.", "PRE": "Client is authenticated and dashboard_id exists.", @@ -18023,8 +19781,8 @@ "name": "_extract_chart_ids_from_layout", "type": "Function", "tier": "STANDARD", - "start_line": 338, - "end_line": 368, + "start_line": 339, + "end_line": 369, "tags": { "PURPOSE": "Traverses dashboard layout metadata and extracts chart IDs from common keys.", "PRE": "payload can be dict/list/scalar.", @@ -18042,8 +19800,8 @@ "name": "export_dashboard", "type": "Function", "tier": "STANDARD", - "start_line": 370, - "end_line": 391, + "start_line": 371, + "end_line": 392, "tags": { "PURPOSE": "\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0432 \u0432\u0438\u0434\u0435 ZIP-\u0430\u0440\u0445\u0438\u0432\u0430.", "PARAM": "dashboard_id (int) - ID \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430 \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430.", @@ -18063,8 +19821,8 @@ "name": "import_dashboard", "type": "Function", "tier": "STANDARD", - "start_line": 393, - "end_line": 420, + "start_line": 394, + "end_line": 423, "tags": { "PURPOSE": "\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0438\u0437 ZIP-\u0444\u0430\u0439\u043b\u0430.", "PARAM": "dash_slug (Optional[str]) - Slug \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 ID.", @@ -18084,8 +19842,8 @@ "name": "delete_dashboard", "type": "Function", "tier": "STANDARD", - "start_line": 422, - "end_line": 436, + "start_line": 425, + "end_line": 439, "tags": { "PURPOSE": "\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u043f\u043e \u0435\u0433\u043e ID \u0438\u043b\u0438 slug.", "PARAM": "dashboard_id (Union[int, str]) - ID \u0438\u043b\u0438 slug \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430.", @@ -18104,8 +19862,8 @@ "name": "get_datasets", "type": "Function", "tier": "STANDARD", - "start_line": 442, - "end_line": 460, + "start_line": 445, + "end_line": 463, "tags": { "PURPOSE": "\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044e.", "PARAM": "query (Optional[Dict]) - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430.", @@ -18125,8 +19883,8 @@ "name": "get_datasets_summary", "type": "Function", "tier": "STANDARD", - "start_line": 462, - "end_line": 484, + "start_line": 465, + "end_line": 487, "tags": { "PURPOSE": "Fetches dataset metadata optimized for the Dataset Hub grid.", "PRE": "Client is authenticated.", @@ -18145,8 +19903,8 @@ "name": "get_dataset_detail", "type": "Function", "tier": "STANDARD", - "start_line": 486, - "end_line": 596, + "start_line": 489, + "end_line": 599, "tags": { "PURPOSE": "Fetches detailed dataset information including columns and linked dashboards", "PRE": "Client is authenticated and dataset_id exists.", @@ -18175,8 +19933,8 @@ "name": "get_dataset", "type": "Function", "tier": "STANDARD", - "start_line": 598, - "end_line": 611, + "start_line": 601, + "end_line": 614, "tags": { "PURPOSE": "\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u043f\u043e \u0435\u0433\u043e ID.", "PARAM": "dataset_id (int) - ID \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430.", @@ -18196,8 +19954,8 @@ "name": "update_dataset", "type": "Function", "tier": "STANDARD", - "start_line": 613, - "end_line": 632, + "start_line": 616, + "end_line": 635, "tags": { "PURPOSE": "\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043f\u043e \u0435\u0433\u043e ID.", "PARAM": "data (Dict) - \u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.", @@ -18217,8 +19975,8 @@ "name": "get_databases", "type": "Function", "tier": "STANDARD", - "start_line": 638, - "end_line": 658, + "start_line": 641, + "end_line": 661, "tags": { "PURPOSE": "\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445.", "PARAM": "query (Optional[Dict]) - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430.", @@ -18238,8 +19996,8 @@ "name": "get_database", "type": "Function", "tier": "STANDARD", - "start_line": 660, - "end_line": 673, + "start_line": 663, + "end_line": 676, "tags": { "PURPOSE": "\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0435\u0451 ID.", "PARAM": "database_id (int) - ID \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.", @@ -18259,8 +20017,8 @@ "name": "get_databases_summary", "type": "Function", "tier": "STANDARD", - "start_line": 675, - "end_line": 692, + "start_line": 678, + "end_line": 695, "tags": { "PURPOSE": "Fetch a summary of databases including uuid, name, and engine.", "PRE": "Client is authenticated.", @@ -18279,8 +20037,8 @@ "name": "get_database_by_uuid", "type": "Function", "tier": "STANDARD", - "start_line": 694, - "end_line": 707, + "start_line": 697, + "end_line": 710, "tags": { "PURPOSE": "Find a database by its UUID.", "PARAM": "db_uuid (str) - The UUID of the database.", @@ -18300,8 +20058,8 @@ "name": "_resolve_target_id_for_delete", "type": "Function", "tier": "STANDARD", - "start_line": 713, - "end_line": 732, + "start_line": 716, + "end_line": 735, "tags": { "PURPOSE": "Resolves a dashboard ID from either an ID or a slug.", "PRE": "Either dash_id or dash_slug should be provided.", @@ -18319,8 +20077,8 @@ "name": "_do_import", "type": "Function", "tier": "STANDARD", - "start_line": 734, - "end_line": 752, + "start_line": 737, + "end_line": 755, "tags": { "PURPOSE": "Performs the actual multipart upload for import.", "PRE": "file_name must be a path to an existing ZIP file.", @@ -18338,8 +20096,8 @@ "name": "_validate_export_response", "type": "Function", "tier": "STANDARD", - "start_line": 754, - "end_line": 765, + "start_line": 757, + "end_line": 768, "tags": { "PURPOSE": "Validates that the export response is a non-empty ZIP archive.", "PRE": "response must be a valid requests.Response object.", @@ -18357,8 +20115,8 @@ "name": "_resolve_export_filename", "type": "Function", "tier": "STANDARD", - "start_line": 767, - "end_line": 780, + "start_line": 770, + "end_line": 783, "tags": { "PURPOSE": "Determines the filename for an exported dashboard.", "PRE": "response must contain Content-Disposition header or dashboard_id must be provided.", @@ -18376,8 +20134,8 @@ "name": "_validate_query_params", "type": "Function", "tier": "STANDARD", - "start_line": 782, - "end_line": 790, + "start_line": 785, + "end_line": 795, "tags": { "PURPOSE": "Ensures query parameters have default page and page_size.", "PRE": "query can be None or a dictionary.", @@ -18395,8 +20153,8 @@ "name": "_fetch_total_object_count", "type": "Function", "tier": "STANDARD", - "start_line": 792, - "end_line": 803, + "start_line": 797, + "end_line": 808, "tags": { "PURPOSE": "Fetches the total number of items for a given endpoint.", "PRE": "endpoint must be a valid Superset API path.", @@ -18414,8 +20172,8 @@ "name": "_fetch_all_pages", "type": "Function", "tier": "STANDARD", - "start_line": 805, - "end_line": 812, + "start_line": 810, + "end_line": 817, "tags": { "PURPOSE": "Iterates through all pages to collect all data items.", "PRE": "pagination_options must contain base_query, total_count, and results_field.", @@ -18433,8 +20191,8 @@ "name": "_validate_import_file", "type": "Function", "tier": "STANDARD", - "start_line": 814, - "end_line": 828, + "start_line": 819, + "end_line": 833, "tags": { "PURPOSE": "Validates that the file to be imported is a valid ZIP with metadata.yaml.", "PRE": "zip_path must be a path to a file.", @@ -18447,6 +20205,27 @@ "issues": [], "score": 1.0 } + }, + { + "name": "get_all_resources", + "type": "Function", + "tier": "STANDARD", + "start_line": 835, + "end_line": 880, + "tags": { + "PURPOSE": "Fetches all resources of a given type with id, uuid, and name columns.", + "PARAM": "resource_type (str) - One of \"chart\", \"dataset\", \"dashboard\".", + "PRE": "Client is authenticated. resource_type is valid.", + "POST": "Returns a list of resource dicts with at minimum id, uuid, and name fields.", + "RETURN": "List[Dict]" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } } ], "compliance": { @@ -18455,12 +20234,12 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 25 + "line_number": 26 }, { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 25 + "line_number": 26 } ], "score": 0.5499999999999999 @@ -18470,8 +20249,8 @@ "name": "extract_dataset_id_from_form_data", "type": "Function", "tier": "TRIVIAL", - "start_line": 159, - "end_line": 159, + "start_line": 160, + "end_line": 160, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -18488,8 +20267,8 @@ "name": "walk", "type": "Function", "tier": "TRIVIAL", - "start_line": 346, - "end_line": 346, + "start_line": 347, + "end_line": 347, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -18506,8 +20285,8 @@ "name": "as_bool", "type": "Function", "tier": "TRIVIAL", - "start_line": 496, - "end_line": 496, + "start_line": 499, + "end_line": 499, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -19424,7 +21203,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 80, + "end_line": 83, "tags": { "TIER": "STANDARD", "SEMANTICS": "config, models, pydantic", @@ -19498,7 +21277,7 @@ "type": "DataClass", "tier": "STANDARD", "start_line": 50, - "end_line": 71, + "end_line": 74, "tags": { "PURPOSE": "Represents global application settings." }, @@ -19514,8 +21293,8 @@ "name": "AppConfig", "type": "DataClass", "tier": "STANDARD", - "start_line": 73, - "end_line": 78, + "start_line": 76, + "end_line": 81, "tags": { "PURPOSE": "The root configuration model containing all application settings." }, @@ -20522,7 +22301,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 102, + "end_line": 222, "tags": { "SEMANTICS": "migration, engine, zip, yaml, transformation", "PURPOSE": "Handles the interception and transformation of Superset asset ZIP archives.", @@ -20540,22 +22319,71 @@ "name": "MigrationEngine", "type": "Class", "tier": "STANDARD", - "start_line": 20, - "end_line": 100, + "start_line": 24, + "end_line": 220, "tags": { "PURPOSE": "Engine for transforming Superset export ZIPs." }, "relations": [], "children": [ + { + "name": "__init__", + "type": "Function", + "tier": "STANDARD", + "start_line": 28, + "end_line": 33, + "tags": { + "PURPOSE": "Initializes the migration engine with optional ID mapping service.", + "PARAM": "mapping_service (Optional[IdMappingService]) - Used for resolving target environment integer IDs." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + } + ], + "score": 0.0 + } + }, { "name": "transform_zip", "type": "Function", "tier": "STANDARD", - "start_line": 24, - "end_line": 76, + "start_line": 35, + "end_line": 102, "tags": { - "PURPOSE": "Extracts ZIP, replaces database UUIDs in YAMLs, and re-packages.", - "PARAM": "strip_databases (bool) - Whether to remove the databases directory from the archive.", + "PURPOSE": "Extracts ZIP, replaces database UUIDs in YAMLs, patches cross-filters, and re-packages.", + "PARAM": "fix_cross_filters (bool) - Whether to patch dashboard json_metadata.", "PRE": "zip_path must point to a valid Superset export archive.", "POST": "Transformed archive is saved to output_path.", "RETURN": "bool - True if successful." @@ -20572,8 +22400,8 @@ "name": "_transform_yaml", "type": "Function", "tier": "STANDARD", - "start_line": 78, - "end_line": 98, + "start_line": 104, + "end_line": 124, "tags": { "PURPOSE": "Replaces database_uuid in a single YAML file.", "PARAM": "db_mapping (Dict[str, str]) - UUID mapping dictionary.", @@ -20588,21 +22416,135 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 78 + "line_number": 104 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 78 + "line_number": 104 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 78 + "line_number": 104 } ], "score": 0.55 } + }, + { + "name": "_extract_chart_uuids_from_archive", + "type": "Function", + "tier": "STANDARD", + "start_line": 126, + "end_line": 146, + "tags": { + "PURPOSE": "Scans the unpacked ZIP to map local exported integer IDs back to their UUIDs.", + "PARAM": "temp_dir (Path) - Root dir of unpacked archive", + "RETURN": "Dict[int, str] - Mapping of source Integer ID to UUID." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 126 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 126 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 126 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 126 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 126 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 126 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 126 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 126 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 126 + } + ], + "score": 0.0 + } + }, + { + "name": "_patch_dashboard_metadata", + "type": "Function", + "tier": "STANDARD", + "start_line": 148, + "end_line": 218, + "tags": { + "PURPOSE": "Replaces integer IDs in json_metadata.", + "PARAM": "source_map (Dict[int, str])" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 148 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 148 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 148 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 148 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 148 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 148 + } + ], + "score": 0.0 + } } ], "compliance": { @@ -20611,12 +22553,12 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 20 + "line_number": 24 }, { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 20 + "line_number": 24 } ], "score": 0.5499999999999999 @@ -20849,6 +22791,333 @@ "score": 0.7 } }, + { + "name": "backend.src.core.mapping_service", + "type": "Module", + "tier": "CRITICAL", + "start_line": 1, + "end_line": 234, + "tags": { + "TIER": "CRITICAL", + "SEMANTICS": "mapping, ids, synchronization, environments, cross-filters", + "PURPOSE": "Service for tracking and synchronizing Superset Resource IDs (UUID <-> Integer ID)", + "LAYER": "Core", + "TEST_DATA": "mock_superset_resources -> {'chart': [{'id': 42, 'uuid': '1234', 'slice_name': 'test'}], 'dataset': [{'id': 99, 'uuid': '5678', 'table_name': 'data'}]}", + "INVARIANT": "sync_environment must handle remote API failures gracefully." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "backend.src.models.mapping (ResourceMapping, ResourceType)" + }, + { + "type": "DEPENDS_ON", + "target": "backend.src.core.logger" + } + ], + "children": [ + { + "name": "IdMappingService", + "type": "Class", + "tier": "CRITICAL", + "start_line": 23, + "end_line": 233, + "tags": { + "TIER": "CRITICAL", + "PURPOSE": "Service handling the cataloging and retrieval of remote Superset Integer IDs." + }, + "relations": [], + "children": [ + { + "name": "__init__", + "type": "Function", + "tier": "STANDARD", + "start_line": 28, + "end_line": 34, + "tags": { + "PURPOSE": "Initializes the mapping service." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + } + ], + "score": 0.0 + } + }, + { + "name": "start_scheduler", + "type": "Function", + "tier": "STANDARD", + "start_line": 36, + "end_line": 65, + "tags": { + "PURPOSE": "Starts the background scheduler with a given cron string.", + "PARAM": "superset_client_factory - Function to get a client for an environment." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 36 + } + ], + "score": 0.0 + } + }, + { + "name": "sync_environment", + "type": "Function", + "tier": "STANDARD", + "start_line": 67, + "end_line": 184, + "tags": { + "PURPOSE": "Fully synchronizes mapping for a specific environment.", + "PARAM": "superset_client - Instance capable of hitting the Superset API.", + "PRE": "environment_id exists in the database.", + "POST": "ResourceMapping records for the environment are created or updated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_remote_id", + "type": "Function", + "tier": "STANDARD", + "start_line": 186, + "end_line": 205, + "tags": { + "PURPOSE": "Retrieves the remote integer ID for a given universal UUID.", + "PARAM": "uuid (str)", + "RETURN": "Optional[int]" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 186 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 186 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 186 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 186 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 186 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 186 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 186 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 186 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 186 + } + ], + "score": 0.0 + } + }, + { + "name": "get_remote_ids_batch", + "type": "Function", + "tier": "STANDARD", + "start_line": 207, + "end_line": 231, + "tags": { + "PURPOSE": "Retrieves remote integer IDs for a list of universal UUIDs efficiently.", + "PARAM": "uuids (List[str])", + "RETURN": "Dict[str, int] - Mapping of UUID -> Integer ID" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 207 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 207 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 207 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 207 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 207 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 207 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 207 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 207 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 207 + } + ], + "score": 0.0 + } + } + ], + "compliance": { + "valid": false, + "issues": [ + { + "message": "Missing @INVARIANT tag (required for CRITICAL tier)", + "severity": "ERROR", + "line_number": 23 + }, + { + "message": "Missing @INVARIANT tag (required for CRITICAL tier)", + "severity": "ERROR", + "line_number": 23 + } + ], + "score": 0.0 + } + }, + { + "name": "sync_all", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 47, + "end_line": 47, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "backend.src.core.auth.config", "type": "Module", @@ -22957,7 +25226,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 228, + "end_line": null, "tags": { "TIER": "STANDARD", "PURPOSE": "Unit tests for logger module", @@ -22974,8 +25243,8 @@ "name": "test_belief_scope_logs_entry_action_exit_at_debug", "type": "Function", "tier": "STANDARD", - "start_line": 24, - "end_line": 53, + "start_line": 46, + "end_line": 75, "tags": { "PURPOSE": "Test that belief_scope generates [ID][Entry], [ID][Action], and [ID][Exit] logs at DEBUG level.", "PRE": "belief_scope is available. caplog fixture is used. Logger configured to DEBUG.", @@ -22993,8 +25262,8 @@ "name": "test_belief_scope_error_handling", "type": "Function", "tier": "STANDARD", - "start_line": 56, - "end_line": 85, + "start_line": 78, + "end_line": 107, "tags": { "PURPOSE": "Test that belief_scope logs Coherence:Failed on exception.", "PRE": "belief_scope is available. caplog fixture is used. Logger configured to DEBUG.", @@ -23012,8 +25281,8 @@ "name": "test_belief_scope_success_coherence", "type": "Function", "tier": "STANDARD", - "start_line": 88, - "end_line": 114, + "start_line": 110, + "end_line": 134, "tags": { "PURPOSE": "Test that belief_scope logs Coherence:OK on success.", "PRE": "belief_scope is available. caplog fixture is used. Logger configured to DEBUG.", @@ -23031,8 +25300,8 @@ "name": "test_belief_scope_not_visible_at_info", "type": "Function", "tier": "STANDARD", - "start_line": 117, - "end_line": 136, + "start_line": 137, + "end_line": 156, "tags": { "PURPOSE": "Test that belief_scope Entry/Exit/Coherence logs are NOT visible at INFO level.", "PRE": "belief_scope is available. caplog fixture is used.", @@ -23050,8 +25319,8 @@ "name": "test_task_log_level_default", "type": "Function", "tier": "STANDARD", - "start_line": 139, - "end_line": 147, + "start_line": 159, + "end_line": 167, "tags": { "PURPOSE": "Test that default task log level is INFO.", "PRE": "None.", @@ -23069,8 +25338,8 @@ "name": "test_should_log_task_level", "type": "Function", "tier": "STANDARD", - "start_line": 150, - "end_line": 161, + "start_line": 170, + "end_line": 181, "tags": { "PURPOSE": "Test that should_log_task_level correctly filters log levels.", "PRE": "None.", @@ -23088,8 +25357,8 @@ "name": "test_configure_logger_task_log_level", "type": "Function", "tier": "STANDARD", - "start_line": 164, - "end_line": 188, + "start_line": 184, + "end_line": 199, "tags": { "PURPOSE": "Test that configure_logger updates task_log_level.", "PRE": "LoggingConfig is available.", @@ -23107,14 +25376,140 @@ "name": "test_enable_belief_state_flag", "type": "Function", "tier": "STANDARD", - "start_line": 191, - "end_line": 225, + "start_line": 202, + "end_line": null, "tags": { "PURPOSE": "Test that enable_belief_state flag controls belief_scope logging.", "PRE": "LoggingConfig is available. caplog fixture is used.", "POST": "belief_scope logs are controlled by the flag." }, "relations": [], + "children": [ + { + "name": "test_belief_scope_missing_anchor", + "type": "Function", + "tier": "STANDARD", + "start_line": 231, + "end_line": 241, + "tags": { + "PURPOSE": "Test @PRE condition: anchor_id must be provided" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 231 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 231 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 231 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 231 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 231 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 231 + } + ], + "score": 0.0 + } + }, + { + "name": "test_configure_logger_post_conditions", + "type": "Function", + "tier": "STANDARD", + "start_line": 243, + "end_line": 279, + "tags": { + "PURPOSE": "Test @POST condition: Logger level, handlers, belief state flag, and task log level are updated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 243 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 243 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 243 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 243 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 243 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 243 + } + ], + "score": 0.0 + } + } + ], + "compliance": { + "valid": false, + "issues": [ + { + "message": "Unclosed Anchor: [DEF:test_enable_belief_state_flag:Function] started at line 202", + "severity": "ERROR", + "line_number": 202 + }, + { + "message": "Unclosed Anchor: [DEF:test_enable_belief_state_flag:Function] started at line 202", + "severity": "ERROR", + "line_number": 202 + } + ], + "score": 0.0 + } + }, + { + "name": "reset_logger_state", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 26, + "end_line": 26, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], "children": [], "compliance": { "valid": true, @@ -23124,15 +25519,20 @@ } ], "compliance": { - "valid": true, + "valid": false, "issues": [ + { + "message": "Unclosed Anchor: [DEF:test_logger:Module] started at line 1", + "severity": "ERROR", + "line_number": 1 + }, { "message": "Missing Mandatory Tag: @SEMANTICS (required for STANDARD tier)", "severity": "WARNING", "line_number": 1 } ], - "score": 0.775 + "score": 0.0 } }, { @@ -23744,7 +26144,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 597, + "end_line": 596, "tags": { "TIER": "CRITICAL", "SEMANTICS": "task, manager, lifecycle, execution, state", @@ -23761,7 +26161,7 @@ "type": "Class", "tier": "CRITICAL", "start_line": 24, - "end_line": 596, + "end_line": 595, "tags": { "SEMANTICS": "task, manager, lifecycle, execution, state", "PURPOSE": "Manages the lifecycle of tasks, including their creation, execution, and state tracking.", @@ -23795,7 +26195,7 @@ "type": "Function", "tier": "STANDARD", "start_line": 72, - "end_line": 82, + "end_line": 81, "tags": { "PURPOSE": "Background thread that periodically flushes log buffer to database.", "PRE": "TaskManager is initialized.", @@ -23805,16 +26205,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": 72 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 72 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 72 + } + ], + "score": 0.55 } }, { "name": "_flush_logs", "type": "Function", "tier": "STANDARD", - "start_line": 84, - "end_line": 108, + "start_line": 83, + "end_line": 107, "tags": { "PURPOSE": "Flush all buffered logs to the database.", "PRE": "None.", @@ -23824,16 +26240,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": 83 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 83 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 83 + } + ], + "score": 0.55 } }, { "name": "_flush_task_logs", "type": "Function", "tier": "STANDARD", - "start_line": 110, - "end_line": 126, + "start_line": 109, + "end_line": 125, "tags": { "PURPOSE": "Flush logs for a specific task immediately.", "PRE": "task_id exists.", @@ -23852,8 +26284,8 @@ "name": "create_task", "type": "Function", "tier": "STANDARD", - "start_line": 128, - "end_line": 155, + "start_line": 127, + "end_line": 154, "tags": { "PURPOSE": "Creates and queues a new task for execution.", "PRE": "Plugin with plugin_id exists. Params are valid.", @@ -23874,8 +26306,8 @@ "name": "_run_task", "type": "Function", "tier": "STANDARD", - "start_line": 157, - "end_line": 221, + "start_line": 156, + "end_line": 220, "tags": { "PURPOSE": "Internal method to execute a task with TaskContext support.", "PRE": "Task exists in registry.", @@ -23894,8 +26326,8 @@ "name": "resolve_task", "type": "Function", "tier": "STANDARD", - "start_line": 223, - "end_line": 245, + "start_line": 222, + "end_line": 244, "tags": { "PURPOSE": "Resumes a task that is awaiting mapping.", "PRE": "Task exists and is in AWAITING_MAPPING state.", @@ -23915,8 +26347,8 @@ "name": "wait_for_resolution", "type": "Function", "tier": "STANDARD", - "start_line": 247, - "end_line": 267, + "start_line": 246, + "end_line": 266, "tags": { "PURPOSE": "Pauses execution and waits for a resolution signal.", "PRE": "Task exists.", @@ -23935,8 +26367,8 @@ "name": "wait_for_input", "type": "Function", "tier": "STANDARD", - "start_line": 269, - "end_line": 288, + "start_line": 268, + "end_line": 287, "tags": { "PURPOSE": "Pauses execution and waits for user input.", "PRE": "Task exists.", @@ -23955,8 +26387,8 @@ "name": "get_task", "type": "Function", "tier": "STANDARD", - "start_line": 290, - "end_line": 299, + "start_line": 289, + "end_line": 298, "tags": { "PURPOSE": "Retrieves a task by its ID.", "PRE": "task_id is a string.", @@ -23976,8 +26408,8 @@ "name": "get_all_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 301, - "end_line": 309, + "start_line": 300, + "end_line": 308, "tags": { "PURPOSE": "Retrieves all registered tasks.", "PRE": "None.", @@ -23996,8 +26428,8 @@ "name": "get_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 311, - "end_line": 349, + "start_line": 310, + "end_line": 348, "tags": { "PURPOSE": "Retrieves tasks with pagination and optional status filter.", "PRE": "limit and offset are non-negative integers.", @@ -24017,8 +26449,8 @@ "name": "get_task_logs", "type": "Function", "tier": "STANDARD", - "start_line": 351, - "end_line": 381, + "start_line": 350, + "end_line": 380, "tags": { "PURPOSE": "Retrieves logs for a specific task (from memory for running, persistence for completed).", "PRE": "task_id is a string.", @@ -24038,8 +26470,8 @@ "name": "get_task_log_stats", "type": "Function", "tier": "STANDARD", - "start_line": 383, - "end_line": 392, + "start_line": 382, + "end_line": 391, "tags": { "PURPOSE": "Get statistics about logs for a task.", "PRE": "task_id is a valid task ID.", @@ -24059,8 +26491,8 @@ "name": "get_task_log_sources", "type": "Function", "tier": "STANDARD", - "start_line": 394, - "end_line": 403, + "start_line": 393, + "end_line": 402, "tags": { "PURPOSE": "Get unique sources for a task's logs.", "PRE": "task_id is a valid task ID.", @@ -24080,8 +26512,8 @@ "name": "_add_log", "type": "Function", "tier": "STANDARD", - "start_line": 405, - "end_line": 455, + "start_line": 404, + "end_line": 454, "tags": { "PURPOSE": "Adds a log entry to a task buffer and notifies subscribers.", "PRE": "Task exists.", @@ -24100,8 +26532,8 @@ "name": "subscribe_logs", "type": "Function", "tier": "STANDARD", - "start_line": 457, - "end_line": 470, + "start_line": 456, + "end_line": 469, "tags": { "PURPOSE": "Subscribes to real-time logs for a task.", "PRE": "task_id is a string.", @@ -24121,8 +26553,8 @@ "name": "unsubscribe_logs", "type": "Function", "tier": "STANDARD", - "start_line": 472, - "end_line": 485, + "start_line": 471, + "end_line": 484, "tags": { "PURPOSE": "Unsubscribes from real-time logs for a task.", "PRE": "task_id is a string, queue is asyncio.Queue.", @@ -24141,8 +26573,8 @@ "name": "load_persisted_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 487, - "end_line": 497, + "start_line": 486, + "end_line": 496, "tags": { "PURPOSE": "Load persisted tasks using persistence service.", "PRE": "None.", @@ -24160,8 +26592,8 @@ "name": "await_input", "type": "Function", "tier": "STANDARD", - "start_line": 499, - "end_line": 519, + "start_line": 498, + "end_line": 518, "tags": { "PURPOSE": "Transition a task to AWAITING_INPUT state with input request.", "PRE": "Task exists and is in RUNNING state.", @@ -24181,8 +26613,8 @@ "name": "resume_task_with_password", "type": "Function", "tier": "STANDARD", - "start_line": 521, - "end_line": 548, + "start_line": 520, + "end_line": 547, "tags": { "PURPOSE": "Resume a task that is awaiting input with provided passwords.", "PRE": "Task exists and is in AWAITING_INPUT state.", @@ -24202,8 +26634,8 @@ "name": "clear_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 550, - "end_line": 594, + "start_line": 549, + "end_line": 593, "tags": { "PURPOSE": "Clears tasks based on status filter (also deletes associated logs).", "PRE": "status is Optional[TaskStatus].", @@ -24230,8 +26662,8 @@ "name": "sort_key", "type": "Function", "tier": "TRIVIAL", - "start_line": 337, - "end_line": 337, + "start_line": 336, + "end_line": 336, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -26101,7 +28533,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 81, + "end_line": 224, "tags": { "TIER": "STANDARD", "SEMANTICS": "api, migration, dashboards", @@ -26123,8 +28555,8 @@ "name": "get_dashboards", "type": "Function", "tier": "STANDARD", - "start_line": 18, - "end_line": 39, + "start_line": 22, + "end_line": 43, "tags": { "PURPOSE": "Fetch all dashboards from the specified environment for the grid.", "PRE": "Environment ID must be valid.", @@ -26144,8 +28576,8 @@ "name": "execute_migration", "type": "Function", "tier": "STANDARD", - "start_line": 41, - "end_line": 79, + "start_line": 45, + "end_line": 84, "tags": { "PURPOSE": "Execute the migration of selected dashboards.", "PRE": "Selection must be valid and environments must exist.", @@ -26160,6 +28592,139 @@ "issues": [], "score": 1.0 } + }, + { + "name": "get_migration_settings", + "type": "Function", + "tier": "STANDARD", + "start_line": 86, + "end_line": 97, + "tags": { + "PURPOSE": "Get current migration Cron string explicitly." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 86 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 86 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 86 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 86 + } + ], + "score": 0.2 + } + }, + { + "name": "update_migration_settings", + "type": "Function", + "tier": "STANDARD", + "start_line": 99, + "end_line": 118, + "tags": { + "PURPOSE": "Update migration Cron string." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 99 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 99 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 99 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 99 + } + ], + "score": 0.2 + } + }, + { + "name": "get_resource_mappings", + "type": "Function", + "tier": "STANDARD", + "start_line": 120, + "end_line": 164, + "tags": { + "PURPOSE": "Fetch synchronized object mappings with search, filtering, and pagination." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 120 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 120 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 120 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 120 + } + ], + "score": 0.2 + } + }, + { + "name": "trigger_sync_now", + "type": "Function", + "tier": "STANDARD", + "start_line": 166, + "end_line": 222, + "tags": { + "PURPOSE": "Triggers an immediate ID synchronization for all environments.", + "PRE": "At least one environment must be configured.", + "POST": "Environment rows are ensured in DB; sync_environment is called for each." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } } ], "compliance": { @@ -27532,7 +30097,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 1799, + "end_line": 1850, "tags": { "TIER": "STANDARD", "SEMANTICS": "api, assistant, chat, command, confirmation", @@ -28351,12 +30916,42 @@ "score": 0.7 } }, + { + "name": "_confirmation_summary", + "type": "Function", + "tier": "STANDARD", + "start_line": 925, + "end_line": 958, + "tags": { + "PURPOSE": "Build human-readable confirmation prompt for an intent before execution.", + "PRE": "intent contains operation and entities fields.", + "POST": "Returns descriptive Russian-language text ending with confirmation prompt." + }, + "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": 925 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 925 + } + ], + "score": 0.7 + } + }, { "name": "_clarification_text_for_intent", "type": "Function", "tier": "STANDARD", - "start_line": 921, - "end_line": 941, + "start_line": 961, + "end_line": 981, "tags": { "PURPOSE": "Convert technical missing-parameter errors into user-facing clarification prompts.", "PRE": "state was classified as needs_clarification for current intent/error combination.", @@ -28370,12 +30965,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 921 + "line_number": 961 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 921 + "line_number": 961 } ], "score": 0.7 @@ -28385,8 +30980,8 @@ "name": "_plan_intent_with_llm", "type": "Function", "tier": "STANDARD", - "start_line": 944, - "end_line": 1050, + "start_line": 984, + "end_line": 1090, "tags": { "PURPOSE": "Use active LLM provider to select best tool/operation from dynamic catalog.", "PRE": "tools list contains allowed operations for current user.", @@ -28400,12 +30995,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 944 + "line_number": 984 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 944 + "line_number": 984 } ], "score": 0.7 @@ -28415,8 +31010,8 @@ "name": "_authorize_intent", "type": "Function", "tier": "STANDARD", - "start_line": 1053, - "end_line": 1061, + "start_line": 1093, + "end_line": 1101, "tags": { "PURPOSE": "Validate user permissions for parsed intent before confirmation/dispatch.", "PRE": "intent.operation is present for known assistant command domains.", @@ -28430,12 +31025,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1053 + "line_number": 1093 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1053 + "line_number": 1093 } ], "score": 0.7 @@ -28445,8 +31040,8 @@ "name": "_dispatch_intent", "type": "Function", "tier": "STANDARD", - "start_line": 1064, - "end_line": 1301, + "start_line": 1104, + "end_line": 1351, "tags": { "PURPOSE": "Execute parsed assistant intent via existing task/plugin/git services.", "PRE": "intent operation is known and actor permissions are validated per operation.", @@ -28460,12 +31055,12 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1064 + "line_number": 1104 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1064 + "line_number": 1104 } ], "score": 0.7 @@ -28475,8 +31070,8 @@ "name": "send_message", "type": "Function", "tier": "STANDARD", - "start_line": 1305, - "end_line": 1469, + "start_line": 1355, + "end_line": 1520, "tags": { "PURPOSE": "Parse assistant command, enforce safety gates, and dispatch executable intent.", "PRE": "Authenticated user is available and message text is non-empty.", @@ -28495,8 +31090,8 @@ "name": "confirm_operation", "type": "Function", "tier": "STANDARD", - "start_line": 1473, - "end_line": 1535, + "start_line": 1524, + "end_line": 1586, "tags": { "PURPOSE": "Execute previously requested risky operation after explicit user confirmation.", "PRE": "confirmation_id exists, belongs to current user, is pending, and not expired.", @@ -28515,8 +31110,8 @@ "name": "cancel_operation", "type": "Function", "tier": "STANDARD", - "start_line": 1539, - "end_line": 1592, + "start_line": 1590, + "end_line": 1643, "tags": { "PURPOSE": "Cancel pending risky operation and mark confirmation token as cancelled.", "PRE": "confirmation_id exists, belongs to current user, and is still pending.", @@ -28535,8 +31130,8 @@ "name": "list_conversations", "type": "Function", "tier": "STANDARD", - "start_line": 1595, - "end_line": 1679, + "start_line": 1646, + "end_line": 1730, "tags": { "PURPOSE": "Return paginated conversation list for current user with archived flag and last message preview.", "PRE": "Authenticated user context and valid pagination params.", @@ -28555,8 +31150,8 @@ "name": "get_history", "type": "Function", "tier": "STANDARD", - "start_line": 1683, - "end_line": 1754, + "start_line": 1734, + "end_line": 1805, "tags": { "PURPOSE": "Retrieve paginated assistant conversation history for current user.", "PRE": "Authenticated user is available and page params are valid.", @@ -28575,8 +31170,8 @@ "name": "get_assistant_audit", "type": "Function", "tier": "STANDARD", - "start_line": 1758, - "end_line": 1797, + "start_line": 1809, + "end_line": 1848, "tags": { "PURPOSE": "Return assistant audit decisions for current user from persistent and in-memory stores.", "PRE": "User has tasks:READ permission.", @@ -28590,6 +31185,24 @@ "issues": [], "score": 1.0 } + }, + { + "name": "_label", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 945, + "end_line": 945, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } } ], "compliance": { @@ -28603,7 +31216,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 146, + "end_line": 147, "tags": { "TIER": "STANDARD", "SEMANTICS": "storage, files, upload, download, backup, repository", @@ -28623,7 +31236,7 @@ "type": "Function", "tier": "STANDARD", "start_line": 24, - "end_line": 47, + "end_line": 48, "tags": { "PURPOSE": "List all files and directories in the storage system.", "PRE": "None.", @@ -28648,8 +31261,8 @@ "name": "upload_file", "type": "Function", "tier": "STANDARD", - "start_line": 49, - "end_line": 80, + "start_line": 50, + "end_line": 81, "tags": { "PURPOSE": "Upload a file to the storage system.", "PRE": "file must be a valid UploadFile.", @@ -28675,8 +31288,8 @@ "name": "delete_file", "type": "Function", "tier": "STANDARD", - "start_line": 82, - "end_line": 112, + "start_line": 83, + "end_line": 113, "tags": { "PURPOSE": "Delete a specific file or directory.", "PRE": "category must be a valid FileCategory.", @@ -28702,8 +31315,8 @@ "name": "download_file", "type": "Function", "tier": "STANDARD", - "start_line": 114, - "end_line": 144, + "start_line": 115, + "end_line": 145, "tags": { "PURPOSE": "Retrieve a file for download.", "PRE": "category must be a valid FileCategory.", @@ -29084,7 +31697,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 396, + "end_line": 398, "tags": { "TIER": "STANDARD", "SEMANTICS": "api, dashboards, resources, hub", @@ -29112,7 +31725,7 @@ "type": "DataClass", "tier": "STANDARD", "start_line": 24, - "end_line": 28, + "end_line": 30, "tags": {}, "relations": [], "children": [], @@ -29126,8 +31739,8 @@ "name": "LastTask", "type": "DataClass", "tier": "STANDARD", - "start_line": 30, - "end_line": 34, + "start_line": 32, + "end_line": 36, "tags": {}, "relations": [], "children": [], @@ -29141,8 +31754,8 @@ "name": "DashboardItem", "type": "DataClass", "tier": "STANDARD", - "start_line": 36, - "end_line": 45, + "start_line": 38, + "end_line": 47, "tags": {}, "relations": [], "children": [], @@ -29156,8 +31769,8 @@ "name": "DashboardsResponse", "type": "DataClass", "tier": "STANDARD", - "start_line": 47, - "end_line": 54, + "start_line": 49, + "end_line": 56, "tags": {}, "relations": [], "children": [], @@ -29171,8 +31784,8 @@ "name": "DashboardChartItem", "type": "DataClass", "tier": "STANDARD", - "start_line": 56, - "end_line": 64, + "start_line": 58, + "end_line": 66, "tags": {}, "relations": [], "children": [], @@ -29186,8 +31799,8 @@ "name": "DashboardDatasetItem", "type": "DataClass", "tier": "STANDARD", - "start_line": 66, - "end_line": 74, + "start_line": 68, + "end_line": 76, "tags": {}, "relations": [], "children": [], @@ -29201,8 +31814,38 @@ "name": "DashboardDetailResponse", "type": "DataClass", "tier": "STANDARD", - "start_line": 76, - "end_line": 89, + "start_line": 78, + "end_line": 91, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "DatabaseMapping", + "type": "DataClass", + "tier": "STANDARD", + "start_line": 93, + "end_line": 100, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "DatabaseMappingsResponse", + "type": "DataClass", + "tier": "STANDARD", + "start_line": 102, + "end_line": 105, "tags": {}, "relations": [], "children": [], @@ -29216,8 +31859,8 @@ "name": "get_dashboards", "type": "Function", "tier": "STANDARD", - "start_line": 91, - "end_line": 169, + "start_line": 107, + "end_line": 185, "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", @@ -29238,12 +31881,38 @@ "score": 1.0 } }, + { + "name": "get_database_mappings", + "type": "Function", + "tier": "STANDARD", + "start_line": 187, + "end_line": 227, + "tags": { + "PURPOSE": "Get database mapping suggestions between source and target environments", + "PRE": "source_env_id and target_env_id are valid environment IDs", + "POST": "Returns list of suggested database mappings with confidence scores", + "PARAM": "target_env_id (str) - Target environment ID", + "RETURN": "DatabaseMappingsResponse - List of suggested mappings" + }, + "relations": [ + { + "type": "CALLS", + "target": "MappingService.get_suggestions" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "get_dashboard_detail", "type": "Function", "tier": "STANDARD", - "start_line": 171, - "end_line": 202, + "start_line": 229, + "end_line": 260, "tags": { "PURPOSE": "Fetch detailed dashboard info with related charts and datasets", "PRE": "env_id must be valid and dashboard_id must exist", @@ -29266,8 +31935,8 @@ "name": "MigrateRequest", "type": "DataClass", "tier": "STANDARD", - "start_line": 204, - "end_line": 211, + "start_line": 262, + "end_line": 269, "tags": {}, "relations": [], "children": [], @@ -29281,8 +31950,8 @@ "name": "TaskResponse", "type": "DataClass", "tier": "STANDARD", - "start_line": 213, - "end_line": 216, + "start_line": 271, + "end_line": 274, "tags": {}, "relations": [], "children": [], @@ -29296,8 +31965,8 @@ "name": "migrate_dashboards", "type": "Function", "tier": "STANDARD", - "start_line": 218, - "end_line": 276, + "start_line": 276, + "end_line": 334, "tags": { "PURPOSE": "Trigger bulk migration of dashboards from source to target environment", "PRE": "dashboard_ids is a non-empty list", @@ -29326,8 +31995,8 @@ "name": "BackupRequest", "type": "DataClass", "tier": "STANDARD", - "start_line": 278, - "end_line": 283, + "start_line": 336, + "end_line": 341, "tags": {}, "relations": [], "children": [], @@ -29341,8 +32010,8 @@ "name": "backup_dashboards", "type": "Function", "tier": "STANDARD", - "start_line": 285, - "end_line": 338, + "start_line": 343, + "end_line": 396, "tags": { "PURPOSE": "Trigger bulk backup of dashboards with optional cron schedule", "PRE": "dashboard_ids is a non-empty list", @@ -29366,62 +32035,6 @@ "issues": [], "score": 1.0 } - }, - { - "name": "DatabaseMapping", - "type": "DataClass", - "tier": "STANDARD", - "start_line": 340, - "end_line": 347, - "tags": {}, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "DatabaseMappingsResponse", - "type": "DataClass", - "tier": "STANDARD", - "start_line": 349, - "end_line": 352, - "tags": {}, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "get_database_mappings", - "type": "Function", - "tier": "STANDARD", - "start_line": 354, - "end_line": 394, - "tags": { - "PURPOSE": "Get database mapping suggestions between source and target environments", - "PRE": "source_env_id and target_env_id are valid environment IDs", - "POST": "Returns list of suggested database mappings with confidence scores", - "PARAM": "target_env_id (str) - Target environment ID", - "RETURN": "DatabaseMappingsResponse - List of suggested mappings" - }, - "relations": [ - { - "type": "CALLS", - "target": "MappingService.get_suggestions" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } } ], "compliance": { @@ -31304,7 +33917,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 558, + "end_line": null, "tags": { "TIER": "STANDARD", "SEMANTICS": "tests, assistant, api, confirmation, status", @@ -31670,123 +34283,219 @@ } }, { - "name": "test_llm_validation_missing_dashboard_returns_needs_clarification", + "name": "test_llm_validation_with_dashboard_ref_requires_confirmation", "type": "Function", "tier": "STANDARD", "start_line": 395, - "end_line": 417, + "end_line": null, "tags": { - "PURPOSE": "LLM validation command without resolvable dashboard id must request clarification instead of generic failure.", - "PRE": "Command intent resolves to run_llm_validation but dashboard id cannot be inferred.", - "POST": "Assistant response state is needs_clarification with guidance text." + "PURPOSE": "LLM validation with dashboard_ref should now require confirmation before dispatch.", + "PRE": "User sends natural-language validation request with dashboard name (not numeric id).", + "POST": "Response state is needs_confirmation since all state-changing operations are now gated." }, "relations": [], - "children": [], + "children": [ + { + "name": "test_list_conversations_groups_by_conversation_and_marks_archived", + "type": "Function", + "tier": "STANDARD", + "start_line": 423, + "end_line": 470, + "tags": { + "PURPOSE": "Conversations endpoint must group messages and compute archived marker by inactivity threshold.", + "PRE": "Fake DB contains two conversations with different update timestamps.", + "POST": "Response includes both conversations with archived flag set for stale one." + }, + "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": 423 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 423 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 423 + } + ], + "score": 0.55 + } + }, + { + "name": "test_history_from_latest_returns_recent_page_first", + "type": "Function", + "tier": "STANDARD", + "start_line": 473, + "end_line": 511, + "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.", + "POST": "First page returns latest messages and has_next indicates older pages exist." + }, + "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": 473 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 473 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 473 + } + ], + "score": 0.55 + } + }, + { + "name": "test_list_conversations_archived_only_filters_active", + "type": "Function", + "tier": "STANDARD", + "start_line": 514, + "end_line": 560, + "tags": { + "PURPOSE": "archived_only mode must return only archived conversations.", + "PRE": "Dataset includes one active and one archived conversation.", + "POST": "Only archived conversation remains in response payload." + }, + "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": 514 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 514 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 514 + } + ], + "score": 0.55 + } + }, + { + "name": "test_guarded_operation_always_requires_confirmation", + "type": "Function", + "tier": "STANDARD", + "start_line": 563, + "end_line": 588, + "tags": { + "PURPOSE": "Non-dangerous (guarded) commands must still require confirmation before execution.", + "PRE": "Admin user sends a backup command that was previously auto-executed.", + "POST": "Response state is needs_confirmation with confirm and cancel actions." + }, + "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": 563 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 563 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 563 + } + ], + "score": 0.55 + } + }, + { + "name": "test_guarded_operation_confirm_roundtrip", + "type": "Function", + "tier": "STANDARD", + "start_line": 591, + "end_line": 627, + "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": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 591 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 591 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 591 + } + ], + "score": 0.55 + } + } + ], "compliance": { - "valid": true, + "valid": false, "issues": [ + { + "message": "Unclosed Anchor: [DEF:test_llm_validation_with_dashboard_ref_requires_confirmation:Function] started at line 395", + "severity": "ERROR", + "line_number": 395 + }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", "line_number": 395 }, + { + "message": "Unclosed Anchor: [DEF:test_llm_validation_with_dashboard_ref_requires_confirmation:Function] started at line 395", + "severity": "ERROR", + "line_number": 395 + }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", "line_number": 395 } ], - "score": 0.7 - } - }, - { - "name": "test_list_conversations_groups_by_conversation_and_marks_archived", - "type": "Function", - "tier": "STANDARD", - "start_line": 420, - "end_line": 467, - "tags": { - "PURPOSE": "Conversations endpoint must group messages and compute archived marker by inactivity threshold.", - "PRE": "Fake DB contains two conversations with different update timestamps.", - "POST": "Response includes both conversations with archived flag set for stale one." - }, - "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": 420 - }, - { - "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 420 - } - ], - "score": 0.7 - } - }, - { - "name": "test_history_from_latest_returns_recent_page_first", - "type": "Function", - "tier": "STANDARD", - "start_line": 470, - "end_line": 508, - "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.", - "POST": "First page returns latest messages and has_next indicates older pages exist." - }, - "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": 470 - }, - { - "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 470 - } - ], - "score": 0.7 - } - }, - { - "name": "test_list_conversations_archived_only_filters_active", - "type": "Function", - "tier": "STANDARD", - "start_line": 511, - "end_line": 557, - "tags": { - "PURPOSE": "archived_only mode must return only archived conversations.", - "PRE": "Dataset includes one active and one archived conversation.", - "POST": "Only archived conversation remains in response payload." - }, - "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": 511 - }, - { - "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 511 - } - ], - "score": 0.7 + "score": 0.0 } }, { @@ -32150,10 +34859,353 @@ } } ], + "compliance": { + "valid": false, + "issues": [ + { + "message": "Unclosed Anchor: [DEF:backend.src.api.routes.__tests__.test_assistant_api:Module] started at line 1", + "severity": "ERROR", + "line_number": 1 + } + ], + "score": 0.0 + } + }, + { + "name": "backend.src.api.routes.__tests__.test_migration_routes", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 346, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Unit tests for migration API route handlers.", + "LAYER": "API" + }, + "relations": [ + { + "type": "VERIFIES", + "target": "backend.src.api.routes.migration" + } + ], + "children": [ + { + "name": "db_session", + "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": "_make_config_manager", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 55, + "end_line": 55, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_migration_settings_returns_default_cron", + "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": "test_get_migration_settings_returns_fallback_when_no_cron", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 84, + "end_line": 84, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_update_migration_settings_saves_cron", + "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_update_migration_settings_rejects_missing_cron", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 117, + "end_line": 117, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_resource_mappings_returns_formatted_list", + "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": "test_get_resource_mappings_respects_pagination", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 166, + "end_line": 166, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_resource_mappings_search_by_name", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 186, + "end_line": 186, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_resource_mappings_filter_by_env", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 200, + "end_line": 200, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_resource_mappings_filter_by_type", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 214, + "end_line": 214, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_mock_env", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 230, + "end_line": 230, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_make_sync_config_manager", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 243, + "end_line": 243, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_trigger_sync_now_creates_env_row_and_syncs", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 256, + "end_line": 256, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_trigger_sync_now_rejects_empty_environments", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 286, + "end_line": 286, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_trigger_sync_now_handles_partial_failure", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 300, + "end_line": 300, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_trigger_sync_now_idempotent_env_upsert", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 330, + "end_line": 330, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], "compliance": { "valid": true, - "issues": [], - "score": 1.0 + "issues": [ + { + "message": "Missing Mandatory Tag: @SEMANTICS (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.775 } }, { @@ -32505,7 +35557,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 75, + "end_line": null, "tags": { "TIER": "STANDARD", "SEMANTICS": "database, mapping, environment, migration, sqlalchemy, sqlite", @@ -32522,11 +35574,29 @@ ], "children": [ { - "name": "MigrationStatus", + "name": "ResourceType", "type": "Class", "tier": "TRIVIAL", "start_line": 22, - "end_line": 31, + "end_line": 29, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Enumeration of possible Superset resource types for ID mapping." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "MigrationStatus", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 32, + "end_line": 41, "tags": { "TIER": "TRIVIAL", "PURPOSE": "Enumeration of possible migration job statuses." @@ -32543,8 +35613,8 @@ "name": "Environment", "type": "Class", "tier": "STANDARD", - "start_line": 33, - "end_line": 43, + "start_line": 43, + "end_line": 53, "tags": { "TIER": "STANDARD", "PURPOSE": "Represents a Superset instance environment." @@ -32561,8 +35631,8 @@ "name": "DatabaseMapping", "type": "Class", "tier": "STANDARD", - "start_line": 45, - "end_line": 59, + "start_line": 55, + "end_line": 69, "tags": { "TIER": "STANDARD", "PURPOSE": "Represents a mapping between source and target databases." @@ -32579,25 +35649,62 @@ "name": "MigrationJob", "type": "Class", "tier": "TRIVIAL", - "start_line": 61, - "end_line": 73, + "start_line": 71, + "end_line": null, "tags": { "TIER": "TRIVIAL", "PURPOSE": "Represents a single migration execution job." }, "relations": [], - "children": [], + "children": [ + { + "name": "ResourceMapping", + "type": "Class", + "tier": "STANDARD", + "start_line": 83, + "end_line": 97, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Maps a universal UUID for a resource to its actual ID on a specific environment.", + "TEST_DATA": "resource_mapping_record -> {'environment_id': 'prod-env-1', 'resource_type': 'chart', 'uuid': '123e4567-e89b-12d3-a456-426614174000', 'remote_integer_id': '42'}" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], "compliance": { - "valid": true, - "issues": [], - "score": 1.0 + "valid": false, + "issues": [ + { + "message": "Unclosed Anchor: [DEF:MigrationJob:Class] started at line 71", + "severity": "ERROR", + "line_number": 71 + }, + { + "message": "Unclosed Anchor: [DEF:MigrationJob:Class] started at line 71", + "severity": "ERROR", + "line_number": 71 + } + ], + "score": 0.0 } } ], "compliance": { - "valid": true, - "issues": [], - "score": 1.0 + "valid": false, + "issues": [ + { + "message": "Unclosed Anchor: [DEF:backend.src.models.mapping:Module] started at line 1", + "severity": "ERROR", + "line_number": 1 + } + ], + "score": 0.0 } }, { @@ -33006,7 +36113,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 31, + "end_line": 32, "tags": { "TIER": "STANDARD", "SEMANTICS": "dashboard, model, metadata, migration", @@ -33043,7 +36150,7 @@ "type": "Class", "tier": "TRIVIAL", "start_line": 21, - "end_line": 29, + "end_line": 30, "tags": { "TIER": "TRIVIAL", "PURPOSE": "Represents the user's selection of dashboards to migrate." @@ -33343,12 +36450,521 @@ "score": 1.0 } }, + { + "name": "test_report_models", + "type": "Module", + "tier": "CRITICAL", + "start_line": 1, + "end_line": 235, + "tags": { + "TIER": "CRITICAL", + "PURPOSE": "Unit tests for report Pydantic models and their validators", + "LAYER": "Domain" + }, + "relations": [ + { + "type": "TESTS", + "target": "backend.src.models.report" + } + ], + "children": [ + { + "name": "test_enum_values", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 18, + "end_line": 18, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_enum_values", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 30, + "end_line": 30, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_valid_creation", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 41, + "end_line": 41, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_minimal_creation", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 48, + "end_line": 48, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_make_report", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 58, + "end_line": 58, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_valid_creation", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 71, + "end_line": 71, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_empty_report_id_raises", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 77, + "end_line": 77, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_whitespace_report_id_raises", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 81, + "end_line": 81, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_empty_task_id_raises", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 85, + "end_line": 85, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_empty_summary_raises", + "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": "test_summary_whitespace_trimmed", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 93, + "end_line": 93, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_optional_fields", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 97, + "end_line": 97, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_with_error_context", + "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": "test_defaults", + "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": "test_invalid_sort_by_raises", + "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": "test_valid_sort_by_values", + "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": "test_invalid_sort_order_raises", + "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_valid_sort_order_values", + "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_time_range_validation_valid", + "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_time_range_validation_invalid", + "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_page_ge_1", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 158, + "end_line": 158, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_page_size_bounds", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 163, + "end_line": 163, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_valid_creation", + "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_with_items", + "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": "test_valid_creation", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 205, + "end_line": 205, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_with_all_fields", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 218, + "end_line": 218, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": false, + "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", + "line_number": 1 + } + ], + "score": 0.0 + } + }, { "name": "backend.src.services.resource_service", "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 251, + "end_line": 269, "tags": { "TIER": "STANDARD", "SEMANTICS": "service, resources, dashboards, datasets, tasks, git", @@ -33376,7 +36992,7 @@ "type": "Class", "tier": "STANDARD", "start_line": 19, - "end_line": 250, + "end_line": 268, "tags": { "PURPOSE": "Provides centralized access to resource data with enhanced metadata" }, @@ -33491,7 +37107,7 @@ "type": "Function", "tier": "STANDARD", "start_line": 153, - "end_line": 192, + "end_line": 210, "tags": { "PURPOSE": "Get Git sync status for a dashboard", "PRE": "dashboard_id is a valid integer", @@ -33532,8 +37148,8 @@ "name": "_get_last_task_for_resource", "type": "Function", "tier": "STANDARD", - "start_line": 194, - "end_line": 226, + "start_line": 212, + "end_line": 244, "tags": { "PURPOSE": "Get the most recent task for a specific resource", "PRE": "resource_id is a valid string", @@ -33549,17 +37165,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 194 + "line_number": 212 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 194 + "line_number": 212 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 194 + "line_number": 212 } ], "score": 0.55 @@ -33569,8 +37185,8 @@ "name": "_extract_resource_name_from_task", "type": "Function", "tier": "STANDARD", - "start_line": 228, - "end_line": 237, + "start_line": 246, + "end_line": 255, "tags": { "PURPOSE": "Extract resource name from task params", "PRE": "task is a valid Task object", @@ -33586,17 +37202,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 228 + "line_number": 246 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 228 + "line_number": 246 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 228 + "line_number": 246 } ], "score": 0.55 @@ -33606,8 +37222,8 @@ "name": "_extract_resource_type_from_task", "type": "Function", "tier": "STANDARD", - "start_line": 239, - "end_line": 248, + "start_line": 257, + "end_line": 266, "tags": { "PURPOSE": "Extract resource type from task params", "PRE": "task is a valid Task object", @@ -33623,17 +37239,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 239 + "line_number": 257 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 239 + "line_number": 257 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 239 + "line_number": 257 } ], "score": 0.55 @@ -34438,7 +38054,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 412, + "end_line": 414, "tags": { "SEMANTICS": "git, service, gitpython, repository, version_control", "PURPOSE": "Core Git logic using GitPython to manage dashboard repositories.", @@ -34465,7 +38081,7 @@ "type": "Class", "tier": "STANDARD", "start_line": 21, - "end_line": 411, + "end_line": 413, "tags": { "PURPOSE": "Wrapper for GitPython operations with semantic logging and error handling." }, @@ -34496,7 +38112,7 @@ "type": "Function", "tier": "STANDARD", "start_line": 46, - "end_line": 55, + "end_line": 57, "tags": { "PURPOSE": "Resolves the local filesystem path for a dashboard's repository.", "PARAM": "dashboard_id (int)", @@ -34516,8 +38132,8 @@ "name": "init_repo", "type": "Function", "tier": "STANDARD", - "start_line": 57, - "end_line": 82, + "start_line": 59, + "end_line": 84, "tags": { "PURPOSE": "Initialize or clone a repository for a dashboard.", "PARAM": "pat (str) - Personal Access Token for authentication.", @@ -34537,8 +38153,8 @@ "name": "get_repo", "type": "Function", "tier": "STANDARD", - "start_line": 84, - "end_line": 100, + "start_line": 86, + "end_line": 102, "tags": { "PURPOSE": "Get Repo object for a dashboard.", "PRE": "Repository must exist on disk for the given dashboard_id.", @@ -34557,8 +38173,8 @@ "name": "list_branches", "type": "Function", "tier": "STANDARD", - "start_line": 102, - "end_line": 154, + "start_line": 104, + "end_line": 156, "tags": { "PURPOSE": "List all branches for a dashboard's repository.", "PRE": "Repository for dashboard_id exists.", @@ -34577,8 +38193,8 @@ "name": "create_branch", "type": "Function", "tier": "STANDARD", - "start_line": 156, - "end_line": 190, + "start_line": 158, + "end_line": 192, "tags": { "PURPOSE": "Create a new branch from an existing one.", "PARAM": "from_branch (str) - Source branch.", @@ -34597,8 +38213,8 @@ "name": "checkout_branch", "type": "Function", "tier": "STANDARD", - "start_line": 192, - "end_line": 201, + "start_line": 194, + "end_line": 203, "tags": { "PURPOSE": "Switch to a specific branch.", "PRE": "Repository exists and the specified branch name exists.", @@ -34616,8 +38232,8 @@ "name": "commit_changes", "type": "Function", "tier": "STANDARD", - "start_line": 203, - "end_line": 227, + "start_line": 205, + "end_line": 229, "tags": { "PURPOSE": "Stage and commit changes.", "PARAM": "files (List[str]) - Optional list of specific files to stage.", @@ -34636,8 +38252,8 @@ "name": "push_changes", "type": "Function", "tier": "STANDARD", - "start_line": 229, - "end_line": 261, + "start_line": 231, + "end_line": 263, "tags": { "PURPOSE": "Push local commits to remote.", "PRE": "Repository exists and has an 'origin' remote.", @@ -34655,8 +38271,8 @@ "name": "pull_changes", "type": "Function", "tier": "STANDARD", - "start_line": 263, - "end_line": 284, + "start_line": 265, + "end_line": 286, "tags": { "PURPOSE": "Pull changes from remote.", "PRE": "Repository exists and has an 'origin' remote.", @@ -34674,8 +38290,8 @@ "name": "get_status", "type": "Function", "tier": "STANDARD", - "start_line": 286, - "end_line": 310, + "start_line": 288, + "end_line": 312, "tags": { "PURPOSE": "Get current repository status (dirty files, untracked, etc.)", "PRE": "Repository for dashboard_id exists.", @@ -34694,8 +38310,8 @@ "name": "get_diff", "type": "Function", "tier": "STANDARD", - "start_line": 312, - "end_line": 329, + "start_line": 314, + "end_line": 331, "tags": { "PURPOSE": "Generate diff for a file or the whole repository.", "PARAM": "staged (bool) - Whether to show staged changes.", @@ -34715,8 +38331,8 @@ "name": "get_commit_history", "type": "Function", "tier": "STANDARD", - "start_line": 331, - "end_line": 359, + "start_line": 333, + "end_line": 361, "tags": { "PURPOSE": "Retrieve commit history for a repository.", "PARAM": "limit (int) - Max number of commits to return.", @@ -34736,8 +38352,8 @@ "name": "test_connection", "type": "Function", "tier": "STANDARD", - "start_line": 361, - "end_line": 409, + "start_line": 363, + "end_line": 411, "tags": { "PURPOSE": "Test connection to Git provider using PAT.", "PARAM": "pat (str)", @@ -34911,6 +38527,400 @@ "score": 0.775 } }, + { + "name": "test_encryption_manager", + "type": "Module", + "tier": "CRITICAL", + "start_line": 1, + "end_line": 126, + "tags": { + "TIER": "CRITICAL", + "SEMANTICS": "encryption, security, fernet, api-keys, tests", + "PURPOSE": "Unit tests for EncryptionManager encrypt/decrypt functionality.", + "LAYER": "Domain", + "INVARIANT": "Encrypt+decrypt roundtrip always returns original plaintext." + }, + "relations": [ + { + "type": "TESTS", + "target": "backend.src.services.llm_provider.EncryptionManager" + } + ], + "children": [ + { + "name": "TestEncryptionManager", + "type": "Class", + "tier": "STANDARD", + "start_line": 18, + "end_line": 125, + "tags": { + "PURPOSE": "Validate EncryptionManager encrypt/decrypt roundtrip, uniqueness, and error handling.", + "PRE": "cryptography package installed.", + "POST": "All encrypt/decrypt invariants verified." + }, + "relations": [], + "children": [ + { + "name": "test_encrypt_decrypt_roundtrip", + "type": "Function", + "tier": "STANDARD", + "start_line": 44, + "end_line": 55, + "tags": { + "PURPOSE": "Encrypt then decrypt returns original plaintext.", + "PRE": "Valid plaintext string.", + "POST": "Decrypted output equals original input." + }, + "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": 44 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 44 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 44 + } + ], + "score": 0.55 + } + }, + { + "name": "test_encrypt_produces_different_output", + "type": "Function", + "tier": "STANDARD", + "start_line": 57, + "end_line": 67, + "tags": { + "PURPOSE": "Same plaintext produces different ciphertext (Fernet uses random IV).", + "PRE": "Two encrypt calls with same input.", + "POST": "Ciphertexts differ but both decrypt to same value." + }, + "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": 57 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 57 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 57 + } + ], + "score": 0.55 + } + }, + { + "name": "test_different_inputs_yield_different_ciphertext", + "type": "Function", + "tier": "STANDARD", + "start_line": 69, + "end_line": 78, + "tags": { + "PURPOSE": "Different inputs produce different ciphertexts.", + "PRE": "Two different plaintext values.", + "POST": "Encrypted outputs differ." + }, + "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": 69 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 69 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 69 + } + ], + "score": 0.55 + } + }, + { + "name": "test_decrypt_invalid_data_raises", + "type": "Function", + "tier": "STANDARD", + "start_line": 80, + "end_line": 88, + "tags": { + "PURPOSE": "Decrypting invalid data raises InvalidToken.", + "PRE": "Invalid ciphertext string.", + "POST": "Exception raised." + }, + "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": 80 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 80 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 80 + } + ], + "score": 0.55 + } + }, + { + "name": "test_encrypt_empty_string", + "type": "Function", + "tier": "STANDARD", + "start_line": 90, + "end_line": 100, + "tags": { + "PURPOSE": "Encrypting and decrypting an empty string works.", + "PRE": "Empty string input.", + "POST": "Decrypted output equals empty string." + }, + "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": 90 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 90 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 90 + } + ], + "score": 0.55 + } + }, + { + "name": "test_custom_key_roundtrip", + "type": "Function", + "tier": "STANDARD", + "start_line": 102, + "end_line": 123, + "tags": { + "PURPOSE": "Custom Fernet key produces valid roundtrip.", + "PRE": "Generated Fernet key.", + "POST": "Encrypt/decrypt with custom key succeeds." + }, + "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": 102 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 102 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 102 + } + ], + "score": 0.55 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + }, + { + "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + } + ], + "score": 0.5499999999999999 + } + }, + { + "name": "_make_manager", + "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 + } + }, + { + "name": "__init__", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 34, + "end_line": 34, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "encrypt", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 37, + "end_line": 37, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "decrypt", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 39, + "end_line": 39, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "__init__", + "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": "encrypt", + "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": "decrypt", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 116, + "end_line": 116, + "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.__tests__.test_llm_prompt_templates", "type": "Module", @@ -35892,6 +39902,353 @@ "score": 1.0 } }, + { + "name": "test_report_service", + "type": "Module", + "tier": "CRITICAL", + "start_line": 1, + "end_line": 181, + "tags": { + "TIER": "CRITICAL", + "PURPOSE": "Unit tests for ReportsService list/detail operations", + "LAYER": "Domain" + }, + "relations": [ + { + "type": "TESTS", + "target": "backend.src.services.reports.report_service.ReportsService" + } + ], + "children": [ + { + "name": "_make_task", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 16, + "end_line": 16, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_make_service", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 34, + "end_line": 34, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_empty_tasks_returns_empty_collection", + "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": "test_single_task_normalized", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 48, + "end_line": 48, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_pagination_first_page", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 57, + "end_line": 57, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_pagination_last_page", + "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": "test_filter_by_status", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 82, + "end_line": 82, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_filter_by_task_type", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 93, + "end_line": 93, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_search_filter", + "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": "test_sort_by_status", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 117, + "end_line": 117, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_applied_filters_echoed", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 128, + "end_line": 128, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_make_service", + "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_detail_found", + "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_detail_not_found", + "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": "test_detail_includes_timeline", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 158, + "end_line": 158, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_detail_failed_task_has_next_actions", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 168, + "end_line": 168, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_detail_success_task_no_error_next_actions", + "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 + } + } + ], + "compliance": { + "valid": false, + "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", + "line_number": 1 + } + ], + "score": 0.0 + } + }, { "name": "backend.tests.test_report_normalizer", "type": "Module", @@ -36960,7 +41317,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 399, + "end_line": 401, "tags": { "SEMANTICS": "git, plugin, dashboard, version_control, sync, deploy", "PURPOSE": "\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 Superset.", @@ -36995,8 +41352,8 @@ "name": "GitPlugin", "type": "Class", "tier": "STANDARD", - "start_line": 30, - "end_line": 398, + "start_line": 32, + "end_line": 400, "tags": { "PURPOSE": "\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Git Integration \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432." }, @@ -37006,8 +41363,8 @@ "name": "__init__", "type": "Function", "tier": "STANDARD", - "start_line": 34, - "end_line": 62, + "start_line": 36, + "end_line": 64, "tags": { "PURPOSE": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0438 \u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.", "PRE": "config.json exists or shared config_manager is available.", @@ -37025,8 +41382,8 @@ "name": "id", "type": "Function", "tier": "STANDARD", - "start_line": 65, - "end_line": 72, + "start_line": 67, + "end_line": 74, "tags": { "PURPOSE": "Returns the plugin identifier.", "PRE": "GitPlugin is initialized.", @@ -37044,8 +41401,8 @@ "name": "name", "type": "Function", "tier": "STANDARD", - "start_line": 75, - "end_line": 82, + "start_line": 77, + "end_line": 84, "tags": { "PURPOSE": "Returns the plugin name.", "PRE": "GitPlugin is initialized.", @@ -37063,8 +41420,8 @@ "name": "description", "type": "Function", "tier": "STANDARD", - "start_line": 85, - "end_line": 92, + "start_line": 87, + "end_line": 94, "tags": { "PURPOSE": "Returns the plugin description.", "PRE": "GitPlugin is initialized.", @@ -37082,8 +41439,8 @@ "name": "version", "type": "Function", "tier": "STANDARD", - "start_line": 95, - "end_line": 102, + "start_line": 97, + "end_line": 104, "tags": { "PURPOSE": "Returns the plugin version.", "PRE": "GitPlugin is initialized.", @@ -37101,8 +41458,8 @@ "name": "ui_route", "type": "Function", "tier": "STANDARD", - "start_line": 105, - "end_line": 111, + "start_line": 107, + "end_line": 113, "tags": { "PURPOSE": "Returns the frontend route for the git plugin.", "RETURN": "str - \"/git\"" @@ -37115,32 +41472,32 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 105 + "line_number": 107 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 105 + "line_number": 107 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 105 + "line_number": 107 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 105 + "line_number": 107 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 105 + "line_number": 107 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 105 + "line_number": 107 } ], "score": 0.0 @@ -37150,8 +41507,8 @@ "name": "get_schema", "type": "Function", "tier": "STANDARD", - "start_line": 113, - "end_line": 130, + "start_line": 115, + "end_line": 132, "tags": { "PURPOSE": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 JSON-\u0441\u0445\u0435\u043c\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043f\u043b\u0430\u0433\u0438\u043d\u0430.", "PRE": "GitPlugin is initialized.", @@ -37170,8 +41527,8 @@ "name": "initialize", "type": "Function", "tier": "STANDARD", - "start_line": 132, - "end_line": 397, + "start_line": 134, + "end_line": 399, "tags": { "PURPOSE": "\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043f\u043b\u0430\u0433\u0438\u043d\u0430.", "PRE": "GitPlugin is initialized.", @@ -37183,8 +41540,8 @@ "name": "execute", "type": "Function", "tier": "STANDARD", - "start_line": 140, - "end_line": 177, + "start_line": 142, + "end_line": 179, "tags": { "PURPOSE": "\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 TaskContext.", "PRE": "task_data \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 'operation' \u0438 'dashboard_id'.", @@ -37213,8 +41570,8 @@ "name": "_handle_sync", "type": "Function", "tier": "STANDARD", - "start_line": 179, - "end_line": 259, + "start_line": 181, + "end_line": 261, "tags": { "PURPOSE": "\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0438\u0437 Superset \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432 Git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439.", "PRE": "\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0434\u043b\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c.", @@ -37244,8 +41601,8 @@ "name": "_handle_deploy", "type": "Function", "tier": "STANDARD", - "start_line": 261, - "end_line": 330, + "start_line": 263, + "end_line": 332, "tags": { "PURPOSE": "\u0423\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432 ZIP \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 Superset.", "PRE": "environment_id \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u043c\u0443 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044e.", @@ -37271,8 +41628,8 @@ "name": "_get_env", "type": "Function", "tier": "STANDARD", - "start_line": 332, - "end_line": 395, + "start_line": 334, + "end_line": 397, "tags": { "PURPOSE": "\u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.", "PARAM": "env_id (Optional[str]) - ID \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.", @@ -37302,12 +41659,12 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 30 + "line_number": 32 }, { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 30 + "line_number": 32 } ], "score": 0.5499999999999999 @@ -37331,7 +41688,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 380, + "end_line": 407, "tags": { "SEMANTICS": "migration, superset, automation, dashboard, plugin", "PURPOSE": "A plugin that provides functionality to migrate Superset dashboards between environments.", @@ -37360,8 +41717,8 @@ "name": "MigrationPlugin", "type": "Class", "tier": "STANDARD", - "start_line": 23, - "end_line": 379, + "start_line": 24, + "end_line": 406, "tags": { "PURPOSE": "Implementation of the migration plugin logic." }, @@ -37371,8 +41728,8 @@ "name": "id", "type": "Function", "tier": "STANDARD", - "start_line": 31, - "end_line": 39, + "start_line": 32, + "end_line": 40, "tags": { "PURPOSE": "Returns the unique identifier for the migration plugin.", "PRE": "None.", @@ -37391,8 +41748,8 @@ "name": "name", "type": "Function", "tier": "STANDARD", - "start_line": 42, - "end_line": 50, + "start_line": 43, + "end_line": 51, "tags": { "PURPOSE": "Returns the human-readable name of the migration plugin.", "PRE": "None.", @@ -37411,8 +41768,8 @@ "name": "description", "type": "Function", "tier": "STANDARD", - "start_line": 53, - "end_line": 61, + "start_line": 54, + "end_line": 62, "tags": { "PURPOSE": "Returns a description of the migration plugin.", "PRE": "None.", @@ -37431,8 +41788,8 @@ "name": "version", "type": "Function", "tier": "STANDARD", - "start_line": 64, - "end_line": 72, + "start_line": 65, + "end_line": 73, "tags": { "PURPOSE": "Returns the version of the migration plugin.", "PRE": "None.", @@ -37451,8 +41808,8 @@ "name": "ui_route", "type": "Function", "tier": "STANDARD", - "start_line": 75, - "end_line": 81, + "start_line": 76, + "end_line": 82, "tags": { "PURPOSE": "Returns the frontend route for the migration plugin.", "RETURN": "str - \"/migration\"" @@ -37465,32 +41822,32 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 75 + "line_number": 76 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 75 + "line_number": 76 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 75 + "line_number": 76 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 75 + "line_number": 76 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 75 + "line_number": 76 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 75 + "line_number": 76 } ], "score": 0.0 @@ -37500,8 +41857,8 @@ "name": "get_schema", "type": "Function", "tier": "STANDARD", - "start_line": 83, - "end_line": 132, + "start_line": 84, + "end_line": 133, "tags": { "PURPOSE": "Returns the JSON schema for migration plugin parameters.", "PRE": "Config manager is available.", @@ -37520,8 +41877,8 @@ "name": "execute", "type": "Function", "tier": "STANDARD", - "start_line": 134, - "end_line": 378, + "start_line": 135, + "end_line": 405, "tags": { "PURPOSE": "Executes the dashboard migration logic with TaskContext support.", "PARAM": "context (Optional[TaskContext]) - Task context for logging with source attribution.", @@ -37534,8 +41891,8 @@ "name": "MigrationPlugin.execute", "type": "Action", "tier": "STANDARD", - "start_line": 155, - "end_line": 377, + "start_line": 157, + "end_line": 404, "tags": { "PURPOSE": "Execute the migration logic with proper task logging." }, @@ -37561,12 +41918,12 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 23 + "line_number": 24 }, { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 23 + "line_number": 24 } ], "score": 0.5499999999999999 @@ -38505,7 +42862,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 344, + "end_line": 372, "tags": { "SEMANTICS": "storage, files, filesystem, plugin", "PURPOSE": "Provides core filesystem operations for managing backups and repositories.", @@ -38532,7 +42889,7 @@ "type": "Class", "tier": "STANDARD", "start_line": 27, - "end_line": 343, + "end_line": 371, "tags": { "PURPOSE": "Implementation of the storage management plugin." }, @@ -38810,10 +43167,10 @@ "type": "Function", "tier": "STANDARD", "start_line": 211, - "end_line": 260, + "end_line": 288, "tags": { "PURPOSE": "Lists all files and directories in a specific category and subpath.", - "PARAM": "subpath (Optional[str]) - Nested path within the category.", + "PARAM": "recursive (bool) - Whether to scan nested subdirectories recursively.", "PRE": "Storage root must exist.", "POST": "Returns a list of StoredFile objects.", "RETURN": "List[StoredFile] - List of file and directory metadata objects." @@ -38830,8 +43187,8 @@ "name": "save_file", "type": "Function", "tier": "STANDARD", - "start_line": 262, - "end_line": 294, + "start_line": 290, + "end_line": 322, "tags": { "PURPOSE": "Saves an uploaded file to the specified category and optional subpath.", "PARAM": "subpath (Optional[str]) - The target subpath.", @@ -38852,8 +43209,8 @@ "name": "delete_file", "type": "Function", "tier": "STANDARD", - "start_line": 296, - "end_line": 320, + "start_line": 324, + "end_line": 348, "tags": { "PURPOSE": "Deletes a file or directory from the specified category and path.", "PARAM": "path (str) - The relative path of the file or directory.", @@ -38873,8 +43230,8 @@ "name": "get_file_path", "type": "Function", "tier": "STANDARD", - "start_line": 322, - "end_line": 341, + "start_line": 350, + "end_line": 369, "tags": { "PURPOSE": "Returns the absolute path of a file for download.", "PARAM": "path (str) - The relative path of the file.", @@ -39023,6 +43380,1471 @@ "score": 1.0 } }, + { + "name": "test_task_persistence", + "type": "Module", + "tier": "CRITICAL", + "start_line": 1, + "end_line": 406, + "tags": { + "SEMANTICS": "test, task, persistence, unit_test", + "PURPOSE": "Unit tests for TaskPersistenceService.", + "LAYER": "Test", + "TIER": "CRITICAL", + "TEST_DATA": "valid_task -> {\"id\": \"test-uuid-1\", \"plugin_id\": \"backup\", \"status\": \"PENDING\"}" + }, + "relations": [ + { + "type": "TESTS", + "target": "TaskPersistenceService" + } + ], + "children": [ + { + "name": "TestTaskPersistenceHelpers", + "type": "Class", + "tier": "CRITICAL", + "start_line": 23, + "end_line": 109, + "tags": { + "PURPOSE": "Test suite for TaskPersistenceService static helper methods.", + "TIER": "CRITICAL" + }, + "relations": [], + "children": [ + { + "name": "test_json_load_if_needed_none", + "type": "Function", + "tier": "STANDARD", + "start_line": 28, + "end_line": 32, + "tags": { + "PURPOSE": "Test _json_load_if_needed with None input." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 28 + } + ], + "score": 0.0 + } + }, + { + "name": "test_json_load_if_needed_dict", + "type": "Function", + "tier": "STANDARD", + "start_line": 34, + "end_line": 39, + "tags": { + "PURPOSE": "Test _json_load_if_needed with dict input." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 34 + } + ], + "score": 0.0 + } + }, + { + "name": "test_json_load_if_needed_list", + "type": "Function", + "tier": "STANDARD", + "start_line": 41, + "end_line": 46, + "tags": { + "PURPOSE": "Test _json_load_if_needed with list input." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + } + ], + "score": 0.0 + } + }, + { + "name": "test_json_load_if_needed_json_string", + "type": "Function", + "tier": "STANDARD", + "start_line": 48, + "end_line": 53, + "tags": { + "PURPOSE": "Test _json_load_if_needed with JSON string." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 48 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 48 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 48 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 48 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 48 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 48 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 48 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 48 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 48 + } + ], + "score": 0.0 + } + }, + { + "name": "test_json_load_if_needed_empty_string", + "type": "Function", + "tier": "STANDARD", + "start_line": 55, + "end_line": 61, + "tags": { + "PURPOSE": "Test _json_load_if_needed with empty/null strings." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 55 + }, + { + "message": "Missing Mandatory Tag: @POST (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: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 55 + }, + { + "message": "Missing Mandatory Tag: @POST (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: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 55 + }, + { + "message": "Missing Mandatory Tag: @POST (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.0 + } + }, + { + "name": "test_json_load_if_needed_plain_string", + "type": "Function", + "tier": "STANDARD", + "start_line": 63, + "end_line": 68, + "tags": { + "PURPOSE": "Test _json_load_if_needed with non-JSON string." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 63 + } + ], + "score": 0.0 + } + }, + { + "name": "test_json_load_if_needed_integer", + "type": "Function", + "tier": "STANDARD", + "start_line": 70, + "end_line": 74, + "tags": { + "PURPOSE": "Test _json_load_if_needed with integer." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 70 + } + ], + "score": 0.0 + } + }, + { + "name": "test_parse_datetime_none", + "type": "Function", + "tier": "STANDARD", + "start_line": 76, + "end_line": 80, + "tags": { + "PURPOSE": "Test _parse_datetime with None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 76 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 76 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 76 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 76 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 76 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 76 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 76 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 76 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 76 + } + ], + "score": 0.0 + } + }, + { + "name": "test_parse_datetime_datetime_object", + "type": "Function", + "tier": "STANDARD", + "start_line": 82, + "end_line": 87, + "tags": { + "PURPOSE": "Test _parse_datetime with datetime object." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 82 + } + ], + "score": 0.0 + } + }, + { + "name": "test_parse_datetime_iso_string", + "type": "Function", + "tier": "STANDARD", + "start_line": 89, + "end_line": 95, + "tags": { + "PURPOSE": "Test _parse_datetime with ISO string." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 89 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 89 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 89 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 89 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 89 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 89 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 89 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 89 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 89 + } + ], + "score": 0.0 + } + }, + { + "name": "test_parse_datetime_invalid_string", + "type": "Function", + "tier": "STANDARD", + "start_line": 97, + "end_line": 101, + "tags": { + "PURPOSE": "Test _parse_datetime with invalid string." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 97 + } + ], + "score": 0.0 + } + }, + { + "name": "test_parse_datetime_integer", + "type": "Function", + "tier": "STANDARD", + "start_line": 103, + "end_line": 107, + "tags": { + "PURPOSE": "Test _parse_datetime with non-string, non-datetime." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 103 + } + ], + "score": 0.0 + } + } + ], + "compliance": { + "valid": false, + "issues": [ + { + "message": "Missing @INVARIANT tag (required for CRITICAL tier)", + "severity": "ERROR", + "line_number": 23 + }, + { + "message": "Missing @INVARIANT tag (required for CRITICAL tier)", + "severity": "ERROR", + "line_number": 23 + } + ], + "score": 0.0 + } + }, + { + "name": "TestTaskPersistenceService", + "type": "Class", + "tier": "CRITICAL", + "start_line": 112, + "end_line": 405, + "tags": { + "PURPOSE": "Test suite for TaskPersistenceService CRUD operations.", + "TIER": "CRITICAL", + "TEST_DATA": "valid_task -> {\"id\": \"test-uuid-1\", \"plugin_id\": \"backup\", \"status\": \"PENDING\"}" + }, + "relations": [], + "children": [ + { + "name": "setup_class", + "type": "Function", + "tier": "STANDARD", + "start_line": 118, + "end_line": 127, + "tags": { + "PURPOSE": "Setup in-memory test database." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 118 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 118 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 118 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 118 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 118 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 118 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 118 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 118 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 118 + } + ], + "score": 0.0 + } + }, + { + "name": "teardown_class", + "type": "Function", + "tier": "STANDARD", + "start_line": 129, + "end_line": 134, + "tags": { + "PURPOSE": "Dispose of test database." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 129 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 129 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 129 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 129 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 129 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 129 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 129 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 129 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 129 + } + ], + "score": 0.0 + } + }, + { + "name": "setup_method", + "type": "Function", + "tier": "STANDARD", + "start_line": 136, + "end_line": 143, + "tags": { + "PURPOSE": "Clean task_records table before each test." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 136 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 136 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 136 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 136 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 136 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 136 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 136 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 136 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 136 + } + ], + "score": 0.0 + } + }, + { + "name": "test_persist_task_new", + "type": "Function", + "tier": "STANDARD", + "start_line": 163, + "end_line": 181, + "tags": { + "PURPOSE": "Test persisting a new task creates a record.", + "PRE": "Empty database.", + "POST": "TaskRecord exists in database." + }, + "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": 163 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 163 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 163 + } + ], + "score": 0.55 + } + }, + { + "name": "test_persist_task_update", + "type": "Function", + "tier": "STANDARD", + "start_line": 183, + "end_line": 207, + "tags": { + "PURPOSE": "Test updating an existing task.", + "PRE": "Task already persisted.", + "POST": "Task record updated with new status." + }, + "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": 183 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 183 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 183 + } + ], + "score": 0.55 + } + }, + { + "name": "test_persist_task_with_logs", + "type": "Function", + "tier": "STANDARD", + "start_line": 209, + "end_line": 230, + "tags": { + "PURPOSE": "Test persisting a task with log entries.", + "PRE": "Task has logs attached.", + "POST": "Logs serialized as JSON in task record." + }, + "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": 209 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 209 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 209 + } + ], + "score": 0.55 + } + }, + { + "name": "test_persist_task_failed_extracts_error", + "type": "Function", + "tier": "STANDARD", + "start_line": 232, + "end_line": 254, + "tags": { + "PURPOSE": "Test that FAILED task extracts last error message.", + "PRE": "Task has FAILED status with ERROR logs.", + "POST": "record.error contains last error message." + }, + "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": 232 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 232 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 232 + } + ], + "score": 0.55 + } + }, + { + "name": "test_persist_tasks_batch", + "type": "Function", + "tier": "STANDARD", + "start_line": 256, + "end_line": 275, + "tags": { + "PURPOSE": "Test persisting multiple tasks.", + "PRE": "Empty database.", + "POST": "All task records created." + }, + "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": 256 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 256 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 256 + } + ], + "score": 0.55 + } + }, + { + "name": "test_load_tasks", + "type": "Function", + "tier": "STANDARD", + "start_line": 277, + "end_line": 303, + "tags": { + "PURPOSE": "Test loading tasks from database.", + "PRE": "Tasks persisted.", + "POST": "Returns list of Task objects with correct data." + }, + "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": 277 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 277 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 277 + } + ], + "score": 0.55 + } + }, + { + "name": "test_load_tasks_with_status_filter", + "type": "Function", + "tier": "STANDARD", + "start_line": 305, + "end_line": 326, + "tags": { + "PURPOSE": "Test loading tasks filtered by status.", + "PRE": "Tasks with different statuses persisted.", + "POST": "Returns only tasks matching status filter." + }, + "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": 305 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 305 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 305 + } + ], + "score": 0.55 + } + }, + { + "name": "test_load_tasks_with_limit", + "type": "Function", + "tier": "STANDARD", + "start_line": 328, + "end_line": 346, + "tags": { + "PURPOSE": "Test loading tasks with limit.", + "PRE": "Multiple tasks persisted.", + "POST": "Returns at most `limit` tasks." + }, + "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": 328 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 328 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 328 + } + ], + "score": 0.55 + } + }, + { + "name": "test_delete_tasks", + "type": "Function", + "tier": "STANDARD", + "start_line": 348, + "end_line": 372, + "tags": { + "PURPOSE": "Test deleting tasks by ID list.", + "PRE": "Tasks persisted.", + "POST": "Specified tasks deleted, others remain." + }, + "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": 348 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 348 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 348 + } + ], + "score": 0.55 + } + }, + { + "name": "test_delete_tasks_empty_list", + "type": "Function", + "tier": "STANDARD", + "start_line": 374, + "end_line": 382, + "tags": { + "PURPOSE": "Test deleting with empty list (no-op).", + "PRE": "None.", + "POST": "No error, no changes." + }, + "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": 374 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 374 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 374 + } + ], + "score": 0.55 + } + }, + { + "name": "test_persist_task_with_datetime_in_params", + "type": "Function", + "tier": "STANDARD", + "start_line": 384, + "end_line": 403, + "tags": { + "PURPOSE": "Test json_serializable handles datetime in params.", + "PRE": "Task params contain datetime values.", + "POST": "Params serialized correctly." + }, + "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": 384 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 384 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 384 + } + ], + "score": 0.55 + } + } + ], + "compliance": { + "valid": false, + "issues": [ + { + "message": "Missing @INVARIANT tag (required for CRITICAL tier)", + "severity": "ERROR", + "line_number": 112 + }, + { + "message": "Missing @INVARIANT tag (required for CRITICAL tier)", + "severity": "ERROR", + "line_number": 112 + } + ], + "score": 0.0 + } + }, + { + "name": "_patched", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 145, + "end_line": 145, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_make_task", + "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 + } + } + ], + "compliance": { + "valid": false, + "issues": [ + { + "message": "Missing Mandatory Tag: @INVARIANT (required for CRITICAL tier)", + "severity": "ERROR", + "line_number": 1 + }, + { + "message": "Missing @INVARIANT tag (required for CRITICAL tier)", + "severity": "ERROR", + "line_number": 1 + } + ], + "score": 0.0 + } + }, { "name": "test_environment_model", "type": "Function", @@ -39042,6 +44864,609 @@ "score": 1.0 } }, + { + "name": "test_task_manager", + "type": "Module", + "tier": "CRITICAL", + "start_line": 1, + "end_line": 495, + "tags": { + "TIER": "CRITICAL", + "SEMANTICS": "task-manager, lifecycle, CRUD, log-buffer, filtering, tests", + "PURPOSE": "Unit tests for TaskManager lifecycle, CRUD, log buffering, and filtering.", + "LAYER": "Core", + "INVARIANT": "TaskManager state changes are deterministic and testable with mocked dependencies." + }, + "relations": [ + { + "type": "TESTS", + "target": "backend.src.core.task_manager.manager.TaskManager" + } + ], + "children": [ + { + "name": "_make_manager", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 20, + "end_line": 20, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_cleanup_manager", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 53, + "end_line": 53, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_init_creates_empty_tasks", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 62, + "end_line": 62, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_init_loads_persisted_tasks", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 69, + "end_line": 69, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_init_starts_flusher_thread", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 76, + "end_line": 76, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_task_returns_none_for_missing", + "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": "test_get_task_returns_existing", + "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": "test_get_all_tasks", + "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": "test_get_tasks_with_status_filter", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 116, + "end_line": 116, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_tasks_with_plugin_filter", + "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_tasks_with_pagination", + "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_tasks_completed_only", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 169, + "end_line": 169, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_create_task_success", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 198, + "end_line": 198, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_create_task_unknown_plugin_raises", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 210, + "end_line": 210, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_create_task_invalid_params_raises", + "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": "test_add_log_appends_to_task_and_buffer", + "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": "test_add_log_skips_nonexistent_task", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 248, + "end_line": 248, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_flush_logs_writes_to_persistence", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 256, + "end_line": 256, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_flush_task_logs_writes_single_task", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 274, + "end_line": 274, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_flush_logs_requeues_on_failure", + "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": "test_clear_all_non_active", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 311, + "end_line": 311, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_clear_by_status", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 334, + "end_line": 334, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_clear_preserves_awaiting_input", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 352, + "end_line": 352, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_subscribe_creates_queue", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 371, + "end_line": 371, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_unsubscribe_removes_queue", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 382, + "end_line": 382, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_multiple_subscribers", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 392, + "end_line": 392, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_await_input_sets_status", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 408, + "end_line": 408, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_await_input_not_running_raises", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 429, + "end_line": 429, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_await_input_nonexistent_raises", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 442, + "end_line": 442, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_resume_with_password", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 450, + "end_line": 450, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_resume_not_awaiting_raises", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 469, + "end_line": 469, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_resume_empty_passwords_raises", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 482, + "end_line": 482, + "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.tests.test_dashboards_api", "type": "Module", @@ -39830,6 +46255,62 @@ "score": 1.0 } }, + { + "name": "test_smoke_plugins", + "type": "Module", + "tier": "TRIVIAL", + "start_line": 1, + "end_line": 64, + "tags": { + "PURPOSE": "Auto-generated module for backend/tests/test_smoke_plugins.py", + "TIER": "TRIVIAL", + "LAYER": "Unknown" + }, + "relations": [], + "children": [ + { + "name": "test_plugins_load_successfully", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 18, + "end_line": 18, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_task_manager_initializes_with_plugins", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 41, + "end_line": 41, + "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": "test_belief_scope_logs_entry_action_exit_at_debug", "type": "Function", @@ -40167,14 +46648,14 @@ { "name": "test_log_persistence", "type": "Module", - "tier": "STANDARD", + "tier": "CRITICAL", "start_line": 1, - "end_line": 395, + "end_line": 338, "tags": { "SEMANTICS": "test, log, persistence, unit_test", "PURPOSE": "Unit tests for TaskLogPersistenceService.", "LAYER": "Test", - "TIER": "STANDARD" + "TIER": "CRITICAL" }, "relations": [ { @@ -40186,12 +46667,13 @@ { "name": "TestLogPersistence", "type": "Class", - "tier": "STANDARD", - "start_line": 17, - "end_line": 394, + "tier": "CRITICAL", + "start_line": 20, + "end_line": 337, "tags": { "PURPOSE": "Test suite for TaskLogPersistenceService.", - "TIER": "STANDARD" + "TIER": "CRITICAL", + "TEST_DATA": "log_entry -> {\"task_id\": \"test-task-1\", \"level\": \"INFO\", \"source\": \"test_source\", \"message\": \"Test message\"}" }, "relations": [], "children": [ @@ -40199,8 +46681,8 @@ "name": "setup_class", "type": "Function", "tier": "STANDARD", - "start_line": 22, - "end_line": 32, + "start_line": 26, + "end_line": 37, "tags": { "PURPOSE": "Setup test database and service instance.", "PRE": "None.", @@ -40214,17 +46696,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 22 + "line_number": 26 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 22 + "line_number": 26 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 22 + "line_number": 26 } ], "score": 0.55 @@ -40234,8 +46716,8 @@ "name": "teardown_class", "type": "Function", "tier": "STANDARD", - "start_line": 34, - "end_line": 42, + "start_line": 39, + "end_line": 47, "tags": { "PURPOSE": "Clean up test database.", "PRE": "None.", @@ -40249,17 +46731,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 34 + "line_number": 39 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 34 + "line_number": 39 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 34 + "line_number": 39 } ], "score": 0.55 @@ -40269,47 +46751,12 @@ "name": "setup_method", "type": "Function", "tier": "STANDARD", - "start_line": 44, - "end_line": 51, - "tags": { - "PURPOSE": "Setup for each test method.", - "PRE": "None.", - "POST": "Fresh database session created." - }, - "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": 44 - }, - { - "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 44 - }, - { - "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 44 - } - ], - "score": 0.55 - } - }, - { - "name": "teardown_method", - "type": "Function", - "tier": "STANDARD", - "start_line": 53, + "start_line": 49, "end_line": 60, "tags": { - "PURPOSE": "Cleanup after each test method.", + "PURPOSE": "Setup for each test method \u2014 clean task_logs table.", "PRE": "None.", - "POST": "Session closed and rolled back." + "POST": "task_logs table is empty." }, "relations": [], "children": [], @@ -40319,28 +46766,28 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 53 + "line_number": 49 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 53 + "line_number": 49 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 53 + "line_number": 49 } ], "score": 0.55 } }, { - "name": "test_add_log_single", + "name": "test_add_logs_single", "type": "Function", "tier": "STANDARD", - "start_line": 62, - "end_line": 85, + "start_line": 69, + "end_line": 95, "tags": { "PURPOSE": "Test adding a single log entry.", "PRE": "Service and session initialized.", @@ -40354,28 +46801,28 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 62 + "line_number": 69 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 62 + "line_number": 69 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 62 + "line_number": 69 } ], "score": 0.55 } }, { - "name": "test_add_log_batch", + "name": "test_add_logs_batch", "type": "Function", "tier": "STANDARD", - "start_line": 87, - "end_line": 126, + "start_line": 97, + "end_line": 118, "tags": { "PURPOSE": "Test adding multiple log entries in batch.", "PRE": "Service and session initialized.", @@ -40389,17 +46836,52 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 87 + "line_number": 97 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 87 + "line_number": 97 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 87 + "line_number": 97 + } + ], + "score": 0.55 + } + }, + { + "name": "test_add_logs_empty", + "type": "Function", + "tier": "STANDARD", + "start_line": 120, + "end_line": 134, + "tags": { + "PURPOSE": "Test adding empty log list (should be no-op).", + "PRE": "Service initialized.", + "POST": "No logs added." + }, + "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": 120 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 120 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 120 } ], "score": 0.55 @@ -40409,8 +46891,8 @@ "name": "test_get_logs_by_task_id", "type": "Function", "tier": "STANDARD", - "start_line": 128, - "end_line": 152, + "start_line": 136, + "end_line": 154, "tags": { "PURPOSE": "Test retrieving logs by task ID.", "PRE": "Service and session initialized, logs exist.", @@ -40424,17 +46906,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 128 + "line_number": 136 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 128 + "line_number": 136 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 128 + "line_number": 136 } ], "score": 0.55 @@ -40444,8 +46926,8 @@ "name": "test_get_logs_with_filters", "type": "Function", "tier": "STANDARD", - "start_line": 154, - "end_line": 199, + "start_line": 156, + "end_line": 181, "tags": { "PURPOSE": "Test retrieving logs with level and source filters.", "PRE": "Service and session initialized, logs exist.", @@ -40459,17 +46941,17 @@ { "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 Belief State Logging: Function should use belief_scope / molecular methods (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.55 @@ -40479,8 +46961,8 @@ "name": "test_get_logs_with_pagination", "type": "Function", "tier": "STANDARD", - "start_line": 201, - "end_line": 227, + "start_line": 183, + "end_line": 203, "tags": { "PURPOSE": "Test retrieving logs with pagination.", "PRE": "Service and session initialized, logs exist.", @@ -40494,17 +46976,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 201 + "line_number": 183 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 201 + "line_number": 183 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 201 + "line_number": 183 } ], "score": 0.55 @@ -40514,8 +46996,8 @@ "name": "test_get_logs_with_search", "type": "Function", "tier": "STANDARD", - "start_line": 229, - "end_line": 270, + "start_line": 205, + "end_line": 223, "tags": { "PURPOSE": "Test retrieving logs with search query.", "PRE": "Service and session initialized, logs exist.", @@ -40529,17 +47011,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 229 + "line_number": 205 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 229 + "line_number": 205 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 229 + "line_number": 205 } ], "score": 0.55 @@ -40549,12 +47031,12 @@ "name": "test_get_log_stats", "type": "Function", "tier": "STANDARD", - "start_line": 272, - "end_line": 320, + "start_line": 225, + "end_line": 250, "tags": { "PURPOSE": "Test retrieving log statistics.", "PRE": "Service and session initialized, logs exist.", - "POST": "Returns statistics grouped by level and source." + "POST": "Returns LogStats model with counts by level and source." }, "relations": [], "children": [], @@ -40564,28 +47046,28 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 272 + "line_number": 225 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 272 + "line_number": 225 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 272 + "line_number": 225 } ], "score": 0.55 } }, { - "name": "test_get_log_sources", + "name": "test_get_sources", "type": "Function", "tier": "STANDARD", - "start_line": 322, - "end_line": 361, + "start_line": 252, + "end_line": 273, "tags": { "PURPOSE": "Test retrieving unique log sources.", "PRE": "Service and session initialized, logs exist.", @@ -40599,28 +47081,28 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 322 + "line_number": 252 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 322 + "line_number": 252 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 322 + "line_number": 252 } ], "score": 0.55 } }, { - "name": "test_delete_logs_by_task_id", + "name": "test_delete_logs_for_task", "type": "Function", "tier": "STANDARD", - "start_line": 363, - "end_line": 392, + "start_line": 275, + "end_line": 301, "tags": { "PURPOSE": "Test deleting logs by task ID.", "PRE": "Service and session initialized, logs exist.", @@ -40634,23 +47116,490 @@ { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 363 + "line_number": 275 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 363 + "line_number": 275 }, { "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", "severity": "WARNING", - "line_number": 363 + "line_number": 275 + } + ], + "score": 0.55 + } + }, + { + "name": "test_delete_logs_for_tasks", + "type": "Function", + "tier": "STANDARD", + "start_line": 303, + "end_line": 325, + "tags": { + "PURPOSE": "Test deleting logs for multiple tasks.", + "PRE": "Service and session initialized, logs exist.", + "POST": "Logs for all specified tasks are deleted." + }, + "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": 303 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 303 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 303 + } + ], + "score": 0.55 + } + }, + { + "name": "test_delete_logs_for_tasks_empty", + "type": "Function", + "tier": "STANDARD", + "start_line": 327, + "end_line": 335, + "tags": { + "PURPOSE": "Test deleting with empty list (no-op).", + "PRE": "Service initialized.", + "POST": "No error, no deletion." + }, + "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": 327 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 327 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 327 } ], "score": 0.55 } } ], + "compliance": { + "valid": false, + "issues": [ + { + "message": "Missing @INVARIANT tag (required for CRITICAL tier)", + "severity": "ERROR", + "line_number": 20 + }, + { + "message": "Missing @INVARIANT tag (required for CRITICAL tier)", + "severity": "ERROR", + "line_number": 20 + } + ], + "score": 0.0 + } + }, + { + "name": "_patched", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 62, + "end_line": 62, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": false, + "issues": [ + { + "message": "Missing Mandatory Tag: @INVARIANT (required for CRITICAL tier)", + "severity": "ERROR", + "line_number": 1 + }, + { + "message": "Missing @INVARIANT tag (required for CRITICAL tier)", + "severity": "ERROR", + "line_number": 1 + } + ], + "score": 0.0 + } + }, + { + "name": "backend.tests.core.test_mapping_service", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 249, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Unit tests for the IdMappingService matching UUIDs to integer IDs.", + "LAYER": "Domain" + }, + "relations": [ + { + "type": "VERIFIES", + "target": "backend.src.core.mapping_service" + } + ], + "children": [ + { + "name": "db_session", + "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 + } + }, + { + "name": "__init__", + "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": "get_all_resources", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 38, + "end_line": 38, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_sync_environment_upserts_correctly", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 41, + "end_line": 41, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_remote_id_returns_integer", + "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": "test_get_remote_ids_batch_returns_dict", + "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_sync_environment_updates_existing_mapping", + "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_sync_environment_skips_resources_without_uuid", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 131, + "end_line": 131, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_sync_environment_handles_api_error_gracefully", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 147, + "end_line": 147, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_all_resources", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 150, + "end_line": 150, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_get_remote_id_returns_none_for_missing", + "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": "test_get_remote_ids_batch_returns_empty_for_empty_input", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 171, + "end_line": 171, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_mapping_service_alignment_with_test_data", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 178, + "end_line": 178, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_sync_environment_requires_existing_env", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 202, + "end_line": 202, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_sync_environment_deletes_stale_mappings", + "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 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @SEMANTICS (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.775 + } + }, + { + "name": "test_defensive_guards", + "type": "Module", + "tier": "TRIVIAL", + "start_line": 1, + "end_line": 29, + "tags": { + "PURPOSE": "Auto-generated module for backend/tests/core/test_defensive_guards.py", + "TIER": "TRIVIAL", + "LAYER": "Unknown" + }, + "relations": [], + "children": [ + { + "name": "test_git_service_get_repo_path_guard", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 12, + "end_line": 12, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_superset_client_import_dashboard_guard", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 18, + "end_line": 18, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], "compliance": { "valid": true, "issues": [], @@ -40663,6 +47612,271 @@ "issues": [], "score": 1.0 } + }, + { + "name": "backend.tests.core.test_migration_engine", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 290, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Unit tests for MigrationEngine's cross-filter patching algorithms.", + "LAYER": "Domain" + }, + "relations": [ + { + "type": "VERIFIES", + "target": "backend.src.core.migration_engine" + } + ], + "children": [ + { + "name": "__init__", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 31, + "end_line": 31, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_remote_ids_batch", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 34, + "end_line": 34, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_write_dashboard_yaml", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 42, + "end_line": 42, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_patch_dashboard_metadata_replaces_chart_ids", + "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": "test_patch_dashboard_metadata_replaces_dataset_ids", + "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_patch_dashboard_metadata_skips_when_no_metadata", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 98, + "end_line": 98, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_patch_dashboard_metadata_handles_missing_targets", + "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_extract_chart_uuids_from_archive", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 143, + "end_line": 143, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_transform_yaml_replaces_database_uuid", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 166, + "end_line": 166, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_transform_yaml_ignores_unmapped_uuid", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 183, + "end_line": 183, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_transform_zip_end_to_end", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 202, + "end_line": 202, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_transform_zip_invalid_path", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 274, + "end_line": 274, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_transform_yaml_nonexistent_file", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 281, + "end_line": 281, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @SEMANTICS (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1 + } + ], + "score": 0.775 + } } ] } \ No newline at end of file