From 891109e1910b500f14c6daef6d19a9a4dcb34fb4 Mon Sep 17 00:00:00 2001 From: Alexander Whitestone Date: Wed, 15 Apr 2026 03:20:03 +0000 Subject: [PATCH] fix(#690): validate config files before deploy Wire config_validator.py into deploy.sh. Validation runs before copying config.yaml to ~/.hermes/. Deploy aborts with clear error if validation fails. Acceptance criteria: - Validates YAML syntax before writing - Rejects deploy on validation failure with clear error - Graceful skip if python3 not available --- deploy.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/deploy.sh b/deploy.sh index e0ecdf43..704a1648 100755 --- a/deploy.sh +++ b/deploy.sh @@ -30,6 +30,18 @@ mkdir -p "$TIMMY_HOME" cp "$SCRIPT_DIR/SOUL.md" "$TIMMY_HOME/SOUL.md" log "SOUL.md -> $TIMMY_HOME/" +# === Validate config before deploy === +if command -v python3 &>/dev/null; then + log "Validating config files..." + if ! python3 "$SCRIPT_DIR/scripts/config_validator.py"; then + echo "ERROR: Config validation failed. Fix errors before deploying." >&2 + exit 1 + fi + log "Config validation passed." +else + log "WARNING: python3 not found, skipping config validation" +fi + # === Deploy config === cp "$SCRIPT_DIR/config.yaml" "$HERMES_HOME/config.yaml" log "config.yaml -> $HERMES_HOME/"