From 7a753da68b324423c8ce38891cc5bd0eb848c597 Mon Sep 17 00:00:00 2001 From: m3taversal Date: Mon, 20 Apr 2026 17:22:11 +0100 Subject: [PATCH] fix: auto-deploy.sh rsync excludes broken + add tests/ sync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Switch RSYNC_FLAGS string to RSYNC_OPTS bash array (same fix as deploy.sh in 368b579 — string passed literal quotes to rsync, matching nothing) - Add tests/ to rsync targets and syntax check glob for parity with deploy.sh - All 8 rsync calls now use "${RSYNC_OPTS[@]}" expansion Co-Authored-By: Claude Opus 4.6 (1M context) --- deploy/auto-deploy.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/deploy/auto-deploy.sh b/deploy/auto-deploy.sh index 0b0dac7..00352ca 100755 --- a/deploy/auto-deploy.sh +++ b/deploy/auto-deploy.sh @@ -51,7 +51,7 @@ fi # Syntax check all Python files before copying ERRORS=0 -for f in lib/*.py *.py diagnostics/*.py telegram/*.py; do +for f in lib/*.py *.py diagnostics/*.py telegram/*.py tests/*.py; do [ -f "$f" ] || continue if ! python3 -c "import ast, sys; ast.parse(open(sys.argv[1]).read())" "$f" 2>&1; then log "SYNTAX ERROR: $f" @@ -65,18 +65,19 @@ fi log "Syntax check passed" # Sync to working directories -RSYNC_FLAGS="-az --exclude='__pycache__' --exclude='*.pyc' --exclude='*.bak*'" +RSYNC_OPTS=(-az --exclude __pycache__ --exclude '*.pyc' --exclude '*.bak*') -rsync $RSYNC_FLAGS lib/ "$PIPELINE_DIR/lib/" +rsync "${RSYNC_OPTS[@]}" lib/ "$PIPELINE_DIR/lib/" for f in teleo-pipeline.py reweave.py fetch_coins.py; do - [ -f "$f" ] && rsync $RSYNC_FLAGS "$f" "$PIPELINE_DIR/$f" + [ -f "$f" ] && rsync "${RSYNC_OPTS[@]}" "$f" "$PIPELINE_DIR/$f" done -rsync $RSYNC_FLAGS telegram/ "$PIPELINE_DIR/telegram/" -rsync $RSYNC_FLAGS diagnostics/ "$DIAGNOSTICS_DIR/" -rsync $RSYNC_FLAGS agent-state/ "$AGENT_STATE_DIR/" -[ -f research/research-session.sh ] && rsync $RSYNC_FLAGS research/research-session.sh /opt/teleo-eval/research-session.sh +rsync "${RSYNC_OPTS[@]}" telegram/ "$PIPELINE_DIR/telegram/" +rsync "${RSYNC_OPTS[@]}" diagnostics/ "$DIAGNOSTICS_DIR/" +rsync "${RSYNC_OPTS[@]}" agent-state/ "$AGENT_STATE_DIR/" +rsync "${RSYNC_OPTS[@]}" tests/ "$PIPELINE_DIR/tests/" +[ -f research/research-session.sh ] && rsync "${RSYNC_OPTS[@]}" research/research-session.sh /opt/teleo-eval/research-session.sh # Safety net: ensure all .sh files are executable after rsync find /opt/teleo-eval -maxdepth 3 -name '*.sh' -not -perm -u+x -exec chmod +x {} +