Skip to main content
scripts/config_sync.py enforces NOVOSKY config authority.
  • Canonical writable files are in repo root only:
    • config.json
    • ml_config.json

Why this exists

Optimizer, weekly optimize, and onboarding all read and write runtime and ML config. Without a single authority, config drift causes train/live mismatch and unstable results. config_sync.py gives you one way to validate configs before automation runs.

Commands

Check drift (hard fail)

Use this in CI and pre-run checks.
python scripts/config_sync.py --check
Exit code behavior:
  • 0: root configs are valid
  • 1: drift or missing file detected

Validate canonical configs

python scripts/config_sync.py --sync
This validates canonical root config files and prints a sync status line.

Strict mode for runtime scripts

Set NOVOSKY_STRICT_CONFIG_SYNC=1 to force a hard check before scripts continue.
NOVOSKY_STRICT_CONFIG_SYNC=1 python scripts/weekly_optimize.py
NOVOSKY_STRICT_CONFIG_SYNC=1 python scripts/optimize_loop.py --iterations 1 --trials 50 --drop-threshold 0.0
NOVOSKY_STRICT_CONFIG_SYNC=1 python scripts/onboarding.py --balance 500
When strict mode is on:
  • If drift exists, the script stops with an error.
  • If no drift exists, the script proceeds.
Add this before any train/tune/deploy job:
python scripts/config_sync.py --check
Optional validation stage:
python scripts/config_sync.py --sync

Best practices

  • Edit only root configs.
  • Run --check before retrain, weekly optimize, and release.
  • Keep NOVOSKY_STRICT_CONFIG_SYNC=1 enabled in production automation.