prune contracts
This commit is contained in:
@@ -217,6 +217,7 @@ tags:
|
|||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
TEST_CONTRACT:
|
TEST_CONTRACT:
|
||||||
type: string
|
type: string
|
||||||
|
multiline: true
|
||||||
description: "Тестовый контракт: Input -> Output"
|
description: "Тестовый контракт: Input -> Output"
|
||||||
contract_types:
|
contract_types:
|
||||||
- Function
|
- Function
|
||||||
@@ -224,6 +225,7 @@ tags:
|
|||||||
|
|
||||||
TEST_SCENARIO:
|
TEST_SCENARIO:
|
||||||
type: string
|
type: string
|
||||||
|
multiline: true
|
||||||
description: "Тестовый сценарий: Название -> Ожидание"
|
description: "Тестовый сценарий: Название -> Ожидание"
|
||||||
contract_types:
|
contract_types:
|
||||||
- Function
|
- Function
|
||||||
@@ -231,12 +233,14 @@ tags:
|
|||||||
|
|
||||||
TEST_FIXTURE:
|
TEST_FIXTURE:
|
||||||
type: string
|
type: string
|
||||||
|
multiline: true
|
||||||
description: "Тестовая фикстура: Название -> file:[path] | INLINE_JSON"
|
description: "Тестовая фикстура: Название -> file:[path] | INLINE_JSON"
|
||||||
contract_types:
|
contract_types:
|
||||||
- Block
|
- Block
|
||||||
|
|
||||||
TEST_EDGE:
|
TEST_EDGE:
|
||||||
type: string
|
type: string
|
||||||
|
multiline: true
|
||||||
description: "Граничный случай: Название -> Сбой"
|
description: "Граничный случай: Название -> Сбой"
|
||||||
contract_types:
|
contract_types:
|
||||||
- Function
|
- Function
|
||||||
@@ -244,6 +248,7 @@ tags:
|
|||||||
|
|
||||||
TEST_INVARIANT:
|
TEST_INVARIANT:
|
||||||
type: string
|
type: string
|
||||||
|
multiline: true
|
||||||
description: "Тестовый инвариант: Имя -> VERIFIED_BY: [scenarios]"
|
description: "Тестовый инвариант: Имя -> VERIFIED_BY: [scenarios]"
|
||||||
contract_types:
|
contract_types:
|
||||||
- Module
|
- Module
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"mcpServers":{"axiom-core":{"command":"/home/busya/dev/ast-mcp-core-server/.venv/bin/python","args":["-c","from src.server import main; main()"],"env":{"PYTHONPATH":"/home/busya/dev/ast-mcp-core-server"},"alwaysAllow":["read_grace_outline_tool","ast_search_tool","get_semantic_context_tool","build_task_context_tool","diff_contract_semantics_tool","simulate_patch_tool","patch_contract_tool","rename_contract_id_tool","move_contract_tool","extract_contract_tool","infer_missing_relations_tool","map_runtime_trace_to_contracts_tool","scaffold_contract_tests_tool","search_contracts_tool","reindex_workspace_tool","prune_contract_metadata_tool","workspace_semantic_health_tool","trace_tests_for_contract_tool","guarded_patch_contract_tool","impact_analysis_tool","wrap_node_in_contract_tool","rename_semantic_tag_tool","scan_vulnerabilities","find_contract_tool","safe_patch_tool","run_workspace_command_tool","rebuild_workspace_semantic_index_tool","audit_contracts_tool","update_contract_metadata_tool","rebuild_workspace_semantic_index"]},"chrome-devtools":{"command":"npx","args":["chrome-devtools-mcp@latest","--browser-url=http://127.0.0.1:9222"],"disabled":false,"alwaysAllow":["take_snapshot"]}}}
|
{"mcpServers":{"axiom-core":{"command":"/home/busya/dev/ast-mcp-core-server/.venv/bin/python","args":["-c","from src.server import main; main()"],"env":{"PYTHONPATH":"/home/busya/dev/ast-mcp-core-server"},"alwaysAllow":["read_grace_outline_tool","ast_search_tool","get_semantic_context_tool","build_task_context_tool","diff_contract_semantics_tool","simulate_patch_tool","patch_contract_tool","rename_contract_id_tool","move_contract_tool","extract_contract_tool","infer_missing_relations_tool","map_runtime_trace_to_contracts_tool","scaffold_contract_tests_tool","search_contracts_tool","reindex_workspace_tool","prune_contract_metadata_tool","workspace_semantic_health_tool","trace_tests_for_contract_tool","guarded_patch_contract_tool","impact_analysis_tool","wrap_node_in_contract_tool","rename_semantic_tag_tool","scan_vulnerabilities","find_contract_tool","safe_patch_tool","run_workspace_command_tool","rebuild_workspace_semantic_index_tool","audit_contracts_tool","update_contract_metadata_tool","rebuild_workspace_semantic_index","audit_belief_protocol_tool","patch_belief_protocol_tool"]},"chrome-devtools":{"command":"npx","args":["chrome-devtools-mcp@latest","--browser-url=http://127.0.0.1:9222"],"disabled":false,"alwaysAllow":["take_snapshot"]}}}
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
# [DEF:MigrationPackage:Module]
|
# [DEF:MigrationPackage:Module]
|
||||||
# @COMPLEXITY: 1
|
|
||||||
# @SEMANTICS: migration, package, exports
|
|
||||||
# @PURPOSE: Namespace package for migration pre-flight orchestration components.
|
|
||||||
# @LAYER: Core
|
|
||||||
|
|
||||||
from .dry_run_orchestrator import MigrationDryRunService
|
from .dry_run_orchestrator import MigrationDryRunService
|
||||||
from .archive_parser import MigrationArchiveParser
|
from .archive_parser import MigrationArchiveParser
|
||||||
|
|||||||
@@ -1,12 +1,4 @@
|
|||||||
# [DEF:TaskManagerPackage:Module]
|
# [DEF:TaskManagerPackage:Module]
|
||||||
# @COMPLEXITY: 1
|
|
||||||
# @SEMANTICS: task, manager, package, exports
|
|
||||||
# @PURPOSE: Exports the public API of the task manager package.
|
|
||||||
# @LAYER: Core
|
|
||||||
# @RELATION: DEPENDS_ON ->[TaskManagerModels]
|
|
||||||
# @RELATION: DEPENDS_ON ->[TaskManagerModule]
|
|
||||||
# @RELATION: DEPENDS_ON ->[TaskManager]
|
|
||||||
# @INVARIANT: Package exports stay aligned with manager and models contracts.
|
|
||||||
|
|
||||||
from .models import Task, TaskStatus, LogEntry
|
from .models import Task, TaskStatus, LogEntry
|
||||||
from .manager import TaskManager
|
from .manager import TaskManager
|
||||||
|
|||||||
@@ -19,9 +19,6 @@ from pydantic import BaseModel, Field
|
|||||||
|
|
||||||
|
|
||||||
# [DEF:TaskStatus:Enum]
|
# [DEF:TaskStatus:Enum]
|
||||||
# @COMPLEXITY: 1
|
|
||||||
# @SEMANTICS: task, status, state, enum
|
|
||||||
# @PURPOSE: Defines the possible states a task can be in during its lifecycle.
|
|
||||||
class TaskStatus(str, Enum):
|
class TaskStatus(str, Enum):
|
||||||
PENDING = "PENDING"
|
PENDING = "PENDING"
|
||||||
RUNNING = "RUNNING"
|
RUNNING = "RUNNING"
|
||||||
@@ -35,11 +32,6 @@ class TaskStatus(str, Enum):
|
|||||||
|
|
||||||
|
|
||||||
# [DEF:LogLevel:Enum]
|
# [DEF:LogLevel:Enum]
|
||||||
# @SEMANTICS: log, level, severity, enum
|
|
||||||
# @PURPOSE: Defines the possible log levels for task logging.
|
|
||||||
# @COMPLEXITY: 1
|
|
||||||
# @RELATION: [DEPENDS_ON] -> [LogEntry]
|
|
||||||
# @RELATION: [USED_BY] -> [TaskLogger]
|
|
||||||
class LogLevel(str, Enum):
|
class LogLevel(str, Enum):
|
||||||
DEBUG = "DEBUG"
|
DEBUG = "DEBUG"
|
||||||
INFO = "INFO"
|
INFO = "INFO"
|
||||||
@@ -51,20 +43,13 @@ class LogLevel(str, Enum):
|
|||||||
|
|
||||||
|
|
||||||
# [DEF:LogEntry:Class]
|
# [DEF:LogEntry:Class]
|
||||||
# @SEMANTICS: log, entry, record, pydantic
|
|
||||||
# @PURPOSE: A Pydantic model representing a single, structured log entry associated with a task.
|
# @PURPOSE: A Pydantic model representing a single, structured log entry associated with a task.
|
||||||
# @COMPLEXITY: 2
|
# @COMPLEXITY: 2
|
||||||
# @RELATION: [DEPENDS_ON] -> [LogLevel]
|
|
||||||
# @RELATION: [DEPENDS_ON] -> [Task]
|
|
||||||
# @INVARIANT: Each log entry has a unique timestamp and source.
|
|
||||||
#
|
#
|
||||||
# @TEST_CONTRACT: LogEntryModel ->
|
|
||||||
# {
|
# {
|
||||||
# required_fields: {message: str},
|
# required_fields: {message: str},
|
||||||
# optional_fields: {timestamp: datetime, level: str, source: str, context: dict, metadata: dict}
|
# optional_fields: {timestamp: datetime, level: str, source: str, context: dict, metadata: dict}
|
||||||
# }
|
# }
|
||||||
# @TEST_FIXTURE: valid_log_entry -> {"message": "Plugin initialized"}
|
|
||||||
# @TEST_EDGE: empty_message -> {"message": ""}
|
|
||||||
class LogEntry(BaseModel):
|
class LogEntry(BaseModel):
|
||||||
timestamp: datetime = Field(default_factory=datetime.utcnow)
|
timestamp: datetime = Field(default_factory=datetime.utcnow)
|
||||||
level: str = Field(default="INFO")
|
level: str = Field(default="INFO")
|
||||||
@@ -105,10 +90,6 @@ class TaskLog(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
# [DEF:LogFilter:Class]
|
# [DEF:LogFilter:Class]
|
||||||
# @SEMANTICS: log, filter, query, pydantic
|
|
||||||
# @PURPOSE: Filter parameters for querying task logs.
|
|
||||||
# @COMPLEXITY: 1
|
|
||||||
# @RELATION: [DEPENDS_ON] -> [TaskManager]
|
|
||||||
class LogFilter(BaseModel):
|
class LogFilter(BaseModel):
|
||||||
level: Optional[str] = None # Filter by log level
|
level: Optional[str] = None # Filter by log level
|
||||||
source: Optional[str] = None # Filter by source component
|
source: Optional[str] = None # Filter by source component
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
# [DEF:GitModels:Module]
|
# [DEF:GitModels:Module]
|
||||||
# @COMPLEXITY: 1
|
|
||||||
# @SEMANTICS: git, models, sqlalchemy, database, schema
|
|
||||||
# @PURPOSE: Git-specific SQLAlchemy models for configuration and repository tracking.
|
|
||||||
# @LAYER: Model
|
|
||||||
# @RELATION: specs/011-git-integration-dashboard/data-model.md
|
|
||||||
|
|
||||||
import enum
|
import enum
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
# [DEF:StorageModels:Module]
|
# [DEF:StorageModels:Module]
|
||||||
# @COMPLEXITY: 1
|
|
||||||
# @SEMANTICS: storage, file, model, pydantic
|
|
||||||
# @PURPOSE: Data models for the storage system.
|
|
||||||
# @LAYER: Domain
|
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
# [DEF:backend/src/plugins/llm_analysis/__init__.py:Module]
|
# [DEF:backend/src/plugins/llm_analysis/__init__.py:Module]
|
||||||
# @COMPLEXITY: 1
|
|
||||||
# @PURPOSE: Initialize the LLM Analysis plugin package.
|
|
||||||
# @LAYER: Domain
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
LLM Analysis Plugin for automated dashboard validation and dataset documentation.
|
LLM Analysis Plugin for automated dashboard validation and dataset documentation.
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
# [DEF:services:Module]
|
# [DEF:services:Module]
|
||||||
# @COMPLEXITY: 2
|
# @COMPLEXITY: 2
|
||||||
# @SEMANTICS: services, package, init
|
|
||||||
# @PURPOSE: Package initialization for services module
|
# @PURPOSE: Package initialization for services module
|
||||||
# @LAYER: Core
|
|
||||||
# @RELATION: EXPORTS -> resource_service, mapping_service
|
|
||||||
# @NOTE: Only export services that don't cause circular imports
|
# @NOTE: Only export services that don't cause circular imports
|
||||||
# @NOTE: GitService, AuthService, LLMProviderService have circular import issues - import directly when needed
|
# @NOTE: GitService, AuthService, LLMProviderService have circular import issues - import directly when needed
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
# [DEF:rbac_permission_catalog:Module]
|
# [DEF:rbac_permission_catalog:Module]
|
||||||
#
|
#
|
||||||
# @COMPLEXITY: 2
|
# @COMPLEXITY: 2
|
||||||
# @SEMANTICS: rbac, permissions, catalog, sync, discovery
|
|
||||||
# @PURPOSE: Discovers declared RBAC permissions from API routes/plugins and synchronizes them into auth database.
|
# @PURPOSE: Discovers declared RBAC permissions from API routes/plugins and synchronizes them into auth database.
|
||||||
# @LAYER: Service
|
|
||||||
# @RELATION: CALLS -> backend.src.core.plugin_loader.PluginLoader.get_all_plugin_configs
|
|
||||||
# @RELATION: DEPENDS_ON -> backend.src.models.auth.Permission
|
|
||||||
# @INVARIANT: Synchronization is idempotent for existing (resource, action) permission pairs.
|
|
||||||
|
|
||||||
# [SECTION: IMPORTS]
|
# [SECTION: IMPORTS]
|
||||||
import re
|
import re
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
# [DEF:type_profiles:Module]
|
# [DEF:type_profiles:Module]
|
||||||
# @COMPLEXITY: 2
|
# @COMPLEXITY: 2
|
||||||
# @SEMANTICS: reports, type_profiles, normalization, fallback
|
|
||||||
# @PURPOSE: Deterministic mapping of plugin/task identifiers to canonical report task types and fallback profile metadata.
|
# @PURPOSE: Deterministic mapping of plugin/task identifiers to canonical report task types and fallback profile metadata.
|
||||||
# @LAYER: Domain
|
|
||||||
# @RELATION: [DEPENDS_ON] ->[TaskType]
|
|
||||||
# @RELATION: [CONTAINS] ->[resolve_task_type]
|
|
||||||
# @RELATION: [CONTAINS] ->[get_type_profile]
|
|
||||||
# @INVARIANT: Unknown input always resolves to TaskType.UNKNOWN with a single fallback profile.
|
|
||||||
|
|
||||||
# [SECTION: IMPORTS]
|
# [SECTION: IMPORTS]
|
||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict, Optional
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
// [DEF:ReportTypeProfiles:Module]
|
// [DEF:ReportTypeProfiles:Module]
|
||||||
// @COMPLEXITY: 2
|
// @COMPLEXITY: 2
|
||||||
// @SEMANTICS: reports, ui, profiles, fallback, mapping
|
|
||||||
// @PURPOSE: Deterministic mapping from report task_type to visual profile with one fallback.
|
// @PURPOSE: Deterministic mapping from report task_type to visual profile with one fallback.
|
||||||
// @LAYER: UI
|
|
||||||
// @RELATION: DEPENDS_ON -> [i18n]
|
|
||||||
// @INVARIANT: Unknown type always resolves to fallback profile.
|
|
||||||
|
|
||||||
import { _ } from '$lib/i18n';
|
import { _ } from '$lib/i18n';
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// [DEF:ActivityTest:Module]
|
// [DEF:ActivityTest:Module]
|
||||||
// @COMPLEXITY: 3
|
// @COMPLEXITY: 3
|
||||||
// @PURPOSE: Unit tests for activity store
|
// @PURPOSE: Unit tests for activity store
|
||||||
// @LAYER: UI
|
|
||||||
// @RELATION: DEPENDS_ON -> [activity]
|
// @RELATION: DEPENDS_ON -> [activity]
|
||||||
// @RELATION: DEPENDS_ON -> [taskDrawer]
|
// @RELATION: DEPENDS_ON -> [taskDrawer]
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
// [DEF:assistantChat:Store]
|
// [DEF:assistantChat:Store]
|
||||||
// @COMPLEXITY: 3
|
// @COMPLEXITY: 3
|
||||||
// @SEMANTICS: assistant, store, ui-state, conversation
|
|
||||||
// @PURPOSE: Control assistant chat panel visibility and active conversation binding.
|
// @PURPOSE: Control assistant chat panel visibility and active conversation binding.
|
||||||
// @LAYER: UI
|
|
||||||
// @RELATION: BINDS_TO -> AssistantChatPanel
|
// @RELATION: BINDS_TO -> AssistantChatPanel
|
||||||
// @INVARIANT: conversationId persists while panel toggles unless explicitly reset.
|
|
||||||
//
|
//
|
||||||
// @UX_STATE: Closed -> Panel hidden.
|
|
||||||
// @UX_STATE: Open -> Panel visible and interactive.
|
|
||||||
|
|
||||||
import { writable } from 'svelte/store';
|
import { writable } from 'svelte/store';
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,8 @@
|
|||||||
// @RELATION: USES -> App
|
// @RELATION: USES -> App
|
||||||
// @COMPLEXITY: 3
|
// @COMPLEXITY: 3
|
||||||
// @PURPOSE: Manage Task Drawer visibility and resource-to-task mapping
|
// @PURPOSE: Manage Task Drawer visibility and resource-to-task mapping
|
||||||
// @LAYER: UI
|
|
||||||
// @INVARIANT: resourceTaskMap always reflects current task associations
|
|
||||||
//
|
//
|
||||||
// @UX_STATE: Closed -> Drawer hidden, no active task
|
|
||||||
// @UX_STATE: Open -> Drawer visible, logs streaming
|
|
||||||
// @UX_STATE: InputRequired -> Interactive form rendered in drawer
|
|
||||||
//
|
//
|
||||||
// @TEST_CONTRACT: TaskDrawerStore ->
|
|
||||||
// {
|
// {
|
||||||
// required_fields: {isOpen: boolean, activeTaskId: string|null, resourceTaskMap: Object},
|
// required_fields: {isOpen: boolean, activeTaskId: string|null, resourceTaskMap: Object},
|
||||||
// invariants: [
|
// invariants: [
|
||||||
@@ -19,8 +13,6 @@
|
|||||||
// "Maintains mapping in resourceTaskMap correctly via updateResourceTask"
|
// "Maintains mapping in resourceTaskMap correctly via updateResourceTask"
|
||||||
// ]
|
// ]
|
||||||
// }
|
// }
|
||||||
// @TEST_FIXTURE: valid_store_state -> {"isOpen": true, "activeTaskId": "test_1", "resourceTaskMap": {"res1": {"taskId": "test_1", "status": "RUNNING"}}}
|
|
||||||
// @TEST_INVARIANT: state_management -> verifies: [valid_store_state]
|
|
||||||
|
|
||||||
import { writable } from 'svelte/store';
|
import { writable } from 'svelte/store';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user