chore: remainder — backend test infra, agent config, docker, i18n, frontend ui

- Backend: alembic env, config manager/models, dependencies, translate plugin
- Backend tests: async_sync_regression, integration tests, git services, test_agent
- Docker: docker-compose.yml updates
- Agent: qa-tester.md update, semantics-testing SKILL.md update
- Frontend: TopNavbar, sidebarNavigation, FeaturesSettings, FeatureGate
- i18n: assistant.json en/ru locale updates
- New: frontend/src/lib/components/agent/ directory
This commit is contained in:
2026-06-10 15:06:36 +03:00
parent 2b303f92b3
commit 143f14d516
34 changed files with 5693 additions and 178 deletions

View File

@@ -146,25 +146,22 @@ class ConfigManager:
# @PURPOSE: Read FEATURES__* env vars and apply them to a GlobalSettings features config.
# @SIDE_EFFECT Reads os.environ; mutates settings.features in-place.
# @RATIONALE Env vars seed the initial defaults. After first bootstrap, DB is source of truth.
# @INVARIANT All FeaturesConfig fields can be overridden via FEATURES__<FIELD_NAME> env vars.
@staticmethod
def _apply_features_from_env(settings: GlobalSettings) -> None:
with belief_scope("ConfigManager._apply_features_from_env"):
dataset_review_env = os.getenv("FEATURES__DATASET_REVIEW")
if dataset_review_env is not None:
parsed = dataset_review_env.strip().lower() in ("true", "1", "yes")
settings.features.dataset_review = parsed
logger.reason(
"Applied FEATURES__DATASET_REVIEW from env",
extra={"value": parsed, "raw": dataset_review_env},
)
health_monitor_env = os.getenv("FEATURES__HEALTH_MONITOR")
if health_monitor_env is not None:
parsed = health_monitor_env.strip().lower() in ("true", "1", "yes")
settings.features.health_monitor = parsed
logger.reason(
"Applied FEATURES__HEALTH_MONITOR from env",
extra={"value": parsed, "raw": health_monitor_env},
)
# Dynamically apply FEATURES__* env vars to all FeaturesConfig fields
features_prefix = "FEATURES__"
for field_name in type(settings.features).model_fields:
env_key = f"{features_prefix}{field_name.upper()}"
env_value = os.getenv(env_key)
if env_value is not None:
parsed = env_value.strip().lower() in ("true", "1", "yes")
setattr(settings.features, field_name, parsed)
logger.reason(
f"Applied {env_key} from env",
extra={"value": parsed, "raw": env_value},
)
app_timezone_env = os.getenv("APP_TIMEZONE")
if app_timezone_env is not None:

View File

@@ -141,10 +141,34 @@ class CleanReleaseConfig(BaseModel):
# @BRIEF Top-level feature flags that toggle entire project features on/off.
# @RATIONALE Features are read from environment variables on bootstrap and persisted in DB.
# DB is source of truth after initial bootstrap; env vars only seed defaults.
# @INVARIANT Each feature flag controls visibility of plugin/service in UI and API access.
class FeaturesConfig(BaseModel):
# ── Core Features ────────────────────────────────────────
dataset_review: bool = True
health_monitor: bool = True
# ── Plugin Features ──────────────────────────────────────
# Translation subsystem
translate: bool = True # LLM Table Translation (main)
translate_scheduling: bool = True # Cron-based translation scheduling
translate_dictionaries: bool = True # Terminology dictionary management
# Dashboard migration & version control
migration: bool = True # Superset Dashboard Migration
git_integration: bool = True # Git Integration
# System tools
backup: bool = True # Superset Dashboard Backup
debug: bool = True # System Diagnostics
storage_manager: bool = True # Storage Manager
dataset_mapper: bool = True # Dataset Column Mapper
search_datasets: bool = True # Search Datasets
maintenance_banner: bool = True # Maintenance Banner
# LLM analysis tools
llm_dashboard_validation: bool = True # Dashboard LLM Validation
llm_documentation: bool = True # Dataset LLM Documentation
# #endregion FeaturesConfig