prune contracts
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
# [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 .archive_parser import MigrationArchiveParser
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
# [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 .manager import TaskManager
|
||||
|
||||
@@ -19,9 +19,6 @@ from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
# [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):
|
||||
PENDING = "PENDING"
|
||||
RUNNING = "RUNNING"
|
||||
@@ -35,11 +32,6 @@ class TaskStatus(str, 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):
|
||||
DEBUG = "DEBUG"
|
||||
INFO = "INFO"
|
||||
@@ -51,20 +43,13 @@ class LogLevel(str, Enum):
|
||||
|
||||
|
||||
# [DEF:LogEntry:Class]
|
||||
# @SEMANTICS: log, entry, record, pydantic
|
||||
# @PURPOSE: A Pydantic model representing a single, structured log entry associated with a task.
|
||||
# @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},
|
||||
# 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):
|
||||
timestamp: datetime = Field(default_factory=datetime.utcnow)
|
||||
level: str = Field(default="INFO")
|
||||
@@ -105,10 +90,6 @@ class TaskLog(BaseModel):
|
||||
|
||||
|
||||
# [DEF:LogFilter:Class]
|
||||
# @SEMANTICS: log, filter, query, pydantic
|
||||
# @PURPOSE: Filter parameters for querying task logs.
|
||||
# @COMPLEXITY: 1
|
||||
# @RELATION: [DEPENDS_ON] -> [TaskManager]
|
||||
class LogFilter(BaseModel):
|
||||
level: Optional[str] = None # Filter by log level
|
||||
source: Optional[str] = None # Filter by source component
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
# [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
|
||||
from datetime import datetime
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
# [DEF:StorageModels:Module]
|
||||
# @COMPLEXITY: 1
|
||||
# @SEMANTICS: storage, file, model, pydantic
|
||||
# @PURPOSE: Data models for the storage system.
|
||||
# @LAYER: Domain
|
||||
|
||||
from datetime import datetime
|
||||
from enum import Enum
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
# [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.
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
# [DEF:services:Module]
|
||||
# @COMPLEXITY: 2
|
||||
# @SEMANTICS: services, package, init
|
||||
# @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: GitService, AuthService, LLMProviderService have circular import issues - import directly when needed
|
||||
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
# [DEF:rbac_permission_catalog:Module]
|
||||
#
|
||||
# @COMPLEXITY: 2
|
||||
# @SEMANTICS: rbac, permissions, catalog, sync, discovery
|
||||
# @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]
|
||||
import re
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
# [DEF:type_profiles:Module]
|
||||
# @COMPLEXITY: 2
|
||||
# @SEMANTICS: reports, type_profiles, normalization, fallback
|
||||
# @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]
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
Reference in New Issue
Block a user