refactor: migrate translate engine to GRACE-Poly v2.6 semantic protocol
- Convert all 84 contracts from legacy [DEF:] to #region/#endregion syntax - Fix complexity tiers: 14 modules re-tiered (6 C4 route modules, 7 C4→C5 plugin services) - Remove forbidden tags: @RATIONALE/@REJECTED stripped from C1–C4 contracts - Add required tags: @PRE/@POST/@SIDE_EFFECT on C4, @RELATION on C3, @DATA_CONTRACT/@INVARIANT on C5 - Add belief runtime markers (reason/reflect/explore) to 7 service.py functions - Fix @LAYER: route files → UI, plugins → Domain, superset_executor → Infra - Fix pre-existing test mock_service fixture in test_orchestrator.py - 196/196 translation tests pass, zero regressions
This commit is contained in:
@@ -1,19 +1,15 @@
|
||||
# [DEF:TranslatePlugin:Module]
|
||||
# @COMPLEXITY: 2
|
||||
# @SEMANTICS: plugin, translate, llm, sql, dashboard
|
||||
# @PURPOSE: TranslatePlugin skeleton for cross-dialect SQL and dashboard translation.
|
||||
# @LAYER: Domain
|
||||
# @RELATION: INHERITS -> [PluginBase]
|
||||
# @RATIONALE: Separate plugin avoids bloating LLMAnalysisPlugin beyond fractal limit (<400 lines).
|
||||
# @REJECTED: Extending LLMAnalysisPlugin would conflate two distinct feature domains.
|
||||
# #region TranslatePlugin [C:3] [TYPE Module] [SEMANTICS plugin,translate,llm,sql,dashboard]
|
||||
# @BRIEF TranslatePlugin skeleton for cross-dialect SQL and dashboard translation.
|
||||
# @LAYER Domain
|
||||
# @RELATION INHERITS -> [PluginBase]
|
||||
|
||||
from typing import Dict, Any, Optional
|
||||
from ...core.plugin_base import PluginBase
|
||||
|
||||
|
||||
# [DEF:TranslatePlugin:Class]
|
||||
# @PURPOSE: Plugin for translating SQL queries and dashboard definitions across database dialects.
|
||||
# @RELATION: IMPLEMENTS -> backend.src.core.plugin_base.PluginBase
|
||||
# #region TranslatePlugin [C:3] [TYPE Class] [SEMANTICS plugin,translate]
|
||||
# @BRIEF Plugin for translating SQL queries and dashboard definitions across database dialects.
|
||||
# @RELATION IMPLEMENTS -> [PluginBase]
|
||||
class TranslatePlugin(PluginBase):
|
||||
@property
|
||||
def id(self) -> str:
|
||||
@@ -57,6 +53,6 @@ class TranslatePlugin(PluginBase):
|
||||
async def execute(self, params: Dict[str, Any], context: Optional[Any] = None):
|
||||
"""Execute a translation job — implementation deferred to later phases."""
|
||||
raise NotImplementedError("TranslatePlugin.execute not yet implemented")
|
||||
# [/DEF:TranslatePlugin:Class]
|
||||
# #endregion TranslatePlugin
|
||||
|
||||
# [/DEF:TranslatePlugin:Module]
|
||||
# #endregion TranslatePlugin
|
||||
|
||||
Reference in New Issue
Block a user