Compare commits

...

1 Commits

Author SHA1 Message Date
891109e191 fix(#690): validate config files before deploy
Some checks failed
Validate Config / Python Test Suite (pull_request) Blocked by required conditions
Architecture Lint / Lint Repository (pull_request) Blocked by required conditions
Architecture Lint / Linter Tests (pull_request) Successful in 23s
PR Checklist / pr-checklist (pull_request) Failing after 2m24s
Smoke Test / smoke (pull_request) Failing after 24s
Validate Config / YAML Lint (pull_request) Failing after 15s
Validate Config / JSON Validate (pull_request) Successful in 11s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 1m29s
Validate Config / Shell Script Lint (pull_request) Failing after 52s
Validate Config / Cron Syntax Check (pull_request) Successful in 12s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 10s
Validate Config / Playbook Schema Validation (pull_request) Successful in 18s
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
2026-04-15 03:20:03 +00:00

View File

@@ -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/"