semantics

This commit is contained in:
2026-05-19 18:36:15 +03:00
parent 64feca2e46
commit b916ef94d5
79 changed files with 19791 additions and 11925 deletions

View File

@@ -1,12 +1,13 @@
# #region LLMAnalysisPlugin [C:3] [TYPE Module] [SEMANTICS llm, analysis, dashboard, validation, documentation]
# #region LLMAnalysisPlugin [C:5] [TYPE Module] [SEMANTICS llm, analysis, dashboard, validation, documentation]
# @BRIEF Implements DashboardValidationPlugin and DocumentationPlugin.
# @LAYER: Domain
# @LAYER: Plugin
# @RELATION INHERITS -> [PluginBase]
# @RELATION CALLS -> [ScreenshotService]
# @RELATION CALLS -> [LLMClient]
# @RELATION CALLS -> [LLMProviderService]
# @RELATION USES -> TaskContext
# @INVARIANT: All LLM interactions must be executed as asynchronous tasks.
# @DATA_CONTRACT: AnalysisRequest -> AnalysisResult
import json
import os

View File

@@ -1,10 +1,11 @@
# #region LLMAnalysisService [C:3] [TYPE Module] [SEMANTICS llm, screenshot, playwright, openai, tenacity]
# #region LLMAnalysisService [C:5] [TYPE Module] [SEMANTICS llm, screenshot, playwright, openai, tenacity]
# @BRIEF Services for LLM interaction and dashboard screenshots.
# @LAYER: Domain
# @LAYER: Plugin
# @RELATION DEPENDS_ON -> playwright
# @RELATION DEPENDS_ON -> openai
# @RELATION DEPENDS_ON -> tenacity
# @INVARIANT: Screenshots must be 1920px width and capture full page height.
# @DATA_CONTRACT: DashboardSpec -> Screenshot + Analysis
import asyncio
import base64

View File

@@ -215,4 +215,4 @@ class TestDictionaryEntryCRUD:
entries, total = DictionaryManager.list_entries(db_session, d.id)
assert total == 2
# endregion test_same_term_different_language_pair
# #endregion TestDictionaryCrud
# #endregion TestDictionaryCRUD

View File

@@ -1,7 +1,7 @@
# region InlineCorrectionTests [TYPE Module]
# @SEMANTICS: test, translate, correction, inline, bulk
# @PURPOSE: Tests for inline correction (T109-T116, T117): single correction, dictionary submission, bulk replace.
# @LAYER: Test
# @LAYER: Domain
# @RELATION: BINDS_TO -> [InlineCorrectionService:Module]
# @RELATION: BINDS_TO -> [BulkFindReplaceService:Module]
# @TEST_CONTRACT: InlineCorrectionService -> submit_correction, duplicate detection

View File

@@ -192,4 +192,4 @@ class TestTokenBudget:
# endregion test_no_target_languages_defaults_to_en
# endregion TestTokenBudget
# endregion TestTokenBudget
# #endregion TestTokenBudget