diff --git a/qa/run.sh b/qa/run.sh index 98e2712..28b0858 100644 --- a/qa/run.sh +++ b/qa/run.sh @@ -39,6 +39,19 @@ stop_local() { # $1 = port rm -rf "$TMP-$1" } +# Syntax gate, every mode (2026-10-29): LinkSpin's /traffic-guide shipped with a parse error in its page script (a // comment +# inside a one-liner) and rendered empty for everyone for a day. node --check costs nothing and catches it before any walk. +syntax_gate() { + local bad=0 f + for f in *.js lib/*.js public/*.js public/assets/*.js; do + [ -f "$f" ] || continue + node --check "$f" 2>"$OUT/syntax.err" || { echo "[bug] SYNTAX $f :: $(grep -m1 -E 'Error' "$OUT/syntax.err")"; bad=1; } + done + rm -f "$OUT/syntax.err" + [ "$bad" = 0 ] && echo "syntax gate: every script parses" || status=1 +} +syntax_gate + if [ "$MODE" = "public" ]; then node qa/walk.mjs public || status=1 node qa/chatbot-sync.mjs || status=1