From 286167b1d59713a1faf85e23279ee1a037c74c68 Mon Sep 17 00:00:00 2001 From: busya Date: Tue, 24 Feb 2026 12:51:57 +0300 Subject: [PATCH] generate semantic clean up --- .ai/MODULE_MAP.md | 254 +- .ai/PROJECT_MAP.md | 503 +- generate_semantic_map.py | 13 + semantics/semantic_map.json | 7493 ++++++++++++++++++++---- specs/020-task-reports-design/tasks.md | 1 + 5 files changed, 7014 insertions(+), 1250 deletions(-) diff --git a/.ai/MODULE_MAP.md b/.ai/MODULE_MAP.md index 7104317..29525f2 100644 --- a/.ai/MODULE_MAP.md +++ b/.ai/MODULE_MAP.md @@ -2,40 +2,15 @@ > High-level module structure for AI Context. Generated automatically. -**Generated:** 2026-02-23T14:44:08.540853 +**Generated:** 2026-02-24T12:45:07.897362 ## Summary -- **Total Modules:** 70 -- **Total Entities:** 1337 +- **Total Modules:** 72 +- **Total Entities:** 1517 ## Module Hierarchy - ### πŸ“ `shots/` - - - πŸ—οΈ **Layers:** Domain (Business Logic), Domain (Core), Interface (API), UI (Presentation) - - πŸ“Š **Tiers:** CRITICAL: 2, STANDARD: 7, TRIVIAL: 1 - - πŸ“„ **Files:** 4 - - πŸ“¦ **Entities:** 10 - - **Key Entities:** - - - 🧩 **FrontendComponentShot** (Component) `[CRITICAL]` - - Action button to spawn a new task with full UX feedback cycl... - - πŸ“¦ **BackendRouteShot** (Module) - - Reference implementation of a task-based route using GRACE-P... - - πŸ“¦ **PluginExampleShot** (Module) - - Reference implementation of a plugin following GRACE standar... - - πŸ“¦ **TransactionCore** (Module) `[CRITICAL]` - - Core banking transaction processor with ACID guarantees. - - **Dependencies:** - - - πŸ”— DEPENDS_ON -> [DEF:Infra:AuditLog] - - πŸ”— DEPENDS_ON -> [DEF:Infra:PostgresDB] - - πŸ”— IMPLEMENTS -> [DEF:Std:API_FastAPI] - - πŸ”— INHERITS -> PluginBase - ### πŸ“ `backend/` - πŸ—οΈ **Layers:** Unknown, Utility @@ -78,13 +53,19 @@ ### πŸ“ `routes/` - - πŸ—οΈ **Layers:** API, UI (API), Unknown - - πŸ“Š **Tiers:** CRITICAL: 2, STANDARD: 140, TRIVIAL: 3 - - πŸ“„ **Files:** 16 - - πŸ“¦ **Entities:** 145 + - πŸ—οΈ **Layers:** API, UI (API) + - πŸ“Š **Tiers:** CRITICAL: 2, STANDARD: 181, TRIVIAL: 4 + - πŸ“„ **Files:** 17 + - πŸ“¦ **Entities:** 187 **Key Entities:** + - β„‚ **AssistantAction** (Class) `[TRIVIAL]` + - UI action descriptor returned with assistant responses. + - β„‚ **AssistantMessageRequest** (Class) `[TRIVIAL]` + - Input payload for assistant message endpoint. + - β„‚ **AssistantMessageResponse** (Class) + - Output payload contract for assistant interaction endpoints. - β„‚ **BranchCheckout** (Class) - Schema for branch checkout requests. - β„‚ **BranchCreate** (Class) @@ -95,15 +76,10 @@ - Schema for staging and committing changes. - β„‚ **CommitSchema** (Class) - Schema for representing Git commit details. + - β„‚ **ConfirmationRecord** (Class) + - In-memory confirmation token model for risky operation dispa... - β„‚ **ConflictResolution** (Class) - Schema for resolving merge conflicts. - - β„‚ **ConnectionCreate** (Class) - - Pydantic model for creating a connection. - - β„‚ **ConnectionSchema** (Class) - - Pydantic model for connection response. - - β„‚ **ConsolidatedSettingsResponse** (Class) - - β„‚ **DeployRequest** (Class) - - Schema for dashboard deployment requests. **Dependencies:** @@ -111,38 +87,52 @@ - πŸ”— DEPENDS_ON -> ConfigModels - πŸ”— DEPENDS_ON -> backend.src.core.database - πŸ”— DEPENDS_ON -> backend.src.core.superset_client - - πŸ”— DEPENDS_ON -> backend.src.dependencies + - πŸ”— DEPENDS_ON -> backend.src.core.task_manager ### πŸ“ `__tests__/` - - πŸ—οΈ **Layers:** API, Domain (Tests) - - πŸ“Š **Tiers:** CRITICAL: 3, STANDARD: 16, TRIVIAL: 22 - - πŸ“„ **Files:** 5 - - πŸ“¦ **Entities:** 41 + - πŸ—οΈ **Layers:** API, Domain (Tests), UI (API Tests) + - πŸ“Š **Tiers:** CRITICAL: 3, STANDARD: 33, TRIVIAL: 81 + - πŸ“„ **Files:** 7 + - πŸ“¦ **Entities:** 117 **Key Entities:** - - πŸ“¦ **backend.src.api.routes.__tests__.test_dashboards** (Module) - - Unit tests for Dashboards API endpoints - - πŸ“¦ **backend.src.api.routes.__tests__.test_datasets** (Module) - - Unit tests for Datasets API endpoints - - πŸ“¦ **backend.tests.test_reports_api** (Module) `[CRITICAL]` - - Contract tests for GET /api/reports defaults, pagination, an... - - πŸ“¦ **backend.tests.test_reports_detail_api** (Module) `[CRITICAL]` - - Contract tests for GET /api/reports/{report_id} detail endpo... - - πŸ“¦ **backend.tests.test_reports_openapi_conformance** (Module) `[CRITICAL]` - - Validate implemented reports payload shape against OpenAPI-r... + - β„‚ **_FakeConfigManager** (Class) `[TRIVIAL]` + - Provide deterministic environment aliases required by intent... + - β„‚ **_FakeConfigManager** (Class) `[TRIVIAL]` + - Environment config fixture with dev/prod aliases for parser ... + - β„‚ **_FakeDb** (Class) `[TRIVIAL]` + - In-memory session substitute for assistant route persistence... + - β„‚ **_FakeDb** (Class) `[TRIVIAL]` + - In-memory fake database implementing subset of Session inter... + - β„‚ **_FakeQuery** (Class) `[TRIVIAL]` + - Minimal chainable query object for fake DB interactions. + - β„‚ **_FakeQuery** (Class) `[TRIVIAL]` + - Minimal chainable query object for fake SQLAlchemy-like DB b... + - β„‚ **_FakeTask** (Class) `[TRIVIAL]` + - Lightweight task model used for assistant authz tests. + - β„‚ **_FakeTask** (Class) `[TRIVIAL]` + - Lightweight task stub used by assistant API tests. + - β„‚ **_FakeTaskManager** (Class) `[TRIVIAL]` + - Minimal task manager for deterministic operation creation an... + - β„‚ **_FakeTaskManager** (Class) `[TRIVIAL]` + - Minimal async-compatible TaskManager fixture for determinist... + + **Dependencies:** + + - πŸ”— DEPENDS_ON -> backend.src.api.routes.assistant ### πŸ“ `core/` - πŸ—οΈ **Layers:** Core - - πŸ“Š **Tiers:** STANDARD: 112, TRIVIAL: 1 + - πŸ“Š **Tiers:** STANDARD: 113, TRIVIAL: 7 - πŸ“„ **Files:** 9 - - πŸ“¦ **Entities:** 113 + - πŸ“¦ **Entities:** 120 **Key Entities:** - - β„‚ **AuthSessionLocal** (Class) + - β„‚ **AuthSessionLocal** (Class) `[TRIVIAL]` - A session factory for the authentication database. - β„‚ **BeliefFormatter** (Class) - Custom logging formatter that adds belief state prefixes to ... @@ -160,7 +150,7 @@ - Scans a specified directory for Python modules, dynamically ... - β„‚ **SchedulerService** (Class) - Provides a service to manage scheduled backup tasks. - - β„‚ **SessionLocal** (Class) + - β„‚ **SessionLocal** (Class) `[TRIVIAL]` - A session factory for the main mappings database. **Dependencies:** @@ -168,7 +158,8 @@ - πŸ”— DEPENDS_ON -> AppConfigRecord - πŸ”— DEPENDS_ON -> ConfigModels - πŸ”— DEPENDS_ON -> PyYAML - - πŸ”— DEPENDS_ON -> sqlalchemy + - πŸ”— DEPENDS_ON -> backend.src.core.auth.config + - πŸ”— DEPENDS_ON -> backend.src.models.mapping ### πŸ“ `auth/` @@ -305,9 +296,9 @@ ### πŸ“ `models/` - πŸ—οΈ **Layers:** Domain, Model - - πŸ“Š **Tiers:** CRITICAL: 2, STANDARD: 24, TRIVIAL: 21 - - πŸ“„ **Files:** 10 - - πŸ“¦ **Entities:** 47 + - πŸ“Š **Tiers:** CRITICAL: 2, STANDARD: 28, TRIVIAL: 21 + - πŸ“„ **Files:** 11 + - πŸ“¦ **Entities:** 51 **Key Entities:** @@ -315,6 +306,12 @@ - Maps an Active Directory group to a local System Role. - β„‚ **AppConfigRecord** (Class) - Stores the single source of truth for application configurat... + - β„‚ **AssistantAuditRecord** (Class) + - Store audit decisions and outcomes produced by assistant com... + - β„‚ **AssistantConfirmationRecord** (Class) + - Persist risky operation confirmation tokens with lifecycle s... + - β„‚ **AssistantMessageRecord** (Class) + - Persist chat history entries for assistant conversations. - β„‚ **ConnectionConfig** (Class) `[TRIVIAL]` - Stores credentials for external databases used for column ma... - β„‚ **DashboardMetadata** (Class) `[TRIVIAL]` @@ -325,18 +322,13 @@ - Represents a mapping between source and target databases. - β„‚ **DeploymentEnvironment** (Class) `[TRIVIAL]` - Target Superset environments for dashboard deployment. - - β„‚ **Environment** (Class) - - Represents a Superset instance environment. - - β„‚ **ErrorContext** (Class) - - Error and recovery context for failed/partial reports. - - β„‚ **FileCategory** (Class) `[TRIVIAL]` - - Enumeration of supported file categories in the storage syst... **Dependencies:** - πŸ”— DEPENDS_ON -> Role - πŸ”— DEPENDS_ON -> TaskRecord - πŸ”— DEPENDS_ON -> backend.src.core.task_manager.models + - πŸ”— DEPENDS_ON -> backend.src.models.mapping - πŸ”— DEPENDS_ON -> sqlalchemy ### πŸ“ `__tests__/` @@ -511,9 +503,9 @@ ### πŸ“ `services/` - πŸ—οΈ **Layers:** Core, Domain, Service - - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 50, TRIVIAL: 5 - - πŸ“„ **Files:** 6 - - πŸ“¦ **Entities:** 56 + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 58, TRIVIAL: 5 + - πŸ“„ **Files:** 7 + - πŸ“¦ **Entities:** 64 **Key Entities:** @@ -535,29 +527,35 @@ - Orchestrates authentication business logic. - πŸ“¦ **backend.src.services.git_service** (Module) - Core Git logic using GitPython to manage dashboard repositor... - - πŸ“¦ **backend.src.services.llm_provider** (Module) - - Service for managing LLM provider configurations with encryp... + - πŸ“¦ **backend.src.services.llm_prompt_templates** (Module) + - Provide default LLM prompt templates and normalization helpe... **Dependencies:** + - πŸ”— DEPENDS_ON -> backend.src.core.config_manager - πŸ”— DEPENDS_ON -> backend.src.core.database - πŸ”— DEPENDS_ON -> backend.src.core.superset_client - πŸ”— DEPENDS_ON -> backend.src.core.task_manager - πŸ”— DEPENDS_ON -> backend.src.core.utils.matching - - πŸ”— DEPENDS_ON -> backend.src.models.llm ### πŸ“ `__tests__/` - - πŸ—οΈ **Layers:** Service - - πŸ“Š **Tiers:** STANDARD: 7 - - πŸ“„ **Files:** 1 - - πŸ“¦ **Entities:** 7 + - πŸ—οΈ **Layers:** Domain Tests, Service + - πŸ“Š **Tiers:** STANDARD: 14 + - πŸ“„ **Files:** 2 + - πŸ“¦ **Entities:** 14 **Key Entities:** + - πŸ“¦ **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 + **Dependencies:** + + - πŸ”— DEPENDS_ON -> backend.src.services.llm_prompt_templates + ### πŸ“ `reports/` - πŸ—οΈ **Layers:** Domain @@ -689,9 +687,9 @@ ### πŸ“ `llm/` - πŸ—οΈ **Layers:** UI, Unknown - - πŸ“Š **Tiers:** STANDARD: 2, TRIVIAL: 10 + - πŸ“Š **Tiers:** STANDARD: 2, TRIVIAL: 11 - πŸ“„ **Files:** 3 - - πŸ“¦ **Entities:** 12 + - πŸ“¦ **Entities:** 13 **Key Entities:** @@ -706,6 +704,18 @@ - πŸ“¦ **ValidationReport** (Module) `[TRIVIAL]` - Auto-generated module for frontend/src/components/llm/Valida... + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** UI Tests + - πŸ“Š **Tiers:** STANDARD: 2 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 2 + + **Key Entities:** + + - πŸ“¦ **frontend.src.components.llm.__tests__.provider_config_integration** (Module) + - Protect edit-button interaction contract in LLM provider set... + ### πŸ“ `storage/` - πŸ—οΈ **Layers:** UI @@ -784,19 +794,22 @@ ### πŸ“ `api/` - - πŸ—οΈ **Layers:** Infra - - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 4 - - πŸ“„ **Files:** 1 - - πŸ“¦ **Entities:** 5 + - πŸ—οΈ **Layers:** Infra, Infra-API + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 10 + - πŸ“„ **Files:** 2 + - πŸ“¦ **Entities:** 11 **Key Entities:** + - πŸ“¦ **frontend.src.lib.api.assistant** (Module) + - API client wrapper for assistant chat, confirmation actions,... - πŸ“¦ **frontend.src.lib.api.reports** (Module) `[CRITICAL]` - Wrapper-based reports API client for list/detail retrieval w... **Dependencies:** - πŸ”— DEPENDS_ON -> [DEF:api_module] + - πŸ”— DEPENDS_ON -> frontend.src.lib.api.api_module ### πŸ“ `auth/` @@ -810,12 +823,40 @@ - πŸ—„οΈ **authStore** (Store) - Manages the global authentication state on the frontend. + ### πŸ“ `assistant/` + + - πŸ—οΈ **Layers:** UI, Unknown + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 12, TRIVIAL: 4 + - πŸ“„ **Files:** 1 + - πŸ“¦ **Entities:** 17 + + **Key Entities:** + + - 🧩 **AssistantChatPanel** (Component) `[CRITICAL]` + - Slide-out assistant chat panel for natural language command ... + - πŸ“¦ **AssistantChatPanel** (Module) `[TRIVIAL]` + - Auto-generated module for frontend/src/lib/components/assist... + + ### πŸ“ `__tests__/` + + - πŸ—οΈ **Layers:** UI Tests + - πŸ“Š **Tiers:** STANDARD: 5 + - πŸ“„ **Files:** 2 + - πŸ“¦ **Entities:** 5 + + **Key Entities:** + + - πŸ“¦ **frontend.src.lib.components.assistant.__tests__.assistant_chat_integration** (Module) + - Contract-level integration checks for assistant chat panel i... + - πŸ“¦ **frontend.src.lib.components.assistant.__tests__.assistant_confirmation_integration** (Module) + - Validate confirm/cancel UX contract bindings in assistant ch... + ### πŸ“ `layout/` - πŸ—οΈ **Layers:** UI, Unknown - - πŸ“Š **Tiers:** CRITICAL: 3, STANDARD: 4, TRIVIAL: 26 + - πŸ“Š **Tiers:** CRITICAL: 3, STANDARD: 4, TRIVIAL: 27 - πŸ“„ **Files:** 4 - - πŸ“¦ **Entities:** 33 + - πŸ“¦ **Entities:** 34 **Key Entities:** @@ -934,9 +975,9 @@ ### πŸ“ `stores/` - πŸ—οΈ **Layers:** UI, Unknown - - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 2, TRIVIAL: 12 - - πŸ“„ **Files:** 3 - - πŸ“¦ **Entities:** 15 + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 7, TRIVIAL: 12 + - πŸ“„ **Files:** 4 + - πŸ“¦ **Entities:** 20 **Key Entities:** @@ -946,6 +987,8 @@ - Auto-generated module for frontend/src/lib/stores/taskDrawer... - πŸ—„οΈ **activity** (Store) - Track active task count for navbar indicator + - πŸ—„οΈ **assistantChat** (Store) + - Control assistant chat panel visibility and active conversat... - πŸ—„οΈ **sidebar** (Store) - Manage sidebar visibility and navigation state - πŸ—„οΈ **taskDrawer** (Store) `[CRITICAL]` @@ -957,13 +1000,15 @@ ### πŸ“ `__tests__/` - - πŸ—οΈ **Layers:** Domain (Tests), UI - - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 8 - - πŸ“„ **Files:** 5 - - πŸ“¦ **Entities:** 9 + - πŸ—οΈ **Layers:** Domain (Tests), UI, UI Tests + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 10 + - πŸ“„ **Files:** 6 + - πŸ“¦ **Entities:** 11 **Key Entities:** + - πŸ“¦ **frontend.src.lib.stores.__tests__.assistantChat** (Module) + - Validate assistant chat store visibility and conversation bi... - πŸ“¦ **frontend.src.lib.stores.__tests__.sidebar** (Module) - Unit tests for sidebar store - πŸ“¦ **frontend.src.lib.stores.__tests__.test_activity** (Module) @@ -977,6 +1022,7 @@ **Dependencies:** + - πŸ”— DEPENDS_ON -> assistantChatStore - πŸ”— DEPENDS_ON -> frontend.src.lib.stores.taskDrawer ### πŸ“ `mocks/` @@ -1076,9 +1122,9 @@ ### πŸ“ `llm/` - πŸ—οΈ **Layers:** UI, Unknown - - πŸ“Š **Tiers:** STANDARD: 1, TRIVIAL: 2 + - πŸ“Š **Tiers:** STANDARD: 1, TRIVIAL: 5 - πŸ“„ **Files:** 1 - - πŸ“¦ **Entities:** 3 + - πŸ“¦ **Entities:** 6 **Key Entities:** @@ -1189,9 +1235,9 @@ ### πŸ“ `settings/` - πŸ—οΈ **Layers:** UI, Unknown - - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 1, TRIVIAL: 10 + - πŸ“Š **Tiers:** CRITICAL: 1, STANDARD: 1, TRIVIAL: 14 - πŸ“„ **Files:** 2 - - πŸ“¦ **Entities:** 12 + - πŸ“¦ **Entities:** 16 **Key Entities:** @@ -1355,14 +1401,18 @@ graph TD routes-->|DEPENDS_ON|backend routes-->|DEPENDS_ON|backend routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend + routes-->|DEPENDS_ON|backend __tests__-->|TESTS|backend __tests__-->|TESTS|backend __tests__-->|TESTS|backend __tests__-->|TESTS|backend + __tests__-->|DEPENDS_ON|backend + __tests__-->|DEPENDS_ON|backend core-->|USES|backend core-->|USES|backend - core-->|USES|backend - core-->|USES|backend + core-->|DEPENDS_ON|backend + core-->|DEPENDS_ON|backend auth-->|USES|backend auth-->|USES|backend auth-->|USES|backend @@ -1372,6 +1422,7 @@ graph TD utils-->|DEPENDS_ON|backend models-->|INHERITS_FROM|backend models-->|DEPENDS_ON|backend + models-->|DEPENDS_ON|backend models-->|USED_BY|backend models-->|INHERITS_FROM|backend llm_analysis-->|IMPLEMENTS|backend @@ -1390,11 +1441,13 @@ graph TD services-->|DEPENDS_ON|backend services-->|DEPENDS_ON|backend services-->|DEPENDS_ON|backend + services-->|DEPENDS_ON|backend services-->|USES|backend services-->|USES|backend services-->|USES|backend services-->|DEPENDS_ON|backend services-->|DEPENDS_ON|backend + __tests__-->|DEPENDS_ON|backend __tests__-->|TESTS|backend reports-->|DEPENDS_ON|backend reports-->|DEPENDS_ON|backend @@ -1405,6 +1458,9 @@ graph TD reports-->|DEPENDS_ON|backend __tests__-->|TESTS|backend tests-->|TESTS|backend + __tests__-->|VERIFIES|components + __tests__-->|VERIFIES|lib + __tests__-->|VERIFIES|lib reports-->|DEPENDS_ON|lib __tests__-->|TESTS|routes __tests__-->|TESTS|routes diff --git a/.ai/PROJECT_MAP.md b/.ai/PROJECT_MAP.md index 766f594..43d6ae2 100644 --- a/.ai/PROJECT_MAP.md +++ b/.ai/PROJECT_MAP.md @@ -79,43 +79,6 @@ - πŸ“ Flattens entity tree for easier grouping. - Ζ’ **to_dict** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) -- πŸ“¦ **TransactionCore** (`Module`) `[CRITICAL]` - - πŸ“ Core banking transaction processor with ACID guarantees. - - πŸ—οΈ Layer: Domain (Core) - - πŸ”’ Invariant: Negative transfers are strictly forbidden. - - πŸ”— DEPENDS_ON -> `[DEF:Infra:PostgresDB]` - - πŸ”— DEPENDS_ON -> `[DEF:Infra:AuditLog]` - - Ζ’ **execute_transfer** (`Function`) - - πŸ“ Atomically move funds between accounts with audit trails. - - πŸ”— CALLS -> `atomic_transaction` -- πŸ“¦ **PluginExampleShot** (`Module`) - - πŸ“ Reference implementation of a plugin following GRACE standards. - - πŸ—οΈ Layer: Domain (Business Logic) - - πŸ”’ Invariant: get_schema must return valid JSON Schema. - - πŸ”— INHERITS -> `PluginBase` - - Ζ’ **get_schema** (`Function`) - - πŸ“ Defines input validation schema. - - Ζ’ **execute** (`Function`) - - πŸ“ Core plugin logic with structured logging and scope isolation. - - Ζ’ **id** (`Function`) `[TRIVIAL]` - - πŸ“ Auto-detected function (orphan) -- πŸ“¦ **BackendRouteShot** (`Module`) - - πŸ“ Reference implementation of a task-based route using GRACE-Poly. - - πŸ—οΈ Layer: Interface (API) - - πŸ”’ Invariant: TaskManager must be available in dependency graph. - - πŸ”— IMPLEMENTS -> `[DEF:Std:API_FastAPI]` - - Ζ’ **create_task** (`Function`) - - πŸ“ Create and start a new task using TaskManager. Non-blocking. - - πŸ”— CALLS -> `task_manager.create_task` -- 🧩 **FrontendComponentShot** (`Component`) `[CRITICAL]` - - πŸ“ Action button to spawn a new task with full UX feedback cycle. - - πŸ—οΈ Layer: UI (Presentation) - - πŸ”’ Invariant: Must prevent double-submission while loading. - - πŸ“₯ Props: plugin_id: any, params: any - - ⬅️ READS_FROM `lib` - - ⬅️ READS_FROM `t` - - Ζ’ **spawnTask** (`Function`) - - πŸ“ Execute task creation request and emit user feedback. - πŸ“¦ **DashboardTypes** (`Module`) `[TRIVIAL]` - πŸ“ TypeScript interfaces for Dashboard entities - πŸ—οΈ Layer: Domain @@ -191,6 +154,18 @@ - πŸ—οΈ Layer: Infra - Ζ’ **debounce** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) +- πŸ—„οΈ **assistantChat** (`Store`) + - πŸ“ Control assistant chat panel visibility and active conversation binding. + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: conversationId persists while panel toggles unless explicitly reset. + - Ζ’ **toggleAssistantChat** (`Function`) + - πŸ“ Toggle assistant panel visibility. + - Ζ’ **openAssistantChat** (`Function`) + - πŸ“ Open assistant panel. + - Ζ’ **closeAssistantChat** (`Function`) + - πŸ“ Close assistant panel. + - Ζ’ **setAssistantConversationId** (`Function`) + - πŸ“ Bind current conversation id in UI state. - πŸ—„οΈ **taskDrawer** (`Store`) `[CRITICAL]` - πŸ“ Manage Task Drawer visibility and resource-to-task mapping - πŸ—οΈ Layer: UI @@ -253,6 +228,13 @@ - πŸ“ Unit tests for task drawer store - πŸ—οΈ Layer: UI - πŸ”’ Invariant: Store state transitions remain deterministic for open/close and task-status mapping. +- πŸ“¦ **frontend.src.lib.stores.__tests__.assistantChat** (`Module`) + - πŸ“ Validate assistant chat store visibility and conversation binding transitions. + - πŸ—οΈ Layer: UI Tests + - πŸ”’ Invariant: Each test starts from default closed state. + - πŸ”— DEPENDS_ON -> `assistantChatStore` + - Ζ’ **assistantChatStore_tests** (`Function`) + - πŸ“ Group store unit scenarios for assistant panel behavior. - πŸ“¦ **navigation** (`Mock`) - πŸ“ Mock for $app/navigation in tests - πŸ“¦ **stores** (`Mock`) @@ -272,6 +254,21 @@ - πŸ“ Fetch unified report list using existing request wrapper. - Ζ’ **getReportDetail** (`Function`) - πŸ“ Fetch one report detail by report_id. +- πŸ“¦ **frontend.src.lib.api.assistant** (`Module`) + - πŸ“ API client wrapper for assistant chat, confirmation actions, and history retrieval. + - πŸ—οΈ Layer: Infra-API + - πŸ”’ Invariant: All assistant requests must use requestApi wrapper (no native fetch). + - πŸ”— DEPENDS_ON -> `frontend.src.lib.api.api_module` + - Ζ’ **sendAssistantMessage** (`Function`) + - πŸ“ Send a user message to assistant orchestrator endpoint. + - Ζ’ **confirmAssistantOperation** (`Function`) + - πŸ“ Confirm a pending risky assistant operation. + - Ζ’ **cancelAssistantOperation** (`Function`) + - πŸ“ Cancel a pending risky assistant operation. + - Ζ’ **getAssistantHistory** (`Function`) + - πŸ“ Retrieve paginated assistant conversation history. + - Ζ’ **getAssistantConversations** (`Function`) + - πŸ“ Retrieve paginated conversation list for assistant sidebar/history switcher. - 🧩 **Select** (`Component`) `[TRIVIAL]` - πŸ“ Standardized dropdown selection component. - πŸ—οΈ Layer: Atom @@ -322,6 +319,60 @@ - πŸ“ Derived store providing the translation dictionary. - Ζ’ **_** (`Function`) - πŸ“ Get translation by key path. +- 🧩 **AssistantChatPanel** (`Component`) `[CRITICAL]` + - πŸ“ Slide-out assistant chat panel for natural language command execution and task tracking. + - πŸ—οΈ Layer: UI + - πŸ”’ Invariant: Risky operations are executed only through explicit confirm action. + - ⬅️ READS_FROM `app` + - ⬅️ READS_FROM `lib` + - ⬅️ READS_FROM `assistantChatStore` + - Ζ’ **loadHistory** (`Function`) + - πŸ“ Load current conversation history when panel becomes visible. + - Ζ’ **loadConversations** (`Function`) + - πŸ“ Load paginated conversation summaries for quick switching UI. + - Ζ’ **loadOlderMessages** (`Function`) + - πŸ“ Lazy-load older messages for active conversation when user scrolls to top. + - Ζ’ **appendLocalUserMessage** (`Function`) + - πŸ“ Add optimistic local user message before backend response. + - Ζ’ **appendAssistantResponse** (`Function`) + - πŸ“ Normalize and append assistant response payload to chat list. + - Ζ’ **handleSend** (`Function`) + - πŸ“ Submit user command to assistant orchestration API. + - Ζ’ **selectConversation** (`Function`) + - πŸ“ Switch active chat context to selected conversation item. + - Ζ’ **startNewConversation** (`Function`) + - πŸ“ Create local empty chat context that will be persisted on first message. + - Ζ’ **handleAction** (`Function`) + - πŸ“ Execute assistant action button behavior (open task/reports, confirm, cancel). + - Ζ’ **handleKeydown** (`Function`) + - πŸ“ Submit command by Enter while preserving multiline input with Shift+Enter. + - Ζ’ **stateClass** (`Function`) + - πŸ“ Map assistant state to visual badge style class. + - Ζ’ **handleHistoryScroll** (`Function`) + - πŸ“ Trigger lazy history fetch when user scroll reaches top boundary. +- πŸ“¦ **AssistantChatPanel** (`Module`) `[TRIVIAL]` + - πŸ“ Auto-generated module for frontend/src/lib/components/assistant/AssistantChatPanel.svelte + - πŸ—οΈ Layer: Unknown + - Ζ’ **buildConversationTitle** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **setConversationFilter** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **formatConversationTime** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **frontend.src.lib.components.assistant.__tests__.assistant_confirmation_integration** (`Module`) + - πŸ“ Validate confirm/cancel UX contract bindings in assistant chat panel source. + - πŸ—οΈ Layer: UI Tests + - πŸ”’ Invariant: Confirm/cancel action handling must remain explicit and confirmation-id bound. + - Ζ’ **assistant_confirmation_contract_tests** (`Function`) + - πŸ“ Assert that confirmation UX flow and API bindings are preserved in chat panel. +- πŸ“¦ **frontend.src.lib.components.assistant.__tests__.assistant_chat_integration** (`Module`) + - πŸ“ Contract-level integration checks for assistant chat panel implementation and localization wiring. + - πŸ—οΈ Layer: UI Tests + - πŸ”’ Invariant: Critical assistant UX states and action hooks remain present in component source. + - Ζ’ **readJson** (`Function`) + - πŸ“ Read and parse JSON fixture file from disk. + - Ζ’ **assistant_chat_contract_tests** (`Function`) + - πŸ“ Validate assistant chat component contract and locale integration without DOM runtime dependency. - 🧩 **ReportCard** (`Component`) `[CRITICAL]` - πŸ“ Render one report with explicit textual type label and profile-driven visual variant. - πŸ—οΈ Layer: UI @@ -448,6 +499,8 @@ - πŸ“ Auto-detected function (orphan) - Ζ’ **handleActivityClick** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) + - Ζ’ **handleAssistantClick** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) - Ζ’ **handleSearchFocus** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) - Ζ’ **handleSearchBlur** (`Function`) `[TRIVIAL]` @@ -670,11 +723,19 @@ - 🧩 **LLMSettingsPage** (`Component`) - πŸ“ Admin settings page for LLM provider configuration. - πŸ—οΈ Layer: UI + - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `t` - πŸ“¦ **+page** (`Module`) `[TRIVIAL]` - πŸ“ Auto-generated module for frontend/src/routes/admin/settings/llm/+page.svelte - πŸ—οΈ Layer: Unknown + - Ζ’ **isMultimodalModel** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getProviderById** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) - Ζ’ **fetchProviders** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) + - Ζ’ **saveSettings** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) - 🧩 **MigrationDashboard** (`Component`) - πŸ“ Main dashboard for configuring and starting migrations. - πŸ—οΈ Layer: Page @@ -704,6 +765,8 @@ - πŸ—οΈ Layer: Page - πŸ”’ Invariant: Mappings are saved to the backend for persistence. - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `t` + - ⬅️ READS_FROM `t` - Ζ’ **fetchEnvironments** (`Function`) - πŸ“ Fetches the list of environments. - Ζ’ **fetchDatabases** (`Function`) @@ -742,6 +805,14 @@ - πŸ—οΈ Layer: Unknown - Ζ’ **loadSettings** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) + - Ζ’ **normalizeLlmSettings** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **isMultimodalModel** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **getProviderById** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **isDashboardValidationBindingValid** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) - Ζ’ **handleTabChange** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) - Ζ’ **getTabClass** (`Function`) `[TRIVIAL]` @@ -782,6 +853,7 @@ - πŸ“ Dashboard management page for Git integration. - πŸ—οΈ Layer: Page - ⬅️ READS_FROM `lib` + - ➑️ WRITES_TO `t` - Ζ’ **fetchEnvironments** (`Function`) - πŸ“ Fetches the list of deployment environments from the API. - Ζ’ **fetchDashboards** (`Function`) @@ -930,6 +1002,7 @@ - πŸ”’ Invariant: Modal blocks migration progress until resolved or cancelled. - ⚑ Events: cancel, resolve - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` - Ζ’ **resolve** (`Function`) - πŸ“ Dispatches the resolution event with the selected mapping. - Ζ’ **cancel** (`Function`) @@ -940,8 +1013,8 @@ - πŸ”’ Invariant: Selected IDs must be a subset of available dashboards. - ⚑ Events: selectionChanged - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` - ➑️ WRITES_TO `derived` - - ➑️ WRITES_TO `t` - Ζ’ **handleValidate** (`Function`) - πŸ“ Triggers dashboard validation task. - Ζ’ **handleSort** (`Function`) @@ -1037,6 +1110,7 @@ - πŸ”’ Invariant: Source and target environments must be selectable from the list of configured environments. - ⚑ Events: change - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `t` - Ζ’ **handleSelect** (`Function`) - πŸ“ Dispatches the selection change event. - 🧩 **ProtectedRoute** (`Component`) `[TRIVIAL]` @@ -1111,8 +1185,8 @@ - πŸ—οΈ Layer: UI - ⚑ Events: uploaded - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` - ⬅️ READS_FROM `t` - - ➑️ WRITES_TO `t` - Ζ’ **handleUpload** (`Function`) - πŸ“ Handles the file upload process. - Ζ’ **handleDrop** (`Function`) @@ -1121,8 +1195,8 @@ - πŸ“ UI component for creating a new database connection configuration. - πŸ—οΈ Layer: UI - ⚑ Events: success - - ➑️ WRITES_TO `t` - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `t` - Ζ’ **handleSubmit** (`Function`) - πŸ“ Submits the connection form to the backend. - Ζ’ **resetForm** (`Function`) @@ -1130,8 +1204,8 @@ - 🧩 **ConnectionList** (`Component`) - πŸ“ UI component for listing and deleting saved database connection configurations. - πŸ—οΈ Layer: UI - - ➑️ WRITES_TO `t` - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `t` - Ζ’ **fetchConnections** (`Function`) - πŸ“ Fetches the list of connections from the backend. - Ζ’ **handleDelete** (`Function`) @@ -1155,6 +1229,8 @@ - 🧩 **DebugTool** (`Component`) - πŸ“ UI component for system diagnostics and debugging API responses. - πŸ—οΈ Layer: UI + - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `t` - Ζ’ **fetchEnvironments** (`Function`) - πŸ“ Fetches available environments. - Ζ’ **handleRunDebug** (`Function`) @@ -1165,8 +1241,8 @@ - πŸ“ Displays the commit history for a specific dashboard. - πŸ—οΈ Layer: Component - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` - ⬅️ READS_FROM `t` - - ➑️ WRITES_TO `t` - Ζ’ **onMount** (`Function`) - πŸ“ Load history when component is mounted. - Ζ’ **loadHistory** (`Function`) @@ -1177,6 +1253,7 @@ - πŸ”’ Invariant: Cannot deploy without a selected environment. - ⚑ Events: deploy - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` - ⬅️ READS_FROM `effect` - πŸ“¦ **loadStatus** (`Watcher`) - Ζ’ **loadEnvironments** (`Function`) @@ -1189,6 +1266,7 @@ - πŸ”’ Invariant: User must resolve all conflicts before saving. - ⚑ Events: resolve - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` - Ζ’ **resolve** (`Function`) - πŸ“ Set resolution strategy for a file. - Ζ’ **handleSave** (`Function`) @@ -1198,7 +1276,8 @@ - πŸ—οΈ Layer: Component - ⚑ Events: commit - ➑️ WRITES_TO `props` - - ⬅️ READS_FROM `effect` + - ➑️ WRITES_TO `state` + - ⬅️ READS_FROM `t` - Ζ’ **handleGenerateMessage** (`Function`) - πŸ“ Generates a commit message using LLM. - Ζ’ **loadStatus** (`Function`) @@ -1210,6 +1289,7 @@ - πŸ—οΈ Layer: Component - ⚑ Events: change - ➑️ WRITES_TO `props` + - ➑️ WRITES_TO `state` - ⬅️ READS_FROM `t` - Ζ’ **onMount** (`Function`) - πŸ“ Load branches when component is mounted. @@ -1225,7 +1305,7 @@ - πŸ“ Π¦Π΅Π½Ρ‚Ρ€Π°Π»ΡŒΠ½Ρ‹ΠΉ ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚ для управлСния Git-опСрациями ΠΊΠΎΠ½ΠΊΡ€Π΅Ρ‚Π½ΠΎΠ³ΠΎ Π΄Π°ΡˆΠ±ΠΎΡ€Π΄Π°. - πŸ—οΈ Layer: Component - ➑️ WRITES_TO `props` - - ➑️ WRITES_TO `t` + - ➑️ WRITES_TO `state` - ⬅️ READS_FROM `t` - Ζ’ **checkStatus** (`Function`) - πŸ“ ΠŸΡ€ΠΎΠ²Π΅Ρ€ΡΠ΅Ρ‚, ΠΈΠ½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·ΠΈΡ€ΠΎΠ²Π°Π½ Π»ΠΈ Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ для Π΄Π°Π½Π½ΠΎΠ³ΠΎ Π΄Π°ΡˆΠ±ΠΎΡ€Π΄Π°. @@ -1241,8 +1321,8 @@ - πŸ“ UI component for previewing generated dataset documentation before saving. - πŸ—οΈ Layer: UI - ➑️ WRITES_TO `props` - - ➑️ WRITES_TO `t` - - ⬅️ READS_FROM `t` + - ➑️ WRITES_TO `derived` + - ➑️ WRITES_TO `state` - πŸ“¦ **DocPreview** (`Module`) `[TRIVIAL]` - πŸ“ Auto-generated module for frontend/src/components/llm/DocPreview.svelte - πŸ—οΈ Layer: Unknown @@ -1251,12 +1331,14 @@ - 🧩 **ProviderConfig** (`Component`) - πŸ“ UI form for managing LLM provider configurations. - πŸ—οΈ Layer: UI - - ➑️ WRITES_TO `props` + - πŸ“₯ Props: providers: any, onSave: any - ➑️ WRITES_TO `t` - ⬅️ READS_FROM `t` - πŸ“¦ **ProviderConfig** (`Module`) `[TRIVIAL]` - πŸ“ Auto-generated module for frontend/src/components/llm/ProviderConfig.svelte - πŸ—οΈ Layer: Unknown + - Ζ’ **isMultimodalModel** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) - Ζ’ **resetForm** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) - Ζ’ **handleEdit** (`Function`) `[TRIVIAL]` @@ -1272,6 +1354,12 @@ - πŸ—οΈ Layer: Unknown - Ζ’ **getStatusColor** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **frontend.src.components.llm.__tests__.provider_config_integration** (`Module`) + - πŸ“ Protect edit-button interaction contract in LLM provider settings UI. + - πŸ—οΈ Layer: UI Tests + - πŸ”’ Invariant: Edit action keeps explicit click handler and opens normalized edit form. + - Ζ’ **provider_config_edit_contract_tests** (`Function`) + - πŸ“ Validate edit button handler wiring and normalized edit form state mapping. - πŸ“¦ **test_auth_debug** (`Module`) `[TRIVIAL]` - πŸ“ Auto-generated module for backend/test_auth_debug.py - πŸ—οΈ Layer: Unknown @@ -1423,6 +1511,14 @@ - πŸ“ ΠŸΠΎΠ»ΡƒΡ‡Π°Π΅Ρ‚ ΠΏΠΎΠ»Π½Ρ‹ΠΉ список Π΄Π°ΡˆΠ±ΠΎΡ€Π΄ΠΎΠ², автоматичСски обрабатывая ΠΏΠ°Π³ΠΈΠ½Π°Ρ†ΠΈΡŽ. - Ζ’ **get_dashboards_summary** (`Function`) - πŸ“ Fetches dashboard metadata optimized for the grid. + - Ζ’ **get_dashboard** (`Function`) + - πŸ“ Fetches a single dashboard by ID. + - Ζ’ **get_chart** (`Function`) + - πŸ“ Fetches a single chart by ID. + - Ζ’ **get_dashboard_detail** (`Function`) + - πŸ“ Fetches detailed dashboard information including related charts and datasets. + - Ζ’ **_extract_chart_ids_from_layout** (`Function`) + - πŸ“ Traverses dashboard layout metadata and extracts chart IDs from common keys. - Ζ’ **export_dashboard** (`Function`) - πŸ“ ЭкспортируСт Π΄Π°ΡˆΠ±ΠΎΡ€Π΄ Π² Π²ΠΈΠ΄Π΅ ZIP-Π°Ρ€Ρ…ΠΈΠ²Π°. - Ζ’ **import_dashboard** (`Function`) @@ -1465,6 +1561,12 @@ - πŸ“ 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. + - Ζ’ **extract_dataset_id_from_form_data** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **walk** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **as_bool** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) - πŸ“¦ **ConfigManagerModule** (`Module`) - πŸ“ Manages application configuration persisted in database with one-time migration from JSON. - πŸ—οΈ Layer: Core @@ -1541,6 +1643,8 @@ - πŸ—οΈ Layer: Core - πŸ”’ Invariant: A single engine instance is used for the entire application. - πŸ”— DEPENDS_ON -> `sqlalchemy` + - πŸ”— DEPENDS_ON -> `backend.src.models.mapping` + - πŸ”— DEPENDS_ON -> `backend.src.core.auth.config` - πŸ“¦ **BASE_DIR** (`Variable`) - πŸ“ Base directory for the backend. - πŸ“¦ **DATABASE_URL** (`Constant`) @@ -1555,11 +1659,11 @@ - πŸ“ SQLAlchemy engine for tasks database. - πŸ“¦ **auth_engine** (`Variable`) - πŸ“ SQLAlchemy engine for authentication database. - - β„‚ **SessionLocal** (`Class`) + - β„‚ **SessionLocal** (`Class`) `[TRIVIAL]` - πŸ“ A session factory for the main mappings database. - - β„‚ **TasksSessionLocal** (`Class`) + - β„‚ **TasksSessionLocal** (`Class`) `[TRIVIAL]` - πŸ“ A session factory for the tasks execution database. - - β„‚ **AuthSessionLocal** (`Class`) + - β„‚ **AuthSessionLocal** (`Class`) `[TRIVIAL]` - πŸ“ A session factory for the authentication database. - Ζ’ **init_db** (`Function`) - πŸ“ Initializes the database by creating all tables. @@ -2320,6 +2424,86 @@ - πŸ“ Schema for dashboard deployment requests. - β„‚ **RepoInitRequest** (`Class`) - πŸ“ Schema for repository initialization requests. +- πŸ“¦ **backend.src.api.routes.assistant** (`Module`) + - πŸ“ API routes for LLM assistant command parsing and safe execution orchestration. + - πŸ—οΈ Layer: API + - πŸ”’ Invariant: Risky operations are never executed without valid confirmation token. + - πŸ”— DEPENDS_ON -> `backend.src.core.task_manager` + - πŸ”— DEPENDS_ON -> `backend.src.models.assistant` + - β„‚ **AssistantMessageRequest** (`Class`) `[TRIVIAL]` + - πŸ“ Input payload for assistant message endpoint. + - β„‚ **AssistantAction** (`Class`) `[TRIVIAL]` + - πŸ“ UI action descriptor returned with assistant responses. + - β„‚ **AssistantMessageResponse** (`Class`) + - πŸ“ Output payload contract for assistant interaction endpoints. + - β„‚ **ConfirmationRecord** (`Class`) + - πŸ“ In-memory confirmation token model for risky operation dispatch. + - Ζ’ **_append_history** (`Function`) + - πŸ“ Append conversation message to in-memory history buffer. + - Ζ’ **_persist_message** (`Function`) + - πŸ“ Persist assistant/user message record to database. + - Ζ’ **_audit** (`Function`) + - πŸ“ Append in-memory audit record for assistant decision trace. + - Ζ’ **_persist_audit** (`Function`) + - πŸ“ Persist structured assistant audit payload in database. + - Ζ’ **_persist_confirmation** (`Function`) + - πŸ“ Persist confirmation token record to database. + - Ζ’ **_update_confirmation_state** (`Function`) + - πŸ“ Update persistent confirmation token lifecycle state. + - Ζ’ **_load_confirmation_from_db** (`Function`) + - πŸ“ Load confirmation token from database into in-memory model. + - Ζ’ **_ensure_conversation** (`Function`) + - πŸ“ Resolve active conversation id in memory or create a new one. + - Ζ’ **_resolve_or_create_conversation** (`Function`) + - πŸ“ Resolve active conversation using explicit id, memory cache, or persisted history. + - Ζ’ **_cleanup_history_ttl** (`Function`) + - πŸ“ Enforce assistant message retention window by deleting expired rows and in-memory records. + - Ζ’ **_is_conversation_archived** (`Function`) + - πŸ“ Determine archived state for a conversation based on last update timestamp. + - Ζ’ **_coerce_query_bool** (`Function`) + - πŸ“ Normalize bool-like query values for compatibility in direct handler invocations/tests. + - Ζ’ **_extract_id** (`Function`) + - πŸ“ Extract first regex match group from text by ordered pattern list. + - Ζ’ **_resolve_env_id** (`Function`) + - πŸ“ Resolve environment identifier/name token to canonical environment id. + - Ζ’ **_is_production_env** (`Function`) + - πŸ“ Determine whether environment token resolves to production-like target. + - Ζ’ **_resolve_provider_id** (`Function`) + - πŸ“ Resolve provider token to provider id with active/default fallback. + - Ζ’ **_get_default_environment_id** (`Function`) + - πŸ“ Resolve default environment id from settings or first configured environment. + - Ζ’ **_resolve_dashboard_id_by_ref** (`Function`) + - πŸ“ Resolve dashboard id by title or slug reference in selected environment. + - Ζ’ **_parse_command** (`Function`) + - πŸ“ Deterministically parse RU/EN command text into intent payload. + - Ζ’ **_check_any_permission** (`Function`) + - πŸ“ Validate user against alternative permission checks (logical OR). + - Ζ’ **_has_any_permission** (`Function`) + - πŸ“ Check whether user has at least one permission tuple from the provided list. + - Ζ’ **_build_tool_catalog** (`Function`) + - πŸ“ Build current-user tool catalog for LLM planner with operation contracts and defaults. + - Ζ’ **_coerce_intent_entities** (`Function`) + - πŸ“ Normalize intent entity value types from LLM output to route-compatible values. + - Ζ’ **_clarification_text_for_intent** (`Function`) + - πŸ“ Convert technical missing-parameter errors into user-facing clarification prompts. + - Ζ’ **_plan_intent_with_llm** (`Function`) + - πŸ“ Use active LLM provider to select best tool/operation from dynamic catalog. + - Ζ’ **_authorize_intent** (`Function`) + - πŸ“ Validate user permissions for parsed intent before confirmation/dispatch. + - Ζ’ **_dispatch_intent** (`Function`) + - πŸ“ Execute parsed assistant intent via existing task/plugin/git services. + - Ζ’ **send_message** (`Function`) + - πŸ“ Parse assistant command, enforce safety gates, and dispatch executable intent. + - Ζ’ **confirm_operation** (`Function`) + - πŸ“ Execute previously requested risky operation after explicit user confirmation. + - Ζ’ **cancel_operation** (`Function`) + - πŸ“ Cancel pending risky operation and mark confirmation token as cancelled. + - Ζ’ **list_conversations** (`Function`) + - πŸ“ Return paginated conversation list for current user with archived flag and last message preview. + - Ζ’ **get_history** (`Function`) + - πŸ“ Retrieve paginated assistant conversation history for current user. + - Ζ’ **get_assistant_audit** (`Function`) + - πŸ“ Return assistant audit decisions for current user from persistent and in-memory stores. - πŸ“¦ **storage_routes** (`Module`) - πŸ“ API endpoints for file storage management (backups and repositories). - πŸ—οΈ Layer: API @@ -2349,11 +2533,13 @@ - πŸ“ Return paginated unified reports list. - Ζ’ **get_report_detail** (`Function`) - πŸ“ Return one normalized report detail with diagnostics and next actions. -- πŸ“¦ **__init__** (`Module`) `[TRIVIAL]` - - πŸ“ Auto-generated module for backend/src/api/routes/__init__.py - - πŸ—οΈ Layer: Unknown +- πŸ“¦ **backend.src.api.routes.__init__** (`Module`) + - πŸ“ Provide lazy route module loading to avoid heavyweight imports during tests. + - πŸ—οΈ Layer: API + - πŸ”’ Invariant: Only names listed in __all__ are importable via __getattr__. + - πŸ”— DEPENDS_ON -> `importlib` - Ζ’ **__getattr__** (`Function`) `[TRIVIAL]` - - πŸ“ Auto-detected function (orphan) + - πŸ“ Lazily import route module by attribute name. - πŸ“¦ **TasksRouter** (`Module`) - πŸ“ Defines the FastAPI router for task-related endpoints, allowing clients to create, list, and get the status of tasks. - πŸ—οΈ Layer: UI (API) @@ -2386,9 +2572,15 @@ - πŸ“¦ **LastTask** (`DataClass`) - πŸ“¦ **DashboardItem** (`DataClass`) - πŸ“¦ **DashboardsResponse** (`DataClass`) + - πŸ“¦ **DashboardChartItem** (`DataClass`) + - πŸ“¦ **DashboardDatasetItem** (`DataClass`) + - πŸ“¦ **DashboardDetailResponse** (`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_dashboard_detail** (`Function`) + - πŸ“ Fetch detailed dashboard info with related charts and datasets + - πŸ”— CALLS -> `SupersetClient.get_dashboard_detail` - πŸ“¦ **MigrateRequest** (`DataClass`) - πŸ“¦ **TaskResponse** (`DataClass`) - Ζ’ **migrate_dashboards** (`Function`) @@ -2412,6 +2604,8 @@ - Ζ’ **test_get_dashboards_with_search** (`Function`) - Ζ’ **test_get_dashboards_env_not_found** (`Function`) - Ζ’ **test_get_dashboards_invalid_pagination** (`Function`) + - Ζ’ **test_get_dashboard_detail_success** (`Function`) + - Ζ’ **test_get_dashboard_detail_env_not_found** (`Function`) - Ζ’ **test_migrate_dashboards_success** (`Function`) - Ζ’ **test_migrate_dashboards_no_ids** (`Function`) - Ζ’ **test_backup_dashboards_success** (`Function`) @@ -2483,6 +2677,160 @@ - πŸ“ Auto-detected function (orphan) - Ζ’ **test_get_report_detail_not_found** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.api.routes.__tests__.test_assistant_authz** (`Module`) + - πŸ“ Verify assistant confirmation ownership, expiration, and deny behavior for restricted users. + - πŸ—οΈ Layer: UI (API Tests) + - πŸ”’ Invariant: Security-sensitive flows fail closed for unauthorized actors. + - πŸ”— DEPENDS_ON -> `backend.src.api.routes.assistant` + - Ζ’ **_run_async** (`Function`) `[TRIVIAL]` + - πŸ“ Execute async endpoint handler in synchronous test context. + - β„‚ **_FakeTask** (`Class`) `[TRIVIAL]` + - πŸ“ Lightweight task model used for assistant authz tests. + - β„‚ **_FakeTaskManager** (`Class`) `[TRIVIAL]` + - πŸ“ Minimal task manager for deterministic operation creation and lookup. + - β„‚ **_FakeConfigManager** (`Class`) `[TRIVIAL]` + - πŸ“ Provide deterministic environment aliases required by intent parsing. + - Ζ’ **_admin_user** (`Function`) `[TRIVIAL]` + - πŸ“ Build admin principal fixture. + - Ζ’ **_other_admin_user** (`Function`) `[TRIVIAL]` + - πŸ“ Build second admin principal fixture for ownership tests. + - Ζ’ **_limited_user** (`Function`) `[TRIVIAL]` + - πŸ“ Build limited principal without required assistant execution privileges. + - β„‚ **_FakeQuery** (`Class`) `[TRIVIAL]` + - πŸ“ Minimal chainable query object for fake DB interactions. + - β„‚ **_FakeDb** (`Class`) `[TRIVIAL]` + - πŸ“ In-memory session substitute for assistant route persistence calls. + - Ζ’ **_clear_assistant_state** (`Function`) `[TRIVIAL]` + - πŸ“ Reset assistant process-local state between test cases. + - Ζ’ **test_confirmation_owner_mismatch_returns_403** (`Function`) + - πŸ“ Confirm endpoint should reject requests from user that does not own the confirmation token. + - Ζ’ **test_expired_confirmation_cannot_be_confirmed** (`Function`) + - πŸ“ Expired confirmation token should be rejected and not create task. + - Ζ’ **test_limited_user_cannot_launch_restricted_operation** (`Function`) + - πŸ“ Limited user should receive denied state for privileged operation. + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **create_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_tasks** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_environments** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **filter** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **order_by** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **first** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **all** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **limit** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **offset** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **count** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **add** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **merge** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **query** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **commit** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **rollback** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.api.routes.__tests__.test_assistant_api** (`Module`) + - πŸ“ Validate assistant API endpoint logic via direct async handler invocation. + - πŸ—οΈ Layer: UI (API Tests) + - πŸ”’ Invariant: Every test clears assistant in-memory state before execution. + - πŸ”— DEPENDS_ON -> `backend.src.api.routes.assistant` + - Ζ’ **_run_async** (`Function`) `[TRIVIAL]` + - πŸ“ Execute async endpoint handler in synchronous test context. + - β„‚ **_FakeTask** (`Class`) `[TRIVIAL]` + - πŸ“ Lightweight task stub used by assistant API tests. + - β„‚ **_FakeTaskManager** (`Class`) `[TRIVIAL]` + - πŸ“ Minimal async-compatible TaskManager fixture for deterministic test flows. + - β„‚ **_FakeConfigManager** (`Class`) `[TRIVIAL]` + - πŸ“ Environment config fixture with dev/prod aliases for parser tests. + - Ζ’ **_admin_user** (`Function`) `[TRIVIAL]` + - πŸ“ Build admin principal fixture. + - Ζ’ **_limited_user** (`Function`) `[TRIVIAL]` + - πŸ“ Build non-admin principal fixture. + - β„‚ **_FakeQuery** (`Class`) `[TRIVIAL]` + - πŸ“ Minimal chainable query object for fake SQLAlchemy-like DB behavior in tests. + - β„‚ **_FakeDb** (`Class`) `[TRIVIAL]` + - πŸ“ In-memory fake database implementing subset of Session interface used by assistant routes. + - Ζ’ **_clear_assistant_state** (`Function`) `[TRIVIAL]` + - πŸ“ Reset in-memory assistant registries for isolation between tests. + - Ζ’ **test_unknown_command_returns_needs_clarification** (`Function`) + - πŸ“ Unknown command should return clarification state and unknown intent. + - Ζ’ **test_capabilities_question_returns_successful_help** (`Function`) + - πŸ“ Capability query should return deterministic help response, not clarification. + - Ζ’ **test_non_admin_command_returns_denied** (`Function`) + - πŸ“ Non-admin user must receive denied state for privileged command. + - Ζ’ **test_migration_to_prod_requires_confirmation_and_can_be_confirmed** (`Function`) + - πŸ“ Migration to prod must require confirmation and then start task after explicit confirm. + - Ζ’ **test_status_query_returns_task_status** (`Function`) + - πŸ“ Task status command must surface current status text for existing task id. + - Ζ’ **test_status_query_without_task_id_returns_latest_user_task** (`Function`) + - πŸ“ Status command without explicit task_id should resolve to latest task for current user. + - Ζ’ **test_llm_validation_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. + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **create_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_task** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_tasks** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **get_environments** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **filter** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **order_by** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **first** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **all** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **count** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **offset** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **limit** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **__init__** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **add** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **merge** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **query** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **commit** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) + - Ζ’ **rollback** (`Function`) `[TRIVIAL]` + - πŸ“ Auto-detected function (orphan) - πŸ“¦ **backend.src.models.config** (`Module`) - πŸ“ Defines database schema for persisted application configuration. - πŸ—οΈ Layer: Domain @@ -2565,6 +2913,17 @@ - πŸ“ Auto-detected function (orphan) - Ζ’ **_validate_time_range** (`Function`) `[TRIVIAL]` - πŸ“ Auto-detected function (orphan) +- πŸ“¦ **backend.src.models.assistant** (`Module`) + - πŸ“ SQLAlchemy models for assistant audit trail and confirmation tokens. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: Assistant records preserve immutable ids and creation timestamps. + - πŸ”— DEPENDS_ON -> `backend.src.models.mapping` + - β„‚ **AssistantAuditRecord** (`Class`) + - πŸ“ Store audit decisions and outcomes produced by assistant command handling. + - β„‚ **AssistantMessageRecord** (`Class`) + - πŸ“ Persist chat history entries for assistant conversations. + - β„‚ **AssistantConfirmationRecord** (`Class`) + - πŸ“ Persist risky operation confirmation tokens with lifecycle state. - πŸ“¦ **backend.src.models.storage** (`Module`) `[TRIVIAL]` - πŸ“ Data models for the storage system. - πŸ—οΈ Layer: Domain @@ -2636,6 +2995,25 @@ - πŸ“ Extract resource name from task params - Ζ’ **_extract_resource_type_from_task** (`Function`) - πŸ“ Extract resource type from task params +- πŸ“¦ **backend.src.services.llm_prompt_templates** (`Module`) + - πŸ“ Provide default LLM prompt templates and normalization helpers for runtime usage. + - πŸ—οΈ Layer: Domain + - πŸ”’ Invariant: All required prompt template keys are always present after normalization. + - πŸ”— DEPENDS_ON -> `backend.src.core.config_manager` + - πŸ“¦ **DEFAULT_LLM_PROMPTS** (`Constant`) + - πŸ“ Default prompt templates used by documentation, dashboard validation, and git commit generation. + - πŸ“¦ **DEFAULT_LLM_PROVIDER_BINDINGS** (`Constant`) + - πŸ“ Default provider binding per task domain. + - πŸ“¦ **DEFAULT_LLM_ASSISTANT_SETTINGS** (`Constant`) + - πŸ“ Default planner settings for assistant chat intent model/provider resolution. + - Ζ’ **normalize_llm_settings** (`Function`) + - πŸ“ Ensure llm settings contain stable schema with prompts section and default templates. + - Ζ’ **is_multimodal_model** (`Function`) + - πŸ“ Heuristically determine whether model supports image input required for dashboard validation. + - Ζ’ **resolve_bound_provider_id** (`Function`) + - πŸ“ Resolve provider id configured for a task binding with fallback to default provider. + - Ζ’ **render_prompt** (`Function`) + - πŸ“ Render prompt template using deterministic placeholder replacement with graceful fallback. - πŸ“¦ **backend.src.services.llm_provider** (`Module`) - πŸ“ Service for managing LLM provider configurations with encrypted API keys. - πŸ—οΈ Layer: Domain @@ -2741,6 +3119,23 @@ - πŸ“ Helper to get an initialized SupersetClient for an environment. - Ζ’ **get_suggestions** (`Function`) - πŸ“ Fetches databases from both environments and returns fuzzy matching suggestions. +- πŸ“¦ **backend.src.services.__tests__.test_llm_prompt_templates** (`Module`) + - πŸ“ Validate normalization and rendering behavior for configurable LLM prompt templates. + - πŸ—οΈ Layer: Domain Tests + - πŸ”’ Invariant: All required prompt keys remain available after normalization. + - πŸ”— DEPENDS_ON -> `backend.src.services.llm_prompt_templates` + - Ζ’ **test_normalize_llm_settings_adds_default_prompts** (`Function`) + - πŸ“ Ensure legacy/partial llm settings are expanded with all prompt defaults. + - Ζ’ **test_normalize_llm_settings_keeps_custom_prompt_values** (`Function`) + - πŸ“ Ensure user-customized prompt values are preserved during normalization. + - Ζ’ **test_render_prompt_replaces_known_placeholders** (`Function`) + - πŸ“ Ensure template placeholders are deterministically replaced. + - Ζ’ **test_is_multimodal_model_detects_known_vision_models** (`Function`) + - πŸ“ Ensure multimodal model detection recognizes common vision-capable model names. + - Ζ’ **test_resolve_bound_provider_id_prefers_binding_then_default** (`Function`) + - πŸ“ Verify provider binding resolution priority. + - Ζ’ **test_normalize_llm_settings_keeps_assistant_planner_settings** (`Function`) + - πŸ“ Ensure assistant planner provider/model fields are preserved and normalized. - πŸ“¦ **backend.src.services.__tests__.test_resource_service** (`Module`) - πŸ“ Unit tests for ResourceService - πŸ—οΈ Layer: Service diff --git a/generate_semantic_map.py b/generate_semantic_map.py index d07e789..3b00502 100644 --- a/generate_semantic_map.py +++ b/generate_semantic_map.py @@ -82,6 +82,12 @@ IGNORE_DIRS = { IGNORE_FILES = { "package-lock.json", "poetry.lock", "yarn.lock" } +IGNORE_PATH_PREFIXES = { + ".ai/shots/" +} +IGNORE_EXACT_PATHS = { + ".ai/shots" +} OUTPUT_JSON = "semantics/semantic_map.json" OUTPUT_COMPRESSED_MD = ".ai/PROJECT_MAP.md" OUTPUT_MODULE_MAP_MD = ".ai/MODULE_MAP.md" @@ -708,6 +714,13 @@ class SemanticMapGenerator: with belief_scope("_is_ignored"): rel_path = rel_path.replace(os.sep, '/') + if rel_path in IGNORE_EXACT_PATHS: + return True + + for prefix in IGNORE_PATH_PREFIXES: + if rel_path.startswith(prefix): + return True + parts = rel_path.split('/') for part in parts: if part in IGNORE_DIRS: diff --git a/semantics/semantic_map.json b/semantics/semantic_map.json index e6d0161..29681dd 100644 --- a/semantics/semantic_map.json +++ b/semantics/semantic_map.json @@ -1,13 +1,13 @@ { "project_root": ".", - "generated_at": "2026-02-23T14:44:08.454810", + "generated_at": "2026-02-24T12:45:07.793423", "modules": [ { "name": "generate_semantic_map", "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 1160, + "end_line": 1173, "tags": { "TIER": "CRITICAL", "SEMANTICS": "semantic_analysis, parser, map_generator, compliance_checker, tier_validation, svelte_props, data_flow, module_map", @@ -138,8 +138,8 @@ "name": "ComplianceIssue", "type": "Class", "tier": "TRIVIAL", - "start_line": 121, - "end_line": 136, + "start_line": 127, + "end_line": 142, "tags": { "TIER": "TRIVIAL", "PURPOSE": "Represents a single compliance issue with severity." @@ -156,8 +156,8 @@ "name": "SemanticEntity", "type": "Class", "tier": "CRITICAL", - "start_line": 139, - "end_line": 315, + "start_line": 145, + "end_line": 321, "tags": { "TIER": "CRITICAL", "PURPOSE": "Represents a code entity (Module, Function, Component) found during parsing.", @@ -169,8 +169,8 @@ "name": "__init__", "type": "Function", "tier": "STANDARD", - "start_line": 144, - "end_line": 167, + "start_line": 150, + "end_line": 173, "tags": { "TIER": "STANDARD", "PURPOSE": "Initializes a new SemanticEntity instance.", @@ -189,8 +189,8 @@ "name": "get_tier", "type": "Function", "tier": "STANDARD", - "start_line": 169, - "end_line": 181, + "start_line": 175, + "end_line": 187, "tags": { "TIER": "STANDARD", "PURPOSE": "Returns the tier of the entity, defaulting to STANDARD.", @@ -209,8 +209,8 @@ "name": "to_dict", "type": "Function", "tier": "STANDARD", - "start_line": 183, - "end_line": 212, + "start_line": 189, + "end_line": 218, "tags": { "TIER": "STANDARD", "PURPOSE": "Serializes the entity to a dictionary for JSON output.", @@ -229,8 +229,8 @@ "name": "validate", "type": "Function", "tier": "CRITICAL", - "start_line": 214, - "end_line": 278, + "start_line": 220, + "end_line": 284, "tags": { "TIER": "CRITICAL", "PURPOSE": "Checks for semantic compliance based on TIER requirements.", @@ -250,8 +250,8 @@ "name": "get_score", "type": "Function", "tier": "STANDARD", - "start_line": 280, - "end_line": 314, + "start_line": 286, + "end_line": 320, "tags": { "TIER": "STANDARD", "PURPOSE": "Calculates a compliance score (0.0 to 1.0) based on tier requirements.", @@ -277,8 +277,8 @@ "name": "get_patterns", "type": "Function", "tier": "STANDARD", - "start_line": 318, - "end_line": 353, + "start_line": 324, + "end_line": 359, "tags": { "TIER": "STANDARD", "PURPOSE": "Returns regex patterns for a specific language.", @@ -298,8 +298,8 @@ "name": "extract_svelte_props", "type": "Function", "tier": "STANDARD", - "start_line": 356, - "end_line": 382, + "start_line": 362, + "end_line": 388, "tags": { "TIER": "STANDARD", "PURPOSE": "Extracts props from Svelte component script section.", @@ -318,8 +318,8 @@ "name": "extract_svelte_events", "type": "Function", "tier": "STANDARD", - "start_line": 385, - "end_line": 419, + "start_line": 391, + "end_line": 425, "tags": { "TIER": "STANDARD", "PURPOSE": "Extracts dispatched events from Svelte component.", @@ -338,8 +338,8 @@ "name": "extract_data_flow", "type": "Function", "tier": "STANDARD", - "start_line": 422, - "end_line": 472, + "start_line": 428, + "end_line": 478, "tags": { "TIER": "STANDARD", "PURPOSE": "Extracts store subscriptions and data flow from Svelte component.", @@ -358,8 +358,8 @@ "name": "parse_file", "type": "Function", "tier": "CRITICAL", - "start_line": 475, - "end_line": 662, + "start_line": 481, + "end_line": 668, "tags": { "TIER": "CRITICAL", "PURPOSE": "Parses a single file to extract semantic entities with tier awareness and enhanced Svelte analysis.", @@ -380,8 +380,8 @@ "name": "SemanticMapGenerator", "type": "Class", "tier": "CRITICAL", - "start_line": 665, - "end_line": 1153, + "start_line": 671, + "end_line": 1166, "tags": { "TIER": "CRITICAL", "PURPOSE": "Orchestrates the mapping process with tier-based validation.", @@ -393,8 +393,8 @@ "name": "__init__", "type": "Function", "tier": "STANDARD", - "start_line": 670, - "end_line": 682, + "start_line": 676, + "end_line": 688, "tags": { "TIER": "STANDARD", "PURPOSE": "Initializes the generator with a root directory.", @@ -413,8 +413,8 @@ "name": "_load_gitignore", "type": "Function", "tier": "STANDARD", - "start_line": 684, - "end_line": 700, + "start_line": 690, + "end_line": 706, "tags": { "TIER": "STANDARD", "PURPOSE": "Loads patterns from .gitignore file.", @@ -433,8 +433,8 @@ "name": "_is_ignored", "type": "Function", "tier": "STANDARD", - "start_line": 702, - "end_line": 736, + "start_line": 708, + "end_line": 749, "tags": { "TIER": "STANDARD", "PURPOSE": "Checks if a path should be ignored based on .gitignore or hardcoded defaults.", @@ -453,8 +453,8 @@ "name": "run", "type": "Function", "tier": "CRITICAL", - "start_line": 738, - "end_line": 751, + "start_line": 751, + "end_line": 764, "tags": { "TIER": "CRITICAL", "PURPOSE": "Main execution flow.", @@ -482,8 +482,8 @@ "name": "_walk_and_parse", "type": "Function", "tier": "CRITICAL", - "start_line": 753, - "end_line": 782, + "start_line": 766, + "end_line": 795, "tags": { "TIER": "CRITICAL", "PURPOSE": "Recursively walks directories and triggers parsing.", @@ -502,8 +502,8 @@ "name": "_process_file_results", "type": "Function", "tier": "STANDARD", - "start_line": 784, - "end_line": 813, + "start_line": 797, + "end_line": 826, "tags": { "TIER": "STANDARD", "PURPOSE": "Validates entities and calculates file scores with tier awareness.", @@ -516,8 +516,8 @@ "name": "validate_recursive", "type": "Function", "tier": "STANDARD", - "start_line": 794, - "end_line": 807, + "start_line": 807, + "end_line": 820, "tags": { "TIER": "STANDARD", "PURPOSE": "Recursively validates a list of entities.", @@ -543,8 +543,8 @@ "name": "_generate_artifacts", "type": "Function", "tier": "CRITICAL", - "start_line": 815, - "end_line": 836, + "start_line": 828, + "end_line": 849, "tags": { "TIER": "CRITICAL", "PURPOSE": "Writes output files with tier-based compliance data.", @@ -563,8 +563,8 @@ "name": "_generate_report", "type": "Function", "tier": "CRITICAL", - "start_line": 838, - "end_line": 891, + "start_line": 851, + "end_line": 904, "tags": { "TIER": "CRITICAL", "PURPOSE": "Generates the Markdown compliance report with severity levels.", @@ -583,8 +583,8 @@ "name": "_collect_issues", "type": "Function", "tier": "STANDARD", - "start_line": 893, - "end_line": 905, + "start_line": 906, + "end_line": 918, "tags": { "TIER": "STANDARD", "PURPOSE": "Helper to collect issues for a specific file from the entity tree.", @@ -603,8 +603,8 @@ "name": "_generate_compressed_map", "type": "Function", "tier": "CRITICAL", - "start_line": 907, - "end_line": 924, + "start_line": 920, + "end_line": 937, "tags": { "TIER": "CRITICAL", "PURPOSE": "Generates the token-optimized project map with enhanced Svelte details.", @@ -623,8 +623,8 @@ "name": "_write_entity_md", "type": "Function", "tier": "CRITICAL", - "start_line": 926, - "end_line": 994, + "start_line": 939, + "end_line": 1007, "tags": { "TIER": "CRITICAL", "PURPOSE": "Recursive helper to write entity tree to Markdown with tier badges and enhanced details.", @@ -643,8 +643,8 @@ "name": "_generate_module_map", "type": "Function", "tier": "CRITICAL", - "start_line": 996, - "end_line": 1151, + "start_line": 1009, + "end_line": 1164, "tags": { "TIER": "CRITICAL", "PURPOSE": "Generates a module-centric map grouping entities by directory structure.", @@ -657,8 +657,8 @@ "name": "_get_module_path", "type": "Function", "tier": "STANDARD", - "start_line": 1008, - "end_line": 1020, + "start_line": 1021, + "end_line": 1033, "tags": { "TIER": "STANDARD", "PURPOSE": "Extracts the module path from a file path.", @@ -673,22 +673,22 @@ { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1008 + "line_number": 1021 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1008 + "line_number": 1021 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1008 + "line_number": 1021 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1008 + "line_number": 1021 } ], "score": 0.6 @@ -698,8 +698,8 @@ "name": "_collect_all_entities", "type": "Function", "tier": "STANDARD", - "start_line": 1022, - "end_line": 1031, + "start_line": 1035, + "end_line": 1044, "tags": { "TIER": "STANDARD", "PURPOSE": "Flattens entity tree for easier grouping.", @@ -714,22 +714,22 @@ { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1022 + "line_number": 1035 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1022 + "line_number": 1035 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1022 + "line_number": 1035 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 1022 + "line_number": 1035 } ], "score": 0.6 @@ -753,8 +753,8 @@ "name": "to_dict", "type": "Function", "tier": "TRIVIAL", - "start_line": 130, - "end_line": 130, + "start_line": 136, + "end_line": 136, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -774,339 +774,6 @@ "score": 1.0 } }, - { - "name": "TransactionCore", - "type": "Module", - "tier": "CRITICAL", - "start_line": 1, - "end_line": 79, - "tags": { - "TIER": "CRITICAL", - "SEMANTICS": "Finance, ACID, Transfer, Ledger", - "PURPOSE": "Core banking transaction processor with ACID guarantees.", - "LAYER": "Domain (Core)", - "INVARIANT": "Negative transfers are strictly forbidden.", - "TEST_DATA": "concurrency_lock -> {./fixtures/transactions.json#race_condition}" - }, - "relations": [ - { - "type": "DEPENDS_ON", - "target": "[DEF:Infra:PostgresDB]" - }, - { - "type": "DEPENDS_ON", - "target": "[DEF:Infra:AuditLog]" - } - ], - "children": [ - { - "name": "execute_transfer", - "type": "Function", - "tier": "STANDARD", - "start_line": 26, - "end_line": 77, - "tags": { - "PURPOSE": "Atomically move funds between accounts with audit trails.", - "PARAM": "amount (Decimal) - Positive amount to transfer.", - "PRE": "amount > 0; sender != receiver; sender_balance >= amount.", - "POST": "sender_balance -= amount; receiver_balance += amount; Audit Record Created.", - "SIDE_EFFECT": "Database mutation (Rows locked), Audit IO.", - "UX_STATE": "Error(System) -> 500 Internal -> UI shows \"Retry later\" toast.", - "UX_FEEDBACK": "Triggers specific UI flow for insufficient funds" - }, - "relations": [ - { - "type": "CALLS", - "target": "atomic_transaction" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - } - ], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "PluginExampleShot", - "type": "Module", - "tier": "STANDARD", - "start_line": 1, - "end_line": 64, - "tags": { - "TIER": "STANDARD", - "SEMANTICS": "Plugin, Core, Extension", - "PURPOSE": "Reference implementation of a plugin following GRACE standards.", - "LAYER": "Domain (Business Logic)", - "INVARIANT": "get_schema must return valid JSON Schema." - }, - "relations": [ - { - "type": "INHERITS", - "target": "PluginBase" - } - ], - "children": [ - { - "name": "get_schema", - "type": "Function", - "tier": "STANDARD", - "start_line": 18, - "end_line": 32, - "tags": { - "PURPOSE": "Defines input validation schema.", - "POST": "Returns dict compliant with JSON Schema draft 7." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [ - { - "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 18 - }, - { - "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 18 - }, - { - "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 18 - }, - { - "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 18 - } - ], - "score": 0.5333333333333333 - } - }, - { - "name": "execute", - "type": "Function", - "tier": "STANDARD", - "start_line": 34, - "end_line": 62, - "tags": { - "PURPOSE": "Core plugin logic with structured logging and scope isolation.", - "PARAM": "context (TaskContext) - Execution tools (log, progress).", - "SIDE_EFFECT": "Emits logs to centralized system." - }, - "relations": [ - { - "type": "BINDS_TO", - "target": "context.logger" - } - ], - "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 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 - } - ], - "score": 0.4666666666666666 - } - }, - { - "name": "id", - "type": "Function", - "tier": "TRIVIAL", - "start_line": 15, - "end_line": 15, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - } - ], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "BackendRouteShot", - "type": "Module", - "tier": "STANDARD", - "start_line": 1, - "end_line": 65, - "tags": { - "TIER": "STANDARD", - "SEMANTICS": "Route, Task, API, Async", - "PURPOSE": "Reference implementation of a task-based route using GRACE-Poly.", - "LAYER": "Interface (API)", - "INVARIANT": "TaskManager must be available in dependency graph." - }, - "relations": [ - { - "type": "IMPLEMENTS", - "target": "[DEF:Std:API_FastAPI]" - } - ], - "children": [ - { - "name": "create_task", - "type": "Function", - "tier": "STANDARD", - "start_line": 24, - "end_line": 63, - "tags": { - "PURPOSE": "Create and start a new task using TaskManager. Non-blocking.", - "PARAM": "task_manager (TaskManager) - Async task executor.", - "PRE": "plugin_id must match a registered plugin.", - "POST": "A new task is spawned; Task ID returned immediately.", - "SIDE_EFFECT": "Writes to DB, Trigger background worker.", - "UX_STATE": "Error feedback -> 500 Internal Error" - }, - "relations": [ - { - "type": "CALLS", - "target": "task_manager.create_task" - } - ], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - } - ], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "FrontendComponentShot", - "type": "Component", - "tier": "CRITICAL", - "start_line": 1, - "end_line": 76, - "tags": { - "TIER": "CRITICAL", - "SEMANTICS": "Task, Button, Action, UX", - "PURPOSE": "Action button to spawn a new task with full UX feedback cycle.", - "LAYER": "UI (Presentation)", - "RELATION": "CALLS -> postApi", - "INVARIANT": "Must prevent double-submission while loading.", - "TEST_DATA": "loading_state -> {\"isLoading\": true}", - "UX_STATE": "Error -> Toast notification triggers.", - "UX_FEEDBACK": "Toast success/error.", - "UX_TEST": "Success -> {api_resolve: 200, expected: toast.success called}" - }, - "relations": [], - "children": [ - { - "name": "spawnTask", - "type": "Function", - "tier": "STANDARD", - "start_line": 32, - "end_line": 62, - "tags": { - "PURPOSE": "Execute task creation request and emit user feedback.", - "PRE": "plugin_id is resolved and request params are serializable.", - "POST": "isLoading is reset and user receives success/error feedback." - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - } - ], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - }, - "props": [ - { - "name": "plugin_id", - "type": "any", - "default": "\"\"" - }, - { - "name": "params", - "type": "any", - "default": "{}" - } - ], - "data_flow": [ - { - "store": "lib", - "type": "READS_FROM", - "line": 23 - }, - { - "store": "lib", - "type": "READS_FROM", - "line": 24 - }, - { - "store": "lib", - "type": "READS_FROM", - "line": 25 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 52 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 57 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 74 - } - ] - }, { "name": "DashboardTypes", "type": "Module", @@ -1445,7 +1112,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 213, + "end_line": 214, "tags": { "TIER": "STANDARD", "SEMANTICS": "api, client, fetch, rest", @@ -1633,7 +1300,7 @@ "type": "Data", "tier": "STANDARD", "start_line": 145, - "end_line": 211, + "end_line": 212, "tags": { "PURPOSE": "API client object with specific methods." }, @@ -1906,6 +1573,121 @@ "score": 1.0 } }, + { + "name": "assistantChat", + "type": "Store", + "tier": "STANDARD", + "start_line": 1, + "end_line": 71, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "assistant, store, ui-state, conversation", + "PURPOSE": "Control assistant chat panel visibility and active conversation binding.", + "LAYER": "UI", + "INVARIANT": "conversationId persists while panel toggles unless explicitly reset.", + "UX_STATE": "Open -> Panel visible and interactive." + }, + "relations": [ + { + "type": "BINDS_TO", + "target": "AssistantChatPanel" + } + ], + "children": [ + { + "name": "toggleAssistantChat", + "type": "Function", + "tier": "STANDARD", + "start_line": 21, + "end_line": 32, + "tags": { + "PURPOSE": "Toggle assistant panel visibility.", + "PRE": "Store is initialized.", + "POST": "isOpen value inverted." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 21 + } + ], + "score": 0.8 + } + }, + { + "name": "openAssistantChat", + "type": "Function", + "tier": "STANDARD", + "start_line": 34, + "end_line": 45, + "tags": { + "PURPOSE": "Open assistant panel.", + "PRE": "Store is initialized.", + "POST": "isOpen = true." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "closeAssistantChat", + "type": "Function", + "tier": "STANDARD", + "start_line": 47, + "end_line": 58, + "tags": { + "PURPOSE": "Close assistant panel.", + "PRE": "Store is initialized.", + "POST": "isOpen = false." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "setAssistantConversationId", + "type": "Function", + "tier": "STANDARD", + "start_line": 60, + "end_line": 70, + "tags": { + "PURPOSE": "Bind current conversation id in UI state.", + "PRE": "conversationId is string-like identifier.", + "POST": "store.conversationId updated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "taskDrawer", "type": "Store", @@ -2475,6 +2257,64 @@ "score": 1.0 } }, + { + "name": "frontend.src.lib.stores.__tests__.assistantChat", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 59, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "test, store, assistant, toggle, conversation", + "PURPOSE": "Validate assistant chat store visibility and conversation binding transitions.", + "LAYER": "UI Tests", + "INVARIANT": "Each test starts from default closed state." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "assistantChatStore" + } + ], + "children": [ + { + "name": "assistantChatStore_tests", + "type": "Function", + "tier": "STANDARD", + "start_line": 19, + "end_line": 58, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Group store unit scenarios for assistant panel behavior.", + "PRE": "Store can be reset to baseline state in beforeEach hook.", + "POST": "Open/close/toggle/conversation transitions are validated." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 19 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 19 + } + ], + "score": 0.8 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "navigation", "type": "Mock", @@ -2673,6 +2513,183 @@ "score": 1.0 } }, + { + "name": "frontend.src.lib.api.assistant", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 78, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "assistant, api, client, chat, confirmation", + "PURPOSE": "API client wrapper for assistant chat, confirmation actions, and history retrieval.", + "LAYER": "Infra-API", + "INVARIANT": "All assistant requests must use requestApi wrapper (no native fetch)." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "frontend.src.lib.api.api_module" + } + ], + "children": [ + { + "name": "sendAssistantMessage", + "type": "Function", + "tier": "STANDARD", + "start_line": 11, + "end_line": 18, + "tags": { + "PURPOSE": "Send a user message to assistant orchestrator endpoint.", + "PRE": "payload.message is a non-empty string.", + "POST": "Returns assistant response object with deterministic state." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 11 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 11 + } + ], + "score": 0.8 + } + }, + { + "name": "confirmAssistantOperation", + "type": "Function", + "tier": "STANDARD", + "start_line": 20, + "end_line": 27, + "tags": { + "PURPOSE": "Confirm a pending risky assistant operation.", + "PRE": "confirmationId references an existing pending token.", + "POST": "Returns execution response (started/success/failed)." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 20 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 20 + } + ], + "score": 0.8 + } + }, + { + "name": "cancelAssistantOperation", + "type": "Function", + "tier": "STANDARD", + "start_line": 29, + "end_line": 36, + "tags": { + "PURPOSE": "Cancel a pending risky assistant operation.", + "PRE": "confirmationId references an existing pending token.", + "POST": "Operation is cancelled and cannot be executed by this token." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 29 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 29 + } + ], + "score": 0.8 + } + }, + { + "name": "getAssistantHistory", + "type": "Function", + "tier": "STANDARD", + "start_line": 38, + "end_line": 52, + "tags": { + "PURPOSE": "Retrieve paginated assistant conversation history.", + "PRE": "page/pageSize are positive integers.", + "POST": "Returns a paginated payload with history items." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 38 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 38 + } + ], + "score": 0.8 + } + }, + { + "name": "getAssistantConversations", + "type": "Function", + "tier": "STANDARD", + "start_line": 54, + "end_line": 77, + "tags": { + "PURPOSE": "Retrieve paginated conversation list for assistant sidebar/history switcher.", + "PRE": "page/pageSize are positive integers.", + "POST": "Returns paginated conversation summaries." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 54 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 54 + } + ], + "score": 0.8 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "Select", "type": "Component", @@ -3016,6 +3033,700 @@ "score": 1.0 } }, + { + "name": "AssistantChatPanel", + "type": "Component", + "tier": "CRITICAL", + "start_line": 1, + "end_line": 556, + "tags": { + "TIER": "CRITICAL", + "PURPOSE": "Slide-out assistant chat panel for natural language command execution and task tracking.", + "LAYER": "UI", + "RELATION": "DISPATCHES -> taskDrawerStore", + "SEMANTICS": "assistant-chat, confirmation, long-running-task, progress-tracking", + "INVARIANT": "Risky operations are executed only through explicit confirm action.", + "UX_STATE": "Error -> Failed action rendered as assistant failed message.", + "UX_FEEDBACK": "Started operation surfaces task_id and quick action to open task drawer.", + "UX_RECOVERY": "User can retry command or action from input and action buttons.", + "UX_TEST": "NeedsConfirmation -> {click: confirm action, expected: started response with task_id}" + }, + "relations": [], + "children": [ + { + "name": "loadHistory", + "type": "Function", + "tier": "STANDARD", + "start_line": 67, + "end_line": 96, + "tags": { + "PURPOSE": "Load current conversation history when panel becomes visible.", + "PRE": "Panel is open and history request is not already running.", + "POST": "messages are populated from persisted history and conversation id is synchronized.", + "SIDE_EFFECT": "Performs API call to assistant history endpoint." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 67 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 67 + } + ], + "score": 0.8 + } + }, + { + "name": "loadConversations", + "type": "Function", + "tier": "STANDARD", + "start_line": 98, + "end_line": 130, + "tags": { + "PURPOSE": "Load paginated conversation summaries for quick switching UI.", + "PRE": "Panel is open and request not already running.", + "POST": "conversations list refreshed or appended based on page." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 98 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 98 + } + ], + "score": 0.8 + } + }, + { + "name": "loadOlderMessages", + "type": "Function", + "tier": "STANDARD", + "start_line": 132, + "end_line": 159, + "tags": { + "PURPOSE": "Lazy-load older messages for active conversation when user scrolls to top.", + "PRE": "History has next page and active conversation is known.", + "POST": "Older messages are prepended while preserving order." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 132 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 132 + } + ], + "score": 0.8 + } + }, + { + "name": "appendLocalUserMessage", + "type": "Function", + "tier": "STANDARD", + "start_line": 174, + "end_line": 191, + "tags": { + "PURPOSE": "Add optimistic local user message before backend response.", + "PRE": "text is non-empty command text.", + "POST": "user message appears at the end of messages list." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 174 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 174 + } + ], + "score": 0.8 + } + }, + { + "name": "appendAssistantResponse", + "type": "Function", + "tier": "STANDARD", + "start_line": 193, + "end_line": 214, + "tags": { + "PURPOSE": "Normalize and append assistant response payload to chat list.", + "PRE": "response follows assistant message response contract.", + "POST": "assistant message appended with state/task/actions metadata." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 193 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 193 + } + ], + "score": 0.8 + } + }, + { + "name": "handleSend", + "type": "Function", + "tier": "STANDARD", + "start_line": 239, + "end_line": 278, + "tags": { + "PURPOSE": "Submit user command to assistant orchestration API.", + "PRE": "input contains a non-empty command and current request is not loading.", + "POST": "assistant response is rendered and conversation id is persisted in store.", + "SIDE_EFFECT": "Triggers backend command execution pipeline." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 239 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 239 + } + ], + "score": 0.8 + } + }, + { + "name": "selectConversation", + "type": "Function", + "tier": "STANDARD", + "start_line": 280, + "end_line": 293, + "tags": { + "PURPOSE": "Switch active chat context to selected conversation item.", + "PRE": "conversation carries valid conversation_id.", + "POST": "conversationId updated and history reloaded." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 280 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 280 + } + ], + "score": 0.8 + } + }, + { + "name": "startNewConversation", + "type": "Function", + "tier": "STANDARD", + "start_line": 295, + "end_line": 312, + "tags": { + "PURPOSE": "Create local empty chat context that will be persisted on first message.", + "PRE": "Panel is open.", + "POST": "Messages reset and new conversation id bound." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 295 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 295 + } + ], + "score": 0.8 + } + }, + { + "name": "handleAction", + "type": "Function", + "tier": "STANDARD", + "start_line": 314, + "end_line": 353, + "tags": { + "PURPOSE": "Execute assistant action button behavior (open task/reports, confirm, cancel).", + "PRE": "action object is produced by assistant response contract.", + "POST": "UI navigation or follow-up assistant response is appended.", + "SIDE_EFFECT": "May navigate routes or call confirm/cancel API endpoints." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 314 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 314 + } + ], + "score": 0.8 + } + }, + { + "name": "handleKeydown", + "type": "Function", + "tier": "STANDARD", + "start_line": 355, + "end_line": 367, + "tags": { + "PURPOSE": "Submit command by Enter while preserving multiline input with Shift+Enter.", + "PRE": "Keyboard event received from chat input.", + "POST": "handleSend is invoked when Enter is pressed without shift modifier." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 355 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 355 + } + ], + "score": 0.8 + } + }, + { + "name": "stateClass", + "type": "Function", + "tier": "STANDARD", + "start_line": 369, + "end_line": 383, + "tags": { + "PURPOSE": "Map assistant state to visual badge style class.", + "PRE": "state is a nullable assistant state string.", + "POST": "Tailwind class string returned for badge rendering." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 369 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 369 + } + ], + "score": 0.8 + } + }, + { + "name": "handleHistoryScroll", + "type": "Function", + "tier": "STANDARD", + "start_line": 385, + "end_line": 398, + "tags": { + "PURPOSE": "Trigger lazy history fetch when user scroll reaches top boundary.", + "PRE": "Scroll event emitted by history viewport container.", + "POST": "loadOlderMessages called when boundary and more pages available." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 385 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 385 + } + ], + "score": 0.8 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + }, + "data_flow": [ + { + "store": "app", + "type": "READS_FROM", + "line": 27 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 28 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 29 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 30 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 35 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 42 + }, + { + "store": "assistantChatStore", + "type": "READS_FROM", + "line": 64 + }, + { + "store": "assistantChatStore", + "type": "READS_FROM", + "line": 65 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 412 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 417 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 478 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 481 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 499 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 513 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 540 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 549 + } + ] + }, + { + "name": "AssistantChatPanel", + "type": "Module", + "tier": "TRIVIAL", + "start_line": 1, + "end_line": 556, + "tags": { + "PURPOSE": "Auto-generated module for frontend/src/lib/components/assistant/AssistantChatPanel.svelte", + "TIER": "TRIVIAL", + "LAYER": "Unknown" + }, + "relations": [], + "children": [ + { + "name": "buildConversationTitle", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 216, + "end_line": 216, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "setConversationFilter", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 222, + "end_line": 222, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "formatConversationTime", + "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 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "frontend.src.lib.components.assistant.__tests__.assistant_confirmation_integration", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 50, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "assistant, confirmation, integration-test, ux", + "PURPOSE": "Validate confirm/cancel UX contract bindings in assistant chat panel source.", + "LAYER": "UI Tests", + "INVARIANT": "Confirm/cancel action handling must remain explicit and confirmation-id bound." + }, + "relations": [ + { + "type": "VERIFIES", + "target": "frontend/src/lib/components/assistant/AssistantChatPanel.svelte" + } + ], + "children": [ + { + "name": "assistant_confirmation_contract_tests", + "type": "Function", + "tier": "STANDARD", + "start_line": 18, + "end_line": 49, + "tags": { + "PURPOSE": "Assert that confirmation UX flow and API bindings are preserved in chat panel.", + "PRE": "Assistant panel source file exists and is readable.", + "POST": "Test guarantees explicit confirm/cancel guards and failed-action recovery path." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + } + ], + "score": 0.8 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "frontend.src.lib.components.assistant.__tests__.assistant_chat_integration", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 87, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "assistant, integration-test, ux-contract, i18n", + "PURPOSE": "Contract-level integration checks for assistant chat panel implementation and localization wiring.", + "LAYER": "UI Tests", + "INVARIANT": "Critical assistant UX states and action hooks remain present in component source." + }, + "relations": [ + { + "type": "VERIFIES", + "target": "frontend/src/lib/components/assistant/AssistantChatPanel.svelte" + } + ], + "children": [ + { + "name": "readJson", + "type": "Function", + "tier": "STANDARD", + "start_line": 26, + "end_line": 33, + "tags": { + "PURPOSE": "Read and parse JSON fixture file from disk.", + "PRE": "filePath points to existing UTF-8 JSON file.", + "POST": "Returns parsed object representation." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 26 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 26 + } + ], + "score": 0.8 + } + }, + { + "name": "assistant_chat_contract_tests", + "type": "Function", + "tier": "STANDARD", + "start_line": 35, + "end_line": 86, + "tags": { + "PURPOSE": "Validate assistant chat component contract and locale integration without DOM runtime dependency.", + "PRE": "Component and locale files exist in expected paths.", + "POST": "Contract checks guarantee assistant UI anchors and i18n wiring remain intact.", + "TIER": "CRITICAL');", + "UX_STATE": "Error');", + "UX_FEEDBACK": "Started operation surfaces task_id');", + "UX_RECOVERY": "User can retry command');" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 35 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 35 + } + ], + "score": 0.8 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "ReportCard", "type": "Component", @@ -3896,6 +4607,26 @@ "store": "page", "type": "READS_FROM", "line": 170 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 204 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 288 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 296 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 299 } ] }, @@ -4032,7 +4763,7 @@ "type": "Component", "tier": "CRITICAL", "start_line": 1, - "end_line": 209, + "end_line": 229, "tags": { "TIER": "CRITICAL", "PURPOSE": "Unified top navigation bar with Logo, Search, Activity, and User menu", @@ -4042,7 +4773,8 @@ "INVARIANT": "Always visible on non-login pages", "UX_STATE": "SearchFocused -> Search input expands", "UX_FEEDBACK": "Activity badge shows count of running tasks", - "UX_RECOVERY": "Click outside closes dropdowns" + "UX_RECOVERY": "Click outside closes dropdowns", + "UX_TEST": "ActivityClick -> {click: activity button, expected: task drawer opens}" }, "relations": [], "children": [], @@ -4058,22 +4790,12 @@ { "store": "app", "type": "READS_FROM", - "line": 18 + "line": 20 }, { "store": "lib", "type": "READS_FROM", - "line": 19 - }, - { - "store": "lib", - "type": "READS_FROM", - "line": 24 - }, - { - "store": "lib", - "type": "READS_FROM", - "line": 25 + "line": 21 }, { "store": "lib", @@ -4090,40 +4812,90 @@ "type": "READS_FROM", "line": 28 }, + { + "store": "lib", + "type": "READS_FROM", + "line": 29 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 30 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 31 + }, + { + "store": "lib", + "type": "READS_FROM", + "line": 32 + }, { "store": "sidebarStore", "type": "READS_FROM", - "line": 35 + "line": 39 }, { "store": "activityStore", "type": "READS_FROM", - "line": 36 + "line": 40 }, { "store": "activityStore", "type": "READS_FROM", - "line": 37 + "line": 41 }, { "store": "auth", "type": "READS_FROM", - "line": 38 + "line": 42 }, { "store": "t", "type": "WRITES_TO", - "line": 124 + "line": 109 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 132 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 146 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 147 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 160 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 180 }, { "store": "t", "type": "READS_FROM", - "line": 192 + "line": 198 }, { "store": "t", "type": "READS_FROM", - "line": 202 + "line": 212 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 222 } ] }, @@ -4132,7 +4904,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 209, + "end_line": 229, "tags": { "PURPOSE": "Auto-generated module for frontend/src/lib/components/layout/TopNavbar.svelte", "TIER": "TRIVIAL", @@ -4144,8 +4916,8 @@ "name": "toggleUserMenu", "type": "Function", "tier": "TRIVIAL", - "start_line": 40, - "end_line": 40, + "start_line": 44, + "end_line": 44, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4162,24 +4934,6 @@ "name": "closeUserMenu", "type": "Function", "tier": "TRIVIAL", - "start_line": 45, - "end_line": 45, - "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" - }, - "relations": [], - "children": [], - "compliance": { - "valid": true, - "issues": [], - "score": 1.0 - } - }, - { - "name": "handleLogout", - "type": "Function", - "tier": "TRIVIAL", "start_line": 49, "end_line": 49, "tags": { @@ -4194,12 +4948,30 @@ "score": 1.0 } }, + { + "name": "handleLogout", + "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": "handleActivityClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 55, - "end_line": 55, + "start_line": 59, + "end_line": 59, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4213,25 +4985,7 @@ } }, { - "name": "handleSearchFocus", - "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": "handleSearchBlur", + "name": "handleAssistantClick", "type": "Function", "tier": "TRIVIAL", "start_line": 71, @@ -4249,7 +5003,7 @@ } }, { - "name": "handleDocumentClick", + "name": "handleSearchFocus", "type": "Function", "tier": "TRIVIAL", "start_line": 75, @@ -4266,12 +5020,48 @@ "score": 1.0 } }, + { + "name": "handleSearchBlur", + "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": "handleDocumentClick", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 83, + "end_line": 83, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "handleHamburgerClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 85, - "end_line": 85, + "start_line": 93, + "end_line": 93, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4352,6 +5142,16 @@ "store": "page", "type": "READS_FROM", "line": 23 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 33 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 139 } ] }, @@ -4434,12 +5234,12 @@ "type": "Component", "tier": "CRITICAL", "start_line": 1, - "end_line": 305, + "end_line": 311, "tags": { "TIER": "CRITICAL", "PURPOSE": "Global task drawer for monitoring background operations", "LAYER": "UI", - "RELATION": "BINDS_TO -> taskDrawerStore, WebSocket", + "RELATION": "BINDS_TO -> taskDrawerStore, assistantChatStore, WebSocket", "SEMANTICS": "TaskLogViewer", "INVARIANT": "Drawer shows logs for active task or remains closed", "UX_STATE": "InputRequired -> Interactive form rendered in drawer", @@ -4452,8 +5252,8 @@ "name": "loadRecentTasks", "type": "Function", "tier": "STANDARD", - "start_line": 125, - "end_line": 144, + "start_line": 129, + "end_line": 148, "tags": { "PURPOSE": "Load recent tasks for list mode display", "POST": "recentTasks array populated with task list" @@ -4466,12 +5266,12 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 125 + "line_number": 129 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 125 + "line_number": 129 } ], "score": 0.7333333333333334 @@ -4481,8 +5281,8 @@ "name": "selectTask", "type": "Function", "tier": "STANDARD", - "start_line": 146, - "end_line": 156, + "start_line": 150, + "end_line": 160, "tags": { "PURPOSE": "Select a task from list to view details" }, @@ -4494,32 +5294,32 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 146 + "line_number": 150 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 146 + "line_number": 150 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 146 + "line_number": 150 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 146 + "line_number": 150 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 146 + "line_number": 150 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 146 + "line_number": 150 } ], "score": 0.26666666666666655 @@ -4529,8 +5329,8 @@ "name": "goBackToList", "type": "Function", "tier": "STANDARD", - "start_line": 158, - "end_line": 170, + "start_line": 162, + "end_line": 174, "tags": { "PURPOSE": "Return to task list view from task details" }, @@ -4542,32 +5342,32 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 158 + "line_number": 162 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 158 + "line_number": 162 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 158 + "line_number": 162 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 158 + "line_number": 162 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 158 + "line_number": 162 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 158 + "line_number": 162 } ], "score": 0.26666666666666655 @@ -4588,7 +5388,7 @@ { "store": "lib", "type": "READS_FROM", - "line": 25 + "line": 23 }, { "store": "lib", @@ -4600,40 +5400,100 @@ "type": "READS_FROM", "line": 27 }, + { + "store": "lib", + "type": "READS_FROM", + "line": 28 + }, { "store": "taskDrawerStore", "type": "READS_FROM", - "line": 38 - }, - { - "store": "taskDrawerStore", - "type": "WRITES_TO", - "line": 39 - }, - { - "store": "taskDrawerStore", - "type": "WRITES_TO", "line": 40 }, { - "store": "t", + "store": "taskDrawerStore", + "type": "WRITES_TO", + "line": 41 + }, + { + "store": "taskDrawerStore", + "type": "WRITES_TO", + "line": 42 + }, + { + "store": "assistantChatStore", "type": "READS_FROM", + "line": 44 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 204 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 212 + }, + { + "store": "t", + "type": "WRITES_TO", "line": 225 }, { "store": "t", "type": "READS_FROM", - "line": 241 + "line": 231 }, { "store": "t", "type": "READS_FROM", - "line": 289 + "line": 231 }, { "store": "t", "type": "READS_FROM", - "line": 298 + "line": 247 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 252 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 271 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 275 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 281 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 282 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 283 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 295 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 304 } ] }, @@ -4642,7 +5502,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 305, + "end_line": 311, "tags": { "PURPOSE": "Auto-generated module for frontend/src/lib/components/layout/TaskDrawer.svelte", "TIER": "TRIVIAL", @@ -4654,8 +5514,8 @@ "name": "handleClose", "type": "Function", "tier": "TRIVIAL", - "start_line": 53, - "end_line": 53, + "start_line": 57, + "end_line": 57, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4672,8 +5532,8 @@ "name": "goToReportsPage", "type": "Function", "tier": "TRIVIAL", - "start_line": 58, - "end_line": 58, + "start_line": 62, + "end_line": 62, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4690,8 +5550,8 @@ "name": "handleOverlayClick", "type": "Function", "tier": "TRIVIAL", - "start_line": 64, - "end_line": 64, + "start_line": 68, + "end_line": 68, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4708,8 +5568,8 @@ "name": "connectWebSocket", "type": "Function", "tier": "TRIVIAL", - "start_line": 71, - "end_line": 71, + "start_line": 75, + "end_line": 75, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4726,8 +5586,8 @@ "name": "disconnectWebSocket", "type": "Function", "tier": "TRIVIAL", - "start_line": 118, - "end_line": 118, + "start_line": 122, + "end_line": 122, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -4895,7 +5755,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 16, - "end_line": 77, + "end_line": 79, "tags": { "TIER": "STANDARD", "SEMANTICS": "app-layout, auth-gating, navigation-shell", @@ -4917,7 +5777,7 @@ "type": "Page", "tier": "CRITICAL", "start_line": 1, - "end_line": 780, + "end_line": 783, "tags": { "TIER": "CRITICAL", "PURPOSE": "Dataset Hub - Dedicated hub for datasets with mapping progress", @@ -4941,7 +5801,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 780, + "end_line": 783, "tags": { "PURPOSE": "Auto-generated module for frontend/src/routes/datasets/+page.svelte", "TIER": "TRIVIAL", @@ -6551,7 +7411,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 49, + "end_line": 314, "tags": { "TIER": "STANDARD", "SEMANTICS": "admin, llm, settings, provider, configuration", @@ -6565,14 +7425,131 @@ "valid": true, "issues": [], "score": 1.0 - } + }, + "data_flow": [ + { + "store": "t", + "type": "READS_FROM", + "line": 112 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 115 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 141 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 144 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 151 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 158 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 169 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 175 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 184 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 187 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 194 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 201 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 210 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 218 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 225 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 236 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 243 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 256 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 259 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 266 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 278 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 290 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 307 + } + ] }, { "name": "+page", "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 49, + "end_line": 314, "tags": { "PURPOSE": "Auto-generated module for frontend/src/routes/admin/settings/llm/+page.svelte", "TIER": "TRIVIAL", @@ -6580,12 +7557,66 @@ }, "relations": [], "children": [ + { + "name": "isMultimodalModel", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 47, + "end_line": 47, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "getProviderById", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 61, + "end_line": 61, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "fetchProviders", "type": "Function", "tier": "TRIVIAL", - "start_line": 18, - "end_line": 18, + "start_line": 66, + "end_line": 66, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "saveSettings", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 91, + "end_line": 91, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -6980,6 +8011,31 @@ "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 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 252 + }, { "store": "t", "type": "WRITES_TO", @@ -6994,6 +8050,56 @@ "store": "t", "type": "READS_FROM", "line": 280 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 286 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 295 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 300 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 308 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 317 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 332 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 338 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 340 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 354 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 364 } ] }, @@ -7124,6 +8230,41 @@ "store": "lib", "type": "READS_FROM", "line": 19 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 109 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 119 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 122 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 126 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 132 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 145 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 170 } ] }, @@ -7393,7 +8534,7 @@ "type": "Page", "tier": "CRITICAL", "start_line": 1, - "end_line": 717, + "end_line": 964, "tags": { "TIER": "CRITICAL", "PURPOSE": "Consolidated Settings Page - All settings in one place with tabbed navigation", @@ -7417,7 +8558,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 717, + "end_line": 964, "tags": { "PURPOSE": "Auto-generated module for frontend/src/routes/settings/+page.svelte", "TIER": "TRIVIAL", @@ -7429,8 +8570,80 @@ "name": "loadSettings", "type": "Function", "tier": "TRIVIAL", - "start_line": 51, - "end_line": 51, + "start_line": 65, + "end_line": 65, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "normalizeLlmSettings", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 80, + "end_line": 80, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "isMultimodalModel", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 103, + "end_line": 103, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "getProviderById", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 117, + "end_line": 117, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "isDashboardValidationBindingValid", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 122, + "end_line": 122, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7447,8 +8660,8 @@ "name": "handleTabChange", "type": "Function", "tier": "TRIVIAL", - "start_line": 66, - "end_line": 66, + "start_line": 130, + "end_line": 130, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7465,8 +8678,8 @@ "name": "getTabClass", "type": "Function", "tier": "TRIVIAL", - "start_line": 71, - "end_line": 71, + "start_line": 135, + "end_line": 135, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7483,8 +8696,8 @@ "name": "handleSave", "type": "Function", "tier": "TRIVIAL", - "start_line": 78, - "end_line": 78, + "start_line": 142, + "end_line": 142, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7501,8 +8714,8 @@ "name": "handleTestEnv", "type": "Function", "tier": "TRIVIAL", - "start_line": 93, - "end_line": 93, + "start_line": 158, + "end_line": 158, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7519,8 +8732,8 @@ "name": "editEnv", "type": "Function", "tier": "TRIVIAL", - "start_line": 112, - "end_line": 112, + "start_line": 177, + "end_line": 177, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7537,8 +8750,8 @@ "name": "resetEnvForm", "type": "Function", "tier": "TRIVIAL", - "start_line": 123, - "end_line": 123, + "start_line": 188, + "end_line": 188, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7555,8 +8768,8 @@ "name": "handleAddOrUpdateEnv", "type": "Function", "tier": "TRIVIAL", - "start_line": 139, - "end_line": 139, + "start_line": 204, + "end_line": 204, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7573,8 +8786,8 @@ "name": "handleDeleteEnv", "type": "Function", "tier": "TRIVIAL", - "start_line": 172, - "end_line": 172, + "start_line": 237, + "end_line": 237, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -7932,6 +9145,31 @@ "store": "lib", "type": "READS_FROM", "line": 14 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 67 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 70 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 82 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 84 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 88 } ] }, @@ -9739,6 +10977,11 @@ "store": "props", "type": "WRITES_TO", "line": 22 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 26 } ] }, @@ -9989,6 +11232,51 @@ "type": "WRITES_TO", "line": 24 }, + { + "store": "state", + "type": "WRITES_TO", + "line": 29 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 30 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 31 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 32 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 33 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 37 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 38 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 39 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 40 + }, { "store": "derived", "type": "WRITES_TO", @@ -11116,7 +12404,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 60, + "end_line": 61, "tags": { "SEMANTICS": "environment, selector, dropdown, migration", "PURPOSE": "Provides a UI component for selecting source and target environments.", @@ -11130,8 +12418,8 @@ "name": "handleSelect", "type": "Function", "tier": "STANDARD", - "start_line": 27, - "end_line": 39, + "start_line": 28, + "end_line": 40, "tags": { "PURPOSE": "Dispatches the selection change event.", "PRE": "event.target must be an HTMLSelectElement.", @@ -11146,12 +12434,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 27 + "line_number": 28 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 27 + "line_number": 28 } ], "score": 0.8 @@ -11176,7 +12464,12 @@ { "store": "props", "type": "WRITES_TO", - "line": 21 + "line": 22 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 52 } ] }, @@ -11935,6 +13228,16 @@ "type": "WRITES_TO", "line": 32 }, + { + "store": "state", + "type": "WRITES_TO", + "line": 34 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 35 + }, { "store": "t", "type": "READS_FROM", @@ -12077,6 +13380,16 @@ "success" ], "data_flow": [ + { + "store": "t", + "type": "READS_FROM", + "line": 34 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 43 + }, { "store": "t", "type": "WRITES_TO", @@ -12087,6 +13400,16 @@ "type": "WRITES_TO", "line": 73 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 73 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 76 + }, { "store": "t", "type": "WRITES_TO", @@ -12206,6 +13529,21 @@ "score": 0.85 }, "data_flow": [ + { + "store": "t", + "type": "READS_FROM", + "line": 31 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 43 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 47 + }, { "store": "t", "type": "WRITES_TO", @@ -12375,6 +13713,31 @@ "type": "READS_FROM", "line": 98 }, + { + "store": "t", + "type": "READS_FROM", + "line": 109 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 120 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 122 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 133 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 135 + }, { "store": "t", "type": "WRITES_TO", @@ -12435,6 +13798,21 @@ "type": "WRITES_TO", "line": 212 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 215 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 227 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 229 + }, { "store": "t", "type": "READS_FROM", @@ -12490,7 +13868,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 190, + "end_line": 191, "tags": { "SEMANTICS": "debug, tool, api, structure", "PURPOSE": "UI component for system diagnostics and debugging API responses.", @@ -12503,8 +13881,8 @@ "name": "fetchEnvironments", "type": "Function", "tier": "STANDARD", - "start_line": 27, - "end_line": 41, + "start_line": 28, + "end_line": 42, "tags": { "PURPOSE": "Fetches available environments.", "PRE": "API is available.", @@ -12519,12 +13897,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 27 + "line_number": 28 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 27 + "line_number": 28 } ], "score": 0.8 @@ -12534,8 +13912,8 @@ "name": "handleRunDebug", "type": "Function", "tier": "STANDARD", - "start_line": 43, - "end_line": 84, + "start_line": 44, + "end_line": 85, "tags": { "PURPOSE": "Triggers the debug task.", "PRE": "Required fields are selected.", @@ -12550,12 +13928,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 43 + "line_number": 44 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 43 + "line_number": 44 } ], "score": 0.8 @@ -12565,8 +13943,8 @@ "name": "startPolling", "type": "Function", "tier": "STANDARD", - "start_line": 86, - "end_line": 116, + "start_line": 87, + "end_line": 117, "tags": { "PURPOSE": "Polls for task completion.", "PRE": "Task ID is valid.", @@ -12582,12 +13960,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 86 + "line_number": 87 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 86 + "line_number": 87 } ], "score": 0.8 @@ -12604,7 +13982,104 @@ } ], "score": 0.85 - } + }, + "data_flow": [ + { + "store": "t", + "type": "READS_FROM", + "line": 39 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 58 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 68 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 105 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 109 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 124 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 127 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 129 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 130 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 137 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 139 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 146 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 148 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 158 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 160 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 167 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 175 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 175 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 183 + } + ] }, { "name": "CommitHistory", @@ -12698,6 +14173,16 @@ "type": "WRITES_TO", "line": 21 }, + { + "store": "state", + "type": "WRITES_TO", + "line": 26 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 27 + }, { "store": "t", "type": "READS_FROM", @@ -12720,7 +14205,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 179, + "end_line": 180, "tags": { "SEMANTICS": "deployment, git, environment, modal", "PURPOSE": "Modal for deploying a dashboard to a target environment.", @@ -12734,8 +14219,8 @@ "name": "loadStatus", "type": "Watcher", "tier": "STANDARD", - "start_line": 33, - "end_line": 37, + "start_line": 34, + "end_line": 38, "tags": {}, "relations": [], "children": [], @@ -12749,8 +14234,8 @@ "name": "loadEnvironments", "type": "Function", "tier": "STANDARD", - "start_line": 39, - "end_line": 63, + "start_line": 40, + "end_line": 64, "tags": { "PURPOSE": "Fetch available environments from API.", "POST": "environments state is populated." @@ -12763,22 +14248,22 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 39 + "line_number": 40 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 39 + "line_number": 40 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 39 + "line_number": 40 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 39 + "line_number": 40 } ], "score": 0.5333333333333333 @@ -12788,8 +14273,8 @@ "name": "handleDeploy", "type": "Function", "tier": "STANDARD", - "start_line": 65, - "end_line": 92, + "start_line": 66, + "end_line": 93, "tags": { "PURPOSE": "Trigger deployment to selected environment.", "PRE": "selectedEnv must be set.", @@ -12803,12 +14288,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 65 + "line_number": 66 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 65 + "line_number": 66 } ], "score": 0.8 @@ -12833,12 +14318,82 @@ { "store": "props", "type": "WRITES_TO", - "line": 20 + "line": 21 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 26 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 27 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 28 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 29 }, { "store": "effect", "type": "READS_FROM", - "line": 34 + "line": 35 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 59 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 80 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 102 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 105 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 108 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 115 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 121 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 140 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 168 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 170 } ] }, @@ -12939,6 +14494,11 @@ "store": "props", "type": "WRITES_TO", "line": 22 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 29 } ] }, @@ -12947,7 +14507,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 268, + "end_line": 269, "tags": { "TIER": "STANDARD", "SEMANTICS": "git, commit, modal, version_control, diff", @@ -12961,8 +14521,8 @@ "name": "handleGenerateMessage", "type": "Function", "tier": "STANDARD", - "start_line": 37, - "end_line": 60, + "start_line": 38, + "end_line": 61, "tags": { "PURPOSE": "Generates a commit message using LLM." }, @@ -12974,32 +14534,32 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 37 + "line_number": 38 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 37 + "line_number": 38 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 37 + "line_number": 38 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 37 + "line_number": 38 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 37 + "line_number": 38 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 37 + "line_number": 38 } ], "score": 0.26666666666666655 @@ -13009,8 +14569,8 @@ "name": "loadStatus", "type": "Function", "tier": "STANDARD", - "start_line": 62, - "end_line": 101, + "start_line": 63, + "end_line": 102, "tags": { "PURPOSE": "\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 diff.", "PRE": "dashboardId \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c." @@ -13023,22 +14583,22 @@ { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 62 + "line_number": 63 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 62 + "line_number": 63 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 62 + "line_number": 63 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 62 + "line_number": 63 } ], "score": 0.5333333333333333 @@ -13048,8 +14608,8 @@ "name": "handleCommit", "type": "Function", "tier": "STANDARD", - "start_line": 103, - "end_line": 129, + "start_line": 104, + "end_line": 130, "tags": { "PURPOSE": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043c\u043c\u0438\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c.", "PRE": "message \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u043c.", @@ -13063,12 +14623,12 @@ { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 103 + "line_number": 104 }, { "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", "severity": "WARNING", - "line_number": 103 + "line_number": 104 } ], "score": 0.8 @@ -13087,12 +14647,122 @@ { "store": "props", "type": "WRITES_TO", - "line": 22 + "line": 23 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 28 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 29 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 30 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 31 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 32 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 33 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 53 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 56 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 97 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 118 }, { "store": "effect", "type": "READS_FROM", - "line": 131 + "line": 132 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 145 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 154 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 162 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 164 + }, + { + "store": "t", + "type": "WRITES_TO", + "line": 171 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 180 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 222 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 229 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 238 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 250 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 261 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 261 } ] }, @@ -13291,6 +14961,26 @@ "type": "WRITES_TO", "line": 25 }, + { + "store": "state", + "type": "WRITES_TO", + "line": 30 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 31 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 32 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 33 + }, { "store": "t", "type": "READS_FROM", @@ -13490,11 +15180,91 @@ "type": "WRITES_TO", "line": 33 }, + { + "store": "state", + "type": "WRITES_TO", + "line": 38 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 39 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 40 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 42 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 44 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 45 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 46 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 49 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 50 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 51 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 85 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 91 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 113 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 132 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 151 + }, { "store": "t", "type": "WRITES_TO", "line": 167 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 168 + }, { "store": "t", "type": "READS_FROM", @@ -13505,11 +15275,21 @@ "type": "WRITES_TO", "line": 191 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 196 + }, { "store": "t", "type": "WRITES_TO", "line": 200 }, + { + "store": "t", + "type": "WRITES_TO", + "line": 202 + }, { "store": "t", "type": "READS_FROM", @@ -13562,7 +15342,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 82, + "end_line": 86, "tags": { "TIER": "STANDARD", "PURPOSE": "UI component for previewing generated dataset documentation before saving.", @@ -13587,37 +15367,47 @@ { "store": "props", "type": "WRITES_TO", - "line": 17 + "line": 20 + }, + { + "store": "derived", + "type": "WRITES_TO", + "line": 22 + }, + { + "store": "state", + "type": "WRITES_TO", + "line": 24 }, { "store": "t", "type": "WRITES_TO", - "line": 37 + "line": 41 }, { "store": "t", "type": "WRITES_TO", - "line": 40 + "line": 44 }, { "store": "t", "type": "WRITES_TO", - "line": 43 + "line": 47 }, { "store": "t", "type": "READS_FROM", - "line": 68 + "line": 72 }, { "store": "t", "type": "READS_FROM", - "line": 75 + "line": 79 }, { "store": "t", "type": "READS_FROM", - "line": 75 + "line": 79 } ] }, @@ -13626,7 +15416,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 82, + "end_line": 86, "tags": { "PURPOSE": "Auto-generated module for frontend/src/components/llm/DocPreview.svelte", "TIER": "TRIVIAL", @@ -13638,8 +15428,8 @@ "name": "handleSave", "type": "Function", "tier": "TRIVIAL", - "start_line": 22, - "end_line": 22, + "start_line": 26, + "end_line": 26, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -13664,7 +15454,7 @@ "type": "Component", "tier": "STANDARD", "start_line": 1, - "end_line": 312, + "end_line": 351, "tags": { "TIER": "STANDARD", "PURPOSE": "UI form for managing LLM provider configurations.", @@ -13685,106 +15475,103 @@ ], "score": 0.85 }, + "props": [ + { + "name": "providers", + "type": "any", + "default": "[]" + }, + { + "name": "onSave", + "type": "any", + "default": "() => {}" + } + ], "data_flow": [ { - "store": "props", + "store": "t", "type": "WRITES_TO", - "line": 15 + "line": 78 }, { "store": "t", "type": "WRITES_TO", - "line": 54 + "line": 87 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 91 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 100 }, { "store": "t", "type": "WRITES_TO", - "line": 63 + "line": 146 }, { "store": "t", "type": "READS_FROM", - "line": 67 + "line": 155 }, { "store": "t", "type": "READS_FROM", - "line": 76 + "line": 167 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 167 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 175 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 190 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 207 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 221 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 236 }, { "store": "t", "type": "WRITES_TO", - "line": 122 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 130 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 140 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 140 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 148 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 163 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 180 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 194 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 209 - }, - { - "store": "t", - "type": "WRITES_TO", - "line": 229 - }, - { - "store": "t", - "type": "READS_FROM", - "line": 249 - }, - { - "store": "t", - "type": "READS_FROM", "line": 256 }, { "store": "t", "type": "READS_FROM", - "line": 256 + "line": 277 }, { "store": "t", "type": "READS_FROM", - "line": 262 + "line": 285 }, { "store": "t", "type": "READS_FROM", - "line": 280 + "line": 285 }, { "store": "t", @@ -13794,7 +15581,27 @@ { "store": "t", "type": "READS_FROM", - "line": 306 + "line": 310 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 316 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 317 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 330 + }, + { + "store": "t", + "type": "READS_FROM", + "line": 345 } ] }, @@ -13803,7 +15610,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 312, + "end_line": 351, "tags": { "PURPOSE": "Auto-generated module for frontend/src/components/llm/ProviderConfig.svelte", "TIER": "TRIVIAL", @@ -13812,7 +15619,7 @@ "relations": [], "children": [ { - "name": "resetForm", + "name": "isMultimodalModel", "type": "Function", "tier": "TRIVIAL", "start_line": 32, @@ -13829,12 +15636,30 @@ "score": 1.0 } }, + { + "name": "resetForm", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 46, + "end_line": 46, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "handleEdit", "type": "Function", "tier": "TRIVIAL", - "start_line": 45, - "end_line": 45, + "start_line": 59, + "end_line": 59, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -13851,8 +15676,8 @@ "name": "testConnection", "type": "Function", "tier": "TRIVIAL", - "start_line": 51, - "end_line": 51, + "start_line": 75, + "end_line": 75, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -13869,8 +15694,8 @@ "name": "handleSubmit", "type": "Function", "tier": "TRIVIAL", - "start_line": 83, - "end_line": 83, + "start_line": 107, + "end_line": 107, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -13887,8 +15712,8 @@ "name": "toggleActive", "type": "Function", "tier": "TRIVIAL", - "start_line": 107, - "end_line": 107, + "start_line": 131, + "end_line": 131, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -13946,6 +15771,64 @@ "score": 1.0 } }, + { + "name": "frontend.src.components.llm.__tests__.provider_config_integration", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 44, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "llm, provider-config, integration-test, edit-flow", + "PURPOSE": "Protect edit-button interaction contract in LLM provider settings UI.", + "LAYER": "UI Tests", + "INVARIANT": "Edit action keeps explicit click handler and opens normalized edit form." + }, + "relations": [ + { + "type": "VERIFIES", + "target": "frontend/src/components/llm/ProviderConfig.svelte" + } + ], + "children": [ + { + "name": "provider_config_edit_contract_tests", + "type": "Function", + "tier": "STANDARD", + "start_line": 18, + "end_line": 43, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Validate edit button handler wiring and normalized edit form state mapping.", + "PRE": "ProviderConfig component source exists in expected path.", + "POST": "Contract checks ensure edit click cannot degrade into no-op flow." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + }, + { + "message": "Missing Belief State Logging: Function should use console.log with [ID][STATE] (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 18 + } + ], + "score": 0.8 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "test_auth_debug", "type": "Module", @@ -14045,7 +15928,7 @@ "type": "Module", "tier": "CRITICAL", "start_line": 1, - "end_line": 274, + "end_line": 275, "tags": { "TIER": "CRITICAL", "SEMANTICS": "app, main, entrypoint, fastapi", @@ -14136,8 +16019,8 @@ "name": "api.include_routers", "type": "Action", "tier": "STANDARD", - "start_line": 129, - "end_line": 133, + "start_line": 130, + "end_line": 134, "tags": { "PURPOSE": "Registers all API routers with the FastAPI application.", "LAYER": "API", @@ -14155,8 +16038,8 @@ "name": "websocket_endpoint", "type": "Function", "tier": "CRITICAL", - "start_line": 135, - "end_line": 236, + "start_line": 136, + "end_line": 237, "tags": { "PURPOSE": "Provides a WebSocket endpoint for real-time log streaming of a task with server-side filtering.", "PRE": "task_id must be a valid task ID.", @@ -14176,8 +16059,8 @@ "name": "StaticFiles", "type": "Mount", "tier": "STANDARD", - "start_line": 238, - "end_line": 273, + "start_line": 239, + "end_line": 274, "tags": { "SEMANTICS": "static, frontend, spa", "PURPOSE": "Mounts the frontend build directory to serve static assets." @@ -14188,8 +16071,8 @@ "name": "serve_spa", "type": "Function", "tier": "STANDARD", - "start_line": 245, - "end_line": 262, + "start_line": 246, + "end_line": 263, "tags": { "PURPOSE": "Serves the SPA frontend for any path not matched by API routes.", "PRE": "frontend_path exists.", @@ -14203,17 +16086,17 @@ { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 245 + "line_number": 246 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 245 + "line_number": 246 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 245 + "line_number": 246 } ], "score": 0.7 @@ -14223,8 +16106,8 @@ "name": "read_root", "type": "Function", "tier": "STANDARD", - "start_line": 264, - "end_line": 272, + "start_line": 265, + "end_line": 273, "tags": { "PURPOSE": "A simple root endpoint to confirm that the API is running when frontend is missing.", "PRE": "None.", @@ -14267,8 +16150,8 @@ "name": "matches_filters", "type": "Function", "tier": "TRIVIAL", - "start_line": 170, - "end_line": 170, + "start_line": 171, + "end_line": 171, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -15518,7 +17401,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 557, + "end_line": 834, "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.", @@ -15541,8 +17424,8 @@ "name": "SupersetClient", "type": "Class", "tier": "STANDARD", - "start_line": 24, - "end_line": 555, + "start_line": 25, + "end_line": 832, "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." }, @@ -15552,8 +17435,8 @@ "name": "__init__", "type": "Function", "tier": "STANDARD", - "start_line": 27, - "end_line": 53, + "start_line": 28, + "end_line": 54, "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.", @@ -15572,8 +17455,8 @@ "name": "authenticate", "type": "Function", "tier": "STANDARD", - "start_line": 55, - "end_line": 63, + "start_line": 56, + "end_line": 64, "tags": { "PURPOSE": "Authenticates the client using the configured credentials.", "PRE": "self.network must be initialized with valid auth configuration.", @@ -15592,8 +17475,8 @@ "name": "headers", "type": "Function", "tier": "STANDARD", - "start_line": 66, - "end_line": 73, + "start_line": 67, + "end_line": 74, "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.", @@ -15611,8 +17494,8 @@ "name": "get_dashboards", "type": "Function", "tier": "STANDARD", - "start_line": 77, - "end_line": 97, + "start_line": 78, + "end_line": 98, "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.", @@ -15632,8 +17515,8 @@ "name": "get_dashboards_summary", "type": "Function", "tier": "STANDARD", - "start_line": 99, - "end_line": 121, + "start_line": 100, + "end_line": 122, "tags": { "PURPOSE": "Fetches dashboard metadata optimized for the grid.", "PRE": "Client is authenticated.", @@ -15648,12 +17531,91 @@ "score": 1.0 } }, + { + "name": "get_dashboard", + "type": "Function", + "tier": "STANDARD", + "start_line": 124, + "end_line": 133, + "tags": { + "PURPOSE": "Fetches a single dashboard by ID.", + "PRE": "Client is authenticated and dashboard_id exists.", + "POST": "Returns dashboard payload from Superset API.", + "RETURN": "Dict" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_chart", + "type": "Function", + "tier": "STANDARD", + "start_line": 135, + "end_line": 144, + "tags": { + "PURPOSE": "Fetches a single chart by ID.", + "PRE": "Client is authenticated and chart_id exists.", + "POST": "Returns chart payload from Superset API.", + "RETURN": "Dict" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_dashboard_detail", + "type": "Function", + "tier": "STANDARD", + "start_line": 146, + "end_line": 336, + "tags": { + "PURPOSE": "Fetches detailed dashboard information including related charts and datasets.", + "PRE": "Client is authenticated and dashboard_id exists.", + "POST": "Returns dashboard metadata with charts and datasets lists.", + "RETURN": "Dict" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_extract_chart_ids_from_layout", + "type": "Function", + "tier": "STANDARD", + "start_line": 338, + "end_line": 368, + "tags": { + "PURPOSE": "Traverses dashboard layout metadata and extracts chart IDs from common keys.", + "PRE": "payload can be dict/list/scalar.", + "POST": "Returns a set of chart IDs found in nested structures." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "export_dashboard", "type": "Function", "tier": "STANDARD", - "start_line": 123, - "end_line": 144, + "start_line": 370, + "end_line": 391, "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.", @@ -15673,8 +17635,8 @@ "name": "import_dashboard", "type": "Function", "tier": "STANDARD", - "start_line": 146, - "end_line": 173, + "start_line": 393, + "end_line": 420, "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.", @@ -15694,8 +17656,8 @@ "name": "delete_dashboard", "type": "Function", "tier": "STANDARD", - "start_line": 175, - "end_line": 189, + "start_line": 422, + "end_line": 436, "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.", @@ -15714,8 +17676,8 @@ "name": "get_datasets", "type": "Function", "tier": "STANDARD", - "start_line": 195, - "end_line": 213, + "start_line": 442, + "end_line": 460, "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.", @@ -15735,8 +17697,8 @@ "name": "get_datasets_summary", "type": "Function", "tier": "STANDARD", - "start_line": 215, - "end_line": 237, + "start_line": 462, + "end_line": 484, "tags": { "PURPOSE": "Fetches dataset metadata optimized for the Dataset Hub grid.", "PRE": "Client is authenticated.", @@ -15755,8 +17717,8 @@ "name": "get_dataset_detail", "type": "Function", "tier": "STANDARD", - "start_line": 239, - "end_line": 319, + "start_line": 486, + "end_line": 596, "tags": { "PURPOSE": "Fetches detailed dataset information including columns and linked dashboards", "PRE": "Client is authenticated and dataset_id exists.", @@ -15785,8 +17747,8 @@ "name": "get_dataset", "type": "Function", "tier": "STANDARD", - "start_line": 321, - "end_line": 334, + "start_line": 598, + "end_line": 611, "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.", @@ -15806,8 +17768,8 @@ "name": "update_dataset", "type": "Function", "tier": "STANDARD", - "start_line": 336, - "end_line": 355, + "start_line": 613, + "end_line": 632, "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.", @@ -15827,8 +17789,8 @@ "name": "get_databases", "type": "Function", "tier": "STANDARD", - "start_line": 361, - "end_line": 381, + "start_line": 638, + "end_line": 658, "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.", @@ -15848,8 +17810,8 @@ "name": "get_database", "type": "Function", "tier": "STANDARD", - "start_line": 383, - "end_line": 396, + "start_line": 660, + "end_line": 673, "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.", @@ -15869,8 +17831,8 @@ "name": "get_databases_summary", "type": "Function", "tier": "STANDARD", - "start_line": 398, - "end_line": 415, + "start_line": 675, + "end_line": 692, "tags": { "PURPOSE": "Fetch a summary of databases including uuid, name, and engine.", "PRE": "Client is authenticated.", @@ -15889,8 +17851,8 @@ "name": "get_database_by_uuid", "type": "Function", "tier": "STANDARD", - "start_line": 417, - "end_line": 430, + "start_line": 694, + "end_line": 707, "tags": { "PURPOSE": "Find a database by its UUID.", "PARAM": "db_uuid (str) - The UUID of the database.", @@ -15910,8 +17872,8 @@ "name": "_resolve_target_id_for_delete", "type": "Function", "tier": "STANDARD", - "start_line": 436, - "end_line": 455, + "start_line": 713, + "end_line": 732, "tags": { "PURPOSE": "Resolves a dashboard ID from either an ID or a slug.", "PRE": "Either dash_id or dash_slug should be provided.", @@ -15929,8 +17891,8 @@ "name": "_do_import", "type": "Function", "tier": "STANDARD", - "start_line": 457, - "end_line": 475, + "start_line": 734, + "end_line": 752, "tags": { "PURPOSE": "Performs the actual multipart upload for import.", "PRE": "file_name must be a path to an existing ZIP file.", @@ -15948,8 +17910,8 @@ "name": "_validate_export_response", "type": "Function", "tier": "STANDARD", - "start_line": 477, - "end_line": 488, + "start_line": 754, + "end_line": 765, "tags": { "PURPOSE": "Validates that the export response is a non-empty ZIP archive.", "PRE": "response must be a valid requests.Response object.", @@ -15967,8 +17929,8 @@ "name": "_resolve_export_filename", "type": "Function", "tier": "STANDARD", - "start_line": 490, - "end_line": 503, + "start_line": 767, + "end_line": 780, "tags": { "PURPOSE": "Determines the filename for an exported dashboard.", "PRE": "response must contain Content-Disposition header or dashboard_id must be provided.", @@ -15986,8 +17948,8 @@ "name": "_validate_query_params", "type": "Function", "tier": "STANDARD", - "start_line": 505, - "end_line": 513, + "start_line": 782, + "end_line": 790, "tags": { "PURPOSE": "Ensures query parameters have default page and page_size.", "PRE": "query can be None or a dictionary.", @@ -16005,8 +17967,8 @@ "name": "_fetch_total_object_count", "type": "Function", "tier": "STANDARD", - "start_line": 515, - "end_line": 526, + "start_line": 792, + "end_line": 803, "tags": { "PURPOSE": "Fetches the total number of items for a given endpoint.", "PRE": "endpoint must be a valid Superset API path.", @@ -16024,8 +17986,8 @@ "name": "_fetch_all_pages", "type": "Function", "tier": "STANDARD", - "start_line": 528, - "end_line": 535, + "start_line": 805, + "end_line": 812, "tags": { "PURPOSE": "Iterates through all pages to collect all data items.", "PRE": "pagination_options must contain base_query, total_count, and results_field.", @@ -16043,8 +18005,8 @@ "name": "_validate_import_file", "type": "Function", "tier": "STANDARD", - "start_line": 537, - "end_line": 551, + "start_line": 814, + "end_line": 828, "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.", @@ -16065,16 +18027,70 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 24 + "line_number": 25 }, { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 24 + "line_number": 25 } ], "score": 0.7000000000000001 } + }, + { + "name": "extract_dataset_id_from_form_data", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 159, + "end_line": 159, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "walk", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 346, + "end_line": 346, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "as_bool", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 496, + "end_line": 496, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } } ], "compliance": { @@ -16980,7 +18996,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 67, + "end_line": 80, "tags": { "TIER": "STANDARD", "SEMANTICS": "config, models, pydantic", @@ -17002,8 +19018,8 @@ "name": "Schedule", "type": "DataClass", "tier": "STANDARD", - "start_line": 13, - "end_line": 18, + "start_line": 18, + "end_line": 23, "tags": { "PURPOSE": "Represents a backup schedule configuration." }, @@ -17019,8 +19035,8 @@ "name": "Environment", "type": "DataClass", "tier": "STANDARD", - "start_line": 20, - "end_line": 32, + "start_line": 25, + "end_line": 37, "tags": { "PURPOSE": "Represents a Superset environment configuration." }, @@ -17036,8 +19052,8 @@ "name": "LoggingConfig", "type": "DataClass", "tier": "STANDARD", - "start_line": 34, - "end_line": 43, + "start_line": 39, + "end_line": 48, "tags": { "PURPOSE": "Defines the configuration for the application's logging system." }, @@ -17053,8 +19069,8 @@ "name": "GlobalSettings", "type": "DataClass", "tier": "STANDARD", - "start_line": 45, - "end_line": 58, + "start_line": 50, + "end_line": 71, "tags": { "PURPOSE": "Represents global application settings." }, @@ -17070,8 +19086,8 @@ "name": "AppConfig", "type": "DataClass", "tier": "STANDARD", - "start_line": 60, - "end_line": 65, + "start_line": 73, + "end_line": 78, "tags": { "PURPOSE": "The root configuration model containing all application settings." }, @@ -17095,8 +19111,9 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 146, + "end_line": 151, "tags": { + "TIER": "STANDARD", "SEMANTICS": "database, postgresql, sqlalchemy, session, persistence", "PURPOSE": "Configures database connection and session management (PostgreSQL-first).", "LAYER": "Core", @@ -17108,11 +19125,11 @@ "target": "sqlalchemy" }, { - "type": "USES", + "type": "DEPENDS_ON", "target": "backend.src.models.mapping" }, { - "type": "USES", + "type": "DEPENDS_ON", "target": "backend.src.core.auth.config" } ], @@ -17121,8 +19138,8 @@ "name": "BASE_DIR", "type": "Variable", "tier": "STANDARD", - "start_line": 27, - "end_line": 30, + "start_line": 29, + "end_line": 32, "tags": { "PURPOSE": "Base directory for the backend." }, @@ -17138,8 +19155,8 @@ "name": "DATABASE_URL", "type": "Constant", "tier": "STANDARD", - "start_line": 32, - "end_line": 39, + "start_line": 34, + "end_line": 41, "tags": { "PURPOSE": "URL for the main application database." }, @@ -17155,8 +19172,8 @@ "name": "TASKS_DATABASE_URL", "type": "Constant", "tier": "STANDARD", - "start_line": 41, - "end_line": 45, + "start_line": 43, + "end_line": 47, "tags": { "PURPOSE": "URL for the tasks execution database." }, @@ -17172,8 +19189,8 @@ "name": "AUTH_DATABASE_URL", "type": "Constant", "tier": "STANDARD", - "start_line": 47, - "end_line": 50, + "start_line": 49, + "end_line": 52, "tags": { "PURPOSE": "URL for the authentication database." }, @@ -17189,8 +19206,8 @@ "name": "engine", "type": "Variable", "tier": "STANDARD", - "start_line": 52, - "end_line": 62, + "start_line": 54, + "end_line": 64, "tags": { "PURPOSE": "SQLAlchemy engine for mappings database." }, @@ -17206,8 +19223,8 @@ "name": "tasks_engine", "type": "Variable", "tier": "STANDARD", - "start_line": 64, - "end_line": 67, + "start_line": 66, + "end_line": 69, "tags": { "PURPOSE": "SQLAlchemy engine for tasks database." }, @@ -17223,8 +19240,8 @@ "name": "auth_engine", "type": "Variable", "tier": "STANDARD", - "start_line": 69, - "end_line": 72, + "start_line": 71, + "end_line": 74, "tags": { "PURPOSE": "SQLAlchemy engine for authentication database." }, @@ -17239,10 +19256,11 @@ { "name": "SessionLocal", "type": "Class", - "tier": "STANDARD", - "start_line": 74, - "end_line": 78, + "tier": "TRIVIAL", + "start_line": 76, + "end_line": 81, "tags": { + "TIER": "TRIVIAL", "PURPOSE": "A session factory for the main mappings database.", "PRE": "engine is initialized." }, @@ -17250,28 +19268,18 @@ "children": [], "compliance": { "valid": true, - "issues": [ - { - "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 74 - }, - { - "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 74 - } - ], - "score": 0.7000000000000001 + "issues": [], + "score": 1.0 } }, { "name": "TasksSessionLocal", "type": "Class", - "tier": "STANDARD", - "start_line": 80, - "end_line": 84, + "tier": "TRIVIAL", + "start_line": 83, + "end_line": 88, "tags": { + "TIER": "TRIVIAL", "PURPOSE": "A session factory for the tasks execution database.", "PRE": "tasks_engine is initialized." }, @@ -17279,28 +19287,18 @@ "children": [], "compliance": { "valid": true, - "issues": [ - { - "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 80 - }, - { - "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 80 - } - ], - "score": 0.7000000000000001 + "issues": [], + "score": 1.0 } }, { "name": "AuthSessionLocal", "type": "Class", - "tier": "STANDARD", - "start_line": 86, - "end_line": 90, + "tier": "TRIVIAL", + "start_line": 90, + "end_line": 95, "tags": { + "TIER": "TRIVIAL", "PURPOSE": "A session factory for the authentication database.", "PRE": "auth_engine is initialized." }, @@ -17308,27 +19306,16 @@ "children": [], "compliance": { "valid": true, - "issues": [ - { - "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 86 - }, - { - "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 86 - } - ], - "score": 0.7000000000000001 + "issues": [], + "score": 1.0 } }, { "name": "init_db", "type": "Function", "tier": "STANDARD", - "start_line": 92, - "end_line": 102, + "start_line": 97, + "end_line": 107, "tags": { "PURPOSE": "Initializes the database by creating all tables.", "PRE": "engine, tasks_engine and auth_engine are initialized.", @@ -17347,8 +19334,8 @@ "name": "get_db", "type": "Function", "tier": "STANDARD", - "start_line": 104, - "end_line": 116, + "start_line": 109, + "end_line": 121, "tags": { "PURPOSE": "Dependency for getting a database session.", "PRE": "SessionLocal is initialized.", @@ -17367,8 +19354,8 @@ "name": "get_tasks_db", "type": "Function", "tier": "STANDARD", - "start_line": 118, - "end_line": 130, + "start_line": 123, + "end_line": 135, "tags": { "PURPOSE": "Dependency for getting a tasks database session.", "PRE": "TasksSessionLocal is initialized.", @@ -17387,8 +19374,8 @@ "name": "get_auth_db", "type": "Function", "tier": "STANDARD", - "start_line": 132, - "end_line": 144, + "start_line": 137, + "end_line": 149, "tags": { "PURPOSE": "Dependency for getting an authentication database session.", "PRE": "AuthSessionLocal is initialized.", @@ -17407,8 +19394,8 @@ "name": "_build_engine", "type": "Function", "tier": "TRIVIAL", - "start_line": 53, - "end_line": 53, + "start_line": 55, + "end_line": 55, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -17424,14 +19411,8 @@ ], "compliance": { "valid": true, - "issues": [ - { - "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", - "severity": "WARNING", - "line_number": 1 - } - ], - "score": 0.85 + "issues": [], + "score": 1.0 } }, { @@ -23127,7 +25108,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 456, + "end_line": 474, "tags": { "TIER": "STANDARD", "SEMANTICS": "git, routes, api, fastapi, repository, deployment", @@ -23154,8 +25135,8 @@ "name": "get_git_configs", "type": "Function", "tier": "STANDARD", - "start_line": 32, - "end_line": 44, + "start_line": 37, + "end_line": 49, "tags": { "PURPOSE": "List all configured Git servers.", "PRE": "Database session `db` is available.", @@ -23174,8 +25155,8 @@ "name": "create_git_config", "type": "Function", "tier": "STANDARD", - "start_line": 46, - "end_line": 64, + "start_line": 51, + "end_line": 69, "tags": { "PURPOSE": "Register a new Git server configuration.", "PRE": "`config` contains valid GitServerConfigCreate data.", @@ -23195,8 +25176,8 @@ "name": "delete_git_config", "type": "Function", "tier": "STANDARD", - "start_line": 66, - "end_line": 85, + "start_line": 71, + "end_line": 90, "tags": { "PURPOSE": "Remove a Git server configuration.", "PRE": "`config_id` corresponds to an existing configuration.", @@ -23215,8 +25196,8 @@ "name": "test_git_config", "type": "Function", "tier": "STANDARD", - "start_line": 87, - "end_line": 103, + "start_line": 92, + "end_line": 108, "tags": { "PURPOSE": "Validate connection to a Git server using provided credentials.", "PRE": "`config` contains provider, url, and pat.", @@ -23235,8 +25216,8 @@ "name": "init_repository", "type": "Function", "tier": "STANDARD", - "start_line": 105, - "end_line": 152, + "start_line": 110, + "end_line": 157, "tags": { "PURPOSE": "Link a dashboard to a Git repository and perform initial clone/init.", "PRE": "`dashboard_id` exists and `init_data` contains valid config_id and remote_url.", @@ -23255,8 +25236,8 @@ "name": "get_branches", "type": "Function", "tier": "STANDARD", - "start_line": 154, - "end_line": 170, + "start_line": 159, + "end_line": 175, "tags": { "PURPOSE": "List all branches for a dashboard's repository.", "PRE": "Repository for `dashboard_id` is initialized.", @@ -23276,8 +25257,8 @@ "name": "create_branch", "type": "Function", "tier": "STANDARD", - "start_line": 172, - "end_line": 190, + "start_line": 177, + "end_line": 195, "tags": { "PURPOSE": "Create a new branch in the dashboard's repository.", "PRE": "`dashboard_id` repository exists and `branch_data` has name and from_branch.", @@ -23296,8 +25277,8 @@ "name": "checkout_branch", "type": "Function", "tier": "STANDARD", - "start_line": 192, - "end_line": 210, + "start_line": 197, + "end_line": 215, "tags": { "PURPOSE": "Switch the dashboard's repository to a specific branch.", "PRE": "`dashboard_id` repository exists and branch `checkout_data.name` exists.", @@ -23316,8 +25297,8 @@ "name": "commit_changes", "type": "Function", "tier": "STANDARD", - "start_line": 212, - "end_line": 230, + "start_line": 217, + "end_line": 235, "tags": { "PURPOSE": "Stage and commit changes in the dashboard's repository.", "PRE": "`dashboard_id` repository exists and `commit_data` has message and files.", @@ -23336,8 +25317,8 @@ "name": "push_changes", "type": "Function", "tier": "STANDARD", - "start_line": 232, - "end_line": 248, + "start_line": 237, + "end_line": 253, "tags": { "PURPOSE": "Push local commits to the remote repository.", "PRE": "`dashboard_id` repository exists and has a remote configured.", @@ -23356,8 +25337,8 @@ "name": "pull_changes", "type": "Function", "tier": "STANDARD", - "start_line": 250, - "end_line": 266, + "start_line": 255, + "end_line": 271, "tags": { "PURPOSE": "Pull changes from the remote repository.", "PRE": "`dashboard_id` repository exists and has a remote configured.", @@ -23376,8 +25357,8 @@ "name": "sync_dashboard", "type": "Function", "tier": "STANDARD", - "start_line": 268, - "end_line": 291, + "start_line": 273, + "end_line": 296, "tags": { "PURPOSE": "Sync dashboard state from Superset to Git using the GitPlugin.", "PRE": "`dashboard_id` is valid; GitPlugin is available.", @@ -23396,8 +25377,8 @@ "name": "get_environments", "type": "Function", "tier": "STANDARD", - "start_line": 293, - "end_line": 313, + "start_line": 298, + "end_line": 318, "tags": { "PURPOSE": "List all deployment environments.", "PRE": "Config manager is accessible.", @@ -23416,8 +25397,8 @@ "name": "deploy_dashboard", "type": "Function", "tier": "STANDARD", - "start_line": 315, - "end_line": 338, + "start_line": 320, + "end_line": 343, "tags": { "PURPOSE": "Deploy dashboard from Git to a target environment.", "PRE": "`dashboard_id` and `deploy_data.environment_id` are valid.", @@ -23436,8 +25417,8 @@ "name": "get_history", "type": "Function", "tier": "STANDARD", - "start_line": 340, - "end_line": 358, + "start_line": 345, + "end_line": 363, "tags": { "PURPOSE": "View commit history for a dashboard's repository.", "PRE": "`dashboard_id` repository exists.", @@ -23457,8 +25438,8 @@ "name": "get_repository_status", "type": "Function", "tier": "STANDARD", - "start_line": 360, - "end_line": 376, + "start_line": 365, + "end_line": 381, "tags": { "PURPOSE": "Get current Git status for a dashboard repository.", "PRE": "`dashboard_id` repository exists.", @@ -23478,8 +25459,8 @@ "name": "get_repository_diff", "type": "Function", "tier": "STANDARD", - "start_line": 378, - "end_line": 399, + "start_line": 383, + "end_line": 404, "tags": { "PURPOSE": "Get Git diff for a dashboard repository.", "PRE": "`dashboard_id` repository exists.", @@ -23499,8 +25480,8 @@ "name": "generate_commit_message", "type": "Function", "tier": "STANDARD", - "start_line": 401, - "end_line": 454, + "start_line": 406, + "end_line": 472, "tags": { "PURPOSE": "Generate a suggested commit message using LLM.", "PRE": "Repository for `dashboard_id` is initialized.", @@ -24067,7 +26048,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 376, + "end_line": 380, "tags": { "SEMANTICS": "settings, api, router, fastapi", "PURPOSE": "Provides API endpoints for managing application settings and Superset environments.", @@ -24090,8 +26071,8 @@ "name": "LoggingConfigResponse", "type": "Class", "tier": "STANDARD", - "start_line": 24, - "end_line": 31, + "start_line": 25, + "end_line": 32, "tags": { "PURPOSE": "Response model for logging configuration with current task log level.", "SEMANTICS": "logging, config, response" @@ -24104,12 +26085,12 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 24 + "line_number": 25 }, { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 24 + "line_number": 25 } ], "score": 0.7000000000000001 @@ -24119,8 +26100,8 @@ "name": "get_settings", "type": "Function", "tier": "STANDARD", - "start_line": 35, - "end_line": 53, + "start_line": 36, + "end_line": 55, "tags": { "PURPOSE": "Retrieves all application settings.", "PRE": "Config manager is available.", @@ -24139,8 +26120,8 @@ "name": "update_global_settings", "type": "Function", "tier": "STANDARD", - "start_line": 55, - "end_line": 72, + "start_line": 57, + "end_line": 74, "tags": { "PURPOSE": "Updates global application settings.", "PRE": "New settings are provided.", @@ -24160,8 +26141,8 @@ "name": "get_storage_settings", "type": "Function", "tier": "STANDARD", - "start_line": 74, - "end_line": 84, + "start_line": 76, + "end_line": 86, "tags": { "PURPOSE": "Retrieves storage-specific settings.", "RETURN": "StorageConfig - The storage configuration." @@ -24174,22 +26155,22 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 74 + "line_number": 76 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 74 + "line_number": 76 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 74 + "line_number": 76 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 74 + "line_number": 76 } ], "score": 0.4666666666666666 @@ -24199,8 +26180,8 @@ "name": "update_storage_settings", "type": "Function", "tier": "STANDARD", - "start_line": 86, - "end_line": 106, + "start_line": 88, + "end_line": 108, "tags": { "PURPOSE": "Updates storage-specific settings.", "PARAM": "storage (StorageConfig) - The new storage settings.", @@ -24215,12 +26196,12 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 86 + "line_number": 88 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 86 + "line_number": 88 } ], "score": 0.7333333333333334 @@ -24230,8 +26211,8 @@ "name": "get_environments", "type": "Function", "tier": "STANDARD", - "start_line": 108, - "end_line": 121, + "start_line": 110, + "end_line": 123, "tags": { "PURPOSE": "Lists all configured Superset environments.", "PRE": "Config manager is available.", @@ -24250,8 +26231,8 @@ "name": "add_environment", "type": "Function", "tier": "STANDARD", - "start_line": 123, - "end_line": 148, + "start_line": 125, + "end_line": 150, "tags": { "PURPOSE": "Adds a new Superset environment.", "PRE": "Environment data is valid and reachable.", @@ -24271,8 +26252,8 @@ "name": "update_environment", "type": "Function", "tier": "STANDARD", - "start_line": 150, - "end_line": 184, + "start_line": 152, + "end_line": 186, "tags": { "PURPOSE": "Updates an existing Superset environment.", "PRE": "ID and valid environment data are provided.", @@ -24292,8 +26273,8 @@ "name": "delete_environment", "type": "Function", "tier": "STANDARD", - "start_line": 186, - "end_line": 200, + "start_line": 188, + "end_line": 202, "tags": { "PURPOSE": "Deletes a Superset environment.", "PRE": "ID is provided.", @@ -24312,8 +26293,8 @@ "name": "test_environment_connection", "type": "Function", "tier": "STANDARD", - "start_line": 202, - "end_line": 233, + "start_line": 204, + "end_line": 235, "tags": { "PURPOSE": "Tests the connection to a Superset environment.", "PRE": "ID is provided.", @@ -24333,8 +26314,8 @@ "name": "get_logging_config", "type": "Function", "tier": "STANDARD", - "start_line": 235, - "end_line": 252, + "start_line": 237, + "end_line": 254, "tags": { "PURPOSE": "Retrieves current logging configuration.", "PRE": "Config manager is available.", @@ -24353,8 +26334,8 @@ "name": "update_logging_config", "type": "Function", "tier": "STANDARD", - "start_line": 254, - "end_line": 279, + "start_line": 256, + "end_line": 281, "tags": { "PURPOSE": "Updates logging configuration.", "PRE": "New logging config is provided.", @@ -24374,8 +26355,8 @@ "name": "ConsolidatedSettingsResponse", "type": "Class", "tier": "STANDARD", - "start_line": 281, - "end_line": 289, + "start_line": 283, + "end_line": 291, "tags": {}, "relations": [], "children": [], @@ -24385,22 +26366,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 281 + "line_number": 283 }, { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 281 + "line_number": 283 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 281 + "line_number": 283 }, { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 281 + "line_number": 283 } ], "score": 0.39999999999999997 @@ -24410,8 +26391,8 @@ "name": "get_consolidated_settings", "type": "Function", "tier": "STANDARD", - "start_line": 291, - "end_line": 334, + "start_line": 293, + "end_line": 338, "tags": { "PURPOSE": "Retrieves all settings categories in a single call", "PRE": "Config manager is available.", @@ -24430,8 +26411,8 @@ "name": "update_consolidated_settings", "type": "Function", "tier": "STANDARD", - "start_line": 336, - "end_line": 374, + "start_line": 340, + "end_line": 378, "tags": { "PURPOSE": "Bulk update application settings from the consolidated view.", "PRE": "User has admin permissions, config is valid.", @@ -25242,6 +27223,1047 @@ "score": 1.0 } }, + { + "name": "backend.src.api.routes.assistant", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 1760, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "api, assistant, chat, command, confirmation", + "PURPOSE": "API routes for LLM assistant command parsing and safe execution orchestration.", + "LAYER": "API", + "INVARIANT": "Risky operations are never executed without valid confirmation token." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "backend.src.core.task_manager" + }, + { + "type": "DEPENDS_ON", + "target": "backend.src.models.assistant" + } + ], + "children": [ + { + "name": "AssistantMessageRequest", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 49, + "end_line": 57, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Input payload for assistant message endpoint.", + "PRE": "message length is within accepted bounds.", + "POST": "Request object provides message text and optional conversation binding." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "AssistantAction", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 60, + "end_line": 69, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "UI action descriptor returned with assistant responses.", + "PRE": "type and label are provided by orchestration logic.", + "POST": "Action can be rendered as button on frontend." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "AssistantMessageResponse", + "type": "Class", + "tier": "STANDARD", + "start_line": 72, + "end_line": 87, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Output payload contract for assistant interaction endpoints.", + "PRE": "Response includes deterministic state and text.", + "POST": "Payload may include task_id/confirmation_id/actions for UI follow-up." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "ConfirmationRecord", + "type": "Class", + "tier": "STANDARD", + "start_line": 90, + "end_line": 104, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "In-memory confirmation token model for risky operation dispatch.", + "PRE": "intent/dispatch/user_id are populated at confirmation request time.", + "POST": "Record tracks lifecycle state and expiry timestamp." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_append_history", + "type": "Function", + "tier": "STANDARD", + "start_line": 126, + "end_line": 154, + "tags": { + "PURPOSE": "Append conversation message to in-memory history buffer.", + "PRE": "user_id and conversation_id identify target conversation bucket.", + "POST": "Message entry is appended to CONVERSATIONS key list." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 126 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 126 + } + ], + "score": 0.8 + } + }, + { + "name": "_persist_message", + "type": "Function", + "tier": "STANDARD", + "start_line": 157, + "end_line": 189, + "tags": { + "PURPOSE": "Persist assistant/user message record to database.", + "PRE": "db session is writable and message payload is serializable.", + "POST": "Message row is committed or persistence failure is logged." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 157 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 157 + } + ], + "score": 0.8 + } + }, + { + "name": "_audit", + "type": "Function", + "tier": "STANDARD", + "start_line": 192, + "end_line": 201, + "tags": { + "PURPOSE": "Append in-memory audit record for assistant decision trace.", + "PRE": "payload describes decision/outcome fields.", + "POST": "ASSISTANT_AUDIT list for user contains new timestamped entry." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 192 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 192 + } + ], + "score": 0.8 + } + }, + { + "name": "_persist_audit", + "type": "Function", + "tier": "STANDARD", + "start_line": 204, + "end_line": 224, + "tags": { + "PURPOSE": "Persist structured assistant audit payload in database.", + "PRE": "db session is writable and payload is JSON-serializable.", + "POST": "Audit row is committed or failure is logged with rollback." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 204 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 204 + } + ], + "score": 0.8 + } + }, + { + "name": "_persist_confirmation", + "type": "Function", + "tier": "STANDARD", + "start_line": 227, + "end_line": 249, + "tags": { + "PURPOSE": "Persist confirmation token record to database.", + "PRE": "record contains id/user/intent/dispatch/expiry fields.", + "POST": "Confirmation row exists in persistent storage." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 227 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 227 + } + ], + "score": 0.8 + } + }, + { + "name": "_update_confirmation_state", + "type": "Function", + "tier": "STANDARD", + "start_line": 252, + "end_line": 268, + "tags": { + "PURPOSE": "Update persistent confirmation token lifecycle state.", + "PRE": "confirmation_id references existing row.", + "POST": "State and consumed_at fields are updated when applicable." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 252 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 252 + } + ], + "score": 0.8 + } + }, + { + "name": "_load_confirmation_from_db", + "type": "Function", + "tier": "STANDARD", + "start_line": 271, + "end_line": 293, + "tags": { + "PURPOSE": "Load confirmation token from database into in-memory model.", + "PRE": "confirmation_id may or may not exist in storage.", + "POST": "Returns ConfirmationRecord when found, otherwise None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 271 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 271 + } + ], + "score": 0.8 + } + }, + { + "name": "_ensure_conversation", + "type": "Function", + "tier": "STANDARD", + "start_line": 296, + "end_line": 312, + "tags": { + "PURPOSE": "Resolve active conversation id in memory or create a new one.", + "PRE": "user_id identifies current actor.", + "POST": "Returns stable conversation id and updates USER_ACTIVE_CONVERSATION." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 296 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 296 + } + ], + "score": 0.8 + } + }, + { + "name": "_resolve_or_create_conversation", + "type": "Function", + "tier": "STANDARD", + "start_line": 315, + "end_line": 341, + "tags": { + "PURPOSE": "Resolve active conversation using explicit id, memory cache, or persisted history.", + "PRE": "user_id and db session are available.", + "POST": "Returns conversation id and updates USER_ACTIVE_CONVERSATION cache." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 315 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 315 + } + ], + "score": 0.8 + } + }, + { + "name": "_cleanup_history_ttl", + "type": "Function", + "tier": "STANDARD", + "start_line": 344, + "end_line": 378, + "tags": { + "PURPOSE": "Enforce assistant message retention window by deleting expired rows and in-memory records.", + "PRE": "db session is available and user_id references current actor scope.", + "POST": "Messages older than ASSISTANT_MESSAGE_TTL_DAYS are removed from persistence and memory mirrors." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 344 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 344 + } + ], + "score": 0.8 + } + }, + { + "name": "_is_conversation_archived", + "type": "Function", + "tier": "STANDARD", + "start_line": 381, + "end_line": 390, + "tags": { + "PURPOSE": "Determine archived state for a conversation based on last update timestamp.", + "PRE": "updated_at can be null for empty conversations.", + "POST": "Returns True when conversation inactivity exceeds archive threshold." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 381 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 381 + } + ], + "score": 0.8 + } + }, + { + "name": "_coerce_query_bool", + "type": "Function", + "tier": "STANDARD", + "start_line": 393, + "end_line": 403, + "tags": { + "PURPOSE": "Normalize bool-like query values for compatibility in direct handler invocations/tests.", + "PRE": "value may be bool, string, or FastAPI Query metadata object.", + "POST": "Returns deterministic boolean flag." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 393 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 393 + } + ], + "score": 0.8 + } + }, + { + "name": "_extract_id", + "type": "Function", + "tier": "STANDARD", + "start_line": 406, + "end_line": 416, + "tags": { + "PURPOSE": "Extract first regex match group from text by ordered pattern list.", + "PRE": "patterns contain at least one capture group.", + "POST": "Returns first matched token or None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 406 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 406 + } + ], + "score": 0.8 + } + }, + { + "name": "_resolve_env_id", + "type": "Function", + "tier": "STANDARD", + "start_line": 419, + "end_line": 433, + "tags": { + "PURPOSE": "Resolve environment identifier/name token to canonical environment id.", + "PRE": "config_manager provides environment list.", + "POST": "Returns matched environment id or None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 419 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 419 + } + ], + "score": 0.8 + } + }, + { + "name": "_is_production_env", + "type": "Function", + "tier": "STANDARD", + "start_line": 436, + "end_line": 450, + "tags": { + "PURPOSE": "Determine whether environment token resolves to production-like target.", + "PRE": "config_manager provides environments or token text is provided.", + "POST": "Returns True for production/prod synonyms, else False." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 436 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 436 + } + ], + "score": 0.8 + } + }, + { + "name": "_resolve_provider_id", + "type": "Function", + "tier": "STANDARD", + "start_line": 453, + "end_line": 485, + "tags": { + "PURPOSE": "Resolve provider token to provider id with active/default fallback.", + "PRE": "db session can load provider list through LLMProviderService.", + "POST": "Returns provider id or None when no providers configured." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 453 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 453 + } + ], + "score": 0.8 + } + }, + { + "name": "_get_default_environment_id", + "type": "Function", + "tier": "STANDARD", + "start_line": 488, + "end_line": 506, + "tags": { + "PURPOSE": "Resolve default environment id from settings or first configured environment.", + "PRE": "config_manager returns environments list.", + "POST": "Returns default environment id or None when environment list is empty." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 488 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 488 + } + ], + "score": 0.8 + } + }, + { + "name": "_resolve_dashboard_id_by_ref", + "type": "Function", + "tier": "STANDARD", + "start_line": 509, + "end_line": 548, + "tags": { + "PURPOSE": "Resolve dashboard id by title or slug reference in selected environment.", + "PRE": "dashboard_ref is a non-empty string-like token.", + "POST": "Returns dashboard id when uniquely matched, otherwise None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 509 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 509 + } + ], + "score": 0.8 + } + }, + { + "name": "_parse_command", + "type": "Function", + "tier": "STANDARD", + "start_line": 551, + "end_line": 723, + "tags": { + "PURPOSE": "Deterministically parse RU/EN command text into intent payload.", + "PRE": "message contains raw user text and config manager resolves environments.", + "POST": "Returns intent dict with domain/operation/entities/confidence/risk fields." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 551 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 551 + } + ], + "score": 0.8 + } + }, + { + "name": "_check_any_permission", + "type": "Function", + "tier": "STANDARD", + "start_line": 726, + "end_line": 740, + "tags": { + "PURPOSE": "Validate user against alternative permission checks (logical OR).", + "PRE": "checks list contains resource-action tuples.", + "POST": "Returns on first successful permission; raises 403-like HTTPException otherwise." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 726 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 726 + } + ], + "score": 0.8 + } + }, + { + "name": "_has_any_permission", + "type": "Function", + "tier": "STANDARD", + "start_line": 743, + "end_line": 753, + "tags": { + "PURPOSE": "Check whether user has at least one permission tuple from the provided list.", + "PRE": "current_user and checks list are valid.", + "POST": "Returns True when at least one permission check passes." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 743 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 743 + } + ], + "score": 0.8 + } + }, + { + "name": "_build_tool_catalog", + "type": "Function", + "tier": "STANDARD", + "start_line": 756, + "end_line": 867, + "tags": { + "PURPOSE": "Build current-user tool catalog for LLM planner with operation contracts and defaults.", + "PRE": "current_user is authenticated; config/db are available.", + "POST": "Returns list of executable tools filtered by permission and runtime availability." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 756 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 756 + } + ], + "score": 0.8 + } + }, + { + "name": "_coerce_intent_entities", + "type": "Function", + "tier": "STANDARD", + "start_line": 870, + "end_line": 887, + "tags": { + "PURPOSE": "Normalize intent entity value types from LLM output to route-compatible values.", + "PRE": "intent contains entities dict or missing entities.", + "POST": "Returned intent has numeric ids coerced where possible and string values stripped." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 870 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 870 + } + ], + "score": 0.8 + } + }, + { + "name": "_clarification_text_for_intent", + "type": "Function", + "tier": "STANDARD", + "start_line": 890, + "end_line": 910, + "tags": { + "PURPOSE": "Convert technical missing-parameter errors into user-facing clarification prompts.", + "PRE": "state was classified as needs_clarification for current intent/error combination.", + "POST": "Returned text is human-readable and actionable for target operation." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 890 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 890 + } + ], + "score": 0.8 + } + }, + { + "name": "_plan_intent_with_llm", + "type": "Function", + "tier": "STANDARD", + "start_line": 913, + "end_line": 1018, + "tags": { + "PURPOSE": "Use active LLM provider to select best tool/operation from dynamic catalog.", + "PRE": "tools list contains allowed operations for current user.", + "POST": "Returns normalized intent dict when planning succeeds; otherwise None." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 913 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 913 + } + ], + "score": 0.8 + } + }, + { + "name": "_authorize_intent", + "type": "Function", + "tier": "STANDARD", + "start_line": 1021, + "end_line": 1029, + "tags": { + "PURPOSE": "Validate user permissions for parsed intent before confirmation/dispatch.", + "PRE": "intent.operation is present for known assistant command domains.", + "POST": "Returns if authorized; raises HTTPException(403) when denied." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1021 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1021 + } + ], + "score": 0.8 + } + }, + { + "name": "_dispatch_intent", + "type": "Function", + "tier": "STANDARD", + "start_line": 1032, + "end_line": 1269, + "tags": { + "PURPOSE": "Execute parsed assistant intent via existing task/plugin/git services.", + "PRE": "intent operation is known and actor permissions are validated per operation.", + "POST": "Returns response text, optional task id, and UI actions for follow-up." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1032 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 1032 + } + ], + "score": 0.8 + } + }, + { + "name": "send_message", + "type": "Function", + "tier": "STANDARD", + "start_line": 1273, + "end_line": 1430, + "tags": { + "PURPOSE": "Parse assistant command, enforce safety gates, and dispatch executable intent.", + "PRE": "Authenticated user is available and message text is non-empty.", + "POST": "Response state is one of clarification/confirmation/started/success/denied/failed.", + "RETURN": "AssistantMessageResponse with operation feedback and optional actions." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "confirm_operation", + "type": "Function", + "tier": "STANDARD", + "start_line": 1434, + "end_line": 1496, + "tags": { + "PURPOSE": "Execute previously requested risky operation after explicit user confirmation.", + "PRE": "confirmation_id exists, belongs to current user, is pending, and not expired.", + "POST": "Confirmation state becomes consumed and operation result is persisted in history.", + "RETURN": "AssistantMessageResponse with task details when async execution starts." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "cancel_operation", + "type": "Function", + "tier": "STANDARD", + "start_line": 1500, + "end_line": 1553, + "tags": { + "PURPOSE": "Cancel pending risky operation and mark confirmation token as cancelled.", + "PRE": "confirmation_id exists, belongs to current user, and is still pending.", + "POST": "Confirmation becomes cancelled and cannot be executed anymore.", + "RETURN": "AssistantMessageResponse confirming cancellation." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "list_conversations", + "type": "Function", + "tier": "STANDARD", + "start_line": 1556, + "end_line": 1640, + "tags": { + "PURPOSE": "Return paginated conversation list for current user with archived flag and last message preview.", + "PRE": "Authenticated user context and valid pagination params.", + "POST": "Conversations are grouped by conversation_id sorted by latest activity descending.", + "RETURN": "Dict with items, paging metadata, and archive segmentation counts." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_history", + "type": "Function", + "tier": "STANDARD", + "start_line": 1644, + "end_line": 1715, + "tags": { + "PURPOSE": "Retrieve paginated assistant conversation history for current user.", + "PRE": "Authenticated user is available and page params are valid.", + "POST": "Returns persistent messages and mirrored in-memory snapshot for diagnostics.", + "RETURN": "Dict with items, paging metadata, and resolved conversation_id." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_assistant_audit", + "type": "Function", + "tier": "STANDARD", + "start_line": 1719, + "end_line": 1758, + "tags": { + "PURPOSE": "Return assistant audit decisions for current user from persistent and in-memory stores.", + "PRE": "User has tasks:READ permission.", + "POST": "Audit payload is returned in reverse chronological order from DB.", + "RETURN": "Dict with persistent and memory audit slices." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "storage_routes", "type": "Module", @@ -25477,27 +28499,36 @@ } }, { - "name": "__init__", + "name": "backend.src.api.routes.__init__", "type": "Module", - "tier": "TRIVIAL", + "tier": "STANDARD", "start_line": 1, - "end_line": 10, + "end_line": 23, "tags": { - "PURPOSE": "Auto-generated module for backend/src/api/routes/__init__.py", - "TIER": "TRIVIAL", - "LAYER": "Unknown" + "TIER": "STANDARD", + "SEMANTICS": "routes, lazy-import, module-registry", + "PURPOSE": "Provide lazy route module loading to avoid heavyweight imports during tests.", + "LAYER": "API", + "INVARIANT": "Only names listed in __all__ are importable via __getattr__." }, - "relations": [], + "relations": [ + { + "type": "DEPENDS_ON", + "target": "importlib" + } + ], "children": [ { "name": "__getattr__", "type": "Function", "tier": "TRIVIAL", - "start_line": 6, - "end_line": 6, + "start_line": 12, + "end_line": 22, "tags": { - "PURPOSE": "Auto-detected function (orphan)", - "TIER": "TRIVIAL" + "TIER": "TRIVIAL", + "PURPOSE": "Lazily import route module by attribute name.", + "PRE": "name is module candidate exposed in __all__.", + "POST": "Returns imported submodule or raises AttributeError." }, "relations": [], "children": [], @@ -25519,7 +28550,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 303, + "end_line": 327, "tags": { "TIER": "STANDARD", "SEMANTICS": "api, router, tasks, create, list, get, logs", @@ -25533,8 +28564,8 @@ "name": "create_task", "type": "Function", "tier": "STANDARD", - "start_line": 35, - "end_line": 76, + "start_line": 41, + "end_line": 100, "tags": { "PURPOSE": "Create and start a new task for a given plugin.", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -25554,8 +28585,8 @@ "name": "list_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 79, - "end_line": 118, + "start_line": 103, + "end_line": 142, "tags": { "PURPOSE": "Retrieve a list of tasks with pagination and optional status filter.", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -25575,8 +28606,8 @@ "name": "get_task", "type": "Function", "tier": "STANDARD", - "start_line": 121, - "end_line": 141, + "start_line": 145, + "end_line": 165, "tags": { "PURPOSE": "Retrieve the details of a specific task.", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -25596,8 +28627,8 @@ "name": "get_task_logs", "type": "Function", "tier": "CRITICAL", - "start_line": 144, - "end_line": 184, + "start_line": 168, + "end_line": 208, "tags": { "PURPOSE": "Retrieve logs for a specific task with optional filtering.", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -25618,8 +28649,8 @@ "name": "get_task_log_stats", "type": "Function", "tier": "STANDARD", - "start_line": 187, - "end_line": 207, + "start_line": 211, + "end_line": 231, "tags": { "PURPOSE": "Get statistics about logs for a task (counts by level and source).", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -25639,8 +28670,8 @@ "name": "get_task_log_sources", "type": "Function", "tier": "STANDARD", - "start_line": 210, - "end_line": 230, + "start_line": 234, + "end_line": 254, "tags": { "PURPOSE": "Get unique sources for a task's logs.", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -25660,8 +28691,8 @@ "name": "resolve_task", "type": "Function", "tier": "STANDARD", - "start_line": 233, - "end_line": 256, + "start_line": 257, + "end_line": 280, "tags": { "PURPOSE": "Resolve a task that is awaiting mapping.", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -25681,8 +28712,8 @@ "name": "resume_task", "type": "Function", "tier": "STANDARD", - "start_line": 259, - "end_line": 282, + "start_line": 283, + "end_line": 306, "tags": { "PURPOSE": "Resume a task that is awaiting input (e.g., passwords).", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -25702,8 +28733,8 @@ "name": "clear_tasks", "type": "Function", "tier": "STANDARD", - "start_line": 285, - "end_line": 302, + "start_line": 309, + "end_line": 326, "tags": { "PURPOSE": "Clear tasks matching the status filter.", "PARAM": "task_manager (TaskManager) - The task manager instance.", @@ -25730,7 +28761,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 327, + "end_line": 396, "tags": { "TIER": "STANDARD", "SEMANTICS": "api, dashboards, resources, hub", @@ -25757,8 +28788,8 @@ "name": "GitStatus", "type": "DataClass", "tier": "STANDARD", - "start_line": 23, - "end_line": 27, + "start_line": 24, + "end_line": 28, "tags": {}, "relations": [], "children": [], @@ -25772,8 +28803,8 @@ "name": "LastTask", "type": "DataClass", "tier": "STANDARD", - "start_line": 29, - "end_line": 33, + "start_line": 30, + "end_line": 34, "tags": {}, "relations": [], "children": [], @@ -25787,8 +28818,8 @@ "name": "DashboardItem", "type": "DataClass", "tier": "STANDARD", - "start_line": 35, - "end_line": 44, + "start_line": 36, + "end_line": 45, "tags": {}, "relations": [], "children": [], @@ -25802,8 +28833,53 @@ "name": "DashboardsResponse", "type": "DataClass", "tier": "STANDARD", - "start_line": 46, - "end_line": 53, + "start_line": 47, + "end_line": 54, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "DashboardChartItem", + "type": "DataClass", + "tier": "STANDARD", + "start_line": 56, + "end_line": 64, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "DashboardDatasetItem", + "type": "DataClass", + "tier": "STANDARD", + "start_line": 66, + "end_line": 74, + "tags": {}, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "DashboardDetailResponse", + "type": "DataClass", + "tier": "STANDARD", + "start_line": 76, + "end_line": 89, "tags": {}, "relations": [], "children": [], @@ -25817,8 +28893,8 @@ "name": "get_dashboards", "type": "Function", "tier": "STANDARD", - "start_line": 55, - "end_line": 133, + "start_line": 91, + "end_line": 169, "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", @@ -25839,12 +28915,36 @@ "score": 1.0 } }, + { + "name": "get_dashboard_detail", + "type": "Function", + "tier": "STANDARD", + "start_line": 171, + "end_line": 202, + "tags": { + "PURPOSE": "Fetch detailed dashboard info with related charts and datasets", + "PRE": "env_id must be valid and dashboard_id must exist", + "POST": "Returns dashboard detail payload for overview page" + }, + "relations": [ + { + "type": "CALLS", + "target": "SupersetClient.get_dashboard_detail" + } + ], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "MigrateRequest", "type": "DataClass", "tier": "STANDARD", - "start_line": 135, - "end_line": 142, + "start_line": 204, + "end_line": 211, "tags": {}, "relations": [], "children": [], @@ -25858,8 +28958,8 @@ "name": "TaskResponse", "type": "DataClass", "tier": "STANDARD", - "start_line": 144, - "end_line": 147, + "start_line": 213, + "end_line": 216, "tags": {}, "relations": [], "children": [], @@ -25873,8 +28973,8 @@ "name": "migrate_dashboards", "type": "Function", "tier": "STANDARD", - "start_line": 149, - "end_line": 207, + "start_line": 218, + "end_line": 276, "tags": { "PURPOSE": "Trigger bulk migration of dashboards from source to target environment", "PRE": "dashboard_ids is a non-empty list", @@ -25903,8 +29003,8 @@ "name": "BackupRequest", "type": "DataClass", "tier": "STANDARD", - "start_line": 209, - "end_line": 214, + "start_line": 278, + "end_line": 283, "tags": {}, "relations": [], "children": [], @@ -25918,8 +29018,8 @@ "name": "backup_dashboards", "type": "Function", "tier": "STANDARD", - "start_line": 216, - "end_line": 269, + "start_line": 285, + "end_line": 338, "tags": { "PURPOSE": "Trigger bulk backup of dashboards with optional cron schedule", "PRE": "dashboard_ids is a non-empty list", @@ -25948,8 +29048,8 @@ "name": "DatabaseMapping", "type": "DataClass", "tier": "STANDARD", - "start_line": 271, - "end_line": 278, + "start_line": 340, + "end_line": 347, "tags": {}, "relations": [], "children": [], @@ -25963,8 +29063,8 @@ "name": "DatabaseMappingsResponse", "type": "DataClass", "tier": "STANDARD", - "start_line": 280, - "end_line": 283, + "start_line": 349, + "end_line": 352, "tags": {}, "relations": [], "children": [], @@ -25978,8 +29078,8 @@ "name": "get_database_mappings", "type": "Function", "tier": "STANDARD", - "start_line": 285, - "end_line": 325, + "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", @@ -26012,7 +29112,7 @@ "type": "Module", "tier": "STANDARD", "start_line": 1, - "end_line": 286, + "end_line": 357, "tags": { "TIER": "STANDARD", "PURPOSE": "Unit tests for Dashboards API endpoints", @@ -26186,11 +29286,127 @@ } }, { - "name": "test_migrate_dashboards_success", + "name": "test_get_dashboard_detail_success", "type": "Function", "tier": "STANDARD", "start_line": 149, - "end_line": 188, + "end_line": 202, + "tags": { + "TEST": "GET /api/dashboards/{id} returns dashboard detail with charts and datasets" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 149 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 149 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 149 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 149 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 149 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 149 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 149 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 149 + } + ], + "score": 0.0 + } + }, + { + "name": "test_get_dashboard_detail_env_not_found", + "type": "Function", + "tier": "STANDARD", + "start_line": 205, + "end_line": 217, + "tags": { + "TEST": "GET /api/dashboards/{id} returns 404 for missing environment" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 205 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 205 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 205 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 205 + }, + { + "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 205 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 205 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 205 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 205 + } + ], + "score": 0.0 + } + }, + { + "name": "test_migrate_dashboards_success", + "type": "Function", + "tier": "STANDARD", + "start_line": 220, + "end_line": 259, "tags": { "TEST": "POST /api/dashboards/migrate creates migration task", "PRE": "Valid source_env_id, target_env_id, dashboard_ids", @@ -26204,22 +29420,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 220 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 220 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 220 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 149 + "line_number": 220 } ], "score": 0.5333333333333333 @@ -26229,8 +29445,8 @@ "name": "test_migrate_dashboards_no_ids", "type": "Function", "tier": "STANDARD", - "start_line": 191, - "end_line": 212, + "start_line": 262, + "end_line": 283, "tags": { "TEST": "POST /api/dashboards/migrate returns 400 for empty dashboard_ids", "PRE": "dashboard_ids is empty", @@ -26244,22 +29460,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 191 + "line_number": 262 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 191 + "line_number": 262 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 191 + "line_number": 262 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 191 + "line_number": 262 } ], "score": 0.5333333333333333 @@ -26269,8 +29485,8 @@ "name": "test_backup_dashboards_success", "type": "Function", "tier": "STANDARD", - "start_line": 215, - "end_line": 251, + "start_line": 286, + "end_line": 322, "tags": { "TEST": "POST /api/dashboards/backup creates backup task", "PRE": "Valid env_id, dashboard_ids", @@ -26284,22 +29500,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 215 + "line_number": 286 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 215 + "line_number": 286 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 215 + "line_number": 286 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 215 + "line_number": 286 } ], "score": 0.5333333333333333 @@ -26309,8 +29525,8 @@ "name": "test_get_database_mappings_success", "type": "Function", "tier": "STANDARD", - "start_line": 254, - "end_line": 283, + "start_line": 325, + "end_line": 354, "tags": { "TEST": "GET /api/dashboards/db-mappings returns mapping suggestions", "PRE": "Valid source_env_id, target_env_id", @@ -26324,22 +29540,22 @@ { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 254 + "line_number": 325 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 254 + "line_number": 325 }, { "message": "Missing Mandatory Tag: @PURPOSE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 254 + "line_number": 325 }, { "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", "severity": "WARNING", - "line_number": 254 + "line_number": 325 } ], "score": 0.5333333333333333 @@ -27093,6 +30309,1530 @@ "score": 1.0 } }, + { + "name": "backend.src.api.routes.__tests__.test_assistant_authz", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 306, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "tests, assistant, authz, confirmation, rbac", + "PURPOSE": "Verify assistant confirmation ownership, expiration, and deny behavior for restricted users.", + "LAYER": "UI (API Tests)", + "INVARIANT": "Security-sensitive flows fail closed for unauthorized actors." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "backend.src.api.routes.assistant" + } + ], + "children": [ + { + "name": "_run_async", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 30, + "end_line": 39, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Execute async endpoint handler in synchronous test context.", + "PRE": "coroutine is awaitable endpoint invocation.", + "POST": "Returns coroutine result or raises propagated exception." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_FakeTask", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 40, + "end_line": 50, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Lightweight task model used for assistant authz tests." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_FakeTaskManager", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 51, + "end_line": 74, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Minimal task manager for deterministic operation creation and lookup." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_FakeConfigManager", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 75, + "end_line": 86, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Provide deterministic environment aliases required by intent parsing." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_admin_user", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 87, + "end_line": 97, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Build admin principal fixture.", + "PRE": "Test requires privileged principal for risky operations.", + "POST": "Returns admin-like user stub with Admin role." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_other_admin_user", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 98, + "end_line": 108, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Build second admin principal fixture for ownership tests.", + "PRE": "Ownership mismatch scenario needs distinct authenticated actor.", + "POST": "Returns alternate admin-like user stub." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_limited_user", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 109, + "end_line": 119, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Build limited principal without required assistant execution privileges.", + "PRE": "Permission denial scenario needs non-admin actor.", + "POST": "Returns restricted user stub." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_FakeQuery", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 120, + "end_line": 151, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Minimal chainable query object for fake DB interactions." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_FakeDb", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 152, + "end_line": 198, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "In-memory session substitute for assistant route persistence calls." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_clear_assistant_state", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 199, + "end_line": 211, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Reset assistant process-local state between test cases.", + "PRE": "Assistant globals may contain state from prior tests.", + "POST": "Assistant in-memory state dictionaries are cleared." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_confirmation_owner_mismatch_returns_403", + "type": "Function", + "tier": "STANDARD", + "start_line": 212, + "end_line": 247, + "tags": { + "PURPOSE": "Confirm endpoint should reject requests from user that does not own the confirmation token.", + "PRE": "Confirmation token is created by first admin actor.", + "POST": "Second actor receives 403 on confirm operation." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 212 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 212 + } + ], + "score": 0.8 + } + }, + { + "name": "test_expired_confirmation_cannot_be_confirmed", + "type": "Function", + "tier": "STANDARD", + "start_line": 248, + "end_line": 284, + "tags": { + "PURPOSE": "Expired confirmation token should be rejected and not create task.", + "PRE": "Confirmation token exists and is manually expired before confirm request.", + "POST": "Confirm endpoint raises 400 and no task is created." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 248 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 248 + } + ], + "score": 0.8 + } + }, + { + "name": "test_limited_user_cannot_launch_restricted_operation", + "type": "Function", + "tier": "STANDARD", + "start_line": 285, + "end_line": 305, + "tags": { + "PURPOSE": "Limited user should receive denied state for privileged operation.", + "PRE": "Restricted user attempts dangerous deploy command.", + "POST": "Assistant returns denied state and does not execute operation." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 285 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 285 + } + ], + "score": 0.8 + } + }, + { + "name": "__init__", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 44, + "end_line": 44, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "__init__", + "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": "create_task", + "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": "get_task", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 64, + "end_line": 64, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_tasks", + "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": "get_environments", + "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": "__init__", + "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": "filter", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 127, + "end_line": 127, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "order_by", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 130, + "end_line": 130, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "first", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 133, + "end_line": 133, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "all", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 136, + "end_line": 136, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "limit", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 139, + "end_line": 139, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "offset", + "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": "count", + "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": "__init__", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 156, + "end_line": 156, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "add", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 161, + "end_line": 161, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "merge", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 170, + "end_line": 170, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "query", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 182, + "end_line": 182, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "commit", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 191, + "end_line": 191, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "rollback", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 194, + "end_line": 194, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "backend.src.api.routes.__tests__.test_assistant_api", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 558, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "tests, assistant, api, confirmation, status", + "PURPOSE": "Validate assistant API endpoint logic via direct async handler invocation.", + "LAYER": "UI (API Tests)", + "INVARIANT": "Every test clears assistant in-memory state before execution." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "backend.src.api.routes.assistant" + } + ], + "children": [ + { + "name": "_run_async", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 27, + "end_line": 36, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Execute async endpoint handler in synchronous test context.", + "PRE": "coroutine is awaitable endpoint invocation.", + "POST": "Returns coroutine result or raises propagated exception." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_FakeTask", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 37, + "end_line": 47, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Lightweight task stub used by assistant API tests." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_FakeTaskManager", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 48, + "end_line": 71, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Minimal async-compatible TaskManager fixture for deterministic test flows." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_FakeConfigManager", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 72, + "end_line": 83, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Environment config fixture with dev/prod aliases for parser tests." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_admin_user", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 84, + "end_line": 94, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Build admin principal fixture.", + "PRE": "Test harness requires authenticated admin-like principal object.", + "POST": "Returns user stub with Admin role." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_limited_user", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 95, + "end_line": 105, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Build non-admin principal fixture.", + "PRE": "Test harness requires restricted principal for deny scenarios.", + "POST": "Returns user stub without admin privileges." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_FakeQuery", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 106, + "end_line": 137, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Minimal chainable query object for fake SQLAlchemy-like DB behavior in tests." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_FakeDb", + "type": "Class", + "tier": "TRIVIAL", + "start_line": 138, + "end_line": 187, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "In-memory fake database implementing subset of Session interface used by assistant routes." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "_clear_assistant_state", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 188, + "end_line": 200, + "tags": { + "TIER": "TRIVIAL", + "PURPOSE": "Reset in-memory assistant registries for isolation between tests.", + "PRE": "Assistant module globals may contain residues from previous test runs.", + "POST": "In-memory conversation/confirmation/audit dictionaries are empty." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "test_unknown_command_returns_needs_clarification", + "type": "Function", + "tier": "STANDARD", + "start_line": 201, + "end_line": 220, + "tags": { + "PURPOSE": "Unknown command should return clarification state and unknown intent.", + "PRE": "Fake dependencies provide admin user and deterministic task/config/db services.", + "POST": "Response state is needs_clarification and no execution side-effect occurs." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 201 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 201 + } + ], + "score": 0.8 + } + }, + { + "name": "test_capabilities_question_returns_successful_help", + "type": "Function", + "tier": "STANDARD", + "start_line": 223, + "end_line": 243, + "tags": { + "PURPOSE": "Capability query should return deterministic help response, not clarification.", + "PRE": "User sends natural-language \"what can you do\" style query.", + "POST": "Response is successful and includes capabilities summary." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 223 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 223 + } + ], + "score": 0.8 + } + }, + { + "name": "test_non_admin_command_returns_denied", + "type": "Function", + "tier": "STANDARD", + "start_line": 244, + "end_line": 264, + "tags": { + "PURPOSE": "Non-admin user must receive denied state for privileged command.", + "PRE": "Limited principal executes privileged git branch command.", + "POST": "Response state is denied and operation is not executed." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 244 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 244 + } + ], + "score": 0.8 + } + }, + { + "name": "test_migration_to_prod_requires_confirmation_and_can_be_confirmed", + "type": "Function", + "tier": "STANDARD", + "start_line": 265, + "end_line": 301, + "tags": { + "PURPOSE": "Migration to prod must require confirmation and then start task after explicit confirm.", + "PRE": "Admin principal submits dangerous migration command.", + "POST": "Confirmation endpoint transitions flow to started state with task id." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 265 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 265 + } + ], + "score": 0.8 + } + }, + { + "name": "test_status_query_returns_task_status", + "type": "Function", + "tier": "STANDARD", + "start_line": 302, + "end_line": 348, + "tags": { + "PURPOSE": "Task status command must surface current status text for existing task id.", + "PRE": "At least one task exists after confirmed operation.", + "POST": "Status query returns started/success and includes referenced task id." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 302 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 302 + } + ], + "score": 0.8 + } + }, + { + "name": "test_status_query_without_task_id_returns_latest_user_task", + "type": "Function", + "tier": "STANDARD", + "start_line": 349, + "end_line": 394, + "tags": { + "PURPOSE": "Status command without explicit task_id should resolve to latest task for current user.", + "PRE": "User has at least one created task in task manager history.", + "POST": "Response references latest task status without explicit task id in command." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 349 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 349 + } + ], + "score": 0.8 + } + }, + { + "name": "test_llm_validation_missing_dashboard_returns_needs_clarification", + "type": "Function", + "tier": "STANDARD", + "start_line": 395, + "end_line": 417, + "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." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 395 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 395 + } + ], + "score": 0.8 + } + }, + { + "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 (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 420 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 420 + } + ], + "score": 0.8 + } + }, + { + "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 (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 470 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 470 + } + ], + "score": 0.8 + } + }, + { + "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 (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 511 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 511 + } + ], + "score": 0.8 + } + }, + { + "name": "__init__", + "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": "__init__", + "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": "create_task", + "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": "get_task", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 61, + "end_line": 61, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "get_tasks", + "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": "get_environments", + "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": "__init__", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 110, + "end_line": 110, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "filter", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 113, + "end_line": 113, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "order_by", + "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": "first", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 119, + "end_line": 119, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "all", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 122, + "end_line": 122, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "count", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 125, + "end_line": 125, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "offset", + "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": "limit", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 132, + "end_line": 132, + "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": 142, + "end_line": 142, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "add", + "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": "merge", + "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": "query", + "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": "commit", + "type": "Function", + "tier": "TRIVIAL", + "start_line": 180, + "end_line": 180, + "tags": { + "PURPOSE": "Auto-detected function (orphan)", + "TIER": "TRIVIAL" + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "rollback", + "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 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "backend.src.models.config", "type": "Module", @@ -27832,6 +32572,93 @@ "score": 1.0 } }, + { + "name": "backend.src.models.assistant", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 74, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "assistant, audit, confirmation, chat", + "PURPOSE": "SQLAlchemy models for assistant audit trail and confirmation tokens.", + "LAYER": "Domain", + "INVARIANT": "Assistant records preserve immutable ids and creation timestamps." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "backend.src.models.mapping" + } + ], + "children": [ + { + "name": "AssistantAuditRecord", + "type": "Class", + "tier": "STANDARD", + "start_line": 16, + "end_line": 32, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Store audit decisions and outcomes produced by assistant command handling.", + "PRE": "user_id must identify the actor for every record.", + "POST": "Audit payload remains available for compliance and debugging." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "AssistantMessageRecord", + "type": "Class", + "tier": "STANDARD", + "start_line": 35, + "end_line": 53, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Persist chat history entries for assistant conversations.", + "PRE": "user_id, conversation_id, role and text must be present.", + "POST": "Message row can be queried in chronological order." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "AssistantConfirmationRecord", + "type": "Class", + "tier": "STANDARD", + "start_line": 56, + "end_line": 73, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Persist risky operation confirmation tokens with lifecycle state.", + "PRE": "intent/dispatch and expiry timestamp must be provided.", + "POST": "State transitions can be tracked and audited." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "backend.src.models.storage", "type": "Module", @@ -28570,6 +33397,211 @@ "score": 1.0 } }, + { + "name": "backend.src.services.llm_prompt_templates", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 180, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "llm, prompts, templates, settings", + "PURPOSE": "Provide default LLM prompt templates and normalization helpers for runtime usage.", + "LAYER": "Domain", + "INVARIANT": "All required prompt template keys are always present after normalization." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "backend.src.core.config_manager" + } + ], + "children": [ + { + "name": "DEFAULT_LLM_PROMPTS", + "type": "Constant", + "tier": "STANDARD", + "start_line": 15, + "end_line": 61, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Default prompt templates used by documentation, dashboard validation, and git commit generation." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "DEFAULT_LLM_PROVIDER_BINDINGS", + "type": "Constant", + "tier": "STANDARD", + "start_line": 64, + "end_line": 72, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Default provider binding per task domain." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "DEFAULT_LLM_ASSISTANT_SETTINGS", + "type": "Constant", + "tier": "STANDARD", + "start_line": 75, + "end_line": 82, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Default planner settings for assistant chat intent model/provider resolution." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, + { + "name": "normalize_llm_settings", + "type": "Function", + "tier": "STANDARD", + "start_line": 85, + "end_line": 126, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Ensure llm settings contain stable schema with prompts section and default templates.", + "PRE": "llm_settings is dictionary-like value or None.", + "POST": "Returned dict contains prompts with all required template keys." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 85 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 85 + } + ], + "score": 0.8 + } + }, + { + "name": "is_multimodal_model", + "type": "Function", + "tier": "STANDARD", + "start_line": 129, + "end_line": 148, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Heuristically determine whether model supports image input required for dashboard validation.", + "PRE": "model_name may be empty or mixed-case.", + "POST": "Returns True when model likely supports multimodal input." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 129 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 129 + } + ], + "score": 0.8 + } + }, + { + "name": "resolve_bound_provider_id", + "type": "Function", + "tier": "STANDARD", + "start_line": 151, + "end_line": 164, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Resolve provider id configured for a task binding with fallback to default provider.", + "PRE": "llm_settings is normalized or raw dict from config.", + "POST": "Returns configured provider id or fallback id/empty string when not defined." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 151 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 151 + } + ], + "score": 0.8 + } + }, + { + "name": "render_prompt", + "type": "Function", + "tier": "STANDARD", + "start_line": 167, + "end_line": 177, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Render prompt template using deterministic placeholder replacement with graceful fallback.", + "PRE": "template is a string and variables values are already stringifiable.", + "POST": "Returns rendered prompt text with known placeholders substituted." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 167 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 167 + } + ], + "score": 0.8 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "backend.src.services.llm_provider", "type": "Module", @@ -29644,6 +34676,273 @@ "score": 0.85 } }, + { + "name": "backend.src.services.__tests__.test_llm_prompt_templates", + "type": "Module", + "tier": "STANDARD", + "start_line": 1, + "end_line": 109, + "tags": { + "TIER": "STANDARD", + "SEMANTICS": "tests, llm, prompts, templates, settings", + "PURPOSE": "Validate normalization and rendering behavior for configurable LLM prompt templates.", + "LAYER": "Domain Tests", + "INVARIANT": "All required prompt keys remain available after normalization." + }, + "relations": [ + { + "type": "DEPENDS_ON", + "target": "backend.src.services.llm_prompt_templates" + } + ], + "children": [ + { + "name": "test_normalize_llm_settings_adds_default_prompts", + "type": "Function", + "tier": "STANDARD", + "start_line": 20, + "end_line": 38, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Ensure legacy/partial llm settings are expanded with all prompt defaults.", + "PRE": "Input llm settings do not contain complete prompts object.", + "POST": "Returned structure includes required prompt templates with fallback defaults." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 20 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 20 + } + ], + "score": 0.8 + } + }, + { + "name": "test_normalize_llm_settings_keeps_custom_prompt_values", + "type": "Function", + "tier": "STANDARD", + "start_line": 41, + "end_line": 53, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Ensure user-customized prompt values are preserved during normalization.", + "PRE": "Input llm settings contain custom prompt override.", + "POST": "Custom prompt value remains unchanged in normalized output." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 41 + } + ], + "score": 0.8 + } + }, + { + "name": "test_render_prompt_replaces_known_placeholders", + "type": "Function", + "tier": "STANDARD", + "start_line": 56, + "end_line": 68, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Ensure template placeholders are deterministically replaced.", + "PRE": "Template contains placeholders matching provided variables.", + "POST": "Rendered prompt string contains substituted values." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 56 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 56 + } + ], + "score": 0.8 + } + }, + { + "name": "test_is_multimodal_model_detects_known_vision_models", + "type": "Function", + "tier": "STANDARD", + "start_line": 71, + "end_line": 78, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Ensure multimodal model detection recognizes common vision-capable model names." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 71 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 71 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 71 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 71 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 71 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 71 + } + ], + "score": 0.26666666666666655 + } + }, + { + "name": "test_resolve_bound_provider_id_prefers_binding_then_default", + "type": "Function", + "tier": "STANDARD", + "start_line": 81, + "end_line": 91, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Verify provider binding resolution priority." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 81 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 81 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 81 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 81 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 81 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 81 + } + ], + "score": 0.26666666666666655 + } + }, + { + "name": "test_normalize_llm_settings_keeps_assistant_planner_settings", + "type": "Function", + "tier": "STANDARD", + "start_line": 94, + "end_line": 106, + "tags": { + "TIER": "STANDARD", + "PURPOSE": "Ensure assistant planner provider/model fields are preserved and normalized." + }, + "relations": [], + "children": [], + "compliance": { + "valid": true, + "issues": [ + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 94 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 94 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 94 + }, + { + "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 94 + }, + { + "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 94 + }, + { + "message": "Missing Belief State Logging: Function should use belief_scope (required for STANDARD tier)", + "severity": "WARNING", + "line_number": 94 + } + ], + "score": 0.26666666666666655 + } + } + ], + "compliance": { + "valid": true, + "issues": [], + "score": 1.0 + } + }, { "name": "backend.src.services.__tests__.test_resource_service", "type": "Module", @@ -32451,8 +37750,8 @@ "name": "DashboardValidationPlugin", "type": "Class", "tier": "STANDARD", - "start_line": 27, - "end_line": 229, + "start_line": 33, + "end_line": 248, "tags": { "PURPOSE": "Plugin for automated dashboard health analysis using LLMs." }, @@ -32467,8 +37766,8 @@ "name": "DashboardValidationPlugin.execute", "type": "Function", "tier": "STANDARD", - "start_line": 58, - "end_line": 228, + "start_line": 64, + "end_line": 247, "tags": { "PURPOSE": "Executes the dashboard validation task with TaskContext support.", "PARAM": "context (Optional[TaskContext]) - Task context for logging with source attribution.", @@ -32491,7 +37790,7 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 27 + "line_number": 33 } ], "score": 0.8 @@ -32501,8 +37800,8 @@ "name": "DocumentationPlugin", "type": "Class", "tier": "STANDARD", - "start_line": 231, - "end_line": 390, + "start_line": 250, + "end_line": 405, "tags": { "PURPOSE": "Plugin for automated dataset documentation using LLMs." }, @@ -32517,8 +37816,8 @@ "name": "DocumentationPlugin.execute", "type": "Function", "tier": "STANDARD", - "start_line": 262, - "end_line": 389, + "start_line": 281, + "end_line": 404, "tags": { "PURPOSE": "Executes the dataset documentation task with TaskContext support.", "PARAM": "context (Optional[TaskContext]) - Task context for logging with source attribution.", @@ -32541,7 +37840,7 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 231 + "line_number": 250 } ], "score": 0.8 @@ -32552,7 +37851,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 392, + "end_line": 407, "tags": { "PURPOSE": "Auto-generated module for backend/src/plugins/llm_analysis/plugin.py", "TIER": "TRIVIAL", @@ -32564,8 +37863,8 @@ "name": "id", "type": "Function", "tier": "TRIVIAL", - "start_line": 32, - "end_line": 32, + "start_line": 38, + "end_line": 38, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32582,8 +37881,8 @@ "name": "name", "type": "Function", "tier": "TRIVIAL", - "start_line": 36, - "end_line": 36, + "start_line": 42, + "end_line": 42, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32600,8 +37899,8 @@ "name": "description", "type": "Function", "tier": "TRIVIAL", - "start_line": 40, - "end_line": 40, + "start_line": 46, + "end_line": 46, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32618,8 +37917,8 @@ "name": "version", "type": "Function", "tier": "TRIVIAL", - "start_line": 44, - "end_line": 44, + "start_line": 50, + "end_line": 50, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32636,8 +37935,8 @@ "name": "get_schema", "type": "Function", "tier": "TRIVIAL", - "start_line": 47, - "end_line": 47, + "start_line": 53, + "end_line": 53, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32654,8 +37953,8 @@ "name": "execute", "type": "Function", "tier": "TRIVIAL", - "start_line": 65, - "end_line": 65, + "start_line": 71, + "end_line": 71, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32672,8 +37971,8 @@ "name": "id", "type": "Function", "tier": "TRIVIAL", - "start_line": 236, - "end_line": 236, + "start_line": 255, + "end_line": 255, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32690,8 +37989,8 @@ "name": "name", "type": "Function", "tier": "TRIVIAL", - "start_line": 240, - "end_line": 240, + "start_line": 259, + "end_line": 259, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32708,8 +38007,8 @@ "name": "description", "type": "Function", "tier": "TRIVIAL", - "start_line": 244, - "end_line": 244, + "start_line": 263, + "end_line": 263, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32726,8 +38025,8 @@ "name": "version", "type": "Function", "tier": "TRIVIAL", - "start_line": 248, - "end_line": 248, + "start_line": 267, + "end_line": 267, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32744,8 +38043,8 @@ "name": "get_schema", "type": "Function", "tier": "TRIVIAL", - "start_line": 251, - "end_line": 251, + "start_line": 270, + "end_line": 270, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32762,8 +38061,8 @@ "name": "execute", "type": "Function", "tier": "TRIVIAL", - "start_line": 269, - "end_line": 269, + "start_line": 288, + "end_line": 288, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32787,8 +38086,8 @@ "name": "ScreenshotService", "type": "Class", "tier": "STANDARD", - "start_line": 24, - "end_line": 414, + "start_line": 25, + "end_line": 415, "tags": { "PURPOSE": "Handles capturing screenshots of Superset dashboards." }, @@ -32798,8 +38097,8 @@ "name": "ScreenshotService.__init__", "type": "Function", "tier": "STANDARD", - "start_line": 27, - "end_line": 32, + "start_line": 28, + "end_line": 33, "tags": { "PURPOSE": "Initializes the ScreenshotService with environment configuration.", "PRE": "env is a valid Environment object." @@ -32812,12 +38111,12 @@ { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 27 + "line_number": 28 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 27 + "line_number": 28 } ], "score": 0.7333333333333334 @@ -32827,8 +38126,8 @@ "name": "ScreenshotService.capture_dashboard", "type": "Function", "tier": "STANDARD", - "start_line": 34, - "end_line": 413, + "start_line": 35, + "end_line": 414, "tags": { "PURPOSE": "Captures a full-page screenshot of a dashboard using Playwright and CDP.", "PRE": "dashboard_id is a valid string, output_path is a writable path.", @@ -32851,7 +38150,7 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 24 + "line_number": 25 } ], "score": 0.8 @@ -32861,8 +38160,8 @@ "name": "LLMClient", "type": "Class", "tier": "STANDARD", - "start_line": 416, - "end_line": 630, + "start_line": 417, + "end_line": 618, "tags": { "PURPOSE": "Wrapper for LLM provider APIs." }, @@ -32872,8 +38171,8 @@ "name": "LLMClient.__init__", "type": "Function", "tier": "STANDARD", - "start_line": 419, - "end_line": 437, + "start_line": 420, + "end_line": 438, "tags": { "PURPOSE": "Initializes the LLMClient with provider settings.", "PRE": "api_key, base_url, and default_model are non-empty strings." @@ -32886,12 +38185,12 @@ { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 419 + "line_number": 420 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 419 + "line_number": 420 } ], "score": 0.7333333333333334 @@ -32901,8 +38200,8 @@ "name": "LLMClient.get_json_completion", "type": "Function", "tier": "STANDARD", - "start_line": 439, - "end_line": 544, + "start_line": 440, + "end_line": 545, "tags": { "PURPOSE": "Helper to handle LLM calls with JSON mode and fallback parsing.", "PRE": "messages is a list of valid message dictionaries.", @@ -32921,8 +38220,8 @@ "name": "LLMClient.analyze_dashboard", "type": "Function", "tier": "STANDARD", - "start_line": 546, - "end_line": 629, + "start_line": 547, + "end_line": 617, "tags": { "PURPOSE": "Sends dashboard data (screenshot + logs) to LLM for health analysis.", "PRE": "screenshot_path exists, logs is a list of strings.", @@ -32944,7 +38243,7 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 416 + "line_number": 417 } ], "score": 0.8 @@ -32955,7 +38254,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 632, + "end_line": 620, "tags": { "PURPOSE": "Auto-generated module for backend/src/plugins/llm_analysis/service.py", "TIER": "TRIVIAL", @@ -32967,8 +38266,8 @@ "name": "__init__", "type": "Function", "tier": "TRIVIAL", - "start_line": 30, - "end_line": 30, + "start_line": 31, + "end_line": 31, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -32985,8 +38284,8 @@ "name": "capture_dashboard", "type": "Function", "tier": "TRIVIAL", - "start_line": 43, - "end_line": 43, + "start_line": 44, + "end_line": 44, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -33003,8 +38302,8 @@ "name": "switch_tabs", "type": "Function", "tier": "TRIVIAL", - "start_line": 253, - "end_line": 253, + "start_line": 254, + "end_line": 254, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -33021,8 +38320,8 @@ "name": "__init__", "type": "Function", "tier": "TRIVIAL", - "start_line": 422, - "end_line": 422, + "start_line": 423, + "end_line": 423, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -33039,8 +38338,8 @@ "name": "_should_retry", "type": "Function", "tier": "TRIVIAL", - "start_line": 444, - "end_line": 444, + "start_line": 445, + "end_line": 445, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -33057,8 +38356,8 @@ "name": "get_json_completion", "type": "Function", "tier": "TRIVIAL", - "start_line": 458, - "end_line": 458, + "start_line": 459, + "end_line": 459, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -33075,8 +38374,8 @@ "name": "analyze_dashboard", "type": "Function", "tier": "TRIVIAL", - "start_line": 551, - "end_line": 551, + "start_line": 552, + "end_line": 552, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" @@ -33521,8 +38820,8 @@ "name": "GitLLMExtension", "type": "Class", "tier": "STANDARD", - "start_line": 13, - "end_line": 64, + "start_line": 14, + "end_line": 62, "tags": { "PURPOSE": "Provides LLM capabilities to the Git plugin." }, @@ -33532,8 +38831,8 @@ "name": "suggest_commit_message", "type": "Function", "tier": "STANDARD", - "start_line": 19, - "end_line": 63, + "start_line": 20, + "end_line": 61, "tags": { "PURPOSE": "Generates a suggested commit message based on a diff and history.", "PARAM": "history (List[str]) - Recent commit messages for context.", @@ -33547,22 +38846,22 @@ { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 19 + "line_number": 20 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 19 + "line_number": 20 }, { "message": "Missing Mandatory Tag: @PRE (required for STANDARD tier)", "severity": "WARNING", - "line_number": 19 + "line_number": 20 }, { "message": "Missing Mandatory Tag: @POST (required for STANDARD tier)", "severity": "WARNING", - "line_number": 19 + "line_number": 20 } ], "score": 0.4666666666666666 @@ -33575,7 +38874,7 @@ { "message": "Missing Mandatory Tag: @TIER (required for STANDARD tier)", "severity": "WARNING", - "line_number": 13 + "line_number": 14 } ], "score": 0.8 @@ -33586,7 +38885,7 @@ "type": "Module", "tier": "TRIVIAL", "start_line": 1, - "end_line": 66, + "end_line": 64, "tags": { "PURPOSE": "Auto-generated module for backend/src/plugins/git/llm_extension.py", "TIER": "TRIVIAL", @@ -33598,8 +38897,8 @@ "name": "__init__", "type": "Function", "tier": "TRIVIAL", - "start_line": 16, - "end_line": 16, + "start_line": 17, + "end_line": 17, "tags": { "PURPOSE": "Auto-detected function (orphan)", "TIER": "TRIVIAL" diff --git a/specs/020-task-reports-design/tasks.md b/specs/020-task-reports-design/tasks.md index f710aba..846e503 100644 --- a/specs/020-task-reports-design/tasks.md +++ b/specs/020-task-reports-design/tasks.md @@ -127,6 +127,7 @@ - [x] T040 Remove deprecated tasks page route and redirect UI navigation entry points to reports (`frontend/src/routes/tasks/+page.svelte`, `frontend/src/lib/components/layout/TaskDrawer.svelte`, `frontend/src/components/Navbar.svelte`) - [x] T041 Fix reports list sorting/filtering for mixed offset-naive and offset-aware datetimes to prevent `GET /api/reports` 500 during active migration (`backend/src/services/reports/report_service.py`, `backend/src/api/routes/__tests__/test_reports_api.py`) - [x] T042 Add frontend submit-guard for dashboard migration/backup modal actions to prevent duplicate task creation on repeated clicks (`frontend/src/routes/dashboards/+page.svelte`) +- [x] T043 Update semantic map generator to ignore few-shot examples under `.ai/shots/` (`generate_semantic_map.py`) ---