#!/usr/bin/env bash # §12.12(schema 落地)之后的终版复验:不能让"之前绿过"当终版读数。 set -u cd "$(git rev-parse --show-toplevel)" || exit 1 SUM=/tmp/13-final.txt; : > "$SUM" say() { echo "$1" >> "$SUM"; } npm run build > /tmp/f3-build.log 2>&1; say "BUILD=$?" npm run test:all > /tmp/f3-testall.log 2>&1; say "TEST_ALL=$?" grep -E '^Tests:|^Test Suites:' /tmp/f3-testall.log | tail -2 >> "$SUM" grep -E '[0-9]+ (passed|failed)' /tmp/f3-testall.log | tail -1 >> "$SUM" (PORT=3100 node dist/standalone/server.js > /tmp/f3-srv.log 2>&1 & echo $! > /tmp/f3-srv.pid) sleep 10 BASE=http://localhost:3100 npm run check:axe:routes > /tmp/f3-axe-routes.log 2>&1; say "AXE_ROUTES=$?" BASE=http://localhost:3100 npm run check:axe > /tmp/f3-axe.log 2>&1; say "AXE=$?" grep -E 'PASSED =|bgMismatch|violationNodes|unexpectedStatus' /tmp/f3-axe.log | head -4 >> "$SUM" kill "$(cat /tmp/f3-srv.pid)" 2>/dev/null; sleep 3 (cd e2e && npx playwright test visual-regression.spec.ts --update-snapshots=none > /tmp/f3-vis.log 2>&1); say "VIS_READONLY=$?" (cd e2e && E2E_TARGET=production npx playwright test ga4-event-tracking.spec.ts --project=chromium --project=chromium-mobile --project=firefox --project=webkit > /tmp/f3-ga4.log 2>&1); say "GA4=$?" node scripts/visual-manifest.mjs /tmp/f3-vis.log docs/acceptance/2026-10-17-final/visual-manifest-post-schema.json; say "MANIFEST=$?" npm run lighthouse > /tmp/f3-lh.log 2>&1; say "LIGHTHOUSE=$?" say DONE