Skip to content

[SSOT Phase 1] Foundation - Create SSOT Config Loaders #601

@mrveiss

Description

@mrveiss

Parent Issue

Part of #599 - Implement Single Source of Truth Configuration System

Phase 1: Foundation

Objective: Create new SSOT infrastructure without breaking existing code.

Tasks

  • Create src/config/ssot_config.py with Pydantic models
    • VMConfig, PortConfig, LLMConfig, TimeoutConfig, FeatureConfig
    • AutoBotConfig master class with computed URL properties
    • get_config() singleton accessor
  • Create autobot-vue/src/config/ssot-config.ts with TypeScript interfaces
    • Mirror Python config structure
    • Environment variable helpers (getEnv, getEnvNumber, getEnvBoolean)
    • Singleton config with computed URLs
  • Create scripts/sync-env.sh for environment synchronization
    • Map AUTOBOT_* variables to VITE_* for frontend
    • Auto-generate autobot-vue/.env from master .env
  • Update .env.example with new canonical SSOT structure
    • AUTOBOT_VM_* for all VM IPs
    • AUTOBOT_PORT_* for all service ports
    • AUTOBOT_LLM_* for LLM configuration
    • AUTOBOT_TIMEOUT_* for all timeouts
    • AUTOBOT_FEATURE_* for feature flags
  • Add validation tests for both loaders

Files to Create

/home/kali/Desktop/AutoBot/
├── src/config/ssot_config.py           # NEW
├── autobot-vue/src/config/ssot-config.ts  # NEW
├── scripts/sync-env.sh                 # NEW
└── .env.example                        # UPDATE

Acceptance Criteria

  • Python loader reads from .env and provides typed access
  • TypeScript loader reads from Vite env and provides typed access
  • sync-env.sh successfully generates frontend .env from master
  • Both loaders have fallback defaults for development
  • Existing code continues to work (backward compatibility)
  • Unit tests pass for both loaders

Reference

See architecture document: docs/architecture/SSOT_CONFIGURATION_ARCHITECTURE.md

  • Section 3.3: Python Loader Implementation
  • Section 3.4: TypeScript Loader Implementation
  • Section 3.5: Environment File Synchronization

Labels

  • refactoring
  • architecture

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions